Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
[embedded bash] `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
eval "$(python3 .github/scripts/get_aws_session_tokens.py)"
set -x
likely benign
LLM, confidence 0.65
Evaluates the output of a repository script that exports AWS session credentials.
Reasoning
The eval runs the output of an in-repo script that fetches AWS session credentials from instance metadata and emits export statements. Eval of such output is a known but risky idiom. The source is in-tree, so it is most likely a legitimate credential setup step.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
mod = __import__(mod_name, fromlist=["__all__"])
except ImportError:
continue
likely benign
LLM, confidence 0.60
Sphinx conf.py imports modules by computed name to gather __all__ entries.
Reasoning
Dynamic __import__ over a module name list inside a try/except ImportError in a Sphinx docs config is a common pattern for importing submodules to collect __all__; the name source is not shown but context is benign documentation tooling.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
value = getattr(module, name)
globals()[name] = value
return value
-
reach-by-name through `vars.get` (ast pass, confidence 0.60)
for _name in _frame["resume_names"] if module in opened else ():
existing = vars(_import(module)).get(_name)
other = getattr(existing, "__precompile_artifact__", None)
if existing is not None and other != tag:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
src = "\n".join(lines)
code = compile(src, f"<quack-epilogue:{tag}>", "exec")
ns = {**ns, "unpack": unpack, "pack": pack, "__name__": "torch._vendor.quack.epilogue.library_generated"}
exec(code, ns)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {**ns, "unpack": unpack, "pack": pack, "__name__": "torch._vendor.quack.epilogue.library_generated"}
exec(code, ns)
return ns[fname]
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _obj in [globals()[name] for name in __all__]:
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
frames: list[tuple[str, int, str]] = []
frame = sys._getframe(1)
try:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
if [[ ${BUILD_ENVIRONMENT} == *onnx* ]]; then
-
command name is a variable (`$PYTHON`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
python_installation="$(dirname $(dirname $(cd /usr && $PYTHON -c 'import os; import caffe2; print(os.path.realpath(caffe2.__file__))')))"
caffe2_pypath="$python_installation/caffe2"
cpp_test_dir="$python_installation/torch/test"
-
command name is a variable (`$test`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
else
LD_LIBRARY_PATH="$ld_library_path" "$test"
fi
;;
-
command name is a variable (`$test`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
*/*_benchmark)
LD_LIBRARY_PATH="$ld_library_path" "$test" --benchmark_color=false
;;
*)
-
command name is a variable (`$test`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
LD_LIBRARY_PATH="$ld_library_path" \
"$test" --gtest_output=xml:"$gtest_reports_dir/$(basename $test).xml"
;;
-
command name is a variable (`$PYTHON`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"$PYTHON" \
-m pytest \
-x \
-
`eval` called on a string literal (ast pass, confidence 0.85)
function extract_version_from_image_name() {
eval export $2=$(echo "${image}" | perl -n -e"/$1(\d+(\.\d+)?(\.\d+)?t?)/ && print \$1")
if [ "x${!2}" = x ]; then
echo "variable '$2' not correctly parsed from image='$image'"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
SCRIPT_FOLDER="$( cd "$(dirname "$0")" ; pwd -P )"
source "${SCRIPT_FOLDER}/common_utils.sh"
pushd /tmp
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
clone_executorch() {
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
else
"$@"
fi
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
COMMIT=$(get_pinned_commit halide)
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
function install_huggingface() {
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
retry () {
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
"${PYTHON}" -m venv "${VENV_PATH}"
source "${VENV_PATH}/bin/activate"
python -mpip install --upgrade pip
-
pipeline feeds into `sh` — piped data is executed as shell code (ast pass, confidence 0.80)
curl --retry 3 --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --no-modify-path --profile minimal --default-toolchain "${RUST_VERSION}"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
get_pip_version() {
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
source $MY_DIR/build_utils.sh
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${PYTORCH_ROOT}/.ci/pytorch/common_utils.sh"
FLASH_ATTENTION_DIR="${PYTORCH_ROOT}/third_party/flash-attention"
FLASH_ATTENTION_HOPPER_DIR="${FLASH_ATTENTION_DIR}/hopper"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${PYTORCH_ROOT}/.ci/docker/common/install_cuda.sh"
[[ -z "$CUDA_INSTALLER_NAME" ]] && fatal "CUDA_INSTALLER_NAME must be set for aarch64 builds"
install_cuda "$CUDA_VERSION" "$CUDA_INSTALLER_NAME"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE:-/c/w/env}"
mkdir -p "$PYTORCH_FINAL_PACKAGE_DIR"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$ENV_FILE"
"$DESIRED_PYTHON_EXE" ../wheel/windows/build_install_deps.py --env-out "$ENV_FILE"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$ENV_FILE"
cd "$PYTORCH_ROOT"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE:-/c/w/env}"
export CUDA_VERSION="${DESIRED_CUDA/cu/}"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/rocm_utils.sh"
if command -v sccache >/dev/null; then
-
command name is a variable (`$1`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
g++ ${TEST_CODE_DIR}/$1.cpp -I${install_root}/include -I${install_root}/include/torch/csrc/api/include -std=gnu++20 -L${install_root}/lib ${REF_LIB} ${ADDITIONAL_LINKER_FLAGS} -ltorch $TORCH_CPU_LINK_FLAGS $TORCH_CUDA_LINK_FLAGS $C10_LINK_FLAGS -o $1
./$1
}
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
OUT="$(dirname "${BASH_SOURCE[0]}")/../../codegen_result"
else
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
set -ex -o pipefail
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
set +e
"$@"
retcode=$?
set -e
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
docker build -t pytorch .
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
echo "Testing pytorch docs"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/macos-build.sh"
fi
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/macos-test.sh"
fi
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/macos-common.sh"
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
sysctl -a | grep machdep.cpu
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/macos-common.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
echo "Testing pytorch"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$pt_checkout/.ci/pytorch/common_utils.sh"
echo "python_doc_push_script.sh: Invoked with $*"
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
`subprocess.check_output` called with `shell=True` and a literal command (ast pass, confidence 0.70)
try:
subprocess.check_output(
f"git clone --depth 1 {module['repo']}",
stderr=subprocess.STDOUT,
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
source "$(dirname "${BASH_SOURCE[0]}")/torch_trace.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/torch_trace.sh"
-
command name is a variable (`$SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${SUDO} ln -sf "$TORCH_LIB_DIR"/libc10* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libcaffe2* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libmkldnn* "$TEST_BASE_DIR"
-
command name is a variable (`$SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${SUDO} ln -sf "$TORCH_LIB_DIR"/libc10* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libcaffe2* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libmkldnn* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libnccl* "$TEST_BASE_DIR"
-
command name is a variable (`$SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${SUDO} ln -sf "$TORCH_LIB_DIR"/libcaffe2* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libmkldnn* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libnccl* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libtorch* "$TEST_BASE_DIR"
-
command name is a variable (`$SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${SUDO} ln -sf "$TORCH_LIB_DIR"/libmkldnn* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libnccl* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libtorch* "$TEST_BASE_DIR"
-
command name is a variable (`$SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${SUDO} ln -sf "$TORCH_LIB_DIR"/libnccl* "$TEST_BASE_DIR"
${SUDO} ln -sf "$TORCH_LIB_DIR"/libtorch* "$TEST_BASE_DIR"
ls "$TEST_BASE_DIR"
-
command name is a variable (`$xpu_case`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
echo "Testing ${case_name} ..."
"$xpu_case" --gtest_output=xml:"$TEST_REPORTS_DIR"/"$case_name".xml
fi
done
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
XLA_DIR=xla
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
clone_pytorch_xla
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
python -m build --wheel --no-isolation --outdir "base_dist"
python -mpip install base_dist/*.whl
-
command name is a variable (`$vec256_exec`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
do
$vec256_exec --gtest_output=xml:test/test-reports/vec256/"$vec256_exec".xml
done
popd
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
echo "Environment variables"
-
command name is a variable (`$MAYBE_SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
echo "Installing ABI Stable FA3 wheel"
$MAYBE_SUDO pip -q install einops ninja
$MAYBE_SUDO pip -q install flash-attn-3 --index-url https://download.pytorch.org/whl/cu130
-
command name is a variable (`$MAYBE_SUDO`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
$MAYBE_SUDO pip -q install einops ninja
$MAYBE_SUDO pip -q install flash-attn-3 --index-url https://download.pytorch.org/whl/cu130
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$SCRIPT_PARENT_DIR/common.sh"
run_tests() {
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$SCRIPT_PARENT_DIR/common.sh"
source "$SCRIPT_PARENT_DIR/common-build.sh"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$SCRIPT_PARENT_DIR/common-build.sh"
export FLASH_ATTENTION_MAX_JOBS="${FLASH_ATTENTION_MAX_JOBS:-4}"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$SCRIPT_PARENT_DIR/common.sh"
export TMP_DIR="${PWD}/build/win_tmp"
-
command name is a variable (`$path`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
if [[ -x "$path" ]]; then
"$path" || echo "true";
break
fi
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source ${SOURCE_DIR}/set_desired_python.sh
source "$(dirname "$(dirname "${SOURCE_DIR}")")/pytorch/rocm_utils.sh"
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
LD_LIBRARY_PATH=/usr/local/nvidia/lib64 \
"${PYTORCH_ROOT}/.ci/pytorch/run_tests.sh" manywheel "${py_majmin}" "$DESIRED_CUDA"
popd
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
fi
source ${SOURCE_DIR}/${BUILD_SCRIPT}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${VENV_DIR}/bin/activate"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$ENV_FILE"
python3 "${SCRIPTPATH}/build_install_deps.py" "${PYTORCH_ROOT}"
-
command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_populate_env.sh"
source "${BINARY_ENV_FILE}"
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
-
pipeline feeds into `sh` — piped data is executed as shell code (ast pass, confidence 0.80)
local installer="https://raw.githubusercontent.com/grafana/gcx/v${GCX_VERSION}/scripts/install.sh"
if ! curl -fsSL "${installer}" | INSTALL_DIR="${tmp}" VERSION="${GCX_VERSION}" sh >/dev/null; then
rm -rf "${tmp}"
echo "error: failed to install gcx ${GCX_VERSION}" >&2
-
U+200B ZERO WIDTH SPACE in source (raw pass, confidence 0.75)
---
name: "D❌⟨U+200B⟩\U0001F519⟨U+200B⟩ ISABLE AUTOREVERT"
about: Disables autorevert when open
title: "[DISABLE AUTOREVERT]"
-
U+200B ZERO WIDTH SPACE in source (raw pass, confidence 0.75)
---
name: "D❌⟨U+200B⟩\U0001F519⟨U+200B⟩ ISABLE AUTOREVERT"
about: Disables autorevert when open
title: "[DISABLE AUTOREVERT]"
-
[embedded bash] command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
echo "${GITHUB_WORKSPACE}"
-
[embedded bash] command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
echo "${GITHUB_WORKSPACE}"
-
[embedded bash] command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
echo "${GITHUB_WORKSPACE}"
-
[embedded bash] command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
echo "${GITHUB_WORKSPACE}"
-
[embedded bash] command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
echo "${GITHUB_WORKSPACE}"
-
[embedded bash] command name is a variable (`$CONDA`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${CONDA} create -y -n py_tmp python=${PYTHON_VERSION} intel-openmp libuv "openssl=3.5.6"
PYTHON3=$(${CONDA_RUN} -n py_tmp which python3)
-
[embedded bash] command name is a variable (`$CONDA_RUN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
PYTHON3=$(${CONDA_RUN} -n py_tmp which python3)
EXIT_CODE=$?
-
[embedded bash] command name is a variable (`$CONDA_RUN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
PYTHON=$(${CONDA_RUN} -n py_tmp which python)
EXIT_CODE=$?
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
set +e
"$@" 2>&1 | tee "${log}"
rc="${PIPESTATUS[0]}"
set -e
-
command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${PYTHON_EXECUTABLE} -mwheel unpack $wheel
mv "${package}-${f_version}" "${package}-${t_version}"
-
command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${PYTHON_EXECUTABLE} -mwheel pack "${package}-${t_version}"
-
command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${PYTHON_EXECUTABLE} -mpip install wheel==0.45.1
pushd externals/vllm/wheels
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
else
"$@" 9>"$done" || status=$?
fi
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
bash .ci/pytorch/binary_linux_test.sh
source "${BINARY_ENV_FILE}"
bash -x /run.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$venv_dir/bin/activate"
pip install "${RUNNER_TEMP}/artifacts"/*.whl numpy -v
python .ci/pytorch/smoke_test/smoke_test.py --package torchonly
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
bash .ci/pytorch/binary_linux_test.sh
source "${BINARY_ENV_FILE}"
bash -x /run.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
bash .ci/pytorch/binary_linux_test.sh
source "${BINARY_ENV_FILE}"
bash -x /run.sh
-
[embedded bash] command name is a variable (`$DOCS_TYPE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
pip install $(echo dist/*.whl)[opt-einsum]
./.ci/pytorch/${DOCS_TYPE}_doc_push_script.sh
-
[embedded bash] command name is a variable (`$VENV_PATH`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"$VENV_PATH/bin/python3" -m pip install psutil==5.9.8 dataclasses_json==0.6.7
"$VENV_PATH/bin/python3" -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
-
[embedded bash] command name is a variable (`$VENV_PATH`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"$VENV_PATH/bin/python3" -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
-
[embedded bash] command name is a variable (`$tool`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
which $tool
$tool --version
done
-
[embedded bash] command name is a variable (`$CONDA_RUN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${CONDA_RUN} python -m pip install psutil==5.9.8 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
${CONDA_RUN} python -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
-
[embedded bash] command name is a variable (`$CONDA_RUN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
${CONDA_RUN} python -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
mkdir -p "${RUNNER_TEMP}/artifacts/"
"${PYTHON_EXECUTABLE}" -m pip download \
--pre torch torchvision torchaudio \
--index-url "https://download.pytorch.org/whl/nightly/${BUILD_DEVICE}" \
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTHON_EXECUTABLE}" -m pip install --no-index \
--find-links "${RUNNER_TEMP}/artifacts" \
"${RUNNER_TEMP}"/artifacts/torch-*.whl \
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${RUNNER_TEMP}"/artifacts/torchaudio-*.whl
"${PYTHON_EXECUTABLE}" use_existing_torch.py
"${PYTHON_EXECUTABLE}" -m pip install -r requirements/build/cuda.txt
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTHON_EXECUTABLE}" use_existing_torch.py
"${PYTHON_EXECUTABLE}" -m pip install -r requirements/build/cuda.txt
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTHON_EXECUTABLE}" setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
if command -v sccache >/dev/null; then
sccache --show-stats || true
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_populate_env.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_windows_build.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_populate_env.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_windows_test.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_populate_env.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_windows_build.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_populate_env.sh"
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/pytorch/binary_windows_test.sh"
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$@`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
"$@" || (sleep 10 && "$@") || (sleep 20 && "$@") || (sleep 40 && "$@")
}
-
command name is a variable (`$PYTORCH_DIR`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
ANDROID_BUILD_ROOT="$BUILD_ROOT/build_android_$abi"
ANDROID_ABI="$abi" \
BUILD_ROOT="$ANDROID_BUILD_ROOT" \
"$PYTORCH_DIR/scripts/build_android.sh" \
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$PYTORCH_ANDROID_DIR/common.sh"
check_android_sdk
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
}
DynamicLibrary::DynamicLibrary(const char* name, const char* alt_name, bool leak_handle_): leak_handle(leak_handle_), handle(dlopen(name, RTLD_LOCAL | RTLD_NOW)) {
if (!handle) {
if (alt_name) {
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
if (alt_name) {
handle = dlopen(alt_name, RTLD_LOCAL | RTLD_NOW);
if (!handle) {
TORCH_CHECK_WITH(DynamicLibraryError, false, "Error in dlopen for library ", name, "and ", alt_name);
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
AT_ASSERT(handle);
return checkDL(dlsym(handle, name));
}
-
two identifiers collapse to visual skeleton `s|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
for (const auto i : c10::irange(dim)) {
auto sl = TORCH_GUARD_OR_TRUE(left.sym_size(i).sym_ne(1));
auto sr = TORCH_GUARD_OR_TRUE(right.sym_size(i).sym_ne(1));
if (sum_dims[i]) {
-
two identifiers collapse to visual skeleton `to` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
}
auto t0 = self.narrow(dim, start, size - start);
auto t1 = self.narrow(dim, 0, start);
return at::cat({std::move(t0), std::move(t1)}, dim);
-
two identifiers collapse to visual skeleton `co|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
constexpr int row = i / COLS;
constexpr int col = i % COLS;
if constexpr (col == 0) {
-
line length 5248 characters (raw pass, confidence 0.65)
cnt: 1, (([T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192], f16), T([1024, 192],
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for operator in sorted_operators:
if skip_non_compute_operators and non_compute_operator(eval(operator)):
continue
f.write(f"Operator: {operator}\n")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
inps = inps.replace(f"'{key}'", key)
return eval(inps.strip().strip("'").strip('"'), global_vals)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
line = lines[i]
cnt = eval(line[len("cnt: ") : line.find(",")])
inps = line[line.find(",") + 2 :].strip("'")
op_inps[inps] += cnt
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
op = eval(key)
except AttributeError:
log.warning("Evaluating an op name into an OpOverload", exc_info=True)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
else:
ops = [eval(op)]
max_samples = max_samples + start_idx
-
`subprocess.check_call` called with `shell=True` and a literal command (ast pass, confidence 0.70)
subprocess.check_call(
f'echo "{day},performance,{dtype},{target_dir}" >> {self.lookup_file}',
shell=True,
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
try:
os.system(f"bash {generated_file}")
except Exception as e:
print(
-
reach-by-name through `locals` (ast pass, confidence 0.60)
if task in locals():
return locals()[task]
elif task == "jacobian":
raise RuntimeError(
-
reach-by-name through `globals` (ast pass, confidence 0.60)
else:
operators = [globals()[k] for k in operators.split(",")]
if shapes is None:
shapes = SHAPES
-
reach-by-name through `globals` (ast pass, confidence 0.60)
else:
shapes = [globals()[k] for k in shapes.split(",")]
print("fuser,device,operator,shape,time")
-
reach-by-name through `globals` (ast pass, confidence 0.60)
TensorClass = globals()[args.tensor_class]
NUM_REPEATS = args.nreps
-
reach-by-name through `globals` (ast pass, confidence 0.60)
continue
test_func = globals()["test_" + op]
meta = dict(
bsr_scatter_mm6=dict(
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
void* nvml_dlopen(const char* name) {
return dlopen(name, RTLD_LAZY);
}
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
void* nvml_dlsym(void* handle, const char* name) {
return dlsym(handle, name);
}
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
#ifndef _WIN32
return dlsym(
RTLD_DEFAULT,
std::string(kWaitCounterDynamicBackendInitFn).c_str());
-
base64-like blob (65 bytes, compression ratio 1.17) (raw pass, confidence 0.60)
_ZN2at6detail22check_size_nonnegativeEN3c108ArrayRefIlEE
_ZN2at6detail30computeStorageNbytesContiguousEN3c108ArrayRefIlEEmm
_ZN2at6detail9empty_cpuEN3c108ArrayRefIlEENS1_10ScalarTypeEbSt8optionalINS1_12MemoryFormatEE
_ZN2at8internal23OpaqueOptionalTensorRefC2Ev
-
base64-like blob (78 bytes, compression ratio 1.05) (raw pass, confidence 0.60)
_ZN3c104impl25InlineOptionalDeviceGuardINS_4cuda4impl13CUDAGuardImplEE12reset_deviceIS4_vEEvNS_6DeviceE
_ZN5torch8autograd22DifferentiableViewMetaC2EPN3c1010TensorImplESt8optionalINS0_8ViewInfoEES7_bNS0_12CreationMetaE
_ZN5torch8autograd22DifferentiableViewMetaD0Ev
-
base64-like blob (107 bytes, compression ratio 0.93) (raw pass, confidence 0.60)
_Z171__device_stub__Z40fmha_cutlassF_f16_aligned_64x128_rf_sm80N22PyTorchMemEffAttention15AttentionKernelIN7cutlass6half_tENS1_4arch4Sm80ELb1ELi64ELi128ELi128ELb1ELb1EE6ParamsERN22PyTorchMemEffAttention15AttentionKernelIN7cutlass6half_tENS1_4arch4Sm80ELb1ELi64ELi128ELi128ELb1ELb1EE6ParamsE
-
base64-like blob (74 bytes, compression ratio 1.15) (raw pass, confidence 0.60)
_ZN2at12_GLOBAL__N_122wrapper_CPU_sub_TensorERKNS_6TensorES3_RKN3c106ScalarE
_ZN5torch8autograd12VariableType6unpackERKN3c108IListRefIN2at6TensorEEEPKci
_ZN5torch8autogradL15THPVariable_bmmEP7_objectS2_S2_
_ZN5torch8autogradL16THPVariable_tanhEP7_objectS2_S2_
-
[markup prose] `eval` called on a string literal (ast pass, confidence 0.85)
eval modes.
-
[markup prose] `eval` called on a string literal (ast pass, confidence 0.85)
eval 2*s0 >= 16 [guard added] at script.py:5 in fn (_dynamo/variables/tensor.py:812 in evaluate_expr)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
frame = inspect.currentframe()
if frame is None:
raise RuntimeError("Unable to get current frame")
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
frame = inspect.currentframe()
if frame is None:
raise RuntimeError("Unable to get current frame")
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace: dict = {}
exec(custom_rearrange_callable_code, globals(), namespace)
return namespace[custom_rearrange_callable_name]
-
`IFS` set to `:` — non-standard separator enables word-splitting obfuscation (ast pass, confidence 0.80)
while IFS=: read -r filepath url; do
(
code=$(curl -k -gsLm30 --retry 3 --retry-delay 3 --retry-connrefused -o /dev/null -w "%{http_code}" -I "$url") || code=000
-
`IFS` set to `:` — non-standard separator enables word-splitting obfuscation (ast pass, confidence 0.80)
while IFS=: read -r filepath link; do
if [ "$filepath" != "$last_filepath" ]; then
printf '\n%s:\n' "$filepath"
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
os.system("clear")
view = textwrap.dedent(
f"""\
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
num = 0
with subprocess.Popen(
f"python -m torch.backends.xeon.run_cpu --ninstances 4 --use-default-allocator \
--disable-iomp --disable-numactl --disable-taskset --log-path {self._test_dir} --no-python pwd",
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
num = 0
with subprocess.Popen(
f"python -m torch.backends.xeon.run_cpu --ninstances 3 --ncores-per-instance 5 5 6 --use-default-allocator \
--disable-iomp --disable-numactl --disable-taskset --log-path {self._test_dir} --no-python pwd",
-
string literal contains an embedded NUL followed by 2 more bytes of source (token pass, confidence 0.85)
bad_data << "PK\x03\x04PTMF\x00\x00"
<< "*}NV\xb3\xfa\xdf\x00pa";
-
string literal contains an embedded NUL followed by 2 more bytes of source (token pass, confidence 0.85)
bad_data << "PK\x03\x04PTMF\x00\x00"
<< "*}NV\xb3\xfa\xdf\x00pa";
-
reach-by-name through `globals.get` (ast pass, confidence 0.60)
for name in globals()
if not name.startswith("_") and callable(globals().get(name))
]
ops_namespace = getattr(torch.ops, _NAMESPACE)
-
reach-by-name through `globals.get` (ast pass, confidence 0.60)
for name in globals()
if not name.startswith("_") and callable(globals().get(name))
]
ops_namespace = getattr(torch.ops, _NAMESPACE)
-
reach-by-name through `globals.get` (ast pass, confidence 0.60)
for name in globals()
if not name.startswith("_") and callable(globals().get(name))
]
ops_namespace = getattr(torch.ops, _NAMESPACE)
-
reach-by-name through `globals.get` (ast pass, confidence 0.60)
for name in globals()
if not name.startswith("_") and callable(globals().get(name))
]
ops_namespace = getattr(torch.ops, _NAMESPACE)
-
reach-by-name through `globals.get` (ast pass, confidence 0.60)
for name in globals()
if not name.startswith("_") and callable(globals().get(name))
]
ops_namespace = getattr(torch.ops, _NAMESPACE)
-
concatenated bytes literal contains 516 `\xNN` escapes (75% of content) — binary payload shape (ast pass, confidence 0.85)
data_legacy_numpy = (
b"PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x10\x00\x12\x00archive/data.pklFB\x0e\x00ZZZZZZZZZZZZZZ\x80\x02}q\x00X\x01"
-
file imports decoder module(s) marshal, pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
self.assertEqual(repr(True), 'True')
self.assertIs(eval(repr(False)), False)
self.assertIs(eval(repr(True)), True)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(repr(True), 'True')
self.assertIs(eval(repr(False)), False)
self.assertIs(eval(repr(True)), True)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertIs(eval(repr(False)), False)
self.assertIs(eval(repr(True)), True)
def test_str(self):
-
`marshal.loads` deserializes Python bytecode from bytes — code-object sink (ast pass, confidence 0.75)
import marshal
self.assertIs(marshal.loads(marshal.dumps(True)), True)
self.assertIs(marshal.loads(marshal.dumps(False)), False)
-
`marshal.loads` deserializes Python bytecode from bytes — code-object sink (ast pass, confidence 0.75)
self.assertIs(marshal.loads(marshal.dumps(True)), True)
self.assertIs(marshal.loads(marshal.dumps(False)), False)
def test_pickle(self):
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
def test_compile(self):
compile('print(1)\n', '', 'exec')
bom = b'\xef\xbb\xbf'
compile(bom + b'print(1)\n', '', 'exec')
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compile('pass', '?', dont_inherit=True, mode='exec')
compile(memoryview(b"text"), "name", "exec")
self.assertRaises(TypeError, compile)
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
codeobjs = []
codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval))
tree = ast.parse(codestr)
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
tree = ast.parse(codestr)
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
for code in codeobjs:
ns = {}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {}
exec(code, ns)
rv = ns['f']()
self.assertEqual(rv, tuple(expected))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
source = dedent(code_sample)
co = compile(source,
'?',
mode,
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
SyntaxError, msg=f"source={source} mode={mode}"):
compile(source, '?', mode)
co = compile(source,
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
co = compile(source,
'?',
mode,
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
globals_ = {'asyncio': asyncio, 'a': 0, 'arange': arange}
asyncio.run(eval(co, globals_))
self.assertEqual(globals_['a'], 1)
finally:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
SyntaxError, msg=f"source={source} mode={mode}"):
compile(source, '?', mode)
with self.assertRaises(
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
SyntaxError, msg=f"source={source} mode={mode}"):
co = compile(source,
'?',
mode,
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
co = compile(code, '?', 'exec', flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT)
glob = {}
exec(co, glob)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
glob = {}
exec(co, glob)
self.assertEqual(type(glob['ticker']()), AsyncGeneratorType)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
args = ("a*(1+2)", "f.py", "exec")
raw = compile(*args, flags = ast.PyCF_ONLY_AST).body[0]
opt1 = compile(*args, flags = ast.PyCF_OPTIMIZED_AST).body[0]
opt2 = compile(ast.parse(args[0]), *args[1:], flags = ast.PyCF_OPTIMIZED_AST).body[0]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
raw = compile(*args, flags = ast.PyCF_ONLY_AST).body[0]
opt1 = compile(*args, flags = ast.PyCF_OPTIMIZED_AST).body[0]
opt2 = compile(ast.parse(args[0]), *args[1:], flags = ast.PyCF_OPTIMIZED_AST).body[0]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
opt1 = compile(*args, flags = ast.PyCF_OPTIMIZED_AST).body[0]
opt2 = compile(ast.parse(args[0]), *args[1:], flags = ast.PyCF_OPTIMIZED_AST).body[0]
for tree in (raw, opt1, opt2):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
def __getitem__(self, key):
return eval(self._cells[key], globals(), self)
ss = SpreadSheet()
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(code, {'__builtins__': frozen_builtins})
self.assertRaisesRegex(NameError, "__build_class__ not found",
exec, code, {'__builtins__': frozendict()})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(code, {'__builtins__': customdict({'superglobal': 1})})
self.assertRaisesRegex(NameError, "name 'superglobal' is not defined",
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
ns = {'__builtins__': types.MappingProxyType({'superglobal': 1})}
self.assertEqual(eval(code, ns), 1)
ns = {'__builtins__': types.MappingProxyType({})}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {'__builtins__': types.MappingProxyType({'__import__': lambda *args: args})}
exec(code, ns)
self.assertEqual(ns['foo'], ('foo.bar', ns, ns, None, 0))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
ns = {'__builtins__': types.MappingProxyType({'iter': iter}), 'x': iter([1, 2])}
self.assertEqual(eval(code, ns), (iter, ([1, 2],), 0))
@torch._dynamo.error_on_graph_break(False)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
result = 0
exec(three_freevars.__code__,
three_freevars.__globals__,
closure=three_freevars.__closure__)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
my_closure = (CellType(35), CellType(72), three_freevars.__closure__[2])
exec(three_freevars.__code__,
three_freevars.__globals__,
closure=my_closure)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
try:
exec(stmt, globals())
except TypeError:
pass
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
try:
exec(stmt, globals())
except TypeError:
pass
-
`open(__file__)` — file reads its own source, common pattern for extracting payloads hidden in comments (ast pass, confidence 0.85)
def test_open_non_inheritable(self):
fileobj = open(__file__, encoding="utf-8")
with fileobj:
self.assertFalse(os.get_inheritable(fileobj.fileno()))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.skipTest("standard IO in should have been a tty")
input_result = eval(lines[1]) if expected is None:
if stdio_encoding:
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
for e in [copy.deepcopy(d),
eval(repr(d))
]:
self.assertEqual(d, e)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for e in [copy.deepcopy(d),
eval(repr(d))
]:
self.assertEqual(d, e)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
check(pickle.loads(pickle.dumps(words, proto)))
check(eval(repr(words)))
update_test = Counter()
update_test.update(words)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
if not any(ch in lit for ch in 'xXoObB'):
self.assertEqual(complex(lit), eval(lit))
self.assertEqual(complex(lit), complex(lit.replace('_', '')))
for lit in INVALID_UNDERSCORE_LITERALS:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
roundtrip = eval(repr(z))
self.assertFloatsAreIdentical(0.0 + z.real,
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
locals = {}
exec(code, locals, locals)
woohoo = locals['woohoo']
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
def decorate(func):
expr = compile(exprstr, "dbcheck-%s" % func.__name__, "eval")
def check(*args, **kwds):
if not eval(expr, globals, locals):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
def check(*args, **kwds):
if not eval(expr, globals, locals):
raise DbcheckError(exprstr, func, args, kwds)
return func(*args, **kwds)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
for stmt in ("x,", "x, y", "x = y", "pass", "import sys"):
compile(stmt, "test", "exec") with self.assertRaises(SyntaxError):
compile(f"@{stmt}\ndef f(): pass", "test", "exec")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
for expr in ("1.+2j", "[1, 2][-1]", "(1, 2)", "True", "...", "None"):
compile(expr, "test", "eval") with self.assertRaises(TypeError):
exec(f"@{expr}\ndef f(): pass")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
codestr = "@%s\ndef f(): pass\nassert f() is None" % expr
code = compile(codestr, "test", "exec")
self.assertRaises(exc, eval, code, context)
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
self.assertEqual(repr(d1), "defaultdict(None, {})")
self.assertEqual(eval(repr(d1)), d1)
d1[11] = 41
self.assertEqual(repr(d1), "defaultdict(None, {11: 41})")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(repr(d1), "defaultdict(None, {})")
self.assertEqual(eval(repr(d1)), d1)
d1[11] = 41
self.assertEqual(repr(d1), "defaultdict(None, {11: 41})")
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
d = deque(range(200))
e = eval(repr(d))
self.assertEqual(list(d), list(e))
d.append(d)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
d = deque(range(200))
e = eval(repr(d))
self.assertEqual(list(d), list(e))
d.append(d)
-
file imports decoder module(s) pickle, binascii and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
d = {'a': a}
self.assertEqual(eval(expr, d), res)
t = type(a)
m = getattr(t, meth)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
d = {'a': a}
self.assertEqual(eval(expr, d), res)
t = type(a)
m = getattr(t, meth)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval(expr, d), res)
t = type(a)
m = getattr(t, meth)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
d = {'a': a, 'b': b, 'c': c}
self.assertEqual(eval(expr, d), res)
t = type(a)
m = getattr(t, meth)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {'a': deepcopy(a), 'b': b}
exec(stmt, d)
self.assertEqual(d['a'], res)
t = type(a)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {'a': deepcopy(a), 'b': b, 'c': c}
exec(stmt, d)
self.assertEqual(d['a'], res)
t = type(a)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
dictionary = {'a': deepcopy(a), 'b': b, 'c': c, 'd': d}
exec(stmt, dictionary)
self.assertEqual(dictionary['a'], res)
t = type(a)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.unop_test(d, 2, "len(a)", "__len__")
self.assertEqual(eval(repr(d), {}), d)
self.assertEqual(eval(d.__repr__(), {}), d)
self.set2op_test({1:2,3:4}, 2, 3, {1:2,2:3,3:4}, "a[b]=c",
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval(repr(d), {}), d)
self.assertEqual(eval(d.__repr__(), {}), d)
self.set2op_test({1:2,3:4}, 2, 3, {1:2,2:3,3:4}, "a[b]=c",
"__setitem__")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
if hasattr(a, name):
res = eval(expr, dict)
self.binop_test(a, b, res, expr, name)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
if hasattr(a, name):
res = eval(expr, dict)
self.unop_test(a, res, expr, name)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
exec(code, ns)
number_attrs = ns["number_attrs"]
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for op in "<", "<=", "==", "!=", ">", ">=":
self.assertEqual(eval("c[x] %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("c[x] %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("c[x] %s y" % op),
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("c[x] %s y" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("c[x] %s y" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("x %s c[y]" % op),
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("x %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("x %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for op in "<", "<=", "==", "!=", ">", ">=":
self.assertEqual(eval("c[x] %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("c[x] %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("c[x] %s y" % op),
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("c[x] %s y" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("c[x] %s y" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("x %s c[y]" % op),
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"x=%d, y=%d" % (x, y))
self.assertEqual(eval("x %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval("x %s c[y]" % op),
eval("x %s y" % op),
"x=%d, y=%d" % (x, y))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
exec(expr, {'x': x, 'y': y})
N1 = sys.maxsize + 1
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
dictliteral = '{' + ', '.join(formatted_items) + '}'
self.assertEqual(eval(dictliteral), dict(items))
def test_merge_operator(self):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
dictliteral = '{' + ', '.join(formatted_items) + '}'
self.assertEqual(eval(dictliteral), dict(items))
def test_merge_operator(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
exec(stmt, locals())
def test_resize1(self):
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
with torch._dynamo.error_on_graph_break(False):
code = compile(code, "<string>", "exec")
global_ns = {}
local_ls = {}
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
code = compile(code, "<string>", "exec")
global_ns = {}
local_ls = {}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with torch._dynamo.error_on_graph_break(False):
exec(code, global_ns, local_ls)
def test_strenum(self):
-
`marshal.loads` deserializes Python bytecode from bytes — code-object sink (ast pass, confidence 0.90)
import marshal
marshal.loads(b'')
except EOFError:
pass
-
file imports decoder module(s) pickle, codecs, marshal and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
self.raise_catch(SyntaxError, "SyntaxError")
try: exec('/\n')
except SyntaxError: pass
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
try:
compile(src, '<fragment>', 'exec')
except SyntaxError as e:
if e.msg != msg:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
try:
compile(src, '<fragment>', 'exec')
except exception as e:
if e.msg != msg:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(SyntaxError) as cm:
compile(src, '<fragment>', 'exec')
self.assertEqual(cm.exception.lineno, lineno)
self.assertEqual(cm.exception.offset, offset)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(OverflowError, "Parser column offset overflow"):
compile(src, '<fragment>', 'exec')
@cpython_only
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(SyntaxError) as cm:
compile(source, '<string>', 'exec')
return cm.exception
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
if not any(ch in lit for ch in 'jJxXoObB'):
self.assertEqual(float(lit), eval(lit))
self.assertEqual(float(lit), float(lit.replace('_', '')))
for lit in INVALID_UNDERSCORE_LITERALS:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
continue
v = eval(line)
self.assertEqual(v, eval(repr(v)))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
v = eval(line)
self.assertEqual(v, eval(repr(v)))
@unittest.skipUnless(getattr(sys, 'float_repr_style', '') == 'short',
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {'type': type, '__builtins__': safe_builtins}
exec(code, ns)
self.assertIs(ns['func3'].__builtins__, safe_builtins)
self.assertIs(ns['func4'].__builtins__, safe_builtins)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
s = """def f(): pass\nf.__name__"""
exec(s, {'__builtins__': {}})
self.assertEqual(self.fi.a.__name__, 'a')
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
finally:
frame = sys._getframe()
g = gen()
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
def cb(*args):
inspect.stack()
def gen():
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
def __del__(self):
inspect.stack()
sneaky = Sneaky()
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
def f():
self.check_stack_names(sys._getframe(), ['f', 'g'])
try:
yield
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
pass
self.check_stack_names(sys._getframe(), ['f', 'g'])
def g():
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
def g():
self.check_stack_names(sys._getframe(), ['g'])
yield from f()
self.check_stack_names(sys._getframe(), ['g'])
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
yield from f()
self.check_stack_names(sys._getframe(), ['g'])
gen = g()
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compile(prog_text_4, "<test string>", "exec")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
continue
self.assertEqual(int(lit, 0), eval(lit))
self.assertEqual(int(lit, 0), int(lit.replace('_', ''), 0))
for lit in INVALID_UNDERSCORE_LITERALS:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
def shouldRaiseSyntaxError(s):
compile(s, "<test>", "single")
self.assertRaises(SyntaxError, shouldRaiseSyntaxError, codestr)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
fundef = "def f(%s):\n pass\n" % ', '.join('i%d' % i for i in range(300))
compile(fundef, "<test>", "single")
fundef = "def f(*, %s):\n pass\n" % ', '.join('i%d' % i for i in range(300))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
fundef = "def f(*, %s):\n pass\n" % ', '.join('i%d' % i for i in range(300))
compile(fundef, "<test>", "single")
def testTooManyPositionalErrorMessage(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_02(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_03(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_04(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_06(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "cannot use assignment expressions with tuple"):
exec(code, {}, {})
def test_named_expression_invalid_07(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_08(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_09(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_10(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_11(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"positional argument follows keyword argument"):
exec(code, {}, {})
def test_named_expression_invalid_12(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"positional argument follows keyword argument"):
exec(code, {}, {})
def test_named_expression_invalid_13(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"positional argument follows keyword argument"):
exec(code, {}, {})
def test_named_expression_invalid_14(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_15(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"cannot use assignment expressions with lambda"):
exec(code, {}, {})
def test_named_expression_invalid_16(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_17(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"did you forget parentheses around the comprehension target?"):
exec(code, {}, {})
def test_named_expression_invalid_in_class_body(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"assignment expression within a comprehension cannot be used in a class body"):
exec(code, {}, {})
def test_named_expression_valid_rebinding_iteration_variable(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(NameError):
exec(code, {}) with self.assertRaises(NameError):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(NameError):
exec(code, {}, {}) exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, msg):
exec(code, {}, {}) with self.assertRaisesRegex(SyntaxError, msg):
exec(f"lambda: {code}", {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
"assignment expression cannot rebind comprehension iteration variable '__x'"):
exec(code, {}, {})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(NameError, "name 'a' is not defined"):
exec(code, {}, {})
def test_named_expression_scope_02(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(code, ns, {})
self.assertEqual(ns["a"], 20)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {}
exec(code, ns)
self.assertEqual(ns["x"], 2)
self.assertEqual(ns["result"], [0, 1, 2])
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
self.assertFalse(hasattr(dup, 'y'))
check(eval(repr(od)))
update_test = OrderedDict()
update_test.update(od)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertFalse(hasattr(dup, 'y'))
check(eval(repr(od)))
update_test = OrderedDict()
update_test.update(od)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"OrderedDict({'c': 1, 'b': 2, 'a': 3, 'd': 4, 'e': 5, 'f': 6})")
self.assertEqual(eval(repr(od)), od)
self.assertEqual(repr(OrderedDict()), "OrderedDict()")
-
`open(__file__)` — file reads its own source, common pattern for extracting payloads hidden in comments (ast pass, confidence 0.85)
with open(__file__) as file:
compile(file.read(), __file__, "exec")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with open(__file__) as file:
compile(file.read(), __file__, "exec")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(SyntaxError):
compile(inspect.cleandoc(code), "<test>", "exec")
def test_alternative_patterns_bind_different_names_0(self):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
other_tb = get_tb()
frame = sys._getframe()
tb = types.TracebackType(other_tb, frame, 1, 2)
-
bytes literal contains 44 `\xNN` escapes (83% of content) — binary payload shape (ast pass, confidence 0.85)
b'\x80\x04\x95C\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x8c\x04iter\x93\x8c\x08builtins\x8c\x05range\x93\x8a\t\x00\x00\x00\x00\x00\x00\x00\x00\xfeK\x14K\x02\x87R\x85R\x8a\t\x07\x00\x00\x00\x00\x00\x00\x00\x01b.',
]
for t in testcases:
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
try:
exec(g.__code__, {})
except TypeError:
pass
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
with torch._dynamo.error_on_graph_break(False):
result = eval("x" + case + "y", locals())
self.assertEqual(result, expected)
-
file imports decoder module(s) codecs and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
del sys.displayhook
code = compile("42", "<string>", "single")
self.assertRaises(RuntimeError, eval, code)
finally:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compile(s, "<stdin>", "eval")
check(s, size(compactfields) + 4 + 4)
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
exec(script)
all_expected = []
for cls, slot, _ in slots:
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(script)
all_expected = []
for cls, slot, _ in slots:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
def shouldRaiseSyntaxError(s):
compile(s, '', 'single')
self.assertRaises(SyntaxError, shouldRaiseSyntaxError, codestr)
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.printf(b"foo first from c\n")
os.system("echo foo first from cmd")
with redirect_stdout(stdout_log):
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.printf(b"foo from c\n")
os.system("echo foo from cmd")
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.printf(b"foo again from c\n")
os.system("echo foo again from cmd")
with open(stdout_log) as f:
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.fprintf(c_stderr, b"bar first from c\n")
os.system("echo bar first from cmd 1>&2")
with redirect_stderr(stderr_log):
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.fprintf(c_stderr, b"bar from c\n")
os.system("echo bar from cmd 1>&2")
print("bar again from python")
-
`os.system` called with a literal shell command (ast pass, confidence 0.70)
libc.fprintf(c_stderr, b"bar again from c\n")
os.system("echo bar again from cmd 1>&2")
with open(stderr_log) as f:
-
reach-by-name through `globals` (ast pass, confidence 0.60)
)
globals()[test_class.__name__] = test_class
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compiled_func = compile(example, inputs)
compiled_out = compiled_func(*inputs)
self.assertTrue(same(eager_out, compiled_out))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
eager_out = matmul_cat_col(*inputs)
compiled_matmul_cat_col = compile(matmul_cat_col, inputs)
inductor_out = compiled_matmul_cat_col(*inputs)
self.assertTrue(same(eager_out, inductor_out, tol=0.001))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
eager_out = inductor_func(eager_func(*eager_inputs), *inductor_inputs)
compiled_inductor_func = compile(
inductor_func, [eager_func(*eager_inputs)] + list(inductor_inputs)
)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
eager_out = eager_func(inductor_func(*inductor_inputs), *eager_inputs)
compiled_inductor_func = compile(inductor_func, inductor_inputs)
inductor_out = eager_func(
compiled_inductor_func(*inductor_inputs), *eager_inputs
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
eager_out = example(*inputs)
compiled_matmul_cat_col = compile(example, inputs)
inductor_out = compiled_matmul_cat_col(*inputs)
self.assertTrue(same(eager_out, inductor_out, tol=0.001))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
eager_out = example(*inputs)
compiled_fn = compile(example, inputs)
inductor_out = compiled_fn(*inputs)
self.assertTrue(same(eager_out, inductor_out, tol=0.001))
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
with report_compile_source_on_error():
exec(r, {"__compile_source__": r})
shutil.rmtree(os.path.join(d, "storages"))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with report_compile_source_on_error():
exec(r, {"__compile_source__": r})
shutil.rmtree(os.path.join(d, "storages"))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with report_compile_source_on_error():
exec(r, {"__compile_source__": r})
if saved_kernel_state is not None:
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec("\n".join(writer._lines), env)
self.assertEqual(reader.args[0], tensor)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns: dict = {}
exec(compile(code, "<test>", "exec"), ns)
ns["load_args"](reader)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns: dict = {}
exec(compile(code, "<test>", "exec"), ns)
ns["load_args"](reader)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
locals = {}
exec(fn_str, {}, locals)
fn = locals["fn"]
orig_inst_str = "\n".join(list(map(str, dis.get_instructions(fn))))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
locals = {}
exec(fn_str, {}, locals)
fn = locals["fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(actual, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x, y)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
eager = EagerAndRecordGraphs()
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
d = {}
exec(first_graph, globals(), d)
retraced = torch.compile(d["GraphModule"], backend=eager, fullgraph=True)
retraced_out = retraced()(x)[0]
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(
eval(source, {"max": max}, {str(symbol): value}),
int(expr.subs(symbol, value)),
)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(
eval(floor_source, {"math": math}, {str(symbol): 4}),
2,
)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {}
exec(compile(imports, f"<{name}>", "exec"), namespace)
self.assertEqual(eval("math.floor(3 / 2)", namespace), 1)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {}
exec(compile(imports, f"<{name}>", "exec"), namespace)
self.assertEqual(eval("math.floor(3 / 2)", namespace), 1)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
exc = RuntimeError("backend exploded")
exc.frame = sys._getframe()
raise exc
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
ResetRequired(),
ShortenTraceback("shortened", first_useful_frame=sys._getframe()),
UserError(UserErrorType.INVALID_INPUT, "bad input"),
]
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
)
compile(code, "<generated minifier repro>", "exec")
namespace = {"__name__": "not_main"}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {"__name__": "not_main"}
exec(code, namespace)
mod = namespace["mod"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertNotIn("weights_only=False", code)
compile(code, "<generated minifier repro>", "exec")
namespace = {"__name__": "not_main"}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {"__name__": "not_main"}
exec(code, namespace)
mod = namespace["mod"]
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
def fn(x):
values = eval("{'scale': 2, 'offset': (3, 4)}")
return x * values["scale"] + eval(" 1+1\n") + eval("1/2")
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope: dict = {"torch": torch}
exec(code, scope)
compiled = torch.compile(scope["op"], fullgraph=True, backend="eager")
self.assertEqual(compiled(x), torch.tensor(0.0))
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
fn = eval(source)
a = torch.ones(1)
b = torch.ones(1)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
self._common(eval(source), 3, 1026)
def test_resume1(self):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
def patch_fn_with_rng_burn(name):
orig_fn = eval(name)
def bad(*args, **kwargs):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
def filter_expected(s: str) -> str:
d = eval(s)
if not dynamo_config.run_gc_after_compile:
d.pop("gc", None)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
)
exec(module_code, module.__dict__)
sys.modules["dummy_module"] = module
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
i = x.item()
eval(fixes)
return y.narrow(0, i, 1).squeeze()
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
i = y.item()
eval(fixes)
return torch.stack(xs, 0).narrow(0, i, 1).squeeze()
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for length in lengths:
eval(fixes)
rs.append(x.narrow(0, start, length))
start += length
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
return ns["call"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
return ns["call"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
if "_rebuild(" in expr:
exec("\n".join(_REBUILD_HELPER), ns)
for stmt in imports:
exec(stmt, ns)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
for stmt in imports:
exec(stmt, ns)
return eval(expr, ns)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
exec(stmt, ns)
return eval(expr, ns)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
local_dict = {}
exec(compile(source, "<test>", "exec"), globals_dict, local_dict)
wrapper = local_dict["inner_fn"]
-
reach-by-name through `vars` (ast pass, confidence 0.60)
y = torch.arange(4, device=GPU_TYPE)
fn = vars()[fn_name]
fn = torch.compile(dynamic=dynamic_shapes)(fn)
if fn_name == "store":
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with WritableTempFile(suffix=".pt2") as f:
compiled_model = compile(
model,
example_inputs,
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
}
compiled = compile(model, example_inputs, inductor_configs=inductor_configs)
self.assertEqual(
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
}
compiled = compile(model, example_inputs, inductor_configs=inductor_configs)
self.assertEqual(
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
new_compiled = compile(model, example_inputs, inductor_configs=inductor_configs)
new_compiled.load_constants(
model.state_dict(), check_full_update=True, user_managed=True
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compiled = compile(model, example_inputs)
copmiled_copy = copy.deepcopy(compiled)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
name_to_users = eval(graph_inductor)
self.assertNotEqual(name_to_users["buf1"], name_to_users["buf5"])
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
wrapper_src = f"async_compile.triton('helper', '''{escaped}''')"
compile(wrapper_src, "<test-wrapper-source>", "exec")
if cpp_wrapper:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
nested_src = f'wrapper_src = r"""{wrapper_src}"""'
compile(nested_src, "<test-nested-wrapper-source>", "exec")
wrapper_src = ast.literal_eval(ast.parse(nested_src).body[0].value)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
compile(imports, "<benchmark_kernel_imports>", "exec")
self.assertIn("\nfrom torch._dynamo.testing import rand_strided\n", imports)
self.assertIn("\nimport torch\n", imports)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
return ns["call"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
return ns["call"]
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertNotIn("<class ", code)
compile(code, "<codegen_config>", "exec")
namespace = {"torch": torch}
exec(code, namespace)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {"torch": torch}
exec(code, namespace)
reconstructed = torch._inductor.config.inductor_choices_class
self.assertIsInstance(reconstructed, functools.partial)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
code = torch._inductor.config.codegen_config()
compile(code, "<codegen_config>", "exec")
exec(code, {"torch": torch})
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
compile(code, "<codegen_config>", "exec")
exec(code, {"torch": torch})
reconstructed = torch._inductor.config.inductor_choices_class
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertNotIn("config.inductor_choices_class = functools.partial", code)
compile(code, "<codegen_config>", "exec")
def test_codegen_partial_with_unsupported_arg_emits_comment(self):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertNotIn("config.inductor_choices_class =", code)
compile(code, "<codegen_config>", "exec")
def test_codegen_partial_with_unresolvable_identity_emits_comment(self):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertIn("partial callable cannot be re-imported", code)
compile(code, "<codegen_config>", "exec")
def test_codegen_partial_with_raising_metadata_emits_comment(self):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertIn("partial callable cannot be re-imported", code)
compile(code, "<codegen_config>", "exec")
def test_codegen_partial_with_invalid_qualname_emits_comment(self):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertIn("partial callable cannot be re-imported", code)
compile(code, "<codegen_config>", "exec")
def test_select_decomp_table_fallback_embedding_bag_byte_unpack(self):
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
return int(
eval(
source,
{"__builtins__": {}},
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"torch": torch}
exec(result, ns)
repro = ns["Repro"]()
self.assertEqual(repro(torch.tensor(False), x), gm(torch.tensor(False), x))
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
result = eval("x" + case + "y", locals())
self.assertEqual(result, expected)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[test_class.__name__] = test_class
test_class.__module__ = __name__
return test_class
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(pattern_str, namespace)
self.assertIsInstance(namespace["output"], GetAttr)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(complex_pattern_str, namespace)
self.assertIsInstance(namespace["output"], GetAttr)
-
7 consecutive `\NNN` octal escapes (entropy 2.5 bits/byte) (raw pass, confidence 0.65)
aten::__interpolate(Tensor input, int? size=None, float[]? scale_factor=None,
str mode='\156\145\141\162\145\163\164', bool? align_corners=None) -> (Tensor):
Expected a value of type 'Optional[int]' for argument 'size' but instead found type 'Tensor'.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
t1 = cu.func()
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code_str, globals(), scope)
cu = torch.jit.CompilationUnit(code_str)
self.assertEqual(cu.func(*inputs), scope[fn_name](*inputs))
-
reach-by-name through `globals` (ast pass, confidence 0.60)
common_device_type.instantiate_device_type_tests(
globals()[test_class_name], globals(), only_for="cpu"
)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
return eval(re.search("-> (.*)\n", func.__doc__).group(1))
def check(self, func):
-
`subprocess.check_output` called with `shell=True` and a literal command (ast pass, confidence 0.70)
raw_device_cnt = int(
subprocess.check_output(
"amd-smi list | grep 'GPU' | wc -l", shell=True
).strip()
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
guard_code = "IsNonOverlappingAndDenseIndicator(2, 3, 4, 5, 60, 20, 5, 1) == 1"
result = eval(guard_code, SYMPY_INTERP) self.assertTrue(result)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
result_false = eval(guard_code_false, SYMPY_INTERP) self.assertFalse(result_false)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
locals_ = {"L": {"u0": u0}}
max_result = eval(max_expr, SYMPY_INTERP, locals_).node.expr min_result = eval(min_expr, SYMPY_INTERP, locals_).node.expr self.assertEqual(max_result, Max(1, sym))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
max_result = eval(max_expr, SYMPY_INTERP, locals_).node.expr min_result = eval(min_expr, SYMPY_INTERP, locals_).node.expr self.assertEqual(max_result, Max(1, sym))
self.assertEqual(min_result, Min(1, sym))
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
locals3 = {"L": {"u0": u0, "u1": u1}}
max3_result = eval(max3, SYMPY_INTERP, locals3).node.expr self.assertEqual(max3_result, Max(1, sym, sym1))
-
reach-by-name through `globals` (ast pass, confidence 0.60)
cls.__module__ = __name__
globals()[cls.__name__] = cls
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
gbls = {"torch": torch}
exec(test_mod_code, gbls)
test_instance = gbls[test_classname](mod)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
gbls = {"torch": torch}
exec(test_mod_code, gbls)
test_instance = gbls[test_classname](mod)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
g = {"torch": torch, "inf": math.inf}
exec(code, g)
TestModule = g["TestModule"]
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
if not isinstance(eval(constants[i]), (str, int, float)):
continue
for j in range(len(constants)):
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
if not isinstance(eval(constants[i]), (str, int, float)):
continue
for j in range(len(constants)):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code_str, globals(), scope)
cu = torch.jit.CompilationUnit(code_str)
self.assertEqual(cu.func(*inputs), scope[fn_name](*inputs))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
t1 = cu.func()
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
torch._C._jit_pass_complete_shape_analysis(cu.func.graph, (), False)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
t1 = cu.func()
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
graph = cu.func.graph
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
non_jit_result = scope['func']()
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
g = {'Tuple' : typing.Tuple}
python_type = eval(empty_tuple_type.annotation_str, g)
if python_type is not typing.Tuple[()]:
raise AssertionError(f"Expected Tuple[()], got {python_type}")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
g = {'NoneType' : type(None)}
python_type = eval(none_type.annotation_str, g)
if python_type is not type(None):
raise AssertionError(f"Expected NoneType, got {python_type}")
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {}
exec(code, globals(), scope)
cu = torch.jit.CompilationUnit(code)
fusion_group_len = 2 if self.dynamic_shapes else 1
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
g = {"torch": torch, "inf": math.inf, "op": op}
exec(code, g)
f = g["f"]
f.__module__ = "test"
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
loc = os.path.dirname(os.path.abspath(__file__))
with subprocess.Popen(f'{sys.executable} -u {loc}/mkl_verbose.py --verbose-level=1', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
for line in p.stdout.readlines():
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
loc = os.path.dirname(os.path.abspath(__file__))
with subprocess.Popen(f'{sys.executable} -u {loc}/mkl_verbose.py --verbose-level=0', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
for line in p.stdout.readlines():
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
loc = os.path.dirname(os.path.abspath(__file__))
with subprocess.Popen(f'{sys.executable} -u {loc}/mkldnn_verbose.py --verbose-level=1', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
for line in p.stdout.readlines():
-
`subprocess.Popen` called with `shell=True` and a literal command (ast pass, confidence 0.70)
loc = os.path.dirname(os.path.abspath(__file__))
with subprocess.Popen(f'{sys.executable} -u {loc}/mkldnn_verbose.py --verbose-level=0', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
for line in p.stdout.readlines():
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
self.assertEqual(
eval(torch.overrides.resolve_name(c)),
c,
msg=lambda msg: f"{msg}\n{c}, {torch.overrides.resolve_name(c)}"
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(
eval(torch.overrides.resolve_name(c)),
c,
msg=lambda msg: f"{msg}\n{c}, {torch.overrides.resolve_name(c)}"
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_artifact"}
exec(compile(code, "<artifact>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_artifact"}
exec(compile(code, "<artifact>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_dt"}
exec(compile(code, "<dt>", "exec"), ns)
self.assertEqual(ns["forward"](m, x).to_local(), ref.to_local())
finally:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_dt"}
exec(compile(code, "<dt>", "exec"), ns)
self.assertEqual(ns["forward"](m, x).to_local(), ref.to_local())
finally:
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_a"}
exec(compile(code, "<a>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x), patch)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_a"}
exec(compile(code, "<a>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x), patch)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_eager"}
exec(compile(code, "<eager>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x))
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_eager"}
exec(compile(code, "<eager>", "exec"), ns)
self.assertEqual(ns["forward"](m, x), m(x))
-
concatenated bytes literal contains 87 `\xNN` escapes (63% of content) — binary payload shape (ast pass, confidence 0.85)
serialized = (
b'\x80\x02\x8a\nl\xfc\x9cF\xf9 j\xa8P\x19.\x80\x02M\xe9\x03.'
b'\x80\x02}q\x01(U\x10protocol_versionq\x02M\xe9\x03U\n'
b'type_sizesq\x03}q\x04(U\x03intq\x05K\x04U\x05shortq\x06K\x02U'
-
concatenated bytes literal contains 103 `\xNN` escapes (65% of content) — binary payload shape (ast pass, confidence 0.85)
serialized = (b'\x80\x02\x8a\nl\xfc\x9cF\xf9 j\xa8P\x19.\x80\x02M\xe9'
b'\x03.\x80\x02}q\x00(X\x10\x00\x00\x00protocol_versionq'
-
concatenated bytes literal contains 122 `\xNN` escapes (67% of content) — binary payload shape (ast pass, confidence 0.85)
serialized = (b'\x80\x02\x8a\nl\xfc\x9cF\xf9 j\xa8P\x19.\x80\x02M\xe9\x03'
b'.\x80\x02}q\x00(X\n\x00\x00\x00type_sizesq\x01}q\x02(X\x03'
b'\x00\x00\x00intq\x03K\x04X\x05\x00\x00\x00shortq\x04K\x02X'
-
concatenated bytes literal contains 945 `\xNN` escapes (81% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\r\x00\x15\x00lstm/data.pklFB\x11\x00ZZZZZZZZZZZZZZZZZ\x80\x02'
-
concatenated bytes literal contains 1031 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00lstm.save/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
b'\x02ccollections\nOrderedDict\nq\x00)Rq\x01(X\x0c\x00\x00\x00weight_ih_l0q\x02ct'
-
concatenated bytes literal contains 945 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00lstm.save/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
-
concatenated bytes literal contains 1031 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00lstm.save/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
b'\x02ccollections\nOrderedDict\nq\x00)Rq\x01(X\x0c\x00\x00\x00weight_ih_l0q\x02ct'
-
concatenated bytes literal contains 393 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x19\x00\t\x00tensor.double.LE/data.pklFB\x05\x00ZZZZZ\x80\x02'
-
concatenated bytes literal contains 474 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1d\x00\x05\x00tensor.double.LE.BOM/data.pklFB\x01\x00Z\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 389 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x19\x00\t\x00tensor.double.BE/data.pklFB\x05\x00ZZZZZ\x80\x02'
-
concatenated bytes literal contains 470 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1d\x00\x05\x00tensor.double.BE.BOM/data.pklFB\x01\x00Z\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 375 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.float.LE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 456 `\xNN` escapes (77% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.float.LE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 375 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.float.BE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 456 `\xNN` escapes (77% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.float.BE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 374 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.half.LE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 455 `\xNN` escapes (77% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.half.LE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 378 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.half.BE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 459 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.half.BE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 478 `\xNN` escapes (82% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.long.LE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 562 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.long.LE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 478 `\xNN` escapes (82% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.long.BE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 562 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.long.BE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 411 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x16\x00\x0c\x00tensor.int.LE/data.pklFB\x08\x00ZZZZZZZZ\x80'
-
concatenated bytes literal contains 496 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b"PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\x00\x1a\x00\x08\x00tensor.int.LE.BOM/data.pklFB\x04\x00ZZZZ\x80"
b"\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc"
-
concatenated bytes literal contains 407 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x16\x00\x0c\x00tensor.int.BE/data.pklFB\x08\x00ZZZZZZZZ\x80'
-
concatenated bytes literal contains 492 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b"PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\x00\x1a\x00\x08\x00tensor.int.BE.BOM/data.pklFB\x04\x00ZZZZ\x80"
b"\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc"
-
concatenated bytes literal contains 393 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.int16.LE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 474 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.int16.LE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 391 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.int16.BE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 472 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.int16.BE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 380 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.int8.LE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 461 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.int8.LE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 380 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.int8.BE/data.pklFB\x07\x00ZZZZZZZ\x80'
-
concatenated bytes literal contains 461 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.int8.BE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 383 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.uint8.LE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 464 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.uint8.LE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 383 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x18\x00\n\x00tensor.uint8.BE/data.pklFB\x06\x00ZZZZZZ\x80\x02'
-
concatenated bytes literal contains 464 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1c\x00\x06\x00tensor.uint8.BE.BOM/data.pklFB\x02\x00ZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 384 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b"PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.bool.LE/data.pklFB\x07\x00ZZZZZZZ\x80"
-
concatenated bytes literal contains 465 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.bool.LE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 384 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b"PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\x00\x17\x00\x0b\x00tensor.bool.BE/data.pklFB\x07\x00ZZZZZZZ\x80"
-
concatenated bytes literal contains 465 `\xNN` escapes (78% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.bool.BE.BOM/data.pklFB\x03\x00ZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 379 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.bfloat16.LE/data.pklFB\x03\x00ZZZ\x80'
-
concatenated bytes literal contains 457 `\xNN` escapes (75% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1f\x00C\x00tensor.bfloat16.LE.BOM/data.pklFB?\x00ZZZZZZZZZ'
b'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\x80\x02ctorch._utils\n_re'
-
concatenated bytes literal contains 377 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1b\x00\x07\x00tensor.bfloat16.BE/data.pklFB\x03\x00ZZZ\x80'
-
concatenated bytes literal contains 455 `\xNN` escapes (75% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1f\x00C\x00tensor.bfloat16.BE.BOM/data.pklFB?\x00ZZZZZZZZZ'
b'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\x80\x02ctorch._utils\n_re'
-
concatenated bytes literal contains 413 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1a\x00\x08\x00tensor.cdouble.LE/data.pklFB\x04\x00ZZZZ\x80'
-
concatenated bytes literal contains 493 `\xNN` escapes (77% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1e\x00\x04\x00tensor.cdouble.LE.BOM/data.pklFB\x00\x00\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 411 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1a\x00\x08\x00tensor.cdouble.BE/data.pklFB\x04\x00ZZZZ\x80'
-
concatenated bytes literal contains 491 `\xNN` escapes (77% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x1e\x00\x04\x00tensor.cdouble.BE.BOM/data.pklFB\x00\x00\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 388 `\xNN` escapes (81% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00tensor.le/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
-
concatenated bytes literal contains 470 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_le_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00tensor.le/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 386 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00tensor.be/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
-
concatenated bytes literal contains 468 `\xNN` escapes (79% of content) — binary payload shape (ast pass, confidence 0.85)
data_be_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x12\x00\x10\x00tensor.be/data.pklFB\x0c\x00ZZZZZZZZZZZZ\x80'
b'\x02ctorch._utils\n_rebuild_tensor_v2\nq\x00((X\x07\x00\x00\x00storageq\x01ctorc'
-
concatenated bytes literal contains 389 `\xNN` escapes (80% of content) — binary payload shape (ast pass, confidence 0.85)
def test_serialization_warning_s390x(self):
data_be_no_bom = (b'PK\x03\x04\x00\x00\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x19\x00\t\x00tensor.double.BE/data.pklFB\x05\x00ZZZZZ\x80\x02'
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
if torch.device(device).type == 'cuda':
storage_type = eval('torch.cuda.' + storage_type_name)
else:
storage_type = eval('torch.' + storage_type_name)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = {"__compile_source__": source}
exec(source, scope, out)
try:
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
def runstring(astr, dict):
exec(astr, dict)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
def runstring(astr, dict):
exec(astr, dict)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
val_repr = repr(val)
val2 = t(eval(val_repr))
if not (val2 == 0 and val < 1e-100):
assert_equal(val, val2)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
with assert_raises(OverflowError):
eval(example)
else:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
else:
result = eval(example)
if new is unchanged:
-
two identifiers collapse to visual skeleton `has_ctr|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
uint32_t size() const { return at<7>().as_uint32(); }
bool has_ctrl() const { return at<8>().valid(); }
uint32_t ctrl() const { return at<8>().as_uint32(); }
bool has_type() const { return at<9>().valid(); }
-
two identifiers collapse to visual skeleton `ctr|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
bool has_ctrl() const { return at<8>().valid(); }
uint32_t ctrl() const { return at<8>().as_uint32(); }
bool has_type() const { return at<9>().valid(); }
uint32_t type() const { return at<9>().as_uint32(); }
-
two identifiers collapse to visual skeleton `kCtr|Fie|dNumber` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
kSizeFieldNumber = 7,
kCtrlFieldNumber = 8,
kTypeFieldNumber = 9,
kEnqueueFieldNumber = 10,
-
two identifiers collapse to visual skeleton `Fie|dMetadata_Ctr|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
using FieldMetadata_Ctrl =
::protozero::proto_utils::FieldMetadata<
8,
-
two identifiers collapse to visual skeleton `kCtr|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
static constexpr FieldMetadata_Ctrl kCtrl{};
void set_ctrl(uint32_t value) {
static constexpr uint32_t field_id = FieldMetadata_Ctrl::kFieldId;
-
two identifiers collapse to visual skeleton `set_ctr|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
static constexpr FieldMetadata_Ctrl kCtrl{};
void set_ctrl(uint32_t value) {
static constexpr uint32_t field_id = FieldMetadata_Ctrl::kFieldId;
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
hints_namespace: dict[str, Any] = {}
exec(hints_source, hints_namespace)
hint_constants = {
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _UNARY_FLOAT_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
UnaryElementwiseOperatorBase, _op, {"requires_float": True}
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _UNARY_NUMERIC_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
UnaryElementwiseOperatorBase, _op
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BOOL_UNARY_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
BoolUnaryElementwiseOperatorBase, _op
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_FLOAT_TENSOR_ONLY_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
FloatOnlyPointwiseOperatorBase, _op
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_FLOAT_SCALAR_OTHER_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
FloatOnlyPointwiseOperatorBase, _op, {"_scalar_input_positions": (1,)}
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_FLOAT_SCALAR_BOTH_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
FloatOnlyPointwiseOperatorBase, _op, {"_scalar_input_positions": (0, 1)}
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_NUMERIC_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(PointwiseOperatorBase, _op)
for _op in _BINARY_NUMERIC_TENSOR_ONLY_OPS:
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_NUMERIC_TENSOR_ONLY_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
PointwiseOperatorBase, _op, {"_scalar_input_positions": ()}
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _BINARY_NUMERIC_SCALAR_OTHER_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
PointwiseOperatorBase, _op, {"_scalar_input_positions": (1,)}
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _op in _TERNARY_OPS:
globals()[_class_name_from_op(_op)] = _make_subclass(
TernaryElementwiseOperatorBase, _op
)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
code = self._generate_code(seed=999)
compile(code, "<test>", "exec")
-
file imports decoder module(s) codecs and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
python_bytecode = compile("\n".join(python_lines), input_path, "exec")
exec(python_bytecode, exec_globals)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
python_bytecode = compile("\n".join(python_lines), input_path, "exec")
exec(python_bytecode, exec_globals)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
python_bytecode = compile("\n".join(python_lines), input_path, "exec")
exec(python_bytecode, exec_globals)
return output_stream.getvalue()
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[sys.argv[1]]()
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
calling_frame = inspect.currentframe().f_back calling_frame_info = inspect.getframeinfo(calling_frame)
-
file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)
)
results = gzip.decompress(body).decode().split("\n")
return [json.loads(result) for result in results if result]
-
file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)
self.emitted_metric = json.loads(
gzip.decompress(kwargs["Body"]).decode("utf-8")
)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
current_module = inspect.getmodule(inspect.currentframe()).__name__
emit_should_include = {
-
reach-by-name through `globals` (ast pass, confidence 0.60)
__fn.__qualname__ = __fn.__name__ = __sym_name
globals()[__sym_name] = __fn
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[__name] = __obj
__name = "_" + __name
globals()[__name] = __obj
-
reach-by-name through `globals` (ast pass, confidence 0.60)
__name = "_" + __name
globals()[__name] = __obj
if not __name.startswith("_"):
__all__.append(__name)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
raise RuntimeError("Model can't be None")
return compile( model,
fullgraph=fullgraph,
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
)
frame = inspect.getframeinfo(sys._getframe(stacklevel))
location = f"{frame.filename}:{frame.lineno}"
self._impls[kind] = FuncAndLocation(func, location)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
result = eval(arg, frame_globals, eval_locals)
print(f"{arg} = {result!r}")
except Exception as e:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
result = eval(cmd, frame_globals, eval_locals)
if result is not None:
print(repr(result))
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ids_before = {k: id(v) for k, v in eval_locals.items()}
exec(cmd, frame_globals, eval_locals)
for key in eval_locals:
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
exec(func_source, namespace)
func = namespace["__dynamo_generated_func__"]
return func.__code__
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(func_source, namespace)
func = namespace["__dynamo_generated_func__"]
return func.__code__
-
reach-by-name through `globals` (ast pass, confidence 0.60)
continue
globals()[name] = getattr(torch._C._dynamo.eval_frame, name)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
device_props = torch.cuda.get_device_properties(device)
raise GPUTooOldForTriton(device_props, inspect.currentframe())
import triton.backends
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
stack = StackSummary()
frame = sys._getframe(1)
while frame is not None:
code = frame.f_code
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
out = {}
exec(func_str, {"op": fn}, out)
fn = out["op_overload_wrapper"]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
guards_log.debug("Python shape guard function:\n%s", pycode)
exec(pycode, globals_for_guard_fn, out)
guard_fn = out["___make_guard_fn"](*closure_vars.values())
if is_epilogue:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
fail_reason = eval(part, global_scope, scope)
except Exception:
if is_recompiles_verbose_enabled():
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
eval(guard, guard_manager.global_scope, local_scope)
except: print(f"Malformed guard:\n{guard}")
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
raise BackendCompilerFailed(
self.compiler_fn, e, inspect.currentframe()
).with_traceback(e.__traceback__) from None
unimplemented_with_warning(
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
raise BackendCompilerFailed(
self.compiler_fn, e, inspect.currentframe()
).with_traceback(e.__traceback__) from None
-
reach-by-name through `globals` (ast pass, confidence 0.60)
):
globals()[__name] = substitute_in_graph(
__func, can_constant_fold_through=True,
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
derived_compiled = {
idx: compile(expr_str, f"<derived arg {idx}>", "eval")
for idx, expr_str in derived_positions.items()
}
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
derived_positions[idx] syms[f"_derived_{idx}"] = eval(code, {"__builtins__": {}}, syms)
other_iter = iter(other)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
if (
(cur_frame := inspect.currentframe())
and (upper_frame := cur_frame.f_back)
and (upper_code := inspect.getframeinfo(upper_frame).code_context)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with patch("sys.argv", args), report_compile_source_on_error():
exec(code, {"__name__": "__main__", "__compile_source__": code})
rc = 0
except Exception:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
result = eval(
compile(tree, filename, "eval"),
{"__builtins__": {}},
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
result = eval(
compile(tree, filename, "eval"),
{"__builtins__": {}},
{},
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
_input_associated_real_value = eval(self.source.name, scope)
except Exception as exc:
raise NotImplementedError from exc
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
for frame in inspect.stack(context=0):
filename = frame.filename.replace("\\", "/")
if "/triton/runtime/" in filename:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
code = compile(source, f"{__file__}:codegen({artifact_name})", "exec")
local_dict: dict[str, object] = {}
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
captured_globals = dict(globals_dict) if sink is not None else globals_dict
exec(code, globals_dict, local_dict)
fn = local_dict[fn_name]
if wrapped_fn is not None:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
result = eval(expr, {"__builtins__": {}}, namespace)
leaves = pytree.tree_leaves(result)
for sentinel in leaves:
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace: dict[str, Any] = {}
exec(code, namespace)
grid_fn = namespace[fn_name]
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
fn = eval(py_kernel_name)
args, kwargs = snode_args_kwargs(snode)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
if isinstance(p, str) and p in globals():
p = globals()[p] if not callable(p):
raise AssertionError(
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
key, value = line.strip().split("=", 1)
config_data[key] = eval(value)
return config_data
-
reach-by-name through `globals` (ast pass, confidence 0.60)
parts = self.template_uid.split(".")
obj = globals()[parts[0]]
for k in parts[1:]:
obj = getattr(obj, k)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
if isinstance(pa, str):
func = globals()[pa]
else:
func = pa
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for metric in get_metric_fields():
self.cached_metrics[metric] = globals()[metric]
def get_deltas(self) -> CachedMetricsDeltas:
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for metric in get_metric_fields():
delta_metrics[metric] = globals()[metric] - self.cached_metrics[metric]
return CachedMetricsDeltas(**delta_metrics)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for metric in get_metric_fields():
globals()[metric] += getattr(delta, metric)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ctx: dict[str, Any] = {}
exec(code.getvalue(), ctx)
for target, impl in ctx.items():
if target in OP_NAMES:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
try:
code = compile(f.read(), path, "exec", dont_inherit=True)
except Exception as e:
raise RuntimeError(
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
mod.key = key exec(code, mod.__dict__, mod.__dict__)
if set_sys_modules:
sys.modules[mod.__name__] = mod
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
launcher_code = "\n".join(lines)
exec(launcher_code, scope)
launcher = scope["launcher"]
-
reach-by-name through `globals` (ast pass, confidence 0.60)
) -> GridExpr:
grid_cls = globals()[inductor_meta["grid_type"]]
if not issubclass(grid_cls, GridExpr):
raise AssertionError(f"Expected GridExpr subclass, got {grid_cls}")
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
for line in self.prefix:
exec(line, scope)
exec(f"grid_0 = {self.x_grid}", scope)
exec(f"grid_1 = {self.y_grid}", scope)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
raise AssertionError("grid_type must be specified for lazy compile")
grid_cls = globals()[grid_type]
if not issubclass(grid_cls, GridExpr):
raise AssertionError(f"Expected GridExpr subclass, got {grid_cls}")
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
kernel_obj = eval(kernel_source.strip())
pending_kernels[kernel_name] = kernel_obj
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
):
raise GPUTooOldForTriton(device_props, inspect.currentframe())
elif is_gpu(device.type) and not device.type == "mps":
raise TritonMissing(inspect.currentframe())
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
elif is_gpu(device.type) and not device.type == "mps":
raise TritonMissing(inspect.currentframe())
return device_scheduling(self)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
tile = info["tile_shape"]
tile_vals = eval(tile) BLOCK_M = tile_vals[0]
BLOCK_K = tile_vals[1]
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
tile_vals = eval(tile) BLOCK_M = tile_vals[0]
BLOCK_K = tile_vals[1]
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
namespace: dict[str, Any] = {"__name__": "__compile_to_python__"}
exec(compile(python_code, "<compile_to_python>", "exec"), namespace)
call = namespace.get("call")
if not callable(call):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace: dict[str, Any] = {"__name__": "__compile_to_python__"}
exec(compile(python_code, "<compile_to_python>", "exec"), namespace)
call = namespace.get("call")
if not callable(call):
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
namespace: dict[str, Any] = {"__name__": "__compile_to_python__"}
exec(compile(python_code, "<compile_to_python>", "exec"), namespace)
call = namespace.get("call")
if not callable(call):
-
reach-by-name through `globals` (ast pass, confidence 0.60)
):
sys.modules[f"{__name__}.{_name}"] = globals()[_name]
del sys, _name
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ctx = {"fn": fn}
exec(
f"""\
def {name}_cache_on_self(self):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ctx = {"fn": fn}
exec(
f"""\
def inner(self: Any, *args: P.args, **kwargs: P.kwargs) -> RV:
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
def get_class_name_lineno(method) -> tuple[str, int]:
current_frame = inspect.currentframe()
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
return eval(annotation_type, pf_globals, pf_locals)
except NameError as e:
error_fn(
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
for name, obj in _name_aliases.items():
vars()[name] = obj
-
reach-by-name through `globals` (ast pass, confidence 0.60)
if isinstance(t, str) and t in _abstract_dtypes:
return globals()[t]
return t
-
reach-by-name through `vars` (ast pass, confidence 0.60)
decorated.__name__ = name
vars()[name] = decorated
__all__.append(name)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
fn = getattr(_funcs, name or method)
vars()[method] = create_method(fn, method)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
method = f"__{method}__"
vars()[method] = create_method(fn, method)
for method, name in ri_dunder.items():
-
reach-by-name through `vars` (ast pass, confidence 0.60)
plain = f"__{method}__"
vars()[plain] = create_method(fn, plain)
rvar = f"__r{method}__"
vars()[rvar] = create_method(lambda self, other, fn=fn: fn(other, self), rvar)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
rvar = f"__r{method}__"
vars()[rvar] = create_method(lambda self, other, fn=fn: fn(other, self), rvar)
ivar = f"__i{method}__"
vars()[ivar] = create_method(
-
reach-by-name through `vars` (ast pass, confidence 0.60)
ivar = f"__i{method}__"
vars()[ivar] = create_method(
lambda self, other, fn=fn: fn(self, other, out=self), ivar
)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
ufunc = getattr(_binary_ufuncs_impl, name)
vars()[name] = deco_binary_ufunc(ufunc)
-
reach-by-name through `vars` (ast pass, confidence 0.60)
ufunc = getattr(_unary_ufuncs_impl, name)
vars()[name] = deco_unary_ufunc(ufunc)
-
`sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)
try:
sys.settrace(None)
return func(*args, **kwargs)
finally:
-
`sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)
finally:
sys.settrace(original_trace)
return wrapper
-
file imports decoder module(s) base64, pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
module_ns: dict[str, object] = {"__name__": "_precompiled_artifact"}
exec(compile(python_code, "<precompile>", "exec"), module_ns)
return cast("Callable[..., object]", module_ns["forward"])
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
module_ns: dict[str, object] = {"__name__": "_precompiled_artifact"}
exec(compile(python_code, "<precompile>", "exec"), module_ns)
return cast("Callable[..., object]", module_ns["forward"])
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
module_ns: dict[str, object] = {"__name__": "_precompiled_artifact"}
exec(compile(python_code, "<precompile>", "exec"), module_ns)
return cast("Callable[..., object]", module_ns["forward"])
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
_fn.__name__ = name
_fn.__module__ = inspect.currentframe().f_back.f_globals["__name__"] return _fn
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for simple_op in SIMPLE_OPS_LIST:
globals()[_get_func_name(simple_op)] = register_simple(simple_op)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for simple_op in SIMPLE_FORCE_TESTED_OPS:
globals()[_get_func_name(simple_op)] = register_force_test(
simple_op, register_simple(simple_op)
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for err_op in ERROR_OPS_LIST:
globals()[_get_func_name(err_op)] = register_error(
err_op, ERROR_TYPES.get(err_op, NotImplementedError)
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for like_op in LIKE_OPS_LIST:
globals()[_get_func_name(like_op)] = register_like(like_op)
del like_op
-
two identifiers collapse to visual skeleton `to` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
auto self_ = self.to(promoted_dtype);
auto out = grad *
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
rocm ? std::string(rocm) + "/lib/libamd_smi.so" : "libamd_smi.so";
amdsmi_handle = dlopen(path.c_str(), RTLD_NOW | RTLD_LOCAL);
if (!amdsmi_handle) {
amdsmi_handle = dlopen("libamd_smi.so", RTLD_NOW | RTLD_LOCAL);
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
filePath = _resolve_cpu_triton_so_path(std::move(filePath), soDir);
void* handle = dlopen(filePath.c_str(), RTLD_NOW | RTLD_LOCAL);
TORCH_CHECK(handle, "dlopen ", filePath, ": ", dlerror());
void* fn = dlsym(handle, funcName.c_str());
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
TORCH_CHECK(handle, "dlopen ", filePath, ": ", dlerror());
void* fn = dlsym(handle, funcName.c_str());
TORCH_CHECK(fn, "dlsym ", funcName, " from ", filePath, ": ", dlerror());
return fn;
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
filePath = _resolve_cpu_triton_so_path(std::move(filePath), soDir);
void* handle = dlopen(filePath.c_str(), RTLD_NOW | RTLD_LOCAL);
TORCH_CHECK(handle, "dlopen ", filePath, ": ", dlerror());
void* fn = dlsym(handle, "run_from_nativert");
-
two identifiers collapse to visual skeleton `t|` (0/O/o and 1/l/I are confusable) (token pass, confidence 0.80)
auto get_smaller_type = [&](const TypePtr& t1,
const TypePtr& t2) -> TypePtr {
if (t1->isSubtypeOf(*t2)) {
-
`subprocess.run` called with `shell=True` and a literal command (ast pass, confidence 0.70)
print(f"Testing PYTORCH_JIT_OPT_LIMIT=tensorexpr_fuser={limit} {cmd}")
p = subprocess.run(
f"PYTORCH_JIT_OPT_LIMIT=tensorexpr_fuser={limit} {cmd}",
shell=True,
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
#else
return dlsym(RTLD_DEFAULT, name);
#endif
}
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
stack_trace = traceback.StackSummary.extract(
traceback.walk_stack(inspect.currentframe()), lookup_lines=False
)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
stack_trace = traceback.StackSummary.extract(
traceback.walk_stack(inspect.currentframe()), lookup_lines=False
)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
for _name in __all__:
globals()[_name].__module__ = "torch.cuda.graph_annotations"
del _name
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
callstack = inspect.stack()
filename = "no_file"
if len(callstack) > 1:
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
def get_method_name(depth=2):
if len(inspect.stack()) > depth:
return inspect.stack()[depth].function
return "no_method_name"
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
if len(inspect.stack()) > depth:
return inspect.stack()[depth].function
return "no_method_name"
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
try:
stack = inspect.stack()
if depth >= len(stack):
raise AssertionError
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
filename = self.get_filename(module.__name__)
code = compile(source, filename, "exec", dont_inherit=True)
exec(code, module.__dict__)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
code = compile(source, filename, "exec", dont_inherit=True)
exec(code, module.__dict__)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
}
exec(code_str, namespace)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
mod, rest = name.split(".", 1)
root = globals()[mod]
return cls._getattr_by_name(root, rest)
else:
-
reach-by-name through `globals` (ast pass, confidence 0.60)
else:
return globals()[name]
@staticmethod
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
currentframe = inspect.currentframe()
f = None
try:
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
code = compile(dest_ast, "", "exec")
globals_dict = copy.copy(fn.__globals__)
keys_before = set(globals_dict.keys())
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
keys_before = set(globals_dict.keys())
exec(code, globals_dict)
new_keys = list(set(globals_dict.keys()) - keys_before)
if len(new_keys) != 1:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
arg_names = [f"t{i}" for i in range(len(args))]
return eval(code, SYMPY_INTERP, {"L": dict(zip(arg_names, args))})
def evaluate_guards_for_args(
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
if ismethod(func):
dispatcher = inspect.currentframe().f_back.f_locals.get( name, MethodDispatcher(name),
-
file imports decoder module(s) base64 and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
exec(compile(src, key, "exec", dont_inherit=True), globals)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(compile(src, key, "exec", dont_inherit=True), globals)
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
exec(compile(src, key, "exec", dont_inherit=True), globals)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
frame = inspect.currentframe()
pt_files = [
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
def __iter__(self) -> Iterator["Proxy"]:
frame = inspect.currentframe()
if frame is None:
raise AssertionError("inspect.currentframe() returned None")
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
frame = inspect.currentframe()
if frame is None:
raise AssertionError("inspect.currentframe() returned None")
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
def _get_interpreter_name_for_var(var):
frame = inspect.currentframe()
if not frame:
raise RuntimeError("failed to inspect frame")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
bytecode = compile(stmt, "", mode="eval")
for insn in dis.get_instructions(bytecode):
if "CALL" in insn.opname:
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
return eval(bytecode, glob, loc)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
g = copy.copy(globals())
exec(ignore_func_str, g) globals()[ignore_function_name] = g[ignore_function_name]
-
reach-by-name through `globals` (ast pass, confidence 0.60)
globals()[ignore_function_name] = g[ignore_function_name]
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
def execWrapper(code, glob, loc) -> None:
exec(code, glob, loc)
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
f = sys._getframe(1)
filename, lineno = f.f_code.co_filename, f.f_lineno
self.m: Any | None = torch._C._dispatch_library(
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
source = torch._library.utils.get_source(_stacklevel + 1)
frame = sys._getframe(_stacklevel)
caller_module = inspect.getmodule(frame)
-
`dlopen` called with a non-literal path (ast pass, confidence 0.75)
#else
return dlopen(filename, RTLD_NOW | RTLD_LOCAL);
#endif
}
-
`dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)
#else
return dlsym(handle, name);
#endif
}
-
reach-by-name through `globals` (ast pass, confidence 0.60)
def wrapper(func):
globals()[name] = func
__all__.append(name)
return func
-
reach-by-name through `globals` (ast pass, confidence 0.60)
if single_tensor_fn:
globals()[single_tensor_fn.__name__] = single_tensor_fn
def wrapper(func: Callable[_P, _T]) -> Callable[_P, _T]:
-
`sys.setprofile` — call-stack frame introspection (ast pass, confidence 0.70)
sys.setprofile(record_used_modules)
-
`sys.setprofile` — call-stack frame introspection (ast pass, confidence 0.70)
sys.setprofile(None)
return list(modules_used)
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
code = self._compile_source(filename, mangled_filename)
exec(code, ns)
return module
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
source = _normalize_line_endings(source)
return compile(source, mangled_filename, "exec", dont_inherit=True)
-
reach-by-name through `globals` (ast pass, confidence 0.60)
_attr = getattr(return_types, name)
globals()[name] = _attr
if not name.startswith("_"):
-
reach-by-name through `globals` (ast pass, confidence 0.60)
if torchcomms.is_backend_built(_backend):
globals()[_flag] = True
-
reach-by-name through `globals` (ast pass, confidence 0.60)
raise AssertionError(f"duplicate definition of flag '{name}'")
globals()[name] = enabled
return enabled
-
reach-by-name through `globals` (ast pass, confidence 0.60)
raise AssertionError(f"duplicate definition of setting '{name}'")
globals()[name] = value
return value
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
def execWrapper(code, glob, loc):
exec(code, glob, loc)
def do_input_map(fn, input):
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
def execWrapper(code, glob, loc):
exec(code, glob, loc)
def do_input_map(fn, input):
-
`inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)
prev_frame = inspect.currentframe().f_back
filename = inspect.getframeinfo(prev_frame)[0]
failures_dict_path = get_file_path_2(
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
expression = f"functools.partial({', '.join(parts)})"
compile(expression, "<config>", "eval")
except Exception:
return f"# {mod}.{k} omitted: partial arguments cannot be serialized"
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
expression = f"functools.partial({', '.join(parts)})"
compile(expression, "<config>", "eval")
except Exception:
return f"# {mod}.{k} omitted: partial arguments cannot be serialized"
-
reach-by-name through `globals` (ast pass, confidence 0.60)
compiled_fn = torch.compile(fn, **compile_kwargs)
globals()[fn.__name__] = functools.wraps(fn)(compiled_fn)
return compiled_fn(*args, **kwargs)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
)
fake_frame = eval(
code,
frame.f_globals,
-
line length 10054 characters (raw pass, confidence 0.65)
var n,l,u,i,t,o,r={},f=[],e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(e,n){for(var t in n)e[t]=n[t];return e}function s(e){var n=e.parentNode;n&&n.removeChild(e)}function a(e,n,t){var _,l,o,r=arguments,i={};for(o in n)"key"==o?_=n[o]:"ref"==o?l=n[o]:i[o]=n[o];if(arguments.length>3)f
-
`sys.setprofile` — call-stack frame introspection (ast pass, confidence 0.70)
else:
sys.setprofile(orig_trace)
enabled = False
try:
-
`sys.setprofile` — call-stack frame introspection (ast pass, confidence 0.70)
return orig_trace(*args, **kwargs)
sys.setprofile(do_collect)
gc.callbacks.append(gc_callback)
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for dataset_name, dataset in datasets.items():
eval_result: EvalResults = eval(dataset_name, dataset)
eval_result_metrics = eval_result.to_map()
if dataset_name == "val":
-
command name is a variable (`$PY312_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PY312_BIN/pip install certifi
ln -s $($PY312_BIN/python -c 'import certifi; print(certifi.where())') \
/opt/_internal/certs.pem
-
command name is a variable (`$PY312_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PY312_BIN/pip install certifi
ln -s $($PY312_BIN/python -c 'import certifi; print(certifi.where())') \
/opt/_internal/certs.pem
-
command name is a variable (`$PY312_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PY312_BIN/pip install auditwheel
ln -s $PY312_BIN/auditwheel /usr/local/bin/auditwheel
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
likely benign
LLM, confidence 0.90
Generic retry helper that re-runs its arguments with exponential sleep.
Reasoning
`retry () { $* || ... }` is a standard retry wrapper that re-runs the arguments it is given with backoff. The command is supplied by the script's own callers, not from untrusted input.
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
likely benign
LLM, confidence 0.90
Retry helper re-running its argument command with backoff.
Reasoning
Same retry helper as the other findings in this file, where `$*` is the wrapped command passed in by the caller. Ordinary CI scripting.
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
likely benign
LLM, confidence 0.90
Retry helper re-running its argument command with backoff.
Reasoning
Same retry helper invocation; the variable command is the caller's argument, not attacker-controlled content.
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
likely benign
LLM, confidence 0.90
Retry helper re-running its argument command with backoff.
Reasoning
Same retry helper invocation; benign CI retry logic.
-
command name is a variable (`$*`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
retry () {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
likely benign
LLM, confidence 0.90
Retry helper re-running its argument command with backoff.
Reasoning
Same retry helper invocation; benign CI retry logic.
-
command name is a variable (`$DESIRED_PYTHON_EXE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"$DESIRED_PYTHON_EXE" ../wheel/windows/build_env_setup.py --env-out "$ENV_FILE"
source "$ENV_FILE"
likely benign
LLM, confidence 0.85
Runs a repo-local Python setup script using the configured interpreter, then sources its env output.
Reasoning
`$DESIRED_PYTHON_EXE` names the Python interpreter for the wheel build, which the CI environment sets. It then runs a repo-local setup script and sources its output file. Typical build plumbing.
-
command name is a variable (`$DESIRED_PYTHON_EXE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"$DESIRED_PYTHON_EXE" ../wheel/windows/build_install_deps.py --env-out "$ENV_FILE"
source "$ENV_FILE"
likely benign
LLM, confidence 0.85
Runs a repo-local Python dependency script using the configured interpreter.
Reasoning
Same pattern: the configured Python interpreter runs a repo-local dependency-install script whose output is sourced. Build plumbing, not malicious.
-
command name is a variable (`$DESIRED_PYTHON_EXE`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
cd "$PYTORCH_ROOT"
"$DESIRED_PYTHON_EXE" "$PYTORCH_ROOT/.ci/wheel/windows/build_wheel.py" "$PYTORCH_FINAL_PACKAGE_DIR"
fi
likely benign
LLM, confidence 0.85
Invokes the repo's wheel build script with the configured Python interpreter.
Reasoning
The configured Python interpreter runs the repo's own build_wheel.py with a package directory argument. Standard wheel-build step.
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${SCRIPTPATH}/set_desired_python.sh"
likely benign
LLM, confidence 0.85
Sources set_desired_python.sh from the script's own directory.
Reasoning
SCRIPTPATH is the directory of the build script, so the source is a sibling helper that sets the desired Python version. Sourcing a sibling file is normal in build scripts.
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
python3 "${SCRIPTPATH}/build_env_setup.py" --env-out "$ENV_FILE"
source "$ENV_FILE"
python3 "${SCRIPTPATH}/build_install_deps.py" "${PYTORCH_ROOT}"
likely benign
LLM, confidence 0.70
Sources the build environment file that build_env_setup.py generated.
Reasoning
ENV_FILE is written by build_env_setup.py earlier in the same script, so the sourced file is generated locally to export build flags. Sourcing generated shell is a mild risk, but the content comes from the repo's own tooling.
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${PYTORCH_ROOT}/.ci/pytorch/common_utils.sh"
likely benign
LLM, confidence 0.85
Sources the repo's common_utils.sh from PYTORCH_ROOT.
Reasoning
The source path is PYTORCH_ROOT plus a fixed relative path to common_utils.sh inside the repo. This is a normal shared-helper include.
-
`source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "$(dirname "$(dirname "${SOURCE_DIR}")")/pytorch/rocm_utils.sh"
likely benign
LLM, confidence 0.85
Sources rocm_utils.sh relative to the script's source directory.
Reasoning
The path is derived from SOURCE_DIR and points to rocm_utils.sh in the repo, with a shellcheck source hint that confirms the intended include. This is a standard helper include.
-
command name is a variable or substitution — executed command determined at runtime (ast pass, confidence 0.90)
fi
if ! "$(dirname "$0")/validate-findings.sh"; then
echo "Rewrite the findings file so nothing is discarded, then finish." >&2
exit 2
likely benign
LLM, confidence 0.85
Stop hook runs the sibling validate-findings.sh and blocks on failure.
Reasoning
The command is the validate-findings.sh sibling resolved via dirname of $0. It is a local hook validator that gates the stop action.
-
command name is a variable or substitution — executed command determined at runtime (ast pass, confidence 0.90)
report=$("$(dirname "$0")/validate-findings.sh" 2>&1)
status=$?
printf 'POSTWRITE validate rc=%s\n' "$status" >> "${PR_REVIEW_HOOK_LOG:-/dev/null}" 2>/dev/null || true
likely benign
LLM, confidence 0.85
Post-write hook runs the sibling validate-findings.sh and logs its result.
Reasoning
The command is the sibling validate-findings.sh resolved via dirname of $0, with its output logged. This is a local validation hook with no network or decoding.
-
line length 2267 characters (raw pass, confidence 0.65)
1. **Resolve the effective labels.** Check every label that new CI runs on (a new workflow, job, matrix or matrix entry such as a test-matrix row or strategy-matrix entry, or a generated or templated job), and every runner label or prefix the PR changes on existing CI. A label counts only if the PR raises the number of
dismissed
LLM, confidence 0.90
Markdown instruction paragraph for reviewing CI runner labels, flagged only for its length.
Reasoning
This is a long prose line in a markdown instruction file from the raw pass. Long lines are a formatting matter with no obfuscation or malicious content.
-
[embedded bash] redirect writes to `sudo` — filename matches a system command (PATH hijack setup) (ast pass, confidence 0.88)
'exec "$@"' \
> /usr/bin/sudo
chmod +x /usr/bin/sudo
likely benign
LLM, confidence 0.70
Installs a pass-through sudo wrapper into /usr/bin inside a CI build container.
Reasoning
The file written is a shell wrapper that just runs its arguments as root. This looks like a stand-in sudo for a build container that lacks one, not a malicious PATH hijack, though writing to /usr/bin/sudo is a notable pattern a reviewer should confirm.
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) that this file sets only to plain text (ast pass, confidence 0.40)
yum install -y zlib-devel zip
"${PYTHON_EXECUTABLE}" -m pip install -U setuptools==78.1.0 pybind11==3.0.1 nanobind==2.10.2 auditwheel wheel
"${PYTHON_EXECUTABLE}" -m pip install -U cmake --force-reinstall
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) that this file sets only to plain text (ast pass, confidence 0.40)
"${PYTHON_EXECUTABLE}" -m pip install -U setuptools==78.1.0 pybind11==3.0.1 nanobind==2.10.2 auditwheel wheel
"${PYTHON_EXECUTABLE}" -m pip install -U cmake --force-reinstall
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) that this file sets only to plain text (ast pass, confidence 0.40)
cd "${RUNNER_TEMP}/artifacts"
"${PYTHON_EXECUTABLE}" "${GITHUB_WORKSPACE}/.github/scripts/build_triton_wheel.py" --device="${BUILD_DEVICE}" ${RELEASE} ${WITH_CLANG_LDD}
if [[ ("${{ inputs.device }}" == "cuda" || "${{ inputs.device }}" == "xpu") ]]; then
-
[embedded bash] command name is a variable (`$TEST_COMMAND`) that this file sets only to plain text (ast pass, confidence 0.40)
ulimit -H -c 0
"${TEST_COMMAND}"
-
line length 527 characters (raw pass, confidence 0.50)
Decide in this order under Principles 1-4. A structurally traceable chain from the suspect is `related`, whatever the failure looks like. Otherwise, if positive evidence establishes a dismissal's full criteria AND independence from the suspect, choose that dismissal: the machinery broke and the suspect did
-
line length 666 characters (raw pass, confidence 0.50)
PYTORCH_EXTRA_INSTALL_REQUIREMENTS: "cuda-toolkit[nvrtc,cudart,cupti,cufft,cusparse,cufile,nvjitlink,nvtx]==13.4.1; platform_system == 'Linux' | nvidia-cublas>=13.7.0.27,<=13.8.1.7; platform_system == 'Linux' | nvidia-cusolver==12.3.2.15; platform_system == 'Linux' | cuda-bindings>=13.0.3,<14; platform_system ==
-
line length 666 characters (raw pass, confidence 0.50)
PYTORCH_EXTRA_INSTALL_REQUIREMENTS: "cuda-toolkit[nvrtc,cudart,cupti,cufft,cusparse,cufile,nvjitlink,nvtx]==13.4.1; platform_system == 'Linux' | nvidia-cublas>=13.7.0.27,<=13.8.1.7; platform_system == 'Linux' | nvidia-cusolver==12.3.2.15; platform_system == 'Linux' | cuda-bindings>=13.0.3,<14; platform_system ==
-
line length 816 characters (raw pass, confidence 0.50)
PYTORCH_EXTRA_INSTALL_REQUIREMENTS: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine == 'x8
-
[embedded bash] `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)
source "${BINARY_ENV_FILE}"
bash .ci/wheel/linux/build_all.sh
likely benign
LLM, confidence 0.80
Sources a generated binary build environment file before running the wheel build script.
Reasoning
The sourced path is an environment file the workflow has just produced for a nightly wheel build. Sourcing a generated env file is routine in generated CI workflows.
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/wheel/mac/install_libomp.sh"
likely benign
LLM, confidence 0.85
Runs a libomp install script from the checked-out PyTorch tree.
Reasoning
PYTORCH_ROOT points at the checked-out repository, so the invoked script is a repo file. The variable is a standard path base in the generated workflow.
-
[embedded bash] command name is a variable (`$PYTORCH_ROOT`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)
"${PYTORCH_ROOT}/.ci/wheel/mac/build_all_macos_wheels.sh"
likely benign
LLM, confidence 0.85
Runs the macOS wheel build script from the checked-out PyTorch tree.
Reasoning
The invoked script sits under the repository root via PYTORCH_ROOT, which is the expected build layout for a nightly macOS wheel job.
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 822 characters (raw pass, confidence 0.50)
pytorch_extra_install_requirements: "intel-cmplr-lib-rt==2026.1.2 | intel-cmplr-lib-ur==2026.1.2 | intel-cmplr-lic-rt==2026.1.2 | intel-sycl-rt==2026.1.2 | oneccl-devel==2022.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | oneccl==2022.1.2; platform_system == 'Linux' and platform_machine
-
line length 750 characters (raw pass, confidence 0.50)
dashboard-tag: training-${{ github.event_name != 'workflow_dispatch' || inputs.training }}-inference-${{ github.event_name != 'workflow_dispatch' || inputs.inference }}-default-${{ github.event_name != 'workflow_dispatch' || inputs.default }}-dynamic-${{ github.event_name != 'workflow_dispatch' || inputs.dynamic
-
line length 711 characters (raw pass, confidence 0.50)
dashboard-tag: training-${{ github.event_name != 'workflow_dispatch' || inputs.training }}-inference-${{ github.event_name != 'workflow_dispatch' || inputs.inference }}-default-${{ github.event_name != 'workflow_dispatch' || inputs.default }}-dynamic-${{ github.event_name != 'workflow_dispatch' || inputs.dynamic
-
line length 711 characters (raw pass, confidence 0.50)
dashboard-tag: training-${{ github.event_name != 'workflow_dispatch' || inputs.training }}-inference-${{ github.event_name != 'workflow_dispatch' || inputs.inference }}-default-${{ github.event_name != 'workflow_dispatch' || inputs.default }}-dynamic-${{ github.event_name != 'workflow_dispatch' || inputs.dynamic
-
line length 527 characters (raw pass, confidence 0.50)
dashboard-tag: training-${{ inputs.training || 'false' }}-inference-${{ github.event_name != 'workflow_dispatch' || inputs.inference }}-default-${{ github.event_name != 'workflow_dispatch' || inputs.default }}-dynamic-${{ github.event_name != 'workflow_dispatch' || inputs.dynamic }}-cppwrapper-${{ github.event_na
-
U+202E RIGHT-TO-LEFT OVERRIDE in source (raw pass, confidence 0.98)
"modelo-éé", "⟨U+202E⟩model", "x" * 129, ):
likely benign
LLM, confidence 0.85
Unit test parameter list deliberately includes a right-to-left override character as an edge case.
Reasoning
The RTL override is inside a deliberate test-case tuple whose comments label it as an RTL override test; this is a unicode edge-case test fixture, not a real attack in code execution.
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
for hostile in (
"verdict⟨U+200B⟩⟨U+200B⟩⟨U+200B⟩ready", "text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b",
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
for hostile in (
"verdict⟨U+200B⟩⟨U+200B⟩⟨U+200B⟩ready", "text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b",
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
for hostile in (
"verdict⟨U+200B⟩⟨U+200B⟩⟨U+200B⟩ready", "text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b",
-
U+FE0F VARIATION SELECTOR-16 (invisible payload carrier) in source (in string/comment) (raw pass, confidence 0.54)
"verdict⟨U+200B⟩⟨U+200B⟩⟨U+200B⟩ready", "text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b", "nul\x00byte",
-
U+FE0E VARIATION SELECTOR-15 (invisible payload carrier) in source (in string/comment) (raw pass, confidence 0.54)
"verdict⟨U+200B⟩⟨U+200B⟩⟨U+200B⟩ready", "text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b", "nul\x00byte",
-
U+202E RIGHT-TO-LEFT OVERRIDE in source (raw pass, confidence 0.98)
"text⟨U+FE0F⟩⟨U+FE0E⟩", "a⟨U+202E⟩b", "nul\x00byte",
):
likely benign
LLM, confidence 0.85
Test fixture intentionally embeds an RTL override and control characters to test input handling.
Reasoning
Labeled as an RTL override test case alongside variation selectors and NUL bytes in a test parameter tuple; deliberate fixture data for robustness testing.
-
32 consecutive `\NNN` octal escapes (entropy 5.0 bits/byte) (raw pass, confidence 0.65)
transtable = b'\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220
likely benign
LLM, confidence 0.90
CPython bytes test defines a full 256-entry translation table with octal escapes.
Reasoning
A 256-byte translation table literal written as octal escapes is a standard way to express byte values in CPython bytes tests; the high entropy is expected for a full byte permutation table.
-
129 consecutive `\NNN` octal escapes (entropy 7.0 bits/byte) (raw pass, confidence 0.65)
NOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\3
likely benign
LLM, confidence 0.90
Continuation of the CPython bytes translation table literal.
Reasoning
Continuation of the same translation table literal in a CPython test file; expected content, not an obfuscated payload.
-
32 consecutive `\NNN` octal escapes (entropy 5.0 bits/byte) (raw pass, confidence 0.65)
transtable = b'\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220
likely benign
LLM, confidence 0.90
Second CPython bytes test translation table literal with octal escapes.
Reasoning
Another translation table literal in the CPython bytes test, consistent with standard test data for bytes.translate.
-
126 consecutive `\NNN` octal escapes (entropy 7.0 bits/byte) (raw pass, confidence 0.65)
NOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\3
likely benign
LLM, confidence 0.90
Continuation of the second CPython bytes translation table literal.
Reasoning
Continuation of the second translation table literal in the CPython test file; benign test data.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
'val.splitlines()[0]', 'val.replace(b"", b"")'):
newval = eval(expr)
self.assertEqual(val, newval)
self.assertIsNot(val, newval,
likely benign
LLM, confidence 0.90
Test code that evaluates fixed bytes-operation expressions while importing pickle for round-trip tests.
Reasoning
The file is CPython's bytes test suite. The eval runs expressions drawn from a fixed tuple of literal test strings, and the pickle import is for serialization tests. This is a multi-stage payload shape only by pattern match, with no hostile input.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
'val.splitlines()[0]', 'val.replace(b"", b"")'):
newval = eval(expr)
self.assertEqual(val, newval)
self.assertIsNot(val, newval,
likely benign
LLM, confidence 0.90
eval of hard-coded test expressions in a CPython bytes test.
Reasoning
The eval argument comes from a hard-coded tuple of expressions such as 'val.splitlines()[0]' inside a unit test. No external input reaches it.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
l = {}
exec(src, {}, l)
self.assertEqual(l['f'](*range(N)), N//2)
likely benign
LLM, confidence 0.93
Test that execs a generated function definition to exercise call semantics.
Reasoning
CPython's call tests generate a small function source string in the test and exec it into a local namespace to check call behavior. The source is controlled by the test itself.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(exception_type, regex):
eval(str)
def test__format__lookup(self):
likely benign
LLM, confidence 0.93
eval of f-string test cases inside an assertRaises helper.
Reasoning
This is an f-string error-test helper that evals test strings to check that the expected exception is raised. The inputs are fixed test cases.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
t = ast.parse(expr)
c = compile(t, '', 'exec')
likely benign
LLM, confidence 0.93
Compile of a parsed f-string expression for a CPython evaluation-order test.
Reasoning
The f-string test parses and compiles a literal expression to check evaluation order and that the callee is not called prematurely. The expression is a hard-coded test string.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec(c)
likely benign
LLM, confidence 0.93
exec of compiled f-string test code in the CPython f-string suite.
Reasoning
This exec runs the compiled code from the test above. It is the standard f-string test pattern with fixed inputs.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
t = ast.parse(expr)
c = compile(t, '', 'exec')
exec(c)
self.assertEqual(x[0], 'foo3')
likely benign
LLM, confidence 0.93
Compile of a hard-coded f-string expression in a CPython test.
Reasoning
This is the same parse-compile-exec test pattern for f-string behavior with hard-coded expressions.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
c = compile(t, '', 'exec')
exec(c)
self.assertEqual(x[0], 'foo3')
likely benign
LLM, confidence 0.93
exec of a compiled hard-coded f-string test expression.
Reasoning
This exec follows the compile above and runs the fixed test expression.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for i in range(250, 260):
self.assertEqual(eval(build_fstr(i)), (x+' ')*i)
likely benign
LLM, confidence 0.93
eval of a generated large f-string to test parser limits.
Reasoning
The eval argument is generated by build_fstr from loop counters inside the test, to exercise large f-string handling. No external input is involved.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(eval(build_fstr(255)*256), (x+' ')*(255*256))
s = build_fstr(253, '{x:{width}} ')
likely benign
LLM, confidence 0.93
eval of a locally generated f-string in a CPython stress test.
Reasoning
This eval runs a locally built f-string for a size stress test with fixed parameters.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
s = build_fstr(253, '{x:{width}} ')
self.assertEqual(eval(s), (x+' ')*254)
likely benign
LLM, confidence 0.93
eval of a generated f-string with format specifiers in a test.
Reasoning
This eval runs a locally generated f-string with nested width specifiers in a CPython test.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
s = "f'{1}' 'x' 'y'" * 1024
self.assertEqual(eval(s), '1xy' * 1024)
def test_format_specifier_expressions(self):
likely benign
LLM, confidence 0.93
eval of a repeated literal f-string in a CPython test.
Reasoning
The eval input is a literal string repeated in the test to check concatenated f-string handling.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertWarns(SyntaxWarning):
result = eval(case)
self.assertEqual(result, expected_result)
self.assertEqual(fr'\{{\}}', '\\{\\}')
likely benign
LLM, confidence 0.93
eval of table-driven f-string test cases in the CPython suite.
Reasoning
This eval runs test cases from a table of f-string expressions and checks their results and warnings. The inputs are fixed in the test.
-
identifier `tenπ` mixes scripts: Latin + Greek (raw pass, confidence 0.80)
tenπ = 31.4
self.assertEqual(f'{tenπ=:.2f}', 'tenπ=31.40')
likely benign
LLM, confidence 0.90
Unicode identifier tenπ used to test f-string self-documentation with non-ASCII names.
Reasoning
A Greek pi in an identifier is deliberate in a CPython test of Unicode identifiers, and the variable is used only in an f-string self-documenting expression test. Mixed scripts here are a test of language support, not an obfuscation technique.
-
identifier `tenπ` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
tenπ = 31.4
self.assertEqual(f'{tenπ=:.2f}', 'tenπ=31.40')
-
identifier `tenπ` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
tenπ = 31.4
self.assertEqual(f'{tenπ=:.2f}', 'tenπ=31.40')
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
pi = 'π'
self.assertEqual(f'alpha α {pi=} ω omega', "alpha α pi='π' ω omega")
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
pi = 'π'
self.assertEqual(f'alpha α {pi=} ω omega', "alpha α pi='π' ω omega")
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
try:
compile(data, "?", "exec")
except SyntaxError as e:
self.assertEqual(e.text, 'z = f"""')
dismissed
LLM, confidence 0.95
CPython test asserting a SyntaxError from compiling a fixed test string.
Reasoning
The compile call sits in a try/except SyntaxError block that asserts on the error text. This is the standard way CPython tests check f-string syntax errors, and the file is a vendored CPython test suite.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
for case in valid_cases:
compile(case, "<string>", "exec")
dismissed
LLM, confidence 0.95
CPython test compiling a list of valid f-string cases.
Reasoning
The loop compiles each entry of a list of valid f-string test cases to confirm they parse. This is ordinary CPython test-suite behaviour with no untrusted input.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
x = eval(s)
except OverflowError:
self.fail("OverflowError on huge integer literal %r" % s)
dismissed
LLM, confidence 0.95
CPython grammar test evaluating integer literal strings.
Reasoning
eval runs over integer literal strings in a grammar test to check that huge literals do not overflow. The inputs are fixed test data from the CPython suite.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
x = eval(s)
except OverflowError:
self.fail("OverflowError on huge integer literal %r" % s)
dismissed
LLM, confidence 0.95
CPython grammar test evaluating another set of integer literals.
Reasoning
Same pattern as the earlier eval: literal strings from a fixed test list are evaluated to check overflow handling in the CPython grammar tests.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for lit in VALID_UNDERSCORE_LITERALS:
self.assertEqual(eval(lit), eval(lit.replace('_', '')))
for lit in INVALID_UNDERSCORE_LITERALS:
self.assertRaises(SyntaxError, eval, lit)
dismissed
LLM, confidence 0.95
CPython test checking underscore numeric literals with eval.
Reasoning
Valid and invalid underscore-literal constants from the test module are evaluated, and assertRaises checks that invalid ones produce SyntaxError. This is standard grammar testing.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
for lit in VALID_UNDERSCORE_LITERALS:
self.assertEqual(eval(lit), eval(lit.replace('_', '')))
for lit in INVALID_UNDERSCORE_LITERALS:
self.assertRaises(SyntaxError, eval, lit)
dismissed
LLM, confidence 0.95
CPython test asserting that invalid underscore literals raise SyntaxError.
Reasoning
This is the assertRaises(SyntaxError, eval, lit) call on the invalid underscore literals in the same test. It is expected test behaviour.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
r'invalid \w+ literal'):
compile(test, "<testcase>", "eval")
self.assertEqual(w, [])
else:
dismissed
LLM, confidence 0.95
CPython test compiling literal test cases to check warnings.
Reasoning
The test compiles fixed test-case strings and checks for expected SyntaxWarning or error messages about invalid literals. This is standard CPython test coverage.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
for num in "0xf", "0o7", "0b1", "9", "0", "1.", "1e3", "1j":
compile(num, "<testcase>", "eval")
check(f"{num}and x", error=(num == "0xf"))
check(f"{num}or x", error=(num == "0"))
dismissed
LLM, confidence 0.95
CPython test compiling numeric literals followed by keywords.
Reasoning
A fixed list of numeric literal strings is compiled and then checked against and/or keyword cases. This is ordinary grammar testing with no external input.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaises(SyntaxError) as cm:
compile(s, "<test>", "exec")
self.assertIn("was never closed", str(cm.exception))
dismissed
LLM, confidence 0.95
CPython test checking the 'was never closed' syntax error.
Reasoning
The test compiles an unclosed-bracket source inside assertRaises(SyntaxError) and checks the message. This is a standard syntax-error test.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
' x: int = yield')
exec(stmt, ns)
self.assertEqual(list(ns['f']()), [None])
dismissed
LLM, confidence 0.95
CPython test executing an annotated-yield statement in a namespace.
Reasoning
exec runs a generated statement in a namespace to check generator behaviour with an annotated yield. The source is a fixed test string.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, custom_msg):
exec(source)
source = source.replace("foo", "(foo.)")
with self.subTest(source=source):
dismissed
LLM, confidence 0.95
CPython test executing invalid source to check the error message.
Reasoning
exec of test-generated source inside assertRaisesRegex checks that invalid syntax produces the expected custom error message. This is expected CPython test behaviour.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(source)
def test_del_stmt(self):
dismissed
LLM, confidence 0.95
CPython test executing invalid source to check the 'invalid syntax' message.
Reasoning
Same pattern: exec of invalid test source inside assertRaisesRegex for the 'invalid syntax' message.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
def _replacing_exec(self, code_string, ns):
co = compile(code_string, "<string>", "exec")
co = self._recursive_replace(co)
exec(co, ns)
dismissed
LLM, confidence 0.93
CPython listcomp test helper that compiles, rewrites and execs code.
Reasoning
The helper compiles a code string, rewrites it recursively for comprehension-scope testing, and execs it in a supplied namespace. This is a test helper in the CPython listcomp tests, and the inputs are test-controlled.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
co = self._recursive_replace(co)
exec(co, ns)
def test_code_replace(self):
likely benign
LLM, confidence 0.93
CPython test exec of a rewritten code object inside a list-comprehension test.
Reasoning
exec on a code object modified by a test helper inside CPython's own test suite; this is the standard way CPython tests exercise compiler behavior, with no network or dropper context.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
"100 / mhuge", "200 / mhuge"]:
result = eval(underflow, namespace)
self.assertEqual(result, 0.0,
"expected underflow to 0 from %r" % underflow)
likely benign
LLM, confidence 0.93
Test evaluates float underflow expressions from a list of literal cases.
Reasoning
eval of a test-case string with a restricted namespace in CPython's long-integer tests checking float underflow; benign test scaffolding.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
with self.assertRaisesRegex(SyntaxError, regex):
compile(codestr + "\n", "<test>", "single")
def test_invalid_syntax_errors(self):
likely benign
LLM, confidence 0.85
Test compiles invalid source strings to verify syntax error messages.
Reasoning
compile of a test source string inside assertRaisesRegex checks SyntaxError messages; pickle import here is incidental to CPython's test suite, and no payload decoding is shown.
-
`compile` called on a constructed string (ast pass, confidence 0.80)
with self.assertRaisesRegex(SyntaxError, regex):
compile(codestr + "\n", "<test>", "single")
def test_invalid_syntax_errors(self):
likely benign
LLM, confidence 0.85
Test compiles a constructed invalid-syntax string to assert a SyntaxError.
Reasoning
compile of a test string with a fixed suffix under assertRaisesRegex is CPython test code checking syntax errors; the critical severity reflects the pattern match, not intent.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
fundef = "def f(%s, /):\n pass\n" % ', '.join('i%d' % i for i in range(300))
compile(fundef, "<test>", "single")
def test_pos_only_definition(self):
likely benign
LLM, confidence 0.90
Test compiles a generated def with many positional-only parameters.
Reasoning
compile of a generated function definition with 300 parameters to test a compiler limit; benign test code.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
fundef = "def f(%s, /):\n pass\n" % ', '.join('i%d' % i for i in range(300))
compile(fundef, "<test>", "single")
def test_serialization(self):
likely benign
LLM, confidence 0.90
Test compiles a generated function definition during serialization checks.
Reasoning
Same generated-definition compile as a serialization test; benign CPython test code.
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест тест', 'find', 'ес')
self.checkequal(1, 'тест тест', 'find', 'ес', 1)
self.checkequal(1, 'тест тест', 'find', 'ес', 1, 3)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест тест', 'find', 'ес')
self.checkequal(1, 'тест тест', 'find', 'ес', 1)
self.checkequal(1, 'тест тест', 'find', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'find', 'ес', 2)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест тест', 'find', 'ес', 1)
self.checkequal(1, 'тест тест', 'find', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'find', 'ес', 2)
self.checkequal(-1, 'тест тест', 'find', 'ес', 6, 7)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест тест', 'find', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'find', 'ес', 2)
self.checkequal(-1, 'тест тест', 'find', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'find', 'ес', 7)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(6, 'тест тест', 'find', 'ес', 2)
self.checkequal(-1, 'тест тест', 'find', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'find', 'ес', 7)
self.checkequal(-1, 'тест тест', 'find', 'ec')
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(-1, 'тест тест', 'find', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'find', 'ес', 7)
self.checkequal(-1, 'тест тест', 'find', 'ec')
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест', 'rfind', 'е')
self.checkequal(1, 'тест', 'rfind', 'е', 1)
self.checkequal(-1, 'тест', 'rfind', 'е', 2)
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест', 'rfind', 'е')
self.checkequal(1, 'тест', 'rfind', 'е', 1)
self.checkequal(-1, 'тест', 'rfind', 'е', 2)
self.checkequal(-1, 'тест', 'rfind', 'e')
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест', 'rfind', 'е', 1)
self.checkequal(-1, 'тест', 'rfind', 'е', 2)
self.checkequal(-1, 'тест', 'rfind', 'e')
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(6, 'тест тест', 'rfind', 'ес')
self.checkequal(6, 'тест тест', 'rfind', 'ес', 1)
self.checkequal(1, 'тест тест', 'rfind', 'ес', 1, 3)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(6, 'тест тест', 'rfind', 'ес')
self.checkequal(6, 'тест тест', 'rfind', 'ес', 1)
self.checkequal(1, 'тест тест', 'rfind', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'rfind', 'ес', 2)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(6, 'тест тест', 'rfind', 'ес', 1)
self.checkequal(1, 'тест тест', 'rfind', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'rfind', 'ес', 2)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 6, 7)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(1, 'тест тест', 'rfind', 'ес', 1, 3)
self.checkequal(6, 'тест тест', 'rfind', 'ес', 2)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 7)
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(6, 'тест тест', 'rfind', 'ес', 2)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 7)
self.checkequal(-1, 'тест тест', 'rfind', 'ec')
-
identifier `ес` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 6, 7)
self.checkequal(-1, 'тест тест', 'rfind', 'ес', 7)
self.checkequal(-1, 'тест тест', 'rfind', 'ec')
-
identifier `finnish` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)
self.assertEqual('\u1fd2\u0130'.capitalize(), exp)
self.assertEqual('finnish'.capitalize(), 'Finnish')
self.assertEqual('A\u0345\u03a3'.capitalize(), 'A\u0345\u03c2')
-
identifier `fiNNISH` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)
'X\U0001044Fx\U0001044F X\U0001044Fx\U0001044F')
self.assertEqual('fiNNISH'.title(), 'Finnish')
self.assertEqual('A\u03a3 \u1fa1xy'.title(), 'A\u03c2 \u1fa9xy')
self.assertEqual('A\u03a3A'.title(), 'A\u03c3a')
-
concatenated bytes literal contains 129 `\xNN` escapes (95% of content) — binary payload shape (ast pass, confidence 0.85)
' Nunstuck git und'.encode('utf-8'),
b'\xe6\xad\xa3\xe7\xa2\xba\xe3\x81\xab\xe8\xa8\x80\xe3\x81'
b'\x86\xe3\x81\xa8\xe7\xbf\xbb\xe8\xa8\xb3\xe3\x81\xaf\xe3'
b'\x81\x95\xe3\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe'
likely benign
LLM, confidence 0.90
Test data: UTF-8 encoded Japanese sentence as a concatenated bytes literal.
Reasoning
A bytes literal of UTF-8 Japanese text split across lines is test data for encoding and decoding in CPython's string tests; the escapes encode readable text, not a binary payload.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
nines = "9" * 32
self.assertTrue(eval("+" + nines) == 10**32-1)
self.assertTrue(eval("-" + nines) == -(10**32-1))
self.assertTrue(eval("~" + nines) == ~(10**32-1))
likely benign
LLM, confidence 0.93
Evaluates a unary-prefixed string of 32 nines to check arithmetic results.
Reasoning
CPython unary-operator test evaluating a literal run of nines with a unary prefix. The eval input is a fixed-digit test string, not attacker-controlled data.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
self.assertTrue(eval("+" + nines) == 10**32-1)
self.assertTrue(eval("-" + nines) == -(10**32-1))
self.assertTrue(eval("~" + nines) == ~(10**32-1))
likely benign
LLM, confidence 0.93
Evaluates a minus-prefixed run of nines to test negation.
Reasoning
Same CPython test pattern: eval of a locally built numeric literal with a minus prefix to verify negation.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
self.assertTrue(eval("-" + nines) == -(10**32-1))
self.assertTrue(eval("~" + nines) == ~(10**32-1))
def test_negation_of_exponentiation(self):
likely benign
LLM, confidence 0.93
Evaluates a tilde-prefixed run of nines to test bitwise inversion.
Reasoning
Same CPython unary test with a tilde prefix on a constant digit string. Benign test of the parser and operators.
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
def call_stack():
return [f[3] for f in inspect.stack()]
def gen():
likely benign
LLM, confidence 0.90
Helper returning the function names from the current inspect.stack().
Reasoning
Test helper collecting function names from inspect.stack() to verify generator delegation call stacks. Ordinary introspection in a test.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
cls = _make_fault_tolerance_test_class(backend)
globals()[cls.__name__] = cls
likely benign
LLM, confidence 0.90
Registers a generated fault-tolerance test class in globals() by name.
Reasoning
Test code registering a dynamically generated test class in module globals so the test runner can discover it. A standard unittest pattern.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
env = {"reader": reader, "torch": torch}
exec("\n".join(writer._lines), env)
self.assertIsInstance(reader.args[0], torch._C.Generator)
self.assertEqual(reader.args[0].device, torch.device(device_type, 0))
likely benign
LLM, confidence 0.85
Executes code produced by a test writer in a namespace holding a reader and torch.
Reasoning
Test executing generated code lines from a writer object in a controlled namespace with torch. Dynamo tests commonly exec generated source. No external input is shown and the payload is not hidden.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
ns = {"__name__": __name__}
exec(
"def outer():\n"
" def inner[T](x: T) -> T:\n"
likely benign
LLM, confidence 0.85
Executes a literal source string defining nested generic functions in a test namespace.
Reasoning
Test exec of a literal Python source string with a PEP 695 generic function, used to exercise serialization. Pickle is imported for the AOT serialization test and nothing is decoded from an external blob.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
self.assertIs(globals()[key], _UNNAMED_SCOPE_NS)
reloaded = AOTCompiledModel.deserialize(UnnamedScopeModule(), data)
self.assertEqual(reloaded(x), x * 2.0 + EPS)
likely benign
LLM, confidence 0.90
Asserts that a globals() key maps to the expected namespace object.
Reasoning
Test asserting a globals() entry is the expected unnamed-scope namespace. Reading globals by key in a test is ordinary.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
self.assertEqual(reloaded(x), x * 2.0 + EPS)
self.assertIs(globals()[key], _UNNAMED_SCOPE_NS)
self._hide_leaked_dynamo_globals()
self.assertNotIn(key, globals())
likely benign
LLM, confidence 0.90
Checks a globals() key is absent after the test has hidden leaked globals.
Reasoning
Test cleanup and assertion on globals() keys after serialization round-trip. Routine test state handling.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
self.assertIs(result._guard_scope, _GuardScope.SUPPLIED)
self.assertIs(globals()[key], result._artifacts.runtime_env.used_globals[key])
def test_aot_compile_module_unnamed_scope_builtins_dict_travels_by_reference(self):
likely benign
LLM, confidence 0.85
Test reads a module global by name to check object identity of a runtime env entry.
Reasoning
A test asserts that a globals() entry is the same object as a value stored in the compiled artifact's runtime env. This is reflective self-checking inside a PyTorch test file, not evasion.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
reloaded = AOTCompiledModel.deserialize(UnnamedScopeModule(), data)
self.assertIs(globals()[key], _UNNAMED_SCOPE_NS)
hook()
self.assertIs(globals()[key], _UNNAMED_SCOPE_NS)
likely benign
LLM, confidence 0.85
Test checks a globals() entry identity after reload.
Reasoning
Same pattern: the test checks that a globals() key still refers to the expected namespace object after deserialization and a hook call. Consistent with the test's purpose.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
hook()
self.assertIs(globals()[key], _UNNAMED_SCOPE_NS)
self.assertEqual(reloaded(x), x * 2.0 + EPS)
likely benign
LLM, confidence 0.85
Test asserts a globals() entry still maps to the unnamed scope namespace.
Reasoning
Repeat identity assertion on a globals() key in a dynamo AOT-compile test. No dynamic execution or network activity involved.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
self.assertEqual(reloaded(x), x + _HELPER_MOD.HELPER_ROWS.sum(0))
self.assertIs(globals()[alias], _HELPER_MOD)
def test_aot_compile_module_dropped_shape_guard_seeds_no_alias(self):
likely benign
LLM, confidence 0.85
Test checks a global alias refers to the helper module.
Reasoning
Test asserts a globals() alias still points to the helper module. Ordinary test bookkeeping.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
(result,) = reloaded.compiled_results
self.assertIs(globals()[key], result._artifacts.runtime_env.used_globals[key])
def test_aot_compile_module_attribute_dict_shape_guard_holds_no_global(self):
likely benign
LLM, confidence 0.85
Test checks a globals() entry against the artifact's used_globals.
Reasoning
Identity check of a globals() key against a stored runtime env value, in a test context.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
try:
builtins.isinstance = lambda obj, cls: real_isinstance(obj, cls)
self.assertFalse(loaded.guard_check(x))
finally:
likely benign
LLM, confidence 0.80
Test temporarily swaps builtins.isinstance to verify guard behaviour and restores it.
Reasoning
Temporary replacement of builtins.isinstance inside try/finally, with the original restored in finally. This is a deliberate test technique to show a guard reads a snapshot rather than live objects. It is unusual but scoped and reverted.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
finally:
builtins.isinstance = real_isinstance
self.assertTrue(loaded.guard_check(x))
likely benign
LLM, confidence 0.80
Restores the builtins.isinstance patch used by the test.
Reasoning
Restoration of builtins.isinstance to the saved original in the finally block of the same test. Confirms the scoped patch pattern.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.isinstance = lambda obj, cls: real_isinstance(obj, cls)
self.assertFalse(loaded.guard_check(x))
finally:
likely benign
LLM, confidence 0.80
Test patches builtins.isinstance for a guard-snapshot check.
Reasoning
Same scoped isinstance override for a guard test, with a comment explaining its purpose.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
finally:
builtins.isinstance = real_isinstance
self.assertTrue(loaded.guard_check(x))
self.assertEqual(loaded(x), fn(x))
likely benign
LLM, confidence 0.80
Restores builtins.isinstance after the test's temporary override.
Reasoning
Restores the original isinstance after the guarded test block. Consistent with a legitimate test.
-
`builtins.aot_probe = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.aot_probe = os.getcwd
try:
guarded, builtins_key = save(keep_builtin_guards)
likely benign
LLM, confidence 0.72
Test sets a probe attribute on builtins to check cross-process guard behaviour.
Reasoning
Sets a custom attribute on builtins as a probe to see whether a saved guard depends on it across processes. Writing a builtin is unusual, but the value is os.getcwd, a harmless callable, and the surrounding code is a test of builtin guards.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {"math": math, "torch": torch, str(symbol): 64}
exec(source, namespace)
reader = Reader()
namespace["load_args"](reader)
likely benign
LLM, confidence 0.70
Test execs generated source code in a controlled namespace.
Reasoning
exec runs source text in a namespace populated with math, torch and a test symbol, in a debug-utils test. Likely executing generated repro code produced by the library itself; the source is not shown, so there is some residual doubt.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
deco_mod.SCALE = 100
exec(
"import functools\n"
"def deco(f):\n"
likely benign
LLM, confidence 0.70
Test execs a literal decorator definition to exercise serialization of decorated code.
Reasoning
exec of a small source string defining a decorator, with a deco_mod.SCALE setting, in a serialization test of decorated functions. The payload is self-contained and does not decode data or reach the network.
-
reach-by-name through `vars` (ast pass, confidence 0.60)
for name in ("IOError", "EnvironmentError"):
self.assertIs(vars(builtins)[name], OSError)
alias_read = DictGetItemSource(_BUILTINS_DICT, name)
self.assertFalse(reads_a_builtin(alias_read, OSError), name)
likely benign
LLM, confidence 0.90
Reflective lookup of builtins by name in a precompile test.
Reasoning
Reads builtins dict via vars() to check alias resolution in a Dynamo source-tracking test. Reflective access used for testing guard logic, no malicious effect.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
forked = {}
exec(compile("def _user_op(x):\n return x + 2\n", __file__, "exec"), forked)
self.assertTrue(defined_where_read(forked["_user_op"], "_user_op", _HERE))
likely benign
LLM, confidence 0.92
Test execs a constant function definition into a dict namespace.
Reasoning
exec runs a fixed literal-derived source string compiled from a constant in a test to define a function in a namespace. The non-literal flag is a false positive from the scanner; content is fully controlled test code.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
exec_ns = {}
exec(compile("def op(x):\n return x\n", "<string>", "exec"), exec_ns)
self.assertEqual(exec_ns["op"].__code__.co_filename, "<string>")
self.assertFalse(defined_where_read(exec_ns["op"], "op", pseudo))
likely benign
LLM, confidence 0.92
Test execs a constant function definition to check code filenames.
Reasoning
Executes a constant code string defining a trivial function in a test namespace to check co_filename and source tracking. Benign.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
source = "class Point:\n def norm(self):\n return 0\n"
exec(compile(source, F.__file__, "exec"), imported)
imported["Point"].extra = _user_op
self.assertFalse(defined_where_read(imported["Point"], "Point", _HERE))
likely benign
LLM, confidence 0.92
Test execs a constant class definition into a namespace.
Reasoning
exec of a constant class source string into a module namespace inside a test; no external input reaches it.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
source = "class Point:\n def norm(self):\n return 0\n"
exec(compile(source, F.__file__, "exec"), imported)
imported["Point"].extra = _user_op
self.assertFalse(defined_where_read(imported["Point"], "Point", _HERE))
likely benign
LLM, confidence 0.90
compile call feeding the test's constant class source.
Reasoning
compile of a constant source string as part of the same test exec call; benign test helper.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(
_code_fingerprint(compile(src, "<a>", "eval")),
_code_fingerprint(compile(src, "<b>", "eval")),
)
likely benign
LLM, confidence 0.92
Compiles constant expressions to compare code fingerprints.
Reasoning
compile of constant expression strings to compare code fingerprints in a test; no untrusted input.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
_code_fingerprint(compile(src, "<a>", "eval")),
_code_fingerprint(compile(src, "<b>", "eval")),
)
likely benign
LLM, confidence 0.92
Compiles constant expressions for fingerprint comparison.
Reasoning
Same fingerprint comparison with constant source strings; benign test logic.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(
out.stdout.strip(), _code_fingerprint(compile(src, "<p>", "eval"))
)
likely benign
LLM, confidence 0.90
Compiles constant source to compare with a subprocess fingerprint.
Reasoning
Compiles a constant source string to compute a fingerprint compared against subprocess output; benign test.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertEqual(sanitized_config.mode, 1)
compile(repr(sanitized_config), "<sanitized-constexpr>", "eval")
for config_type in (UserDefinedAttrsLikeConfig, UserDefinedPydanticLikeConfig):
likely benign
LLM, confidence 0.92
Test checks that a sanitized config repr compiles as an expression.
Reasoning
compile of repr of a config object purely to check it is syntactically valid after sanitization; a test assertion with no execution of untrusted data.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
self.assertIsInstance(sanitized_config.nested, int)
compile(repr(sanitized_config), "<sanitized-constexpr>", "eval")
unchanged_config = config_type(1, "hidden")
likely benign
LLM, confidence 0.92
Repeated repr-compile validity check for config objects in a test.
Reasoning
Same repr-compile sanity check in a loop over config types inside a test. Benign.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
with torch.no_grad():
torch.testing.assert_close(ns["call"]([x])[0], fn(x)[0])
likely benign
LLM, confidence 0.92
Test execs locally generated kernel source and compares results.
Reasoning
Execs generated compiled-kernel source from a locally-produced test string and checks output against eager fn. Standard codegen testing in PyTorch inductor; no external input.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns = {"__name__": "_compiled"}
exec(compile(src, "<compiled>", "exec"), ns)
with torch.no_grad():
torch.testing.assert_close(ns["call"]([x])[0], fn(x)[0])
likely benign
LLM, confidence 0.80
A PyTorch Inductor test compiles and execs generated code to compare its output with eager execution.
Reasoning
The exec(compile(...)) runs generated source inside a test that compares its output with an eager function. This is a test harness pattern, and nothing in the snippet suggests hidden or malicious payloads.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {}
exec(compile(source, "<nvgemm-benchmark>", "exec"), namespace)
args = namespace["get_args"]()
args_by_name = dict(
likely benign
LLM, confidence 0.70
A GEMM benchmark test executes a source string to obtain argument generators.
Reasoning
The source being exec'd is a benchmark snippet from the test's own code path. The origin of the source string is not shown, so some doubt remains, but the context looks like a benchmark harness.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
namespace = {}
exec(compile(source, "<nvgemm-benchmark>", "exec"), namespace)
args = namespace["get_args"]()
args_by_name = dict(
likely benign
LLM, confidence 0.70
The compile step feeding the benchmark exec in a GEMM test.
Reasoning
This is the compile call feeding the same exec, so the same reasoning applies. The source origin is not visible in the snippet.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
continue
_cls = globals()[_name]
if hasattr(_cls, "test_randint_distribution_dynamic_shapes"):
likely benign
LLM, confidence 0.85
A test module looks up a test class by name through globals() to check for a specific test method.
Reasoning
globals() lookup of a test class by name is a common way to generate or select test classes. The lookup key comes from the test module itself, and the subsequent hasattr check is a test-skip condition.
-
`sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)
def stack_has_instrumented_frame():
f = sys._getframe(1)
while f is not None:
if (
likely benign
LLM, confidence 0.90
An instrumentation test walks the call stack via sys._getframe to look for an instrumented frame.
Reasoning
Walking the frame chain with sys._getframe to detect an instrumented frame is a standard technique in instrumentation tests. It reads frame state for a test assertion and does nothing harmful.
-
`subprocess.call` called with `shell=True` and a literal command (ast pass, confidence 0.70)
"--allow-run-as-root"
if subprocess.call(
'mpiexec --allow-run-as-root -n 1 bash -c ""',
shell=True,
likely benign
LLM, confidence 0.90
The test runner checks for mpiexec availability with a fixed shell command.
Reasoning
The shell command is a fixed literal probing whether mpiexec works, used to decide whether to run distributed tests. It is a test-runner capability check with no external input.
-
`subprocess.call` called with `shell=True` and a literal command (ast pass, confidence 0.70)
"--noprefix"
if subprocess.call(
f'mpiexec {allowrunasroot_opt} -n 1 --noprefix bash -c ""',
shell=True,
likely benign
LLM, confidence 0.93
A test runner calls a literal mpiexec command via shell.
Reasoning
The shell=True call uses a fixed literal command string for mpiexec in a test runner; no untrusted input is involved, so it is a normal test harness pattern.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
sentinel = Sentinel()
exec("wrap('_wrap_frame_leak_target')", module_globals)
return weakref.ref(sentinel)
likely benign
LLM, confidence 0.88
FX test execs a fixed wrap() call in module globals to test frame leaks.
Reasoning
exec of a fixed literal string into module globals in an FX test is ordinary test scaffolding; the pickle-import flag is a weak co-occurrence in a large test file.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
ns: dict[str, object] = {"__name__": "precompile_test_artifact"}
exec(compile(compiled.to_python_code(), "<artifact>", "exec"), ns)
forward = ns["forward"]
with torch.autocast("cpu", dtype=torch.bfloat16):
likely benign
LLM, confidence 0.85
Test execs compiled artifact source it generated itself.
Reasoning
Executes Python code generated by the same library's compile step in a test to verify artifacts; it is self-generated code, not an external payload, though exec of generated source is a notable shape.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
ns: dict[str, object] = {"__name__": "precompile_test_artifact"}
exec(compile(compiled.to_python_code(), "<artifact>", "exec"), ns)
forward = ns["forward"]
with torch.autocast("cpu", dtype=torch.bfloat16):
likely benign
LLM, confidence 0.85
Test execs generated artifact source produced by the library under test.
Reasoning
Same exec of self-generated artifact code within a precompile test; the non-literal argument comes from the library's own compilation.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
ns: dict[str, object] = {"__name__": "precompile_test_artifact"}
exec(compile(compiled.to_python_code(), "<artifact>", "exec"), ns)
forward = ns["forward"]
with torch.autocast("cpu", dtype=torch.bfloat16):
likely benign
LLM, confidence 0.85
Test compiles the library's own generated Python source.
Reasoning
compile of to_python_code output in a test verifying generated artifacts; no external or decoded input.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
}
exec(inspect.getsource(driver._build_multigraph_forward), ns)
build = ns["_build_multigraph_forward"]
forward = build()
likely benign
LLM, confidence 0.87
Test execs source of a local method to build a forward graph.
Reasoning
Execs inspect.getsource of a local driver method into a namespace to build a forward function, a test technique for isolating graph code.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
}
exec(inspect.getsource(driver._build_multigraph_forward), ns)
build = ns["_build_multigraph_forward"]
likely benign
LLM, confidence 0.87
Test execs source of a local driver method to rebuild a forward function.
Reasoning
Same getsource-based exec of a local method in a precompile test.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
}
exec(inspect.getsource(driver._build_multigraph_forward), ns)
forward = ns["_build_multigraph_forward"]()
served = torch.nn.Linear(4, 4)
likely benign
LLM, confidence 0.87
Test execs source of a local method to construct a forward function.
Reasoning
Same getsource-based exec pattern in a precompile test, operating on the repository's own code.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
implied_config.mode = "default"
exec(code, {"torch": sys.modules["torch"]})
self.assertEqual(implied_config.save_config_portable(), saved)
implied_config.mode = "default"
likely benign
LLM, confidence 0.80
Test executes a generated config module snippet with torch in its namespace.
Reasoning
exec of a code object in a test for config save/restore; the code variable is generated in a test harness, and the 'decoder' shape is a heuristic match in a test file. Likely a legitimate config-module test pattern.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
implied_config.mode = "default"
exec(code, {"torch": sys.modules["torch"]})
self.assertEqual(implied_config.save_config_portable(), saved)
implied_config.mode = "default"
likely benign
LLM, confidence 0.80
Test runs a generated code object via exec for config checks.
Reasoning
Same exec call flagged by the dynamic-execution signal; it runs test-generated code inside a test of config portability, not an attack.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
jk.return_value = False
exec(code, {cfg.__name__: cfg})
self.assertTrue(cfg.flag)
likely benign
LLM, confidence 0.80
Test uses exec to load a config module variant for flag checks.
Reasoning
exec of a test-constructed code object into a namespace containing the config module, used to verify flag behavior; ordinary test technique.
-
command name is a variable (`$build_cmd`) that this file sets only to plain text (ast pass, confidence 0.40)
build_cmd="buck build --show-output @mode/opt -c fbcode.nvcc_arch=b200a -m ovr_config//third-party/cuda/constraints:12.8 :kineto_stress_test"
build_out=$($build_cmd)
mpi_path=/usr/local/fbcode/platform010-aarch64/bin//mpirun
-
command name is a variable (`$mpi_path`) that this file sets only to plain text (ast pass, confidence 0.40)
$mpi_path -np $num_ranks "$binary_path" ./stress_test_dense_mp.json
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
}
exec(self._codegen(rounding_mode, dtype), namespace)
return cast(torch.Tensor, namespace["result"])
likely benign
LLM, confidence 0.85
Fuzzer test execs generated torch code to compute a result.
Reasoning
exec of generated code for a fuzzer test that compiles a torch operation expression into a namespace; the code is produced by the project's own codegen, so this is an expected fuzzing pattern.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
value = eval(self._name_template, globals, locals)
except Exception as error:
if on_error is not None:
likely benign
LLM, confidence 0.85
Evaluates a name template expression to resolve a guard variable name.
Reasoning
eval of a name template with explicit globals and locals is used to materialize guard source names inside PyTorch's guard system; expected for this codebase, with an error handler around it.
-
`eval` called on a non-literal expression (ast pass, confidence 0.70)
try:
value = eval(self._name_template.format(tmpvar), globals, locals)
except Exception as error:
if on_error is not None:
likely benign
LLM, confidence 0.85
Evaluates a formatted name template to produce a temporary variable name for guards.
Reasoning
Evaluates a formatted name template for guard variable naming, same internal mechanism as the sibling eval; no external input or payload indicated.
-
file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)
try:
exec(tuning_code, scope)
except Exception as e:
raise RuntimeError(f"Failed to run autotuning code block: {e}") from e
likely benign
LLM, confidence 0.80
Executes generated autotuning code block inside a prepared scope.
Reasoning
Executes generated autotuning code in a scope; the multi-stage shape flag is triggered by pickle import in the same file, but in Inductor this is code generation for autotuning, not decoding a hidden payload. Uncertainty remains about the exact source of tuning_code.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
try:
exec(tuning_code, scope)
except Exception as e:
raise RuntimeError(f"Failed to run autotuning code block: {e}") from e
likely benign
LLM, confidence 0.75
Executes generated autotuning source in a scope during kernel tuning.
Reasoning
Same exec of generated autotuning source as the sibling finding; the code is compiler-generated for kernel tuning, so benign reading is most likely.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
scope = gemm_epilogue_op_scope(cute, mlir_math=mlir_math)
exec(source, scope)
return scope[function_names[0]]
likely benign
LLM, confidence 0.80
Execs generated epilogue source to produce a callable kernel function.
Reasoning
Executes generated source for a GEMM epilogue function into a scope and returns the named function; this is compiler codegen building kernels, consistent with the surrounding module.
-
compression ratio 0.730 is >2σ above file mean 0.559 (in comment) (raw pass, confidence 0.30)
)
def gemm_out(
-
command name is a variable (`$MAYBE_SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$MAYBE_SUDO pip -q uninstall -y hypothesis
$MAYBE_SUDO pip -q uninstall -y coverage
-
command name is a variable (`$MAYBE_SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$MAYBE_SUDO pip -q uninstall -y hypothesis
$MAYBE_SUDO pip -q uninstall -y coverage
-
command name is a variable (`$MAYBE_SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$MAYBE_SUDO pip -q install attrs==18.1.0 -f https://s3.amazonaws.com/ossci-linux/wheels/attrs-18.1.0-py2.py3-none-any.whl
$MAYBE_SUDO pip -q install coverage==4.5.1 -f https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl
-
command name is a variable (`$MAYBE_SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$MAYBE_SUDO pip -q install coverage==4.5.1 -f https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl
$MAYBE_SUDO pip -q install hypothesis==3.44.6 -f https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl
-
command name is a variable (`$MAYBE_SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$MAYBE_SUDO pip -q install coverage==4.5.1 -f https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl
$MAYBE_SUDO pip -q install hypothesis==3.44.6 -f https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl
-
command name is a variable (`$SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$SUDO -E -H -u jenkins env -u SUDO_UID -u SUDO_GID -u SUDO_COMMAND -u SUDO_USER env "PATH=$PATH" "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" $*
}
-
command name is a variable (`$prefix`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
${prefix}/bin/python get-pip.py
if [ -e ${prefix}/bin/pip3 ] && [ ! -e ${prefix}/bin/pip ]; then
ln -s pip3 ${prefix}/bin/pip
-
command name is a variable (`$prefix`) that this file sets only to plain text (ast pass, confidence 0.40)
local abi_tag=$(${prefix}/bin/python -c "from packaging.tags import interpreter_name, interpreter_version; import sysconfig ; from sysconfig import get_config_var; print('{0}{1}-{0}{1}{2}'.format(interpreter_name(), interpreter_version(), 't' if sysconfig.get_config_var('Py_GIL_DISABLED') else ''))")
-
command name is a variable (`$runfile`) that this file sets only to plain text (ast pass, confidence 0.40)
chmod +x ${runfile}
./${runfile} --toolkit --silent
rm -f ${runfile}
rm -f /usr/local/cuda && ln -s /usr/local/cuda-${major_minor} /usr/local/cuda
-
`eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
if command -v conda >/dev/null 2>&1; then
eval "$(conda shell.bash hook)"
conda activate py_$ANACONDA_PYTHON_VERSION
ENV_PREFIX="${CONDA_PREFIX}"
likely benign
LLM, confidence 0.92
Initialises conda in a Docker build script via eval of conda's shell hook.
Reasoning
`eval "$(conda shell.bash hook)"` is the standard documented way to initialise conda in a shell script. The variable portion comes from conda itself, and the following lines just activate a Python environment. No sign of malicious intent.
-
command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)
ln -sf "/usr/bin/${PYTHON}" /usr/bin/python
"${PYTHON}" -m venv "${VENV_PATH}"
source "${VENV_PATH}/bin/activate"
-
command name is a variable (`$CARGO_HOME`) that this file sets only to plain text (ast pass, confidence 0.40)
"${CARGO_HOME}/bin/cargo" --version
"${CARGO_HOME}/bin/rustc" --version
-
command name is a variable (`$CARGO_HOME`) that this file sets only to plain text (ast pass, confidence 0.40)
"${CARGO_HOME}/bin/cargo" --version
"${CARGO_HOME}/bin/rustc" --version
-
redirect writes to `passwd` — filename matches a system command (PATH hijack setup) (ast pass, confidence 0.88)
echo "jenkins:x:1000:1000::/var/lib/jenkins:" >> /etc/passwd
echo "jenkins:x:1000:" >> /etc/group
likely benign
LLM, confidence 0.80
Appends a fixed jenkins user and group entry to /etc/passwd and /etc/group in a CI Docker image.
Reasoning
The 'path-command-shadow' signal is a false match: /etc/passwd is a data file, not a command, so there is no PATH hijack. The script appends a fixed jenkins user and group with a fixed uid/gid to the passwd and group files inside a CI image build, so this is an ordinary (if slightly unusual) user-setup step.
-
command name is a variable (`$SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)
$SUDO -u jenkins $SUDO -v
-
5 rows of base64-like lines, lines 11-17 (first: base64-like blob (69 bytes, compression ratio 0.94) (outside string/comment)) (raw pass, confidence 0.30)
OPENSSL_ROOT=openssl-1.1.1l
OPENSSL_HASH=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
DEVTOOLS_HASH=a8ebeb4bed624700f727179e6ef771dafe47651131a00a78b342251415646acc
PATCHELF_HASH=d9afdff4baeacfbc64861454f368b7f2c15c44d245293f7587bbf726bfe722fb
-
command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "installing dependencies"
"$PYTHON" -m pip install einops packaging ninja numpy wheel setuptools
export PATH="$(dirname "$PYTHON"):$PATH"
-
command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)
"$PYTHON" setup.py bdist_wheel \
-d "$FA_FINAL_PACKAGE_DIR" \
-k \
-
command name is a variable (`$PACKAGE_FILES`) that this file sets only to plain text (ast pass, confidence 0.40)
INSTALL_DIR=${PACKAGE_BUILD} ${PACKAGE_FILES}/build.sh
popd
-
command name is a variable (`$GIT_DESCRIBE`) that this file sets only to plain text (ast pass, confidence 0.40)
kill $$
elif ${GIT_DESCRIBE} --exact >/dev/null; then
${GIT_DESCRIBE}
else
-
command name is a variable (`$GIT_DESCRIBE`) that this file sets only to plain text (ast pass, confidence 0.40)
elif ${GIT_DESCRIBE} --exact >/dev/null; then
${GIT_DESCRIBE}
else
return 1
-
command name is a variable (`$NUM_CPUS`) and `NUM_CPUS` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
export MAX_JOBS=${MAX_JOBS:-$(( ${NUM_CPUS} > ${MEMORY_LIMIT_MAX_JOBS} ? ${MEMORY_LIMIT_MAX_JOBS} : ${NUM_CPUS} ))}
else
likely benign
LLM, confidence 0.92
Computes MAX_JOBS with bash arithmetic expansion, capping CPU count by a memory limit.
Reasoning
The flagged text is arithmetic expansion `$(( ${NUM_CPUS} > ... ? ... : ... ))`, which compares and selects numbers. It does not execute a command named by a variable. The false positive comes from the `$(( ))` syntax being read as a command.
-
command name is a variable (`$AWS_S3_CP`) that this file sets only to plain text (ast pass, confidence 0.40)
set -x
${AWS_S3_CP} --recursive . "${BACKUP_BUCKET}/${CIRCLE_TAG}/${backup_dir}/"
)
}
-
command name is a variable (`$AWS_S3_CP`) that this file sets only to plain text (ast pass, confidence 0.40)
shm_id=$(sha256sum "${pkg}" | awk '{print $1}')
${AWS_S3_CP} --no-progress --acl public-read "${pkg}" "${s3_upload_dir}" \
--metadata "checksum-sha256=${shm_id}"
)
-
command name is a variable (`$AWS_S3_CP`) that this file sets only to plain text (ast pass, confidence 0.40)
shm_id=$(sha256sum "${pkg}" | awk '{print $1}')
AWS_ACCESS_KEY_ID="${R2_ACCESS_KEY_ID}" \
AWS_SECRET_ACCESS_KEY="${R2_SECRET_ACCESS_KEY}" \
AWS_SESSION_TOKEN="" \
-
`eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
eval "extract_trap_cmd $(trap -p "${trap_add_name}")"
printf '%s\n' "${trap_add_cmd}"
likely benign
LLM, confidence 0.82
Bash helper that appends to an existing trap by evaluating the output of `trap -p`.
Reasoning
This is the well-known bash trap-add helper. It evals the output of `trap -p` for the same signal, which the shell itself produces, to reconstruct the existing trap command before appending a new one. The eval input is not external data. Legitimate.
-
command name is a variable (`$pip_install_pkg`) that this file sets only to plain text (ast pass, confidence 0.40)
pip_install_pkg="python3 -m pip install --progress-bar off"
${pip_install_pkg} "$@" || \
${pip_install_pkg} "$@" || \
${pip_install_pkg} "$@"
-
command name is a variable (`$pip_install_pkg`) that this file sets only to plain text (ast pass, confidence 0.40)
${pip_install_pkg} "$@" || \
${pip_install_pkg} "$@" || \
${pip_install_pkg} "$@"
}
-
command name is a variable (`$pip_install_pkg`) that this file sets only to plain text (ast pass, confidence 0.40)
${pip_install_pkg} "$@" || \
${pip_install_pkg} "$@"
}
-
`subprocess.check_output` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
smoke_test_command = f"python {module['smoke_test']}"
output = subprocess.check_output(
smoke_test_command,
stderr=subprocess.STDOUT,
likely benign
LLM, confidence 0.70
Runs a per-module smoke-test command via subprocess with shell=True, built from a config value.
Reasoning
The command is an f-string built from `module['smoke_test']`, which most likely comes from a hardcoded module list in the same CI smoke-test script. Using shell=True with interpolation is poor practice and would be a risk if the values were externally controlled. Nothing in the snippet shows that they are, so this reads as benign with a code-quality concern.
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
for mode in "${mode_options[@]}"; do
$TASKSET python "benchmarks/dynamo/cachebench.py" \
--mode "$mode" \
--device cuda \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
$TASKSET python "benchmarks/dynamo/cachebench.py" \
--mode "$mode" \
--dynamic \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
$TASKSET python "benchmarks/dynamo/cachebench.py" \
--mode training \
--device cpu \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --disable-cudagraphs "$@" \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" "$@" \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --dynamic-shapes \
--dynamic-batch-only "$@" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
TORCHINDUCTOR_CPP_WRAPPER=1 $TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --disable-cudagraphs "$@" \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" "$@" --freezing \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
TORCHINDUCTOR_MAX_AUTOTUNE=1 $TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" "$@" --freezing \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "$target" == "accuracy" ]]; then
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --export --disable-cudagraphs "$@" \
--output "$TEST_REPORTS_DIR/${backend}_export_${suite}_${dtype}_${mode}_${device}_${target}.csv"
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --export-aot-inductor --disable-cudagraphs "$@" \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
fi
TORCHINDUCTOR_MAX_AUTOTUNE=1 $TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" "$@" \
"${profiler_trace_flags[@]}" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "$DASHBOARD_TAG" == *deterministic_perf-true* ]]; then
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --disable-cudagraphs --deterministic "$@" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "$DASHBOARD_TAG" == *batch_invariant_accuracy-true* ]] && [[ "$target" == "accuracy" ]]; then
$TASKSET python "benchmarks/dynamo/$suite.py" \
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --disable-cudagraphs --batch-invariant "$@" \
-
command name is a variable (`$backed_failed`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ -n "$current_model" ]]; then
if $backed_failed && $unbacked_failed; then
both_failures+=("$current_model")
elif $unbacked_failed && ! $backed_failed; then
-
command name is a variable (`$unbacked_failed`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ -n "$current_model" ]]; then
if $backed_failed && $unbacked_failed; then
both_failures+=("$current_model")
elif $unbacked_failed && ! $backed_failed; then
-
command name is a variable (`$unbacked_failed`) that this file sets only to plain text (ast pass, confidence 0.40)
both_failures+=("$current_model")
elif $unbacked_failed && ! $backed_failed; then
unbacked_only_failures+=("$current_model")
fi
-
command name is a variable (`$backed_failed`) that this file sets only to plain text (ast pass, confidence 0.40)
both_failures+=("$current_model")
elif $unbacked_failed && ! $backed_failed; then
unbacked_only_failures+=("$current_model")
fi
-
command name is a variable (`$has_failures`) that this file sets only to plain text (ast pass, confidence 0.40)
if $has_failures; then
return 0
fi
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ ${model_cfg[3]} == "dynamic" ]]; then
$TASKSET python benchmarks/dynamo/torchbench.py \
--inference --performance --"$data_type" -dcpu -n50 --only "$model_name" --dynamic-shapes \
--dynamic-batch-only --freezing --timeout 9000 --"$backend" --output "$output_name"
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
else
$TASKSET python benchmarks/dynamo/torchbench.py \
--inference --performance --"$data_type" -dcpu -n50 --only "$model_name" \
--freezing --timeout 9000 --"$backend" --output "$output_name"
-
command name is a variable (`$TORCH_BIN_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
OMP_NUM_THREADS=2 TORCH_CPP_TEST_MNIST_PATH="${MNIST_DIR}" "$TORCH_BIN_DIR"/test_api --gtest_filter='-IMethodTest.*' --gtest_output=xml:$TEST_REPORTS_DIR/test_api.xml
else
-
`eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
MPICMD="${MPIEXEC} -np 2 $TORCH_BIN_DIR/ProcessGroupMPITest"
eval "$MPICMD"
fi
likely benign
LLM, confidence 0.85
Test runner evals an mpiexec command to run ProcessGroupMPITest.
Reasoning
eval runs a command string built from MPIEXEC and TORCH_BIN_DIR, both set by the CI script itself to invoke a local test binary under mpiexec. Dynamic eval is unusual but this is a plain test-runner idiom, not a dropper.
-
command name is a variable (`$INSTALL_SCRIPT`) and `INSTALL_SCRIPT` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
pushd /executorch
"${INSTALL_SCRIPT}" setup_executorch
echo "Run ExecuTorch unit tests"
likely benign
LLM, confidence 0.70
CI step runs an installer script whose path is held in a variable before ExecuTorch tests.
Reasoning
INSTALL_SCRIPT is assigned from a command substitution and then executed. The snippet does not show the source of that value, but in a CI job it most plausibly points to an in-repo or ExecuTorch setup script, so the risk is low.
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
cd "${TEST_DIR}"/benchmarks/operator_benchmark
$TASKSET python -m benchmark_all_test --device "$1" --tag-filter "$2" \
--output-csv "${TEST_REPORTS_DIR}/operator_benchmark_eager_float32_cpu.csv" \
--output-json-for-dashboard "${TEST_REPORTS_DIR}/operator_benchmark_eager_float32_cpu.json" \
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
for op in $op_list; do
$TASKSET python -m "pt.${op}_test" --tag-filter long \
--output-json-for-dashboard "${TEST_REPORTS_DIR}/operator_microbenchmark_${op}_compile${suffix}.json" \
--benchmark-name "PyTorch operator microbenchmark" --use-compile
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
--benchmark-name "PyTorch operator microbenchmark" --use-compile
$TASKSET python -m "pt.${op}_test" --tag-filter long \
--output-json-for-dashboard "${TEST_REPORTS_DIR}/operator_microbenchmark_${op}${suffix}.json" \
--benchmark-name "PyTorch operator microbenchmark"
-
command name is a variable (`$TASKSET`) that this file sets only to plain text (ast pass, confidence 0.40)
$TASKSET python score_mod.py --config configs/config_basic.yaml \
--output-json-for-dashboard "${TEST_REPORTS_DIR}/attention_microbenchmark.json"
}
-
command name is a variable or substitution — executed command determined at runtime (ast pass, confidence 0.90)
install_torchvision
"$(dirname "${BASH_SOURCE[0]}")/../../scripts/onnx/test.sh"
elif [[ "${TEST_CONFIG}" == *numpy_2* ]]; then
likely benign
LLM, confidence 0.85
Runs the repo's ONNX test script via a path relative to the current script.
Reasoning
The executed path is resolved from dirname of BASH_SOURCE, so it runs the repo's own scripts/onnx/test.sh relative to the current script. This is a standard self-relative invocation.
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
"$SCRIPT_HELPERS_DIR"/build_pytorch.bat
assert_git_not_dirty
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "$TEST_CONFIG" == "openreg" ]]; then
"$SCRIPT_HELPERS_DIR"/test_openreg.bat
return
fi
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ $NUM_TEST_SHARDS -eq 1 ]]; then
"$SCRIPT_HELPERS_DIR"/test_python_shard.bat
"$SCRIPT_HELPERS_DIR"/test_custom_script_ops.bat
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
"$SCRIPT_HELPERS_DIR"/test_python_shard.bat
"$SCRIPT_HELPERS_DIR"/test_custom_script_ops.bat
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
"$SCRIPT_HELPERS_DIR"/test_libtorch.bat
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
"$SCRIPT_HELPERS_DIR"/test_custom_script_ops.bat
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
"$SCRIPT_HELPERS_DIR"/test_libtorch.bat
else
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
"$SCRIPT_HELPERS_DIR"/test_libtorch.bat
else
"$SCRIPT_HELPERS_DIR"/test_python_shard.bat
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
else
"$SCRIPT_HELPERS_DIR"/test_python_shard.bat
if [[ "${SHARD_NUMBER}" == 1 && $NUM_TEST_SHARDS -gt 1 ]]; then
"$SCRIPT_HELPERS_DIR"/test_libtorch.bat
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "${SHARD_NUMBER}" == 1 && $NUM_TEST_SHARDS -gt 1 ]]; then
"$SCRIPT_HELPERS_DIR"/test_libtorch.bat
if [[ "${USE_CUDA}" == "1" ]]; then
"$SCRIPT_HELPERS_DIR"/test_python_jit_legacy.bat
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ "${USE_CUDA}" == "1" ]]; then
"$SCRIPT_HELPERS_DIR"/test_python_jit_legacy.bat
fi
elif [[ "${SHARD_NUMBER}" == 2 && $NUM_TEST_SHARDS -gt 1 ]]; then
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
elif [[ "${SHARD_NUMBER}" == 2 && $NUM_TEST_SHARDS -gt 1 ]]; then
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
"$SCRIPT_HELPERS_DIR"/test_custom_script_ops.bat
fi
-
command name is a variable (`$SCRIPT_HELPERS_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
"$SCRIPT_HELPERS_DIR"/test_custom_backend.bat
"$SCRIPT_HELPERS_DIR"/test_custom_script_ops.bat
fi
fi
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
export PATCHELF_BIN=/usr/local/bin/patchelf
patchelf_version=$($PATCHELF_BIN --version)
echo "patchelf version: " $patchelf_version
if [[ "$patchelf_version" == "patchelf 0.9" ]]; then
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
set +e
origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname.*")
ERRCODE=$?
set -e
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "patching $sofile entry $origname to $patchedname"
$PATCHELF_BIN --replace-needed $origname $patchedname $sofile
fi
fi
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile to ${C_SO_RPATH:-'$ORIGIN:$ORIGIN/lib'}"
$PATCHELF_BIN --set-rpath ${C_SO_RPATH:-'$ORIGIN:$ORIGIN/lib'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath ${C_SO_RPATH:-'$ORIGIN:$ORIGIN/lib'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile to ${LIB_SO_RPATH:-'$ORIGIN'}"
$PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:-'$ORIGIN'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:-'$ORIGIN'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
export PATCHELF_BIN=/usr/local/bin/patchelf
patchelf_version=`$PATCHELF_BIN --version`
echo "patchelf version: " $patchelf_version
if [[ "$patchelf_version" == "patchelf 0.9" ]]; then
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
set +e
origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname.*")
ERRCODE=$?
set -e
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "patching $sofile entry $origname to $patchedname"
$PATCHELF_BIN --replace-needed $origname $patchedname $sofile
fi
fi
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile to " '$ORIGIN:$ORIGIN/lib'
$PATCHELF_BIN --set-rpath '$ORIGIN:$ORIGIN/lib' $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath '$ORIGIN:$ORIGIN/lib' $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile to " '$ORIGIN'
$PATCHELF_BIN --set-rpath '$ORIGIN' $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath '$ORIGIN' $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$py_bin`) and `py_bin` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
found_minor="$("${py_bin}" -c 'import sys; print(f"{sys.version_info[0]}.{sys.version_info[1]}")')"
if [[ "${found_minor}" != "${desired%t}" ]]; then
likely benign
LLM, confidence 0.80
Queries a selected Python interpreter's version to validate the wheel ABI tag.
Reasoning
py_bin names a Python interpreter chosen by the build matrix, and the command only prints its version to check the ABI tag. Running a configured interpreter is expected for wheel builds.
-
command name is a variable (`$PYDIR`, `$PYTHON_EXE_NAME`) that this file sets only to plain text (ast pass, confidence 0.40)
"$PYDIR/$PYTHON_EXE_NAME" -m pip install --upgrade pip setuptools packaging wheel build
-
command name is a variable (`$GCX_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
_run_gcx() {
"${GCX_BIN}" "$@"
}
-
`exec` called with a dynamic (variable/substitution) path (ast pass, confidence 0.85)
exec "${GCX_BIN}" "$@"
likely benign
LLM, confidence 0.70
Wrapper execs a configured gcx binary, forwarding its arguments.
Reasoning
This is a thin wrapper that execs GCX_BIN with the passed arguments. The binary is configured by the user or environment, which is the expected wrapper design, though the path is not validated.
-
[embedded bash] redirect writes to `python` — filename matches a system command (PATH hijack setup) (ast pass, confidence 0.88)
CUDA_LAUNCH_BLOCKING=1 PYTORCH_NO_CUDA_MEMORY_CACHING=1 compute-sanitizer --tool memcheck --error-exitcode=99 <python> repro.py
dismissed
LLM, confidence 0.85
Docs example for compute-sanitizer uses a <python> placeholder that was misread as a redirect.
Reasoning
The <python> token is a documentation placeholder that the reader substitutes with their interpreter. It is parsed as an input redirect in a markdown example, not a real write to a file named python, so there is no PATH hijack.
-
line length 546 characters (raw pass, confidence 0.50)
-
[embedded bash] command name is a variable (`$tmp_venv`) and `tmp_venv` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
result=$("$tmp_venv/bin/python" -c "from tpu_info import device; chip, count = device.get_local_chips(); print(f'chip={chip}, count={count}'); print('true' if count > 0 else 'false')")
exit_code=$?
likely benign
LLM, confidence 0.85
Runs a Python check for TPU chips from a temporary virtualenv.
Reasoning
The variable command is a Python interpreter inside a temporary virtualenv created earlier in the same job, running a fixed inline check for TPU chips. Dynamic dispatch here is an ordinary CI pattern, not an attack.
-
[embedded bash] 24 of 54 non-conventional identifiers are single-character (44%) (token pass, confidence 0.50)
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
set +e
origname=$($PATCHELF_BIN --print-needed $sofile | grep "$origname.*")
ERRCODE=$?
set -e
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "patching $sofile entry $origname to $patchedname"
$PATCHELF_BIN --replace-needed $origname $patchedname $sofile
fi
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
rm -f $(basename $pkg)
$PATCHELF_BIN --set-rpath ${LD_SO_RPATH:-'$ORIGIN:$ORIGIN/../../lib'} $PREFIX/$ROCM_LD/ld.lld
$PATCHELF_BIN --print-rpath $PREFIX/$ROCM_LD/ld.lld
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath ${LD_SO_RPATH:-'$ORIGIN:$ORIGIN/../../lib'} $PREFIX/$ROCM_LD/ld.lld
$PATCHELF_BIN --print-rpath $PREFIX/$ROCM_LD/ld.lld
find $PREFIX/_C -type f -name "*.so*" | while read sofile; do
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile"
$PATCHELF_BIN --set-rpath ${C_SO_RPATH:-'$ORIGIN:$ORIGIN/'../$ROCM_LIB} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath ${C_SO_RPATH:-'$ORIGIN:$ORIGIN/'../$ROCM_LIB} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
done
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Setting rpath of $sofile to ${LIB_SO_RPATH:-'$ORIGIN'}"
$PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:-'$ORIGIN'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
deps+=("$sofile")
-
command name is a variable (`$PATCHELF_BIN`) that this file sets only to plain text (ast pass, confidence 0.40)
$PATCHELF_BIN --set-rpath ${LIB_SO_RPATH:-'$ORIGIN'} ${FORCE_RPATH:-} $sofile
$PATCHELF_BIN --print-rpath $sofile
deps+=("$sofile")
deps_soname+=("$(basename $sofile)")
-
command name is a variable (`$SCRIPT_DIR`) and `SCRIPT_DIR` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
ACCESS_TOKEN="$(APP_ID="$(<"${APP_ID}")" INSTALL_ID="$(<"${INSTALL_ID}")" APP_PRIVATE_KEY="$(<"${APP_PRIVATE_KEY}")" "${SCRIPT_DIR}/app_token.sh")"
echo "${ACCESS_TOKEN}" > "${DST_FILE}"
likely benign
LLM, confidence 0.85
Calls a sibling helper script to mint a GitHub App access token from local credential files.
Reasoning
SCRIPT_DIR is the script's own directory, and the call passes credential files to a sibling app_token.sh that writes a token to a destination file. This is the expected shape of a GitHub App token helper.
-
command name is a variable (`$AWS_S3_CP`) that this file sets only to plain text (ast pass, confidence 0.40)
set -x
${AWS_S3_CP} --no-progress --acl public-read --exclude="*" --include="${PKG_INCLUDE}" --recursive "${PKG_DIR}" "${s3_upload_dir}"
-
[embedded bash] command name is a variable (`$PYTHON_EXECUTABLE`) that this file sets only to plain text (ast pass, confidence 0.40)
export PYTHON_EXECUTABLE
"${PYTHON_EXECUTABLE}" -m pip install \
"torch==${TORCH_VERSION}" --extra-index-url "https://download.pytorch.org/whl/cu${CUDA_SHORT}"
bash .ci/flash-attention/build.sh
-
[embedded bash] 21 of 45 non-conventional identifiers are single-character (47%) (token pass, confidence 0.50)
-
[embedded bash] 25 of 56 non-conventional identifiers are single-character (45%) (token pass, confidence 0.50)
-
[embedded bash] command name is a variable (`$TEST_COMMAND`) that this file sets only to plain text (ast pass, confidence 0.40)
python3 -m pip install $(echo dist/*.whl)[opt-einsum]
${TEST_COMMAND}
-
[embedded bash] command name is a variable (`$TEST_COMMAND`) that this file sets only to plain text (ast pass, confidence 0.40)
python3 -m pip install $(echo dist/*.whl)[opt-einsum]
${TEST_COMMAND}
-
[embedded bash] command name is a variable (`$AWS`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ -d "${RUNNER_TEMP}/hf_cache/hub" ]]; then
"${AWS}" s3 sync "${RUNNER_TEMP}/hf_cache/hub" "s3://${HF_CACHE_S3_BUCKET}/hub" \
--region "${HF_CACHE_S3_REGION}" --no-progress
fi
-
[embedded bash] command name is a variable (`$AWS`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ -d "${RUNNER_TEMP}/hf_datasets" ]]; then
"${AWS}" s3 sync "${RUNNER_TEMP}/hf_datasets" "s3://${HF_CACHE_S3_BUCKET}/datasets" \
--region "${HF_CACHE_S3_REGION}" --no-progress
fi
-
[embedded bash] command name is a variable (`$LOCAL_PATH`) that this file sets only to plain text (ast pass, confidence 0.40)
else
LOCAL_VERSION=$("${LOCAL_PATH}/sccache" --version | cut -d" " -f2)
if [ "${LOCAL_VERSION}" != "${SCCACHE_VERSION}" ]; then
-
[embedded bash] command name is a variable (`$AWS`) that this file sets only to plain text (ast pass, confidence 0.40)
if [[ -d "${HF_CACHE}/${sub}" ]]; then
"${AWS}" s3 sync "${HF_CACHE}/${sub}" "s3://${HF_CACHE_S3_BUCKET}/${sub}" \
--region "${HF_CACHE_S3_REGION}" --no-progress
else
-
line length 520 characters (raw pass, confidence 0.50)
--json-schema '{"type":"object","required":["verdict","confidence","summary","causal_reasoning"],"properties":{"verdict":{"type":"string","enum":["related","unsure","not_related","infra_issue","garbage"]},"confidence":{"type":"number","minimum":0,"maximum":1},"summary":{"type":"string","description":"1-3 se
-
line length 652 characters (raw pass, confidence 0.50)
3. **Read the failure logs.** MANDATORY: for the suspect commit's `failure` event, fetch its `log_url` and read the actual error — the failing assertion, exception, stack trace, or build error, not just the job name — and the relevant test source. Never render a verdict without having read the suspect's
-
[embedded bash] `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
if eval "${command}"; then
echo "Success on attempt $((retry_count + 1))"
return 0
likely benign
LLM, confidence 0.75
Retry helper that evaluates a workflow-supplied command string until it succeeds.
Reasoning
The eval is inside a retry helper that receives its command from the workflow's own steps. The helper does not take external input, so this is a generic retry wrapper with low risk.
-
line length 986 characters (raw pass, confidence 0.50)
A non-exhaustive but growing list needs to mention: [Trevor Killeen](https://github.com/killeent), [Sasank Chilamkurthy](https://github.com/chsasank), [Sergey Zagoruyko](https://github.com/szagoruyko), [Adam Lerer](https://github.com/adamlerer), [Francisco Massa](https://github.com/fmassa), [Alykhan Tejani](https://git
-
command name is a variable (`$ADB_PATH`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Expecting running emulator"
$ADB_PATH devices
DEVICES_COUNT=$($ADB_PATH devices | awk 'NF' | wc -l)
-
command name is a variable (`$ADB_PATH`) that this file sets only to plain text (ast pass, confidence 0.40)
DEVICES_COUNT=$($ADB_PATH devices | awk 'NF' | wc -l)
echo "DEVICES_COUNT:$DEVICES_COUNT"
-
command name is a variable (`$ADB_PATH`) that this file sets only to plain text (ast pass, confidence 0.40)
echo "Waiting for emulator boot completed"
$ADB_PATH wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
{
-
19 of 39 non-conventional identifiers are single-character (49%) (token pass, confidence 0.50)
-
printf format directive `% n` writes to memory (in macro definition) (token pass, confidence 0.90)
auto row = i / n; \
auto col = i % n; \
c[row * ldc + col] = 0; \
for (const auto k : c10::irange(k)) { \
dismissed
LLM, confidence 0.95
A modulo expression inside a C++ macro, misread as a printf format directive.
Reasoning
The token is the C modulo operator `%` followed by a space and `n` in a macro body. It is not a printf format directive and performs no memory write, so this is a false positive from the token pass.
-
25 of 61 non-conventional identifiers are single-character (41%) (token pass, confidence 0.50)
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
-
124 of 277 non-conventional identifiers are single-character (45%) (token pass, confidence 0.50)
-
`exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)
exec(fn_str, globals())
torch._dynamo.config.recompile_limit = 16
likely benign
LLM, confidence 0.70
Module-level exec of a generated function source string in a Dynamo benchmark.
Reasoning
The exec runs a generated function string into the module globals inside a TorchDynamo guard-evaluation benchmark. Dynamo benchmarks legitimately generate and exec guard code, though a reviewer should check where fn_str comes from.
-
command name is a variable (`$ROOT`) that this file sets only to plain text (ast pass, confidence 0.40)
(cd "$WORK/sweep/static" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@")
(cd "$WORK/sweep/dynamic" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@" --dynamic-shapes)
python benchmarks/dynamo/combine_csv.py "$WORK/sweep/static/final.csv" "$WORK/sweep/dynamic/final.csv" > "$WORK/delta.csv"
-
command name is a variable (`$ROOT`) that this file sets only to plain text (ast pass, confidence 0.40)
(cd "$WORK/sweep/static" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@")
(cd "$WORK/sweep/dynamic" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@" --dynamic-shapes)
python benchmarks/dynamo/combine_csv.py "$WORK/sweep/static/final.csv" "$WORK/sweep/dynamic/final.csv" > "$WORK/delta.csv"
gh gist create "$WORK/delta.csv"
-
`subprocess.getstatusoutput` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
get_machine_cmd = "lscpu| grep 'Model name' | awk -F':' '{print $2}'"
machine = subprocess.getstatusoutput(get_machine_cmd)[1].strip()
description = (
"We evaluate different backends "
likely benign
LLM, confidence 0.90
Reads the CPU model name by running a fixed lscpu pipeline through getstatusoutput.
Reasoning
The command is a fixed local string that greps lscpu output for the CPU model name. Although the call is through a variable, nothing external feeds it.
-
`subprocess.Popen` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
print(f"[system] {command}")
p = subprocess.Popen(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
)
likely benign
LLM, confidence 0.85
Benchmark helper that runs a profiling command through a shell and captures its output.
Reasoning
This is a benchmark profiling helper that echoes a command and runs it through a shell for local profiling. The shell use is expected for a developer benchmarking tool.
-
`subprocess.run` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = f'{source_cmd}{PYTHON_CMD} -c "import torch"'
proc = subprocess.run(
cmd,
shell=True,
likely benign
LLM, confidence 0.85
Benchmark runner that executes a Python command through a shell with an optional source prefix.
Reasoning
The command is assembled from a source-setup prefix and a Python invocation within a benchmark runner. The shell usage is expected for launching benchmark subprocesses, with no sign of external input.
-
`subprocess.Popen` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
self._proc = subprocess.Popen(
self.cmd,
stdout=subprocess.PIPE,
likely benign
LLM, confidence 0.75
Benchmark harness class that starts its configured command as a subprocess.
Reasoning
This is a benchmark runner that launches a configured command string through subprocess.Popen. The shell=True flag is not visible in the snippet, but a benchmark harness running its own configured commands is a normal pattern, and nothing here indicates a dropper or hidden payload.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
const std::string script = R"IR(
graph(%self: Tensor, %n: int, %dim: int, %prepend: Tensor?, %append: Tensor?):
%bias: None = prim::Constant()
%ret = aten::diff(%self, %n, %dim, %prepend, %append)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is a named TorchScript IR variable inside a raw string literal holding a graph definition for a test. It is not a printf format directive and never reaches a printf call.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
%bias: None = prim::Constant()
%ret = aten::diff(%self, %n, %dim, %prepend, %append)
%cloned = aten::clone(%ret, %bias)
return (%cloned)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
Same as the other IR-string hits: %n is a TorchScript IR variable name in a raw string literal used by a generated op test, not a format directive.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
const std::string script = R"IR(
graph(%self: Tensor, %n: int):
%bias: None = prim::Constant()
%ret = aten::matrix_power(%self, %n)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph for a matrix_power test, with no printf call involved.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
%bias: None = prim::Constant()
%ret = aten::matrix_power(%self, %n)
%cloned = aten::clone(%ret, %bias)
return (%cloned)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph, not a printf write directive.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
const std::string script = R"IR(
graph(%n: int, %self: Tensor):
%bias: None = prim::Constant()
%ret = aten::polygamma(%n, %self)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph for a polygamma test; the rule matched IR syntax, not a format string.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
%bias: None = prim::Constant()
%ret = aten::polygamma(%n, %self)
%cloned = aten::clone(%ret, %bias)
return (%cloned)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph, not a printf format directive.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
const std::string script = R"IR(
graph(%n: int, %self: Tensor):
%bias: None = prim::Constant()
%ret = aten::special_polygamma(%n, %self)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph for a special_polygamma test, not a format directive.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
%bias: None = prim::Constant()
%ret = aten::special_polygamma(%n, %self)
%cloned = aten::clone(%ret, %bias)
return (%cloned)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph, not a printf write.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
const std::string script = R"IR(
graph(%self: Tensor, %n: int):
%bias: None = prim::Constant()
%ret = aten::linalg_matrix_power(%self, %n)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph for a linalg_matrix_power test; no printf is involved.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
%bias: None = prim::Constant()
%ret = aten::linalg_matrix_power(%self, %n)
%cloned = aten::clone(%ret, %bias)
return (%cloned)
dismissed
LLM, confidence 0.97
TorchScript IR test graph text containing the variable name %n.
Reasoning
The %n is an IR variable in a raw-string TorchScript graph, not a format directive.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
std::cout << cmd.str() << std::endl;
std::system(cmd.str().c_str());
# endif
likely benign
LLM, confidence 0.70
Diagnostic C++ tool that builds and runs a shell command via std::system.
Reasoning
This looks like a diagnostic binary that prints a command and runs it with std::system to report parallel-backend information. The command is built locally, the printing before the call suggests a visible, user-run diagnostic, and nothing indicates attacker-controlled input or hidden behavior.
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
-
71 of 121 non-conventional identifiers are single-character (59%) (token pass, confidence 0.50)
-
printf format directive `%n` writes to memory (in macro definition) (token pass, confidence 0.90)
#define TORCH_SDT_ARGFMT(no) %n[TORCH_SDT_S##no]@%[TORCH_SDT_A##no]
#define TORCH_SDT_ARG_TEMPLATE_0
#define TORCH_SDT_ARG_TEMPLATE_1 TORCH_SDT_ARGFMT(1)
dismissed
LLM, confidence 0.96
Preprocessor macro building an SDT tracepoint assembler operand template.
Reasoning
The %n is an operand-reference token inside an assembler note template for SystemTap/SDT tracepoints, consumed by the GNU assembler in inline asm. It is not a printf write.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
module = __import__(info["module"], fromlist=[""])
except Exception:
return None
likely benign
LLM, confidence 0.85
Sphinx linkcode helper that dynamically imports a documented module by name.
Reasoning
This is a Sphinx conf.py helper that imports a module named in a documentation lookup table, inside a try/except that returns None on failure. This is standard linkcode resolution, and the module name comes from the docs' own code, not from untrusted input.
-
line length 538 characters (raw pass, confidence 0.50)
Below is a simple example of migrating an existing kernel that uses `TORCH_LIBRARY` to the stable ABI (`TORCH_STABLE_LIBRARY`). For a larger end to end example you can take a look at the FA3 repository. Specifically the diff between [`flash_api.cpp`](https://github.com/Dao-AILab/flash-attention/blob/ad70a007e6287d4f7e7
-
[embedded python] 21 of 35 non-conventional identifiers are single-character (60%) (token pass, confidence 0.50)
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
f"Acc@1: {np.mean(top1_acc):.6f} "
f"(ε = {epsilon:.2f}, δ = {args.delta}) for α = {best_alpha}"
)
else:
-
command name is a variable (`$PIP`) that this file sets only to plain text (ast pass, confidence 0.40)
${PIP} install --index-url ${DOWNLOAD_PYTORCH_ORG}/test/ "${TRITON_PACKAGE}~=${TRITON_VERSION}"
else
-
command name is a variable (`$PIP`) that this file sets only to plain text (ast pass, confidence 0.40)
${PIP} install --index-url ${DOWNLOAD_PYTORCH_ORG}/nightly/ "${TRITON_PACKAGE}==${TRITON_VERSION}+git${TRITON_COMMIT_ID}"
fi
-
`subprocess.Popen` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
p = subprocess.Popen(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
)
likely benign
LLM, confidence 0.70
Helper runs a caller-provided command string through a shell for release-notes tooling.
Reasoning
shell=True with a caller-supplied command is a known pattern in release tooling; the command comes from internal scripts rather than untrusted input, though it is a generic injection risk worth noting.
-
command name is a variable (`$CXX`) that this file sets only to plain text (ast pass, confidence 0.40)
$CXX -I$TORCH_ROOT_DIR/build/aten/src -I$TORCH_ROOT_DIR/aten/src -I$TORCH_ROOT_DIR/build -I$TORCH_ROOT_DIR -I$TORCH_ROOT_DIR/build/caffe2/aten/src -I$TORCH_ROOT_DIR/torch/csrc/api -I$TORCH_ROOT_DIR/torch/csrc/api/include -std=gnu++20 -fPIE -o $1.o -c $1
-
command name is a variable (`$CXX`) that this file sets only to plain text (ast pass, confidence 0.40)
$CXX -rdynamic -Wl,--no-as-needed,$TORCH_ROOT_DIR/build/lib/libtorch.so $1.o -Wl,--no-as-needed,$TORCH_ROOT_DIR/build/lib/libtorch_cpu.so -Wl,--no-as-needed,$TORCH_ROOT_DIR/build/lib/libc10.so -o $2
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
std::cout << "Generating test data: " << test_data_cmd << std::endl;
int result1 = std::system(test_data_cmd.c_str());
if (result1 != 0) {
std::cerr << "Warning: Test data generation failed with code " << result1
likely benign
LLM, confidence 0.80
Test program shells out to generate model test data.
Reasoning
std::system invoked with a command built in the test to generate test data for AOTI inference tests; a build/test setup step in a repository test, not malicious.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
std::cout << "Generating model files: " << models_cmd << std::endl;
int result2 = std::system(models_cmd.c_str());
if (result2 != 0) {
std::cerr << "Warning: Model generation failed with code " << result2
likely benign
LLM, confidence 0.80
Test program shells out to generate model files for AOTI tests.
Reasoning
Same pattern as the sibling finding: a test harness runs a model-generation command via std::system; consistent with a legitimate test setup.
-
`execl` called with a non-literal path (ast pass, confidence 0.90)
std::cout << "Execute mpiexec from: " << STR(MPIEXEC) << '\n';
execl(STR(MPIEXEC), "-np 2", argv[0], (char*)nullptr);
}
likely benign
LLM, confidence 0.80
MPI test re-execs itself under mpiexec using a build-time path macro.
Reasoning
execl launches mpiexec using a compile-time macro path in an MPI test, a standard way to re-exec under mpiexec; legitimate test code.
-
31 of 69 non-conventional identifiers are single-character (45%) (token pass, confidence 0.50)
-
`compile` called on a constructed string (ast pass, confidence 0.80)
bom = b'\xef\xbb\xbf'
compile(bom + b'print(1)\n', '', 'exec')
compile(source='pass', filename='?', mode='exec')
compile(dont_inherit=False, filename='tmp', source='0', mode='eval')
likely benign
LLM, confidence 0.85
CPython test exercising compile() with literal and BOM-prefixed sources.
Reasoning
CPython test suite exercising compile() with varied arguments, including BOM bytes; standard conformance testing with no malicious payload.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
bom = b'\xef\xbb\xbf'
self.assertEqual(eval(bom + b'a', globals, locals), 1)
self.assertEqual(eval('"\xe5"', globals), "\xe5")
self.assertRaises(TypeError, eval)
likely benign
LLM, confidence 0.85
CPython test exercising eval() on constructed byte and string inputs.
Reasoning
CPython test suite checking eval() behavior with BOM and literal strings; expected conformance testing.
-
`exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)
d = {}
exec(statictests, globals(), d)
for method in testmeths:
exec(method_template % method, globals(), d)
likely benign
LLM, confidence 0.93
Module-level exec that builds test methods from hard-coded templates in a CPython class test.
Reasoning
CPython's class tests build methods from static test source and a template at import time to create AllTests. This is a well-known, benign test-generation idiom in the stdlib test suite.
-
`exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)
for method in testmeths:
exec(method_template % method, globals(), d)
AllTests = type("AllTests", (object,), d)
del d, statictests, method, method_template
likely benign
LLM, confidence 0.93
Second exec in the same test-generation loop that populates AllTests.
Reasoning
Same generated-test construction as the preceding exec. The method_template and testmeths values are fixed in the test module, and the result is a type built for testing.
-
identifier `fooжжж` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)
0="""''', 5, 13)
check('b"fooжжж"'.encode(), 1, 1, 1, 10)
# Errors thrown by symtable.c
-
`builtins.len = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
try:
builtins.len = self.module.lru_cache(4)(len)
for i in [0, 0, 1, 2, 3, 3, 4, 5, 6, 1, 7, 2, 1]:
self.assertEqual(len('abcdefghijklmn'[:i]), i)
dismissed
LLM, confidence 0.90
CPython functools test temporarily wrapping builtins.len in lru_cache and restoring it.
Reasoning
The test temporarily replaces builtins.len with an lru_cache wrapper to exercise caching. The finally block at line 1565 restores the original, so the patch is scoped to the test. This is a legitimate test technique, though it is a global side effect.
-
`builtins.len = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
finally:
builtins.len = old_len
def test_lru_star_arg_handling(self):
dismissed
LLM, confidence 0.90
Restoration of builtins.len after the lru_cache test.
Reasoning
This is the finally block that restores builtins.len to its saved value, which is the cleanup half of the temporary patch above. It is benign test hygiene.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
old_trace = sys.gettrace()
sys.settrace(trace)
try:
func(*args, **kwargs)
likely benign
LLM, confidence 0.90
Test installs a trace function to record line numbers during pattern-matching checks.
Reasoning
sys.settrace is used by CPython's pattern-matching tests to check line-number tracing of a function; the 'anti-analysis' label is a heuristic artifact of the file calling exec/eval elsewhere, not evidence of evasion.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
finally:
sys.settrace(old_trace)
return actual_linenos
likely benign
LLM, confidence 0.90
Test restores the previous trace function after recording line numbers.
Reasoning
Restoring the previous trace function in a finally block is the standard pattern for test tracing; benign.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
self.addCleanup(sys.settrace, sys.gettrace())
sys.settrace(lambda a,b,c:None)
x = 12
likely benign
LLM, confidence 0.90
Test installs a no-op trace function to exercise scope behavior.
Reasoning
sys.settrace with a no-op lambda, cleaned up via addCleanup, is a standard CPython scope-test pattern; benign.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
self.addCleanup(sys.settrace, sys.gettrace())
sys.settrace(tracer)
adaptgetter("foo", TestClass, (1, ""))
sys.settrace(None)
likely benign
LLM, confidence 0.90
Test sets a tracer around an adaptation call and clears it afterward.
Reasoning
Installing a tracer around an adapter call and resetting it, with cleanup registered; benign test code.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
adaptgetter("foo", TestClass, (1, ""))
sys.settrace(None)
self.assertRaises(TypeError, sys.settrace)
likely benign
LLM, confidence 0.90
Test clears the trace function and checks that sys.settrace requires an argument.
Reasoning
Clearing the trace function and asserting TypeError on bare sys.settrace is a CPython unit test check; benign.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
with torch._dynamo.error_on_graph_break(False):
result = eval("x" + case + "y", locals())
self.assertEqual(result, expected)
likely benign
LLM, confidence 0.88
Test evaluates set-operator expressions built from a fixed list of method-name cases.
Reasoning
eval of 'x' + case + 'y' where case iterates over a fixed table of set-method names from _TestSubsets; the strings are test constants, not external input, so this is benign test code.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
with torch._dynamo.error_on_graph_break(False):
result = eval("y" + rcase + "x", locals())
self.assertEqual(result, expected)
if rcase in _TestSubsets.case2method:
likely benign
LLM, confidence 0.88
Test evaluates reversed set-operator expressions from a fixed case table.
Reasoning
Same pattern as the sibling finding: eval over a fixed table of reversed-operator test cases in CPython's set tests; benign.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
SysModuleTest.test_getframe.__code__ \
is sys._getframe().f_code
)
likely benign
LLM, confidence 0.95
Test assertion comparing sys._getframe().f_code to a function's code object.
Reasoning
This is CPython's own sys test suite checking that sys._getframe returns the correct code object. The frame use is part of testing the interpreter, and the anti-analysis label comes only from the file also containing sys.exit or exec.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
i = 0
f = sys._getframe(i)
while f:
self.assertEqual(
likely benign
LLM, confidence 0.95
Test loop walking frames via sys._getframe(i) until exhaustion.
Reasoning
Standard CPython test walking the call stack with sys._getframe to verify frame traversal. Legitimate test of interpreter behaviour.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
try:
f = sys._getframe(i)
except ValueError:
break
likely benign
LLM, confidence 0.95
Test probing stack depth with sys._getframe and catching ValueError.
Reasoning
Frame walk in a CPython test, catching ValueError to find the stack depth. Expected behaviour for testing sys._getframe bounds.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
frame = d.pop(main_id)
self.assertTrue(frame is sys._getframe())
likely benign
LLM, confidence 0.95
Assertion that the captured main-thread frame is the current frame.
Reasoning
Test checking that sys._getframe() identifies the current thread's frame in the thread-frames test. Nothing here is hidden or evasive.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
def func():
return sys._getframe()
x = func()
check(x, size('3Pi2c2P7P2ic??2P'))
likely benign
LLM, confidence 0.95
Helper returning sys._getframe() so the test can check frame object size.
Reasoning
Size-check test in CPython that calls sys._getframe to build a frame object for measuring its memory layout.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
self._frame_state = None
sys.settrace(self._tracefunc)
if isinstance(fn, torch.nn.Module):
fn = fn.forward
likely benign
LLM, confidence 0.75
Test installs a trace function to record frame state during guard serialization.
Reasoning
sys.settrace installs a frame tracer for guard-state capture in a dynamo test and is reset to None in finally. The anti-analysis note is a poor fit for a test tracer; there is no evasion or payload behaviour.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
finally:
sys.settrace(None)
if self._frame_state is None:
likely benign
LLM, confidence 0.75
Clears the trace function after the test's traced region.
Reasoning
Matching settrace(None) cleanup in the finally block after the tracing region. Standard test scaffolding.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.isinstance = patched_isinstance
opt_fn = torch.compile(backend="eager", fullgraph=True)(fn)
res = opt_fn(x, y)
likely benign
LLM, confidence 0.95
Test monkey-patches builtins.isinstance to exercise Dynamo guard behavior.
Reasoning
Temporarily replacing builtins.isinstance inside a PyTorch Dynamo test to check recompilation behavior; the code restores the original in a finally block. This is deliberate test instrumentation, not malicious persistence.
-
`builtins.isinstance = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
finally:
builtins.isinstance = builtin_isinstance
likely benign
LLM, confidence 0.93
Restores builtins.isinstance after the monkey-patch test.
Reasoning
This is the restore step of the same test's try/finally, reinstating the original builtin_isinstance. Benign test scaffolding.
-
`os.system` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
retcode = os.system(command)
self.assertEqual(retcode, 0, repro_message)
likely benign
LLM, confidence 0.80
A CUTLASS backend test shells out to run a reproduction command and asserts success.
Reasoning
os.system runs a repro command in a test that asserts a zero return code. This is a test helper, and the command is constructed by the test itself rather than from external input.
-
`os.system` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
if not IS_FBCODE or not IN_RE_WORKER:
retcode = os.system(exe_file.name)
self.assertEqual(retcode, 0, repro_message)
likely benign
LLM, confidence 0.80
A CUTLASS backend test runs a generated executable file and asserts its exit status.
Reasoning
The test runs a freshly generated executable and checks its exit code. This is ordinary test behaviour in a compiler test suite, with no network or persistence visible.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
result = eval("x" + case + "y", locals())
self.assertEqual(result, expected)
likely benign
LLM, confidence 0.90
A set-operator test evals a string built from a fixed operator name table.
Reasoning
The eval string is built from a fixed table of operator names (case) within a set-operator test. The input set is controlled by the test, so this is not an injection risk.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
rcase = TestSubsets.reverse[case]
result = eval("y" + rcase + "x", locals())
self.assertEqual(result, expected)
if rcase in TestSubsets.case2method:
likely benign
LLM, confidence 0.90
A set-operator test evals a reversed operator spelling from a fixed table.
Reasoning
This is the reverse-operator counterpart of the previous eval, drawing its operator names from a fixed test table. The pattern is a standard way to test operator spellings.
-
command name is a variable (`$SRC_ROOT`) and `SRC_ROOT` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
BUILD_ROOT="${LIBTORCH_BUILD_ROOT}" \
"${SRC_ROOT}/scripts/build_mobile.sh"
}
likely benign
LLM, confidence 0.85
A mobile build script invokes build_mobile.sh through a source-root variable.
Reasoning
SRC_ROOT is a build-script variable pointing to the repository's scripts directory, so the command is a fixed script path resolved from the source tree. This is normal build-script behaviour.
-
command name is a variable (`$SRC_ROOT`) and `SRC_ROOT` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)
BUILD_ROOT="${LIBTORCH_BUILD_ROOT}" \
"${SRC_ROOT}/scripts/build_mobile.sh" \
-DCMAKE_CXX_FLAGS="-DSTRIP_ERROR_MESSAGES" \
likely benign
LLM, confidence 0.85
A mobile build script runs build_mobile.sh with additional CMake flags.
Reasoning
This is the same invocation of build_mobile.sh through SRC_ROOT with extra CMake flags. It is a routine build step with no sign of hidden execution.
-
command name is a variable (`$TORCH_BIN_DIR`) that this file sets only to plain text (ast pass, confidence 0.40)
pushd "$TMP_DIR"
"$TORCH_BIN_DIR"/aot_model_compiler_test --model "$MODEL" --model_name=aot_test_model --output_llvm=$COMPILED_CODE --model_version=v1 --input_dims="2,2,2"
if [ ! -f "$COMPILED_MODEL" ] || [ ! -f "$COMPILED_CODE" ]; then
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
def dynamic_import_test(name: str):
__import__(name)
likely benign
LLM, confidence 0.85
A torch.package test fixture exposes a dynamic __import__ helper.
Reasoning
This is a torch.package test fixture whose dynamic import exists to exercise the packaging machinery. The function is tiny and used only by tests, with no payload or obfuscation.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
module = __import__(module_name, fromlist=function_names)
for func_name in function_names:
if hasattr(module, func_name):
likely benign
LLM, confidence 0.70
A native DSL ops test dynamically imports a module and checks for named functions.
Reasoning
Importing a module by name with fromlist and then checking attributes fits a test that loads native DSL op modules. The module_name source is not shown, so some doubt remains, but the code is plausibly a test loader.
-
`subprocess.check_output` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = "rocminfo | grep -o 'Uuid:.*GPU-.*' | sed 's/Uuid:.*GPU-//'"
uuids = subprocess.check_output(cmd, shell=True, text=True).strip().split("\n")
uuids = [s.strip() for s in uuids]
raw_uuids = torch.cuda._raw_device_uuid_amdsmi()
likely benign
LLM, confidence 0.90
A test reads GPU UUIDs by running a fixed rocminfo shell pipeline.
Reasoning
The command is a constant pipeline (rocminfo | grep | sed) assigned locally in a test to read GPU UUIDs; the severity is inflated because the command is a variable, but it is not attacker-controlled.
-
`subprocess.check_output` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = "rocminfo | grep -o 'Uuid:.*GPU-.*' | sed 's/Uuid://'"
uuids = subprocess.check_output(cmd, shell=True, text=True).strip().split("\n")
uuids = [s.strip() for s in uuids]
likely benign
LLM, confidence 0.90
A test helper runs a fixed rocminfo shell pipeline to list GPU UUIDs.
Reasoning
Same pattern: a fixed local command string run with shell=True in a GPU test helper, with no external input.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
self_module = __import__(os.path.splitext(os.path.basename(__file__))[0])
likely benign
LLM, confidence 0.90
Test module re-imports itself by its own filename for multiprocessing.
Reasoning
Self-import via __import__ of the current file's basename is a standard multiprocessing pickling trick for test modules; the argument derives from __file__, not external data.
-
identifier `iθ` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
expected_eigenvalue = complex(math.cos(theta), math.sin(theta))
-
identifier `iπ` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
expected_eigenvalue = complex(math.cos(theta), math.sin(theta))
expected_val = torch.tensor(
-
identifier `λv` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)
lhs = A_complex.to(vecs_complex.dtype) @ vecs_complex
rhs = vals_complex.unsqueeze(-2) * vecs_complex
-
identifier `λv` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)
lhs = A_real.to(vecs_real.dtype) @ vecs_real
rhs = vals_real.unsqueeze(-2) * vecs_real
-
identifier `λv` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)
lhs = A_batch.to(vecs_batch.dtype) @ vecs_batch
rhs = vals_batch.unsqueeze(-2) * vecs_batch
-
`eval` called on a constructed string (ast pass, confidence 0.80)
if torch.device(device).type == 'cuda':
storage_type = eval('torch.cuda.' + storage_type_name)
else:
storage_type = eval('torch.' + storage_type_name)
likely benign
LLM, confidence 0.85
Test evals a torch storage class name built from a local string.
Reasoning
eval on 'torch.' plus a storage type name from a test-controlled list is a common idiom in PyTorch's serialization tests; the concatenated value is not external input.
-
`eval` called on a constructed string (ast pass, confidence 0.80)
else:
storage_type = eval('torch.' + storage_type_name)
N = 10
likely benign
LLM, confidence 0.85
Test evals a torch storage class name built from a local string.
Reasoning
Same eval of a constructed torch attribute path from a test-local name; low risk and typical of PyTorch tests.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
cpp_warn_fn()
frameinfo = inspect.getframeinfo(inspect.currentframe())
warning = w[0]
likely benign
LLM, confidence 0.85
Test uses frame introspection to validate warning source location.
Reasoning
inspect.currentframe is used to get frame info for warning-location checks in a test; the co-occurrence with sys.exit or eval elsewhere is a weak anti-analysis signal in a test suite.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
scripted_warn_fn()
frameinfo = inspect.getframeinfo(inspect.currentframe())
warning = w[0]
likely benign
LLM, confidence 0.90
Test code retrieving frame info via inspect while checking warnings.
Reasoning
inspect.currentframe used to get frame info for a warning test in PyTorch's test suite; the 'anti-analysis' co-occurrence with exit/exec is incidental and the snippet shows ordinary test code.
-
`subprocess.check_output` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = f"ldd {library} | grep libsycl"
results = subprocess.check_output(cmd, shell=True).strip().split(b"\n")
self.assertEqual(len(results), 1)
likely benign
LLM, confidence 0.75
Test shells out to ldd and grep to count libsycl shared libraries.
Reasoning
Shell pipeline ldd|grep with a library path from a test fixture to count libsycl copies; a fixed local diagnostic, not hostile, though shell=True with interpolated path is poor practice.
-
`execve` called with a non-literal path (ast pass, confidence 0.90)
char** env = args->env.empty() ? environ : args->env.data();
execve(args->exec_cmd, args->argv.data(), env);
} else {
likely benign
LLM, confidence 0.90
Perfetto's subprocess launcher calls execve with a caller-provided path.
Reasoning
Standard execve in Perfetto's process-spawning helper, where the caller supplies the executable path by design; this is the expected implementation of a subprocess launcher.
-
`execvp` called with a non-literal path (ast pass, confidence 0.90)
die("A full path is required for |exec_cmd| when setting |env|");
execvp(args->exec_cmd, args->argv.data());
}
likely benign
LLM, confidence 0.90
Perfetto's subprocess launcher falls back to execvp with a caller-provided command.
Reasoning
Standard execvp fallback in the same Perfetto subprocess helper, requiring a full path when env is set; legitimate.
-
line length 588 characters (raw pass, confidence 0.50)
input, weight0, weight1, weight2, weight3, hx_, cx_: "GradMode::is_enabled() ? mkldnn_rnn_layer_differentiable_backward(input, weight0, weight1, weight2, weight3, hx_, cx_, result0, result1, result2, grads[0], grads[1], grads[2], reverse, mode, hidden_size, num_layers, has_biases, train, bidirectional, batch_sizes, b
-
line length 554 characters (raw pass, confidence 0.50)
self: "self.layout() == c10::kJagged ? at::_nested_from_padded_tensor_symint(grad, at::_nested_get_offsets(self), at::_nested_get_jagged_dummy(self), at::_nested_get_ragged_idx(self), at::_nested_get_min_seqlen(self).defined() ? std::optional<Tensor>(at::_nested_get_min_seqlen(self)) : ::std::nullopt, at::_nested_get
-
`subprocess.check_call` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
try:
subprocess.check_call(
binary_file, shell=True, cwd=get_oss_binary_folder(TestType.PY)
)
likely benign
LLM, confidence 0.80
Coverage tooling runs a test binary through the shell.
Reasoning
Runs a locally built test binary via shell=True in a coverage tool; the command is a file path from the build tree. Shell use is unnecessary but not malicious.
-
`os.system` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = f"{llvm_tool_path}/llvm-cov export {cmd_binary} {cmd_shared_library} -instr-profile={merged_file} > {json_file}"
os.system(cmd)
likely benign
LLM, confidence 0.85
Coverage script invokes llvm-cov via os.system with local paths.
Reasoning
os.system with an f-string built from llvm tool paths and coverage file names in a developer coverage script; interpolation of local paths, not obfuscation or payload delivery.
-
`os.popen` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
git_diff = f"git diff --name-only {sys.argv[1]} {sys.argv[1]}^"
changed_files = os.popen(git_diff).read().split("\n")
freq_dict = get_freq_dict(
TESTS, [x for x in changed_files if x != "" and not x.startswith("test")]
likely benign
LLM, confidence 0.85
CI script runs git diff via os.popen using a command-line revision.
Reasoning
os.popen runs a git diff command built from sys.argv[1] in a CI target-determination script; the injection surface is a local developer argument, not a remote attack.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
f: types.FrameType | None = sys._getframe()
while f is not None:
if f.f_code is code:
likely benign
LLM, confidence 0.90
Bytecode debugger walks the call stack to locate a frame.
Reasoning
sys._getframe walking the stack to find a code object is a standard debugger technique in a bytecode debugging utility; the anti-analysis label is a heuristic false match.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
self._old_trace = sys.gettrace()
sys.settrace(self._settrace_callback)
likely benign
LLM, confidence 0.90
Bytecode debugger installs a trace callback via sys.settrace.
Reasoning
sys.settrace in a debugger module installing its own trace callback, with the previous trace saved and restored; expected debugger behavior.
-
`sys.settrace` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
sys.settrace(self._old_trace)
return False
likely benign
LLM, confidence 0.90
Restores the prior trace function when the bytecode debugger context exits.
Reasoning
sys.settrace restoring the previous trace function in a context manager is a standard debugger pattern in a bytecode debugger module; no obfuscation or malicious behavior shown.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
prev_frame = sys._getframe()
while (
likely benign
LLM, confidence 0.90
Inspects the caller frame to detect non-recursive disable wrappers in Dynamo.
Reasoning
sys._getframe is used to inspect the previous frame to detect disable wrappers, a known internal PyTorch Dynamo mechanism. Frame introspection here is legitimate.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
value = __import__(
module_name,
fromlist=fromlist,
likely benign
LLM, confidence 0.80
Dynamically imports a module by name inside symbolic conversion.
Reasoning
__import__ with a module_name variable is a normal dynamic import pattern used to resolve modules at runtime during symbolic tracing; the snippet shows no hidden payload.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
for case_name in case_names:
case = __import__(case_name, globals(), locals(), [], 1)
variables = [name for name in dir(case) if name in case_fields]
export_case(**{v: getattr(case, v) for v in variables})(case.model)
likely benign
LLM, confidence 0.85
Imports export example case modules by name to register them.
Reasoning
Loops over a list of case names to import example modules from the export db package; a conventional plugin/example loader with no network or decoding involved.
-
`builtins.max = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.max = functools.partial(
_tensor_min_max, real_callable=original_max, tensor_callable=torch.maximum
)
likely benign
LLM, confidence 0.70
Temporarily patches builtins max to a tensor-aware wrapper during export tracing.
Reasoning
Temporarily replaces builtins max/min during non-strict export tracing and restores them in a finally block. Monkeypatching builtins is unusual and fragile, but it is scoped and documented as a tracing workaround, not hidden malicious behavior.
-
`builtins.min = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.min = functools.partial(
_tensor_min_max, real_callable=original_min, tensor_callable=torch.minimum
)
likely benign
LLM, confidence 0.70
Temporarily patches builtins min to a tensor-aware wrapper during export tracing.
Reasoning
Same scoped builtins min patch as the max case, restored in a finally block; a tracing accommodation rather than malicious persistence.
-
`builtins.max = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
finally:
builtins.max = original_max
builtins.min = original_min
math.pow = original_pow
likely benign
LLM, confidence 0.75
Restores the original builtins max in a finally block after tracing.
Reasoning
This is the restore step in a finally block, returning builtins.max to its original value; it reverses the scoped patch and shows no persistent malicious effect.
-
`builtins.min = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
builtins.max = original_max
builtins.min = original_min
math.pow = original_pow
likely benign
LLM, confidence 0.75
Restores the original builtins min in a finally block after tracing.
Reasoning
Restore step in a finally block returning builtins.min to its original value, paired with the scoped patch above.
-
identifier `cₙ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)
y = c₀*a₀ + c₁*a₁ + c₂*a₂ + ... + cₙ*aₙ
where each aᵢ must be one of these specific patterns:
-
identifier `aₙ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)
y = c₀*a₀ + c₁*a₁ + c₂*a₂ + ... + cₙ*aₙ
where each aᵢ must be one of these specific patterns:
-
identifier `aᵢ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)
where each aᵢ must be one of these specific patterns:
- ModularIndexing(var, divisor, modulo)
- FloorDiv(ModularIndexing(var, 1, modulo), divisor)
-
identifier `cₙ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)
The key pattern we need is:
- Coefficients are strictly decreasing: c₀ > c₁ > c₂ > ... > cₙ
- Each coefficient matches the product of ranges of later terms (mixed-radix property)
- Each term extracts a bounded range, creating non-overlapping "slots"
-
`inspect.stack` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
overall_gb = sum(call[1] for call in collected_calls)
cur_file = inspect.stack()[1].filename
summary_str = (
f"SUMMARY ({cur_file})\n"
likely benign
LLM, confidence 0.85
Reads the caller's filename via inspect.stack for a memory summary message.
Reasoning
inspect.stack used to get the calling filename for a summary string in a diagnostic/logging context; ordinary introspection with no anti-analysis behavior.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
components = name.split(".")
obj = __import__(components[0])
for component in components[1:]:
obj = getattr(obj, component)
likely benign
LLM, confidence 0.85
Dynamic __import__ of a top-level module name while resolving a dotted path in PyTorch's _utils.
Reasoning
Standard PyTorch helper that resolves a dotted attribute path by importing the top-level module from a name split on dots. The argument is a module name from internal code, not attacker-controlled input in this snippet. Common legitimate pattern.
-
compression ratio 0.824 is >2σ above file mean 0.665 (raw pass, confidence 0.50)
"sparse_coo_tensor(IntArrayRef size, *, ScalarType dtype=None, Device? device=None, bool requires_grad=False, bool check_invariants=None)",
});
-
compression ratio 0.784 is >2σ above file mean 0.639 (raw pass, confidence 0.50)
m.def(
"monitored_barrier_(Tensor tensor, __torch__.torch.classes.c10d.ProcessGroup process_group, int[] device_ids, int timeout, bool wait_all_ranks) -> ()");
m.def(
-
`popen` called with a non-literal command (ast pass, confidence 0.85)
std::string output;
FILE* pipe = popen(cmd.c_str(), "r");
TORCH_CHECK(pipe, "Failed to start py-spy, not installed?");
while (fgets(buf.data(), buf.size(), pipe)) {
likely benign
LLM, confidence 0.85
popen call executing py-spy to collect process stack traces for distributed diagnostics.
Reasoning
Runs py-spy via popen to dump stack traces for a diagnostics handler; the error message refers to py-spy not being installed. Command is built internally; using popen with a constructed command is expected for this diagnostic feature.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
TORCH_CHECK(system(compile_cmd.c_str()) == 0, "Failed to compile cpp file.");
TORCH_CHECK(system(link_cmd.c_str()) == 0, "Failed to link files.");
likely benign
LLM, confidence 0.85
system() calls running compile and link commands to build a .so for an AOTInductor package.
Reasoning
Compiles and links generated C++ code into a shared object for AOT Inductor packages. Commands are built from internal compiler/link paths. Shelling out to a compiler is the legitimate design of this loader.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
TORCH_CHECK(system(compile_cmd.c_str()) == 0, "Failed to compile cpp file.");
TORCH_CHECK(system(link_cmd.c_str()) == 0, "Failed to link files.");
likely benign
LLM, confidence 0.85
system() call linking compiled objects into a .so during AOTInductor packaging.
Reasoning
Second system() call in the same compile/link sequence, linking objects into the shared library. Same legitimate build step.
-
printf format directive `%n` writes to memory (in string literal) (token pass, confidence 0.90)
std::string line;
std::string fmt = "File \"%1024[^\"]\", line %u, in %1024[^\n]\n%n";
while (std::getline(stream, line)) {
dismissed
LLM, confidence 0.90
scanf-style format string used to parse stack-trace lines, containing %n for a consumed-character count.
Reasoning
The %n appears inside a string used as a scanf-style pattern for parsing stack trace lines (%1024[^"] are scanf conversions). In scanf, %n stores a count of characters consumed, not a format-string write vulnerability; the string is a parsing format, not an attacker-controlled printf format. Benign.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
#else
return (system(cmd.c_str()) == 0);
#endif
}
likely benign
LLM, confidence 0.85
system() call invoking the C++ compiler to build a generated fused kernel.
Reasoning
Non-Windows branch of the fuser compiling generated kernel source by invoking the system compiler. This is the JIT fuser's expected behavior, with the command built from configured compiler flags and temp file paths.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
#else
int r = system(result.c_str());
#endif
if (config.openmp && r != 0) {
likely benign
LLM, confidence 0.85
system() call running the compile command for a fused CPU kernel with OpenMP fallback.
Reasoning
Runs the compile command for the fused CPU kernel and checks the result for OpenMP fallback. Legitimate compiler invocation in the JIT fuser.
-
`system` called with a non-literal argument (ast pass, confidence 0.90)
std::string cmd = format(disas_string, env);
int r = system(cmd.c_str());
AT_ASSERT(r == 0);
}
likely benign
LLM, confidence 0.85
system() call running a disassembler command for debugging generated kernels.
Reasoning
Formats a disassembly command from a template and runs it via system() for debugging output, asserting success. Developer tooling for inspecting generated code, not malicious.
-
compression ratio 0.789 is >2σ above file mean 0.698 (raw pass, confidence 0.50)
{
"aten::empty(int[] size, *, int? dtype, int? layout, Device? device, bool? pin_memory, MemoryFormat? memory_format=contiguous_format) -> Tensor",
"aten::full(int[] size, Scalar fill_value, *, int? dtype, int? layout, Device? device, bool? pin_memory) -> Tensor",
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor = aten::gru(%input.1, %hx.1, %params_cpu, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first)
return (%y.1, %hn.1) )";
std::string prepacked_ops_pattern = R"(
dismissed
LLM, confidence 0.90
Token-pass hit on '%hn.1' inside a TorchScript IR pattern string used by the Vulkan rewrite pass.
Reasoning
%hn here is part of a JIT IR pattern string (aten::gru output named %hn.1), a graph-pattern variable name, not a printf directive. The format-string finding is a false positive from the token pass.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor = aten::gru(%input.1, %hx.1, %params_cpu, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first)
return (%y.1, %hn.1) )";
std::string prepacked_ops_pattern = R"(
dismissed
LLM, confidence 0.90
Token-pass hit on the SSA value name '%hn.1' inside a Vulkan GRU rewrite pattern string.
Reasoning
Same as the adjacent finding: %hn.1 is an SSA value name inside a TorchScript pattern literal, not a printf write directive.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%params_cpu, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first)
%y.1 : Tensor, %hn.1 : Tensor = vulkan_prepack::run_gru_context(%input.1, %hx.1, %packed_weights_biases)
return (%y.1, %hn.1) )";
dismissed
LLM, confidence 0.90
Token-pass hit on SSA name '%hn.1' in a Vulkan prepack pattern string.
Reasoning
%hn.1 is an IR variable name in a graph pattern string for rewriting GRU ops; no printf-style formatting is involved.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor = vulkan_prepack::run_gru_context(%input.1, %hx.1, %packed_weights_biases)
return (%y.1, %hn.1) )";
auto filter = [&](const Match& match,
dismissed
LLM, confidence 0.90
Token-pass hit on SSA name '%hn.1' in a Vulkan rewrite pattern string.
Reasoning
Same pattern-string SSA name %hn.1 in a rewrite pattern; a false positive from matching a printf-like token.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor, %cn.1 : Tensor = aten::lstm(%input.1, %hx, %params_cpu, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first)
return (%y.1, %hn.1, %cn.1) )";
std::string prepacked_ops_pattern = R"(
dismissed
LLM, confidence 0.90
Token-pass hit on SSA name '%hn.1' in an LSTM rewrite pattern string.
Reasoning
%hn.1 is an SSA value name in an aten::lstm pattern string; not a format directive writing to memory.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor, %cn.1 : Tensor = aten::lstm(%input.1, %hx, %params_cpu, %has_biases, %num_layers, %dropout, %train, %bidirectional, %batch_first)
return (%y.1, %hn.1, %cn.1) )";
std::string prepacked_ops_pattern = R"(
dismissed
LLM, confidence 0.95
A TorchScript IR pattern string in the Vulkan rewrite pass that contains the variable name %hn.1.
Reasoning
The %hn is part of an IR pattern string whose names (%hn.1, a tensor variable) are not printf directives. No format string is being passed to a printf-style function.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%hx.1 : Tensor, %cx.1 : Tensor = prim::ListUnpack(%hx)
%y.1 : Tensor, %hn.1 : Tensor, %cn.1 : Tensor = vulkan_prepack::run_lstm_context(%input.1, %hx.1, %cx.1, %packed_weights_biases)
return (%y.1, %hn.1, %cn.1) )";
dismissed
LLM, confidence 0.95
An IR pattern string referencing the tensor variable %hn.1 in a vulkan_prepack LSTM rewrite.
Reasoning
Same as the sibling finding: %hn.1 is a tensor identifier inside a raw-string IR pattern, not a printf write directive.
-
printf format directive `%hn` writes to memory (in string literal) (token pass, confidence 0.90)
%y.1 : Tensor, %hn.1 : Tensor, %cn.1 : Tensor = vulkan_prepack::run_lstm_context(%input.1, %hx.1, %cx.1, %packed_weights_biases)
return (%y.1, %hn.1, %cn.1) )";
auto filter = [&](const Match& match,
dismissed
LLM, confidence 0.95
A return statement in an IR pattern string that names the tensor %hn.1.
Reasoning
Identical pattern: the token is a variable name in a graph-rewrite string literal, so the printf-write signal is a false positive.
-
`execvp` called with a non-literal path (ast pass, confidence 0.90)
dup2(errpipe_[1], STDERR_FILENO);
execvp(command, (char* const*)args);
throw UnwindError("failed execvp");
} else {
likely benign
LLM, confidence 0.80
A fork-then-execvp helper in the profiler unwind code that launches an external command with redirected stderr.
Reasoning
This is the child branch of a fork that runs a command through execvp after redirecting stderr to a pipe. This is the standard subprocess pattern used by the unwinder to invoke an external tool. The command is a caller-supplied variable, which is expected for a helper utility.
-
line length 667 characters (raw pass, confidence 0.50)
std::variant<Void, bool, TensorArgument, std::vector<TensorArgument>, int64_t, std::vector<int64_t>, F64, std::vector<F64>, std::string, std::vector<std::string>, SymIntArgument, std::vector<SymIntArgument>, ScalarType, MemoryFormat, Layout, Device, bool, std::vector<bool>, SymBoolArgument, std::vector<SymBoolArgumen
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
frame = inspect.currentframe()
while frame is not None:
if any(path in frame.f_code.co_filename for path in patterns):
dismissed
LLM, confidence 0.95
A call-stack walk in torch.export unlift code that checks frame filenames against a list of patterns.
Reasoning
inspect.currentframe is used to walk the call stack to find frames whose filenames match a list of internal paths, which is a common pattern for hiding internal frames from tracebacks. The sys.exit/exec/eval co-occurrence is unrelated to this use.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
frame = inspect.currentframe()
for _ in range(skip + 1): if frame is None:
dismissed
LLM, confidence 0.95
Frame lookup in torch.fx symbolic shapes used to report the user frame for guard and warning messages.
Reasoning
Stack introspection to locate user code frames for diagnostics in symbolic shape handling is a standard, legitimate debugging technique. Nothing about it is evasive.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
def _get_user_frame(self) -> types.FrameType | None:
frame = inspect.currentframe()
while frame is not None:
if frame.f_code.co_filename not in uninteresting_files():
dismissed
LLM, confidence 0.95
A _get_user_frame helper in symbolic_shapes that walks the stack skipping internal files.
Reasoning
Walking frames while skipping uninteresting files is a diagnostics helper for finding user code. It is not malicious.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
def _find_user_code_frame() -> types.FrameType | None:
frame = inspect.currentframe()
while frame is not None:
if not frame.f_code.co_filename.startswith(
dismissed
LLM, confidence 0.95
A helper that walks the call stack to find the first frame outside the torch package.
Reasoning
A user-code frame finder based on co_filename prefixes, used for error reporting in PyTorch's shape machinery. Legitimate.
-
`execl` called with a non-literal path (ast pass, confidence 0.90)
SYSCHECK_ERR_RETURN_NEG1(close(pipe_ends[1]));
execl(manager_executable_path.c_str(), "torch_shm_manager", NULL);
std::string msg("ERROR: execl failed: ");
likely benign
LLM, confidence 0.85
Child-process launch of the torch_shm_manager helper binary in libshm.
Reasoning
After forking, the child execl's the torch_shm_manager binary at a path computed by the library. This is the documented way PyTorch starts its shared-memory manager process, and the path is internal, not attacker-controlled.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
package_name = python_class_name.split(".")[0]
package = __import__(package_name)
version = getattr(package, "__version__", None)
likely benign
LLM, confidence 0.85
Imports the top-level package of a pass's class name to retrieve its version string.
Reasoning
__import__ is applied to the first component of a configured class name to read its __version__ for reporting. The input is a developer-supplied class path, not untrusted data, so the behavior is ordinary.
-
`inspect.stack` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
try:
stack = inspect.stack()
for frame_info in stack:
frame = frame_info.frame
dismissed
LLM, confidence 0.95
A test-utility stack walk over inspect.stack frames.
Reasoning
inspect.stack is used in test utilities to locate the calling frame. This is ordinary test-harness behavior with no evasive purpose.
-
`inspect.stack` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
if file is None:
file = inspect.stack()[1 + skip].filename
file = _as_posix_path(file)
dismissed
LLM, confidence 0.95
A test helper that gets the calling file name from the stack to resolve paths.
Reasoning
Reads the caller's filename via inspect.stack()[1+skip] to resolve a test file path. This is a standard testing convenience.
-
`inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
def get_frame_vars(self, frames_up):
frame = inspect.currentframe()
if not frame:
raise RuntimeError("failed to inspect frame")
dismissed
LLM, confidence 0.95
A JIT test helper that reads variables from an outer frame via inspect.currentframe.
Reasoning
Fetching the current frame to read local variables for JIT test helpers is a normal test-internal technique. Nothing suggests obfuscation or malicious intent.
-
mean non-conventional identifier length 1.73 over 243 names (token pass, confidence 0.50)
-
line length 1206 characters (raw pass, confidence 0.50)
var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h<s.length;h++){var p=s[h++],a=s[h]?(s[0]|=p?1:2,r[s[h++]]):s[++h];3===p?e[0]=a:4===p?e[1]=Object.assign(e[1]||{},a):5===p?(e[1]=e[1]||{})[s[++h]]=a:6===p?e[1][s[++h]]+=a+"":p?(u=t.apply(a,n(t,a,r,["",null])),e.push(u),a[0]?s[0]|=2:(s[h-2]=0,s[h]=u)):e.push(a)}return e},
-
991 of 1860 non-conventional identifiers are single-character (53%) (token pass, confidence 0.50)
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.