Repository Analysis

pytorch/executorch

On-device AI across mobile, embedded and edge for PyTorch

11.8 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pytorch/executorch, a Python project with 4,964 GitHub stars. SynthScan v2.0 examined 1,586,458 lines of code across 7812 source files, recording 14393 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 11.8 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.8
Adjusted Score
11.8
Raw Score
100%
Time Factor
2026-08-29
Last Push
5.0K
Stars
Python
Language
1.6M
Lines of Code
7.8K
Files
14.4K
Pattern Hits
2026-08-29
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 34HIGH 440MEDIUM 1331LOW 12588

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 14393 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers6946 hits · 6712 pts
SeverityFileLineSnippetContext
LOWinstall_executorch.py111def get_required_submodule_paths():CODE
LOWinstall_executorch.py132def check_and_update_submodules():CODE
LOWinstall_requirements.py131def install_optional_example_requirements(use_pytorch_nightly):CODE
LOWsetup.py465def _verify_cuda_runtime_matches_train(cmake_cache_dir: Optional[str]) -> None:CODE
LOWsetup.py537def _sibling_library_search_paths(depth: int = 1) -> List[str]:CODE
LOWsetup.py562def _cuda_runtime_search_paths(depth: int = 1) -> List[str]:CODE
LOWsetup.py578def _is_cuda_toolkit_directory(entry: str) -> bool:CODE
LOWsetup.py1167 def _resubstitute_tracer_definition(self) -> None:CODE
LOWsetup.py1179 def copy_extensions_to_source(self) -> None:CODE
LOWsetup.py1271def _append_relative_search_paths(entries: List[str], depth: int = 1) -> None:CODE
LOWsetup.py1427def _strip_absolute_runtime_paths(library: Path, ships_cuda: bool) -> None:CODE
LOWsetup.py1745 def _write_cmake_version_file(self, dst_root: str) -> None:CODE
LOWsetup.py1860def _substitute_tracer_definition(path: str, cmake_cache_dir: str) -> None:CODE
LOWsetup.py1891def _substitute_tracer_definition_from_args(destination) -> None:CODE
LOWinstall_utils.py298def _cuda_version_to_pytorch_suffix(major, minor):CODE
LOWkernels/test/gen_supported_features.py51def generate_header_entry_text(namespace: str, feature: str, properties: dict):CODE
LOWkernels/test/gen_supported_features.py93def generate_definition_entry(d: dict):STRING
LOWkernels/test/gen_supported_features.py105def generate_definition_entry_text(namespace: str, feature: str, value: Any):STRING
LOWkernels/test/test_bitwise_shift.py115 def test_left_shift_tensor_tensor(self):CODE
LOWkernels/test/test_bitwise_shift.py122 def test_left_shift_tensor_scalar(self):CODE
LOWkernels/test/test_bitwise_shift.py128 def test_right_shift_tensor_tensor(self):CODE
LOWkernels/test/test_bitwise_shift.py135 def test_right_shift_tensor_scalar(self):CODE
LOWkernels/test/test_case_gen.py36def make_out_dynamic_shape_bound_shape_same(tensor: torch.Tensor):CODE
LOWkernels/test/test_case_gen.py43def make_out_dynamic_shape_bound_shape_larger(tensor: torch.Tensor):CODE
LOWkernels/test/test_case_gen.py51def make_out_dynamic_shape_unbound_shape(tensor: torch.Tensor):CODE
LOWkernels/test/test_case_gen.py78def make_test_cases_dynamic_shape(*args):CODE
LOWkernels/test/test_case_gen.py104def make_test_cases_broadcast_two_input_tensor(x, y, cpp_args, torch_args, torch_fn):CODE
LOWkernels/test/test_case_gen.py282def make_simple_generated_case(*args, torch_fn):CODE
LOWkernels/test/test_case_gen.py362def gen_test_case_op_as_strided_copy():STRING
LOWkernels/test/test_case_gen.py367def gen_test_case_op_bitwise_not():STRING
LOWkernels/test/test_case_gen.py436def gen_test_case_op_detach_copy():STRING
LOWkernels/test/test_case_gen.py457def gen_test_case_op_full_like():STRING
LOWkernels/test/test_case_gen.py520def gen_test_case_op_log_softmax():STRING
LOWkernels/test/test_case_gen.py661def gen_test_case_op_transpose():STRING
LOWkernels/test/test_case_gen.py666def gen_test_case_op_unsqueeze():STRING
LOWkernels/test/test_case_gen.py724def gen_test_case_op_embedding():STRING
LOWkernels/test/test_case_gen.py734def gen_test_case_op_floor_divide():STRING
LOWkernels/test/test_case_gen.py791def gen_test_case_op_select_scatter():STRING
LOWkernels/test/test_case_gen.py847def gen_test_case_op_convolution():STRING
LOWkernels/test/test_case_gen.py857def gen_test_case_op_masked_fill():STRING
LOWkernels/quantized/test/test_quant_dequant_per_token.py34 def test_quantize_per_token_large_tensor(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py47 def test_quantize_per_token_high_rank(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py60 def test_quantize_per_token_dynamic(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py85 def test_dequantize_per_token(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py100 def test_dequantize_per_token_large_tensor(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py113 def test_dequantize_per_token_high_rank(self):CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py126 def test_dequantize_per_token_dynamic(self):CODE
LOWkernels/quantized/test/test_out_variants.py30 def test_choose_qparams_tensor_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py38 def test_dequantize_per_tensor_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py46 def test_dequantize_per_tensor_tensor_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py56 def test_dequantize_per_channel_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py64 def test_mixed_linear_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py70 def test_mixed_mm_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py76 def test_quantize_per_tensor_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py84 def test_quantize_per_tensor_tensor_to_out_variant(self) -> None:CODE
LOWkernels/quantized/test/test_out_variants.py94 def test_quantize_per_channel_to_out_variant(self) -> None:CODE
LOW…rnels/portable/test/test_grid_sampler_2d_executorch.py119 def test_all_mode_combinations(self):CODE
LOW…rnels/portable/test/test_grid_sampler_2d_executorch.py361 def test_exact_boundary_coordinates(self):CODE
LOW…rnels/portable/test/test_grid_sampler_2d_executorch.py397 def test_out_of_bounds_values_in_grid(self):CODE
LOWtools/cmake/common/preset_test.py68 def test_define_overridable_option_invalid_name(self):STRING
6886 more matches not shown…
Decorative Section Separators775 hits · 2326 pts
SeverityFileLineSnippetContext
MEDIUMkernels/test/test_bitwise_shift.py111 # ==========================================================================COMMENT
MEDIUMkernels/test/test_bitwise_shift.py113 # ==========================================================================COMMENT
MEDIUMkernels/test/test_bitwise_shift.py141 # ==========================================================================COMMENT
MEDIUMkernels/test/test_bitwise_shift.py143 # ==========================================================================COMMENT
MEDIUMextension/llm/export/quant/quantize.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMextension/llm/export/quant/quantize.py310# ---------------------------------------------------------------------------COMMENT
MEDIUMextension/llm/export/quant/quantize.py342# ---------------------------------------------------------------------------COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt65 // ─── dataFiles constructor variants ─────────────────────────────────────────COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt111 // ─── LlmModuleConfig with dataPath ──────────────────────────────────────────COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt154 // ─── Invalid data file paths ────────────────────────────────────────────────COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt200 // ─── Baseline equivalence ───────────────────────────────────────────────────COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt227 // ─── LlmModuleConfig builder validation ─────────────────────────────────────COMMENT
MEDIUM…a/org/pytorch/executorch/LlmLoraInstrumentationTest.kt268 // ─── Helpers ────────────────────────────────────────────────────────────────COMMENT
MEDIUM…org/pytorch/executorch/AsrModuleInstrumentationTest.kt42 // ─── Constructor validation ─────────────────────────────────────────────────COMMENT
MEDIUM…org/pytorch/executorch/AsrModuleInstrumentationTest.kt102 // ─── Lifecycle ──────────────────────────────────────────────────────────────COMMENT
MEDIUM…org/pytorch/executorch/AsrModuleInstrumentationTest.kt146 // ─── Transcribe validation ──────────────────────────────────────────────────COMMENT
MEDIUM…org/pytorch/executorch/AsrModuleInstrumentationTest.kt161 // ─── AsrTranscribeConfig ────────────────────────────────────────────────────COMMENT
MEDIUM…org/pytorch/executorch/AsrModuleInstrumentationTest.kt225 // ─── Helpers ────────────────────────────────────────────────────────────────COMMENT
MEDIUM…Test/java/org/pytorch/executorch/LlmPerformanceTest.kt219 // ─── LlmCallback ──────────────────────────────────────────────────────────────────COMMENT
MEDIUM…Test/java/org/pytorch/executorch/LlmPerformanceTest.kt241 // ─── Helpers ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUM.ci/scripts/test_torchao_huggingface_checkpoints.sh4# -------------------------COMMENT
MEDIUM.ci/scripts/test_torchao_huggingface_checkpoints.sh6# -------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh12# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh14# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh87# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh89# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh108# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh110# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh121# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh123# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh134# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh136# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh205# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh207# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh222# ----------------------------COMMENT
MEDIUM.ci/scripts/test_wheel_package_qnn.sh224# ----------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py1404# =============================================================================COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py1406# =============================================================================COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py138# =============================================================================COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py140# =============================================================================COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py155# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py157# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py172# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py191# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py212# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py214# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py231# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py233# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py252# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py269# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py281# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py306# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py331# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py356# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py381# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py406# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py408# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py436# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py462# -------------------------------------------------------------------------COMMENT
MEDIUMbackends/apple/metal/tests/test_modules.py488# -------------------------------------------------------------------------COMMENT
715 more matches not shown…
Cross-File Repetition281 hits · 1405 pts
SeverityFileLineSnippetContext
HIGHextension/module/test/resources/gen_bundled_program.py0an example model with multi-methods. each method has multiple input and single outputSTRING
HIGHdocs/source/bundled-io.md0an example model with multi-methods. each method has multiple input and single outputSTRING
HIGHdevtools/bundled_program/util/test_util.py0an example model with multi-methods. each method has multiple input and single outputSTRING
HIGH…ends/apple/coreml/quantizer/_coreml_quantizer_utils.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/vulkan/quantizer/vulkan_quantizer_utils.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/xnnpack/quantizer/xnnpack_quantizer_utils.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/qualcomm/quantizer/rules.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/samsung/quantizer/annotator.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/mediatek/quantizer/annotator.py0given a list of nodes (that represents an operator pattern), return true if any of the node is annotated, otherwise retuSTRING
HIGHbackends/nxp/tests/models.py0call `torch.max_pool2d` that is a noop, but it enforces the channelsfirst format in the `nodeformatinference`.STRING
HIGH…ir/converter/node_converter/test_mean_dim_converter.py0call `torch.max_pool2d` that is a noop, but it enforces the channelsfirst format in the `nodeformatinference`.STRING
HIGH…sts/ir/converter/node_converter/test_amax_converter.py0call `torch.max_pool2d` that is a noop, but it enforces the channelsfirst format in the `nodeformatinference`.STRING
HIGH…sts/ir/converter/node_converter/test_amin_converter.py0call `torch.max_pool2d` that is a noop, but it enforces the channelsfirst format in the `nodeformatinference`.STRING
HIGH…rter/node_converter/test_sum_dim_int_list_converter.py0call `torch.max_pool2d` that is a noop, but it enforces the channelsfirst format in the `nodeformatinference`.STRING
HIGH…ir/converter/node_converter/test_mean_dim_converter.py0when `keep_dim = false`, the `sum` operator changes the rank, so the format have to be explicitly handled. the tests in STRING
HIGH…sts/ir/converter/node_converter/test_amax_converter.py0when `keep_dim = false`, the `sum` operator changes the rank, so the format have to be explicitly handled. the tests in STRING
HIGH…sts/ir/converter/node_converter/test_amin_converter.py0when `keep_dim = false`, the `sum` operator changes the rank, so the format have to be explicitly handled. the tests in STRING
HIGH…rter/node_converter/test_sum_dim_int_list_converter.py0when `keep_dim = false`, the `sum` operator changes the rank, so the format have to be explicitly handled. the tests in STRING
HIGHbackends/nxp/backend/edge_helper.py0get the static data from a given node. if it doesn't have any data, return `none`.STRING
HIGHbackends/nxp/aten_passes/split_group_convolution.py0get the static data from a given node. if it doesn't have any data, return `none`.STRING
HIGH…ends/nxp/aten_passes/fuse_batch_norm_with_conv_pass.py0get the static data from a given node. if it doesn't have any data, return `none`.STRING
HIGH…ds/nxp/aten_passes/fuse_batch_norm_with_linear_pass.py0get the static data from a given node. if it doesn't have any data, return `none`.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/LogicalOrOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…ds/nxp/backend/ir/lib/tflite/StablehloReduceOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/ZerosLikeOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…/backend/ir/lib/tflite/StablehloReduceWindowOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…kends/nxp/backend/ir/lib/tflite/ReduceWindowOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/EqualOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/PowOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/LessOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/AddOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…s/nxp/backend/ir/lib/tflite/StablehloScatterOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…ends/nxp/backend/ir/lib/tflite/HashtableSizeOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/QuantizeOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/RightShiftOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…xp/backend/ir/lib/tflite/StablehloCustomCallOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/Pool2DOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/SoftmaxOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/ShapeOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…ckends/nxp/backend/ir/lib/tflite/SparsityParameters.py0this method is deprecated. please switch to getrootas.STRING
HIGH…ds/nxp/backend/ir/lib/tflite/ReverseSequenceOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/LeakyReluOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…ends/nxp/backend/ir/lib/tflite/LSHProjectionOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/Metadata.py0this method is deprecated. please switch to getrootas.STRING
HIGH…nds/nxp/backend/ir/lib/tflite/StablehloSliceOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/MatrixDiagOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…kends/nxp/backend/ir/lib/tflite/ReadVariableOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGH…nxp/backend/ir/lib/tflite/StablehloTransposeOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/LessEqualOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/CallOnceOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/ReverseV2Options.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/RNNOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/DimensionMetadata.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/Int32Vector.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/NegOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/FloorDivOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/LogSoftmaxOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/SignatureDef.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/SelectOptions.py0this method is deprecated. please switch to getrootas.STRING
HIGHbackends/nxp/backend/ir/lib/tflite/UniqueOptions.py0this method is deprecated. please switch to getrootas.STRING
221 more matches not shown…
Unused Imports1527 hits · 1373 pts
SeverityFileLineSnippetContext
LOWkernels/prim_ops/test/prim_ops_test.py10CODE
LOWkernels/quantized/test/test_quant_dequant_per_token.py12CODE
LOWkernels/quantized/test/test_out_variants.py10CODE
LOWkernels/quantized/test/test_out_variants.py12CODE
LOWkernels/quantized/test/test_out_variants.py13CODE
LOWkernels/quantized/test/test_out_variants.py15CODE
LOWextension/pytree/__init__.py26CODE
LOWextension/pytree/__init__.py26CODE
LOWextension/pytree/__init__.py26CODE
LOWextension/pytree/__init__.py40CODE
LOWextension/pytree/__init__.py40CODE
LOWextension/pytree/__init__.py40CODE
LOWextension/llm/custom_ops/bench_gated_delta_rule.py25CODE
LOWextension/llm/custom_ops/test_quantized_moe.py18CODE
LOWextension/llm/custom_ops/test_quantized_moe.py36CODE
LOW…tension/llm/custom_ops/test_update_cross_attn_cache.py12CODE
LOWextension/llm/custom_ops/test_preprocess_custom_ops.py14CODE
LOWextension/llm/custom_ops/custom_ops.py34CODE
LOWextension/llm/custom_ops/test_sdpa_with_kv_cache.py14CODE
LOWextension/llm/custom_ops/test_gated_delta.py15CODE
LOWextension/llm/custom_ops/test_update_cache.py14CODE
LOWextension/llm/custom_ops/model_sharding.py10CODE
LOWextension/llm/custom_ops/test_quantized_sdpa.py14CODE
LOWextension/llm/custom_ops/test_quantized_sdpa.py29CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py3CODE
LOWextension/llm/cache/update_and_attend.py15CODE
LOWextension/llm/cache/reference_cache.py28CODE
LOWextension/llm/runner/__init__.py18CODE
LOWextension/llm/runner/__init__.py18CODE
LOWextension/llm/runner/__init__.py18CODE
LOWextension/llm/runner/__init__.py18CODE
LOWextension/llm/runner/__init__.py18CODE
LOWextension/llm/export/gguf.py30CODE
LOWextension/llm/export/quantize.py223CODE
LOWextension/llm/export/__init__.py7CODE
LOWextension/llm/export/__init__.py8CODE
LOWextension/llm/export/__init__.py9CODE
LOWextension/llm/export/__init__.py10CODE
LOWextension/llm/export/export_passes.py114CODE
LOWextension/llm/export/quant/__init__.py7CODE
LOWextension/llm/export/quant/__init__.py7CODE
LOWextension/llm/export/quant/__init__.py7CODE
LOWextension/llm/export/quant/__init__.py7CODE
LOWextension/llm/export/quant/__init__.py7CODE
LOWextension/llm/export/quant/__init__.py14CODE
LOWextension/llm/export/quant/__init__.py14CODE
LOWextension/llm/export/quant/__init__.py14CODE
LOWextension/llm/export/quant/__init__.py14CODE
LOWextension/llm/export/quant/__init__.py20CODE
LOWextension/llm/export/quant/__init__.py20CODE
LOWextension/llm/export/quant/__init__.py20CODE
LOWextension/llm/modules/__init__.py7CODE
LOWextension/llm/modules/__init__.py7CODE
LOWextension/llm/modules/__init__.py7CODE
LOWextension/llm/modules/__init__.py7CODE
LOWextension/llm/modules/__init__.py13CODE
LOWextension/llm/modules/__init__.py13CODE
LOWextension/llm/modules/__init__.py14CODE
LOWextension/llm/modules/turboquant/__init__.py7CODE
LOWextension/training/__init__.py9CODE
1467 more matches not shown…
Over-Commented Block1234 hits · 1198 pts
SeverityFileLineSnippetContext
LOWinstall_requirements.sh1#!/bin/bashCOMMENT
LOWinstall_executorch.py81COMMENT
LOWCMakeLists.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWCMakeLists.txt21 (rm -rf cmake-out \COMMENT
LOWCMakeLists.txt201 # runtime, extracting each archive's contents so a single library owns theCOMMENT
LOWCMakeLists.txt321# state crash at import time. This function replaces pybind11::embed withCOMMENT
LOWCMakeLists.txt341 # on the build machine. Neither survives being shipped: the loader cannotCOMMENT
LOWCMakeLists.txt1281 # and src/executorch/lib, and setup.py's _SIBLING_LIBRARY_DIRECTORIES addsCOMMENT
LOWCMakeLists.txt1401 portable_lib PROPERTIES OUTPUT_NAME "_C" CXX_STANDARD 20COMMENT
LOWCMakeLists.txt1441 # other entry in this list arrives another way:COMMENT
LOWpyproject.toml101# package, and package_data to restrict the set up non-python files weCOMMENT
LOWrequirements-examples.txt1# pip packages needed to run examples.COMMENT
LOWinstall_requirements.py21COMMENT
LOWinstall_requirements.py41 "ERROR: Prebuilt PyTorch wheels are no longer available for Intel-based macOS.\n"COMMENT
LOWsetup.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsetup.py21# 2. Redistributions in binary form must reproduce the above copyright notice,COMMENT
LOWsetup.py101 # Needs a header generated when the schema is compiled, which in turn needs the FlatBuffers C++COMMENT
LOWsetup.py201 "*.__pycache__.*",COMMENT
LOWsetup.py521COMMENT
LOWsetup.py661 # without both of these. It reads the CPU vendor to disable an mkldnn path onCOMMENT
LOWsetup.py681 # nightlies. Keep both bounds in the same series.COMMENT
LOWsetup.py701 # Windows, and brought scipy with it.COMMENT
LOWsetup.py1201 package_dir, os.path.basename(ext.dst_path(self))COMMENT
LOWsetup.py1241COMMENT
LOWsetup.py1381 if not entry:COMMENT
LOWsetup.py1401 # then it is the only way this library finds torch.COMMENT
LOWsetup.py1601 build_py.run(self)COMMENT
LOWsetup.py1641 "tools/cmake/executorch-wheel-config.cmake",COMMENT
LOWsetup.py1681 # The MergedDataMap and FlatTensorDataMap entry points, whoseCOMMENT
LOWsetup.py1701 # The CUDA stream helper's public header, and the export macros it includes. Its library isCOMMENT
LOWsetup.py1761 # such as "1.5.0+cpu" or a development suffix, and `find_package(executorchCOMMENT
LOWsetup.py1981COMMENT
LOWinstall_executorch.sh1#!/bin/bashCOMMENT
LOWinstall_utils.py161 if explicit:COMMENT
LOWkernels/prim_ops/et_copy_index.cpp21namespace executor {COMMENT
LOWkernels/prim_ops/et_copy_index.cpp41// map_1 = torch.ops.map(submodule_0, arg0_1, arg1_1); submodule_0 =COMMENT
LOWkernels/prim_ops/test/prim_ops_test.cpp1/*COMMENT
LOWkernels/prim_ops/test/CMakeLists.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkernels/test/CMakeLists.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkernels/test/op_index_select_test.cpp261 run_test_cases(x, /*dim=*/2, /*index=*/index, expected);COMMENT
LOWkernels/test/op_to_copy_test.cpp1/*COMMENT
LOWkernels/test/op__to_dim_order_copy_test.cpp1/*COMMENT
LOWkernels/test/op_mean_test.cpp1/*COMMENT
LOWkernels/test/op_select_copy_test.cpp41 // Based on the split defintion, if we split any dim()=3 and size(1)=2COMMENT
LOWkernels/test/op_select_copy_test.cpp301 ET_FORALL_REAL_TYPES_AND(Bool, TEST_ENTRY);COMMENT
LOWkernels/test/op_select_scatter_test.cpp501/// zeros().COMMENT
LOWkernels/test/UnaryUfuncRealHBBF16ToFloatHBF16Test.h21// Generic test harness for ops that use unary_ufunc_realhb_to_floathCOMMENT
LOWkernels/test/op_linear_test.cpp1/*COMMENT
LOWkernels/test/op_stack_test.cpp121COMMENT
LOWkernels/test/op_mm_test.cpp1/*COMMENT
LOWkernels/test/op_amin_test.cpp1/*COMMENT
LOWkernels/test/op_min_test.cpp1/*COMMENT
LOWkernels/test/op_native_layer_norm_test.cpp1/*COMMENT
LOWkernels/test/op_sum_test.cpp1/*COMMENT
LOWkernels/test/supported_features_skip.h1/*COMMENT
LOWkernels/test/supported_features_skip.h21// fbcode: expands to `if (cond) return;` so the test reports PASS, not SKIP.COMMENT
LOWkernels/test/update_supported_feature_summary.sh1#!/bin/bashCOMMENT
LOWkernels/test/op_max_test.cpp1/*COMMENT
LOWkernels/test/op_clamp_test.cpp1/*COMMENT
LOWkernels/test/op_amax_test.cpp1/*COMMENT
1174 more matches not shown…
Self-Referential Comments454 hits · 1064 pts
SeverityFileLineSnippetContext
MEDIUMpytest-windows.ini3# This file is intended to be deleted once the enablement is complete.COMMENT
MEDIUMsetup.py1613 # Create the version file.COMMENT
MEDIUMkernels/portable/test/op_grid_sampler_2d_test.py119 # Create a checkerboard patternCOMMENT
MEDIUMkernels/portable/test/op_grid_sampler_2d_test.py165 # Create a smooth gradientCOMMENT
MEDIUMkernels/portable/test/op_grid_sampler_2d_test.py168 # Create a fine grid for upsamplingCOMMENT
MEDIUMtools/cmake/cmake_cache.py20 # This module is imported both as tools.cmake.cmake_cache and standalone, so the repository rootCOMMENT
MEDIUMtools/cmake/common/__init__.py33# Create a file tree in the current working directory (cwd). The structure of theCOMMENT
MEDIUMextension/pytree/__init__.py11# Create a loggerCOMMENT
MEDIUM…tension/llm/custom_ops/test_update_cross_attn_cache.py64 # Define a function that uses the op inside torch.condCOMMENT
MEDIUM…tension/llm/custom_ops/test_update_cross_attn_cache.py115 # Define a module that uses torch.cond with the opCOMMENT
MEDIUM…tension/llm/custom_ops/test_update_cross_attn_cache.py224 # Define a function that uses different ops in each branchCOMMENT
MEDIUM…/llm/custom_ops/spinquant/special_hadamard_code_gen.py2# This file is adapted fromCOMMENT
MEDIUMextension/llm/runner/test/test_runner_pybindings.py167 # Create an imageCOMMENT
MEDIUMextension/llm/runner/test/test_runner_pybindings.py256 # Create a test image tensor (RGB, CHW)COMMENT
MEDIUMextension/llm/export/test/test_export_llm.py59 # Create a temporary config fileCOMMENT
MEDIUMextension/llm/export/test/test_export_llm.py114 # Create a temporary config fileCOMMENT
MEDIUMextension/llm/export/test/test_builder.py18 # Create a mock modelCOMMENT
MEDIUMextension/llm/export/test/test_builder.py28 # Create a manager with preset dynamic_shapesCOMMENT
MEDIUMextension/llm/export/test/test_builder.py46 # Create a manager with enable_dynamic_shape=True and use_kv_cache=FalseCOMMENT
MEDIUMextension/llm/export/test/test_builder.py70 # Create a manager with enable_dynamic_shape=True and use_kv_cache=TrueCOMMENT
MEDIUMextension/llm/export/test/test_builder.py103 # Create a manager with enable_dynamic_shape=FalseCOMMENT
MEDIUMextension/pybindings/test/make_test.py189 # Create the ExecuTorch program from the graph.COMMENT
MEDIUM.ci/scripts/setup-ios.sh21# Create a temporary keychainCOMMENT
MEDIUM.ci/scripts/test_coreml_bc.sh23# Create a conda environment with Python 3.10 for compatibility with old ET versionsCOMMENT
MEDIUM.ci/scripts/wheel/envvar_linux.sh7# This file is sourced into the environment before building a pip wheel. ItCOMMENT
MEDIUM.ci/scripts/wheel/envvar_cuda_linux.sh7# This file is sourced into the environment before building a pip wheel. ItCOMMENT
MEDIUM.ci/scripts/wheel/envvar_base.sh7# This file is sourced into the environment before building a pip wheel. ItCOMMENT
MEDIUM.ci/scripts/wheel/envvar_macos.sh7# This file is sourced into the environment before building a pip wheel. ItCOMMENT
MEDIUM…ripts/benchmark_tooling/analyze_benchmark_stability.py402 # Create a string buffer to hold the report contentCOMMENT
MEDIUM…ripts/benchmark_tooling/analyze_benchmark_stability.py665 # Create a string buffer to hold the report contentCOMMENT
MEDIUM…ripts/benchmark_tooling/analyze_benchmark_stability.py1051 # Create a string buffer to hold the report contentCOMMENT
MEDIUM…ripts/benchmark_tooling/analyze_benchmark_stability.py1248 # Create a string buffer to hold the report contentCOMMENT
MEDIUMtest/end2end/exported_module.py124 # Create the eager module.COMMENT
MEDIUMtest/end2end/exported_module.py224 # Create the ExportedModule.COMMENT
MEDIUMbackends/apple/coreml/compiler/coreml_preprocess.py798 # Create a temporary directory for all the mlpackagesCOMMENT
MEDIUMbackends/apple/coreml/compiler/coreml_preprocess.py806 # Create a NamedDataStore to hold the shared multifunction modelsCOMMENT
MEDIUMbackends/nxp/tests/ops_aliases.py6# This file defines ops aliases for shorter and more readable test description. List is sorted alphabetically.COMMENT
MEDIUM…ir/converter/node_converter/test_hardtanh_converter.py69 # Create a RandomDatasetCreator that covers also negative numbers to properly test the operator.COMMENT
MEDIUM…/ir/converter/node_converter/test_sigmoid_converter.py39 # Create a RandomDatasetCreator that covers also negative numbers to properly test the operator.COMMENT
MEDIUM…tests/ir/converter/node_converter/test_mm_converter.py47 # Create a RandomDatasetCreator that covers also negative numbers to properly test the operator.COMMENT
MEDIUM…ts/ir/converter/node_converter/test_addmm_converter.py55 # Create a RandomDatasetCreator that covers also negative numbers to properly test the operator.COMMENT
MEDIUM…/converter/node_converter/test_leaky_relu_converter.py44 # Create a RandomDatasetCreator that covers also negative numbers to properly test the operator.COMMENT
MEDIUM…de_converters/ops_converters/permute_copy_converter.py221 """This method is currently far more complex than necessary, as Neutron C supports all permutations.STRING
MEDIUM…/node_converters/ops_converters/view_copy_converter.py90 # Create the TFLite Reshape with the new shapeCOMMENT
MEDIUM…ends/nxp/backend/ir/converter/builder/model_builder.py202 # Create a new one and register it for potential future use.COMMENT
MEDIUM…ends/nxp/backend/ir/converter/builder/model_builder.py249 # Create the output tensor of the 'Pad' operator.COMMENT
MEDIUM…ends/nxp/backend/ir/converter/builder/model_builder.py255 # Create the second input of the 'Pad' operator.COMMENT
MEDIUM…ends/nxp/backend/ir/converter/builder/model_builder.py442 # Create a Transpose operator and replace the graph inputCOMMENT
MEDIUM…ends/nxp/backend/ir/converter/builder/model_builder.py574 # Create the final edge-to-tflite mapping after model optimizationCOMMENT
MEDIUM…tions/permute_fully_connected_weights_after_reshape.py105 # Create a new tensor for the data, in case it is used by some other operator as well.COMMENT
MEDIUMbackends/nxp/backend/ir/lib/tflite/LogicalOrOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUM…ds/nxp/backend/ir/lib/tflite/StablehloReduceOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUMbackends/nxp/backend/ir/lib/tflite/ZerosLikeOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUM…/backend/ir/lib/tflite/StablehloReduceWindowOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUM…kends/nxp/backend/ir/lib/tflite/ReduceWindowOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUMbackends/nxp/backend/ir/lib/tflite/EqualOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUMbackends/nxp/backend/ir/lib/tflite/PowOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUMbackends/nxp/backend/ir/lib/tflite/LessOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUMbackends/nxp/backend/ir/lib/tflite/AddOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
MEDIUM…s/nxp/backend/ir/lib/tflite/StablehloScatterOptions.py23 """This method is deprecated. Please switch to GetRootAs."""STRING
394 more matches not shown…
Deep Nesting888 hits · 784 pts
SeverityFileLineSnippetContext
LOWinstall_executorch.py111CODE
LOWinstall_utils.py377CODE
LOWkernels/test/summarize_supported_features.py20CODE
LOWkernels/test/test_case_gen.py243CODE
LOW…rnels/portable/test/test_grid_sampler_2d_executorch.py361CODE
LOWtools/cmake/cmake_cache.py58CODE
LOWextension/llm/custom_ops/test_gated_delta.py491CODE
LOWextension/llm/custom_ops/model_sharding.py53CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py650CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py725CODE
LOWextension/llm/cache/test_update_and_attend.py184CODE
LOWextension/llm/export/gguf.py546CODE
LOWextension/llm/export/quantize.py28CODE
LOWextension/llm/export/builder.py288CODE
LOWextension/llm/export/builder.py384CODE
LOWextension/llm/export/builder.py477CODE
LOWextension/llm/export/builder.py301CODE
LOWextension/llm/export/export_passes.py44CODE
LOWextension/llm/export/quantizer_lib.py260CODE
LOWextension/llm/export/quant/convert.py163CODE
LOWextension/training/examples/CIFAR/train_utils.py51CODE
LOWextension/training/examples/CIFAR/train_utils.py188CODE
LOW.ci/scripts/gather_benchmark_configs.py146CODE
LOW.ci/scripts/gather_benchmark_configs.py299CODE
LOW.ci/scripts/test_example_imports.py212CODE
LOW.ci/scripts/test_example_imports.py410CODE
LOW.ci/scripts/test_example_imports.py31CODE
LOW.ci/scripts/test_huggingface_optimum_model.py133CODE
LOW.ci/scripts/tests/test_coreml_markers.py104CODE
LOW.ci/scripts/wheel/test_shared_libraries.py417CODE
LOW.ci/scripts/wheel/test_shared_libraries.py480CODE
LOW.ci/scripts/wheel/test_shared_libraries.py530CODE
LOW.ci/scripts/wheel/test_shared_libraries.py1404CODE
LOW.ci/scripts/wheel/test_shared_libraries.py2020CODE
LOW…ripts/benchmark_tooling/analyze_benchmark_stability.py68CODE
LOW…ripts/benchmark_tooling/analyze_benchmark_stability.py655CODE
LOW…ripts/benchmark_tooling/analyze_benchmark_stability.py1242CODE
LOW…ripts/benchmark_tooling/get_benchmark_analysis_data.py282CODE
LOWutil/collect_env.py184CODE
LOWutil/collect_env.py344CODE
LOWutil/collect_env.py378CODE
LOWutil/activation_memory_profiler.py51CODE
LOWbackends/apple/metal/passes/decompose_linear_pass.py24CODE
LOWbackends/apple/coreai/test/test_preprocess.py437CODE
LOWbackends/apple/coreml/recipes/coreml_recipe_provider.py42CODE
LOWbackends/apple/coreml/partition/coreml_partitioner.py181CODE
LOWbackends/apple/coreml/partition/coreml_partitioner.py343CODE
LOWbackends/apple/coreml/compiler/coreml_preprocess.py39CODE
LOW…ckends/apple/coreml/compiler/enumerated_shape_utils.py102CODE
LOWbackends/nxp/neutron_partitioner.py385CODE
LOWbackends/nxp/tests/models.py579CODE
LOWbackends/nxp/tests/dataset_creator.py312CODE
LOWbackends/nxp/tests/nsys_testing.py331CODE
LOWbackends/nxp/tests/nsys_testing.py797CODE
LOWbackends/nxp/backend/node_format_inference.py133CODE
LOWbackends/nxp/backend/node_format_inference.py306CODE
LOWbackends/nxp/backend/neutron_map.py227CODE
LOWbackends/nxp/backend/neutron_map.py337CODE
LOWbackends/nxp/backend/neutron_map.py369CODE
LOWbackends/nxp/backend/edge_program_converter.py147CODE
828 more matches not shown…
Cross-Language Confusion100 hits · 504 pts
SeverityFileLineSnippetContext
HIGH…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py757 "cd measurements && make run_%s" % type_name, shell=True, stdout=devnullCODE
HIGHextension/llm/export/quantizer_lib.py112 "rm -rf cmake-out && mkdir cmake-out && (cd cmake-out && cmake -DEXECUTORCH_BUILD_KERNELS_QUANTIZED_CODE
HIGH.ci/scripts/wheel/test_shared_libraries.py2295 unimported = [symbol for symbol in _EXTENSION_IMPORTS if symbol not in undefined]CODE
HIGHbackends/qualcomm/tests/utils.py249 adb.push(CODE
HIGHbackends/qualcomm/tests/utils.py622 adb.push(CODE
HIGHbackends/qualcomm/tests/rework/conftest.py366 adb.push()CODE
HIGHbackends/qualcomm/tests/rework/conftest.py408 adb.push(inputs=[inputs], init_env=False)CODE
HIGH…/strategies/inference/default_device_runner_adapter.py69 self._adb.push(CODE
HIGHbackends/qualcomm/debugger/utils.py296 self.adb.push(STRING
HIGHbackends/webgpu/test/op_tests/cases.py1824 # case: pow(x, 2) == x*x. WGSL pow(neg) is undefined, so the shader special-casesCOMMENT
HIGHbackends/samsung/test/utils/runtime_executor.py129 test_manager.push()CODE
HIGHbackends/vulkan/test/op_tests/utils/gen_benchmark_vk.py230 if (high == 1.0 && low == 0.0)CODE
HIGH…nds/vulkan/test/op_tests/utils/gen_correctness_base.py317 if (high == 1.0 && low == 0.0)CODE
HIGH…kends/vulkan/test/op_tests/utils/gen_correctness_vk.py151 if (t1.scalar_type() == at::kLong || t2.scalar_type() == at::kLong) {CODE
HIGH…kends/vulkan/test/op_tests/utils/gen_correctness_vk.py155 if (!is_close && t1.numel() < 500) {CODE
HIGH…s/xnnpack/_passes/channels_last_tagged_reshape_pass.py160 # then we want to see this is nchw hence return falseCOMMENT
HIGHbackends/arm/_passes/insert_rescales_pass.py227 # zero point is non-null, the result will be in the range [-255;COMMENT
HIGHbackends/arm/scripts/aot_arm_compiler.py807 intermediates_path, f"input_{method_index}.pt" # type: ignore[possibly-undefined]CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q5k/linear.py166 if (tiisg == 0 && r < N) {{CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q5k/linear.py314 if (j < nr1 && i < nr0) {{CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q6k/linear.py142 if (tiisg == 0 && r < N) {{CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q6k/linear.py289 if (j < nr1 && i < nr0) {{CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q4k/embedding.py48 if (row < 0 || row >= V) {CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q4k/linear.py133 if (tiisg == 0 && r < N) {{CODE
HIGHbackends/mlx/custom_kernel_ops/gguf/q4k/linear.py279 if (j < nr1 && i < nr0) {{CODE
HIGHcodegen/tools/test/test_gen_selected_op_variants.py77 && (scalar_type == executorch::aten::ScalarType::Float || scalar_type == executorch::aten::ScalarType::Int))STRING
HIGHcodegen/tools/test/test_gen_selected_op_variants.py149 && (scalar_type == executorch::aten::ScalarType::Float || scalar_type == executorch::aten::ScalarType::Int))STRING
HIGHdevtools/inspector/tests/inspector_test.py2212 1. The output tensor has a valid (non-null) data pointerSTRING
HIGHexamples/qualcomm/qaihub_scripts/utils/export.py194 adb.push(files=files)CODE
HIGHexamples/qualcomm/qaihub_scripts/utils/export.py323 adb.push(inputs=inputs)CODE
HIGH…ub_scripts/stable_diffusion/qaihub_stable_diffusion.py323 adb.push(inputs=input_unet, files=files)CODE
HIGH…alcomm/qaihub_scripts/llama/llama3/qaihub_llama3_8b.py164 adb.push(files=custom_files)CODE
HIGH…alcomm/qaihub_scripts/llama/llama2/qaihub_llama2_7b.py164 adb.push(files=custom_files)CODE
HIGH…ualcomm/util_scripts/qnn_intermediate_debugger_demo.py85 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/util_scripts/cli.py367 adb.push(inputs=user_inputs, backends=[backend_type])CODE
HIGHexamples/qualcomm/util_scripts/gen_etrecord.py75 adb.push(inputs=[sample_input])CODE
HIGHexamples/qualcomm/scripts/wav2letter.py151 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/deeplab_v3.py104 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/mobilebert_fine_tune.py292 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/edsr.py140 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/mobilenet_v2.py72 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/inception_v4.py71 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/mobilenet_v3.py79 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/inception_v3.py73 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/scripts/torchvision_vit.py121 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/custom_op/custom_ops_1.py216 adb.push(inputs=sample_input, files=op_package_paths)CODE
HIGHexamples/qualcomm/custom_op/custom_ops_2.py226 adb.push(inputs=sample_input, files=op_package_paths)CODE
HIGHexamples/qualcomm/oss_scripts/deit.py94 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/ssd300_vgg16.py157 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/pvt.py77 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/dino_v2.py79 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/convnext_small.py80 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/vit_b_16.py81 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/regnet.py77 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/maxvit_t.py188 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/roberta.py125 adb.push(inputs=[sample_input])CODE
HIGHexamples/qualcomm/oss_scripts/roberta.py137 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/squeezenet.py68 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/distilbert.py109 adb.push(inputs=inputs)CODE
HIGHexamples/qualcomm/oss_scripts/fastvit.py138 adb.push(inputs=inputs)CODE
40 more matches not shown…
Structural Annotation Overuse274 hits · 473 pts
SeverityFileLineSnippetContext
LOWinstall_executorch.py231 # Step 1: Install core dependencies firstCOMMENT
LOWinstall_executorch.py234 # Step 2: Install core packageCOMMENT
LOWinstall_executorch.py256 # Step 3: Extra (optional) packages that is only useful for running examples.COMMENT
LOW.wiki/troubleshooting/runtime-errors.md181### Step 1: ProfileCOMMENT
LOW.wiki/troubleshooting/runtime-errors.md192### Step 2: AnalyzeCOMMENT
LOW.wiki/troubleshooting/runtime-errors.md200### Step 3: Identify BottlenecksCOMMENT
LOW.wiki/troubleshooting/runtime-errors.md207### Step 4: Advanced ProfilingCOMMENT
LOW.wiki/quantization/debugging.md102### Step 1: Export Both VersionsCOMMENT
LOW.wiki/quantization/debugging.md121### Step 2: Run Both and CompareCOMMENT
LOW.wiki/quantization/debugging.md139### Step 3: For CoreML, Extract and CompareCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py14# Step 1: ExecuTorch Program ExportCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py54 # Step 2: Construct MethodTestSuite for Each MethodCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py86 # Step 3: Generate BundledProgramCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py89 # Step 4: Serialize BundledProgram to flatbuffer.COMMENT
LOWextension/gguf_util/load_gguf.py96 # Step 1: Build GGUFModelArgsCOMMENT
LOWextension/gguf_util/load_gguf.py100 # Step 2: Build GGUFWeightsCOMMENT
LOWextension/gguf_util/convert_main.py32 # Step 1: Load the GGUF fileCOMMENT
LOWextension/gguf_util/convert_main.py35 # Step 2: Convert the GGUF model to PTECOMMENT
LOWextension/gguf_util/convert_main.py47 # Step 3: Save the PTE program so thatCOMMENT
LOWextension/gguf_util/converters/llama_converter.py110 # Step 1: Create the PyTorch modelCOMMENT
LOWextension/gguf_util/converters/llama_converter.py116 # Step 2: Load the weights into the PyTorch modelCOMMENT
LOWextension/gguf_util/converters/llama_converter.py120 # Step 3: Export to ExecuTorchCOMMENT
LOWextension/image/image_processor.cpp323 // Step 1: orientation (orient -> ROI -> resize). Produce an oriented copy ofCOMMENT
LOWextension/image/image_processor.cpp347 // Step 2: ROI crop (pointer arithmetic).COMMENT
LOWextension/image/image_processor.cpp368 // Step 3: Swizzle BGRA/RGBA → RGB (alpha discarded).COMMENT
LOWextension/image/image_processor.cpp382 // Step 4: Resize.COMMENT
LOWextension/image/image_processor.cpp403 // Step 5: Normalize + layout into the caller's CHW output (padded).COMMENT
LOWextension/image/image_processor_apple.cpp694 // Step 2: orientation. Rotate the BGRA buffer (vImage) so ROI/resize run inCOMMENT
LOWextension/image/image_processor_apple.cpp720 // Step 3: ROI crop (pointer arithmetic on BGRA data).COMMENT
LOWextension/image/image_processor_apple.cpp723 // Step 4: resize. Letterbox padding is applied during normalization.COMMENT
LOWextension/image/image_processor_apple.cpp752 // Step 5: normalize BGRA → CHW float buffer.COMMENT
LOW.ci/docker/common/install_conda.sh59 # WARNING: This is a HACK from PyTorch core to be able to build PyTorch on 22.04.COMMENT
LOW.ci/scripts/gather_test_models.py8# WARNING: The CI runner logic should directly be in the corresponding yml filesCOMMENT
LOW.ci/scripts/test_coreml_bc.sh61# Step 1: Checkout old version of ExecuTorchCOMMENT
LOW.ci/scripts/test_coreml_bc.sh66# Step 2: Install the old versionCOMMENT
LOW.ci/scripts/test_coreml_bc.sh75# Step 3: Export modelCOMMENT
LOW.ci/scripts/test_coreml_bc.sh124# Step 4: Checkout current version (main)COMMENT
LOW.ci/scripts/test_coreml_bc.sh130# Step 5: Install current versionCOMMENT
LOW.ci/scripts/test_coreml_bc.sh135# Step 6: Run the old pte fileCOMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py95 # Step 1: Permute dim1, dim2 to last positions (if needed)COMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py107 # Step 2: Reshape [..., M, N] -> [..., M*N]COMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py117 # Step 3: Compute flat diagonal indicesCOMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py142 # Step 4: index_select on last dimCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py19 # Step 1: Compute differencesCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py22 # Step 2: Square differencesCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py25 # Step 3: Sum of squaresCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py28 # Step 4: Square rootCOMMENT
LOWbackends/qualcomm/_passes/decompose_var.py82 # Step 1: mean_x = mean(x, dim, keepdim=True)COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py94 # Step 2: diff = x - mean_xCOMMENT
LOWbackends/qualcomm/_passes/decompose_var.py102 # Step 3: sq = diff * diff (more efficient than pow(diff, 2))COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py110 # Step 4: var = mean(sq, dim, keepdim)COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py116 # Step 5: Apply correction factor if neededCOMMENT
LOWbackends/qualcomm/_passes/decompose_div_mode.py55 # Step 1: div_result = div(x, y)COMMENT
LOWbackends/qualcomm/_passes/decompose_div_mode.py61 # Step 2: Apply rounding mode if neededCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py148 # Step 1: calibrate inputCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py177 # Step 2: reshape weightCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py230 # Step 3: restore original output of linear nodeCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py143 # Step 1: Load modelCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py150 # Step 2: Load tokenizerCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py157 # Step 3: Build the export example inputs from the model itself.COMMENT
214 more matches not shown…
Excessive Try-Catch Wrapping377 hits · 427 pts
SeverityFileLineSnippetContext
LOWinstall_utils.py57 except Exception:CODE
LOWinstall_utils.py352 except Exception as err:CODE
LOWinstall_utils.py417 except Exception as e:CODE
LOWkernels/portable/__init__.py22except Exception: # noqa: E722CODE
LOW…rnels/portable/test/test_grid_sampler_2d_executorch.py112 except Exception as e:CODE
LOWtools/cmake/buck_util.py57 except Exception as e:CODE
LOWextension/llm/custom_ops/test_update_cache.py226 except Exception:CODE
LOWextension/llm/custom_ops/test_update_cache.py246 except Exception:CODE
LOWextension/llm/custom_ops/test_update_cache.py346 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py624 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py640 except Exception as e:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py655 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py673 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py690 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py793 except Exception:CODE
LOW…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py828 except Exception as e:CODE
MEDIUM…nsion/llm/custom_ops/spinquant/third-party/FFHT/gen.py621def greedy_merged(type_name, log_n, composite_step):CODE
LOWextension/pybindings/portable_lib.py59 except Exception as e:CODE
LOWextension/pybindings/portable_lib.py69 except Exception as e:CODE
LOWextension/pybindings/test/test_pybindings.py43 except Exception:CODE
LOWextension/pybindings/test/test_pybindings.py53 except Exception:CODE
LOWextension/pybindings/test/test_pybindings.py128 except Exception:CODE
LOWextension/pybindings/test/test_pybindings.py387 except Exception:CODE
LOWextension/export_util/utils.py144 except Exception as e:CODE
MEDIUM.ci/scripts/cuda_benchmark.py100 print(f"Error parsing PyTorchObserver log: {e}", file=sys.stderr)CODE
LOW.ci/scripts/cuda_benchmark.py134 except Exception as e:CODE
LOW.ci/scripts/cuda_benchmark.py202 except Exception as e:CODE
MEDIUM.ci/scripts/cuda_benchmark.py203 print(f"Error: Failed to set GPU clocks: {e}", file=sys.stderr)CODE
LOW.ci/scripts/cuda_benchmark.py244 except Exception as e:CODE
MEDIUM.ci/scripts/cuda_benchmark.py245 print(f"Error: Failed to reset GPU clocks: {e}", file=sys.stderr)CODE
MEDIUM.ci/scripts/cuda_benchmark.py330 print(f"Error: Command timed out on run {run_num}", file=sys.stderr)CODE
LOW.ci/scripts/cuda_benchmark.py332 except Exception as e:CODE
MEDIUM.ci/scripts/cuda_benchmark.py333 print(f"Error on run {run_num}: {e}", file=sys.stderr)CODE
LOW.ci/scripts/test-cuda-build.sh78except Exception as e:CODE
LOW.ci/scripts/test_model_e2e.sh588 except Exception as e:CODE
LOW.ci/scripts/test_backend_imports.py122 except Exception as error:CODE
LOW.ci/scripts/wheel/test_shared_libraries.py230 except Exception:CODE
LOWtest/end2end/test_temp_allocator_fix.py209 except Exception as e:CODE
MEDIUMbackends/apple/metal/tests/test_modules.py1192 print(f"Error reading binary file {filepath}: {e}")CODE
LOWbackends/apple/coreml/partition/coreml_partitioner.py376 except Exception as e:STRING
LOWbackends/nxp/tests/utils.py38 except Exception as e:CODE
LOWbackends/nxp/tests/tester/tester.py499 except Exception as exc:CODE
LOWbackends/nxp/tests/generic_tests/test_profiling.py108 except Exception as e:CODE
LOWbackends/nxp/backend/edge_helper.py399 except Exception:CODE
LOWbackends/nxp/backend/ir/converter/tensor_utils.py25 except Exception as e:CODE
LOW…ends/nxp/backend/ir/converter/builder/model_builder.py625 except Exception:CODE
LOW…ends/nxp/backend/ir/converter/builder/model_builder.py634 except Exception:CODE
LOW…ckend/ir/neutron_ir_post_processing/pattern_matcher.py118 except Exception:CODE
LOW…ckend/ir/neutron_ir_post_processing/pattern_matcher.py328 except Exception:CODE
LOW…nds/nxp/aten_passes/remove_nodes_with_known_outputs.py182 except Exception:CODE
LOWbackends/native/serialization/graph_serialize.py1036 except Exception:CODE
LOWbackends/test/harness/tester.py365 except Exception:CODE
LOWbackends/test/suite/runner.py129 except Exception as e:CODE
LOWbackends/test/suite/runner.py134 except Exception as e:CODE
LOWbackends/test/suite/runner.py145 except Exception as e:CODE
LOWbackends/test/suite/runner.py155 except Exception as e:CODE
LOWbackends/test/suite/runner.py163 except Exception as e:CODE
LOWbackends/test/suite/runner.py202 except Exception as e:CODE
LOWbackends/test/suite/runner.py226 except Exception as e:CODE
LOWbackends/test/suite/runner.py236 except Exception:CODE
317 more matches not shown…
Hallucination Indicators34 hits · 385 pts
SeverityFileLineSnippetContext
CRITICALkernels/prim_ops/et_copy_index.cpp58// torch.ops.executorch.prim.add.int(iteration_index, 1, iteration_index)COMMENT
CRITICALkernels/prim_ops/et_copy_index.cpp59// done_bool = torch.ops.executorch.prim.eq.int(iteration_index,COMMENT
CRITICALbackends/apple/coreml/test/tester.py103 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICALbackends/apple/coreml/partition/coreml_partitioner.py194 is_supported = ct.converters.mil.frontend.torch.is_torch_fx_node_supported(CODE
CRITICALbackends/test/suite/__init__.py52 for name, f in executorch.backends.test.suite.flow.all_flows().items()CODE
CRITICALbackends/qualcomm/tests/tester.py107 stage_classes = executorch.backends.test.harness.Tester.default_stage_classes() | {CODE
CRITICALbackends/qualcomm/quantizer/rules.py194 quantization_config.weight.observer_or_fake_quant_ctr.p.keywords.update(CODE
CRITICALbackends/qualcomm/quantizer/README.md173 quantization_config.weight.observer_or_fake_quant_ctr.p.keywords.update(CODE
CRITICALbackends/qualcomm/quantizer/annotators/lpai_rules.py546 quantization_config.weight.observer_or_fake_quant_ctr.p.keywords.update(CODE
CRITICALbackends/qualcomm/quantizer/annotators/htp_rules.py974 quantization_config.weight.observer_or_fake_quant_ctr.p.keywords.update(CODE
CRITICALbackends/webgpu/test/tester.py132 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICALbackends/openvino/test/tester/tester.py76 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICALbackends/openvino/quantizer/quantizer.py129 self._algo = nncf.quantization.algorithms.weight_compression.algorithm.WeightCompression(CODE
CRITICALbackends/vulkan/test/tester.py79 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICALbackends/xnnpack/test/tester/tester.py116 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICAL…kends/xnnpack/test/quantizer/test_pt2e_quantization.py215 torch.ao.quantization.observer.PlaceholderObserver.with_args(CODE
CRITICAL…kends/xnnpack/test/quantizer/test_pt2e_quantization.py306 torch.ao.quantization.observer.PlaceholderObserver.with_args(CODE
CRITICALbackends/mlx/test/tester.py62 executorch.backends.test.harness.Tester.default_stage_classes()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py272 exir_ops.edge.quantized_decomposed.quantize_per_tensor.default.to_out_variant()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py273 exir_ops.edge.quantized_decomposed.dequantize_per_tensor.default.to_out_variant()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py284 exir_ops.edge.quantized_decomposed.quantize_per_tensor.default.to_out_variant()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py285 exir_ops.edge.quantized_decomposed.dequantize_per_tensor.default.to_out_variant()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py307 exir_ops.edge.quantized_decomposed.quantize_per_tensor.default.to_out_variant()CODE
CRITICAL…mple_ethos_u/model_export/export_silero_vad_ethos_u.py308 exir_ops.edge.quantized_decomposed.dequantize_per_tensor.default.to_out_variant()CODE
CRITICALexir/tests/test_arg_validator.py63 ops.edge.aten.add.Tensor.name(),CODE
CRITICALexir/tests/common.py90 torch.ops.aten.max.default.tags.append(canonical)CODE
CRITICALexir/tests/common.py91 torch.ops.aten.sum.default.tags.append(canonical)CODE
CRITICALexir/tests/common.py92 torch.ops.aten.searchsorted.Tensor.tags.append(canonical)CODE
CRITICALexir/tests/common.py93 torch.ops.aten.ones_like.default.tags.append(canonical)CODE
CRITICALexir/tests/common.py94 torch.ops.aten.upsample_nearest2d.default.tags.append(canonical)CODE
CRITICALexir/tests/common.py95 torch.ops.aten.index.Tensor.tags.append(canonical)CODE
CRITICALexir/tests/common.py96 torch.ops.aten.addbmm.default.tags.append(canonical)CODE
CRITICALexir/emit/_emitter.py795 iteration_index) iteration_index = torch.ops.executorch.prim.add.int(iteration_index, 1,STRING
CRITICALexir/emit/_emitter.py796 iteration_index) done_bool = torch.ops.executorch.prim.eq.int(iteration_index, sym_size,STRING
Fake / Example Data377 hits · 366 pts
SeverityFileLineSnippetContext
LOWbackends/apple/coreai/test/test_partitioner.py80 for op in ("placeholder", "output", "call_module", "call_method"):CODE
LOWbackends/apple/coreai/test/test_recipes.py48 if n.op == "placeholder" and hasattr(n.meta.get("val"), "dtype")CODE
LOWbackends/apple/coreai/passes/narrow_dtypes.py41 placeholders = [n for n in graph.nodes if n.op == "placeholder"]CODE
LOWbackends/apple/coreai/passes/test/test_narrow_dtypes.py26 return [n for n in gm.graph.nodes if n.op == "placeholder"]CODE
LOWbackends/apple/coreai/compiler/io_compat.py81 n.name: n for n in edge_program.graph.nodes if n.op == "placeholder"CODE
LOWbackends/apple/coreai/compiler/enumerated_shapes.py41 n.name: n for n in exported_program.graph.nodes if n.op == "placeholder"CODE
LOWbackends/apple/coreai/compiler/enumerated_shapes.py190 n.name: n for n in edge_program.graph.nodes if n.op == "placeholder"CODE
LOW…ckends/apple/coreml/compiler/enumerated_shape_utils.py98 if node.op == "placeholder" and node.name in user_inputs:CODE
LOWbackends/nxp/tests/test_fold_redundant_qdq.py85 assert [node.op for node in remaining_nodes] == ["placeholder", "output"]CODE
LOWbackends/nxp/backend/node_format_inference.py396 return node.op == "placeholder"CODE
LOWbackends/nxp/backend/edge_program_converter.py149 if node.op == "placeholder":CODE
LOWbackends/nxp/edge_passes/remove_io_quant_ops_pass.py31 n for n in graph.nodes if n.op == "placeholder" and n.name == user_inputCODE
LOW…sion_passes/add_simulated_linear_bn_fusion_qat_pass.py52 if node.op == "placeholder":CODE
LOWbackends/nxp/quantizer/neutron_quantizer.py399 if node.op == "placeholder" and len(node.users) > 0:CODE
LOWbackends/native/partitioner.py62 if node.op in ("placeholder", "output", "get_attr"):CODE
LOWbackends/native/test/test_partitioner.py49 for op in ("placeholder", "output", "get_attr", "call_module", "call_method"):CODE
LOWbackends/native/serialization/graph_serialize.py531 "placeholder": OpKind.PLACEHOLDER,CODE
LOWbackends/native/serialization/graph_serialize.py891 user_inputs = [n.name for n in graph_module.graph.nodes if n.op == "placeholder"]CODE
LOWbackends/test/graph_builder.py30 if node.op != "placeholder":CODE
LOWbackends/qualcomm/qnn_preprocess.py107 "placeholder",CODE
LOWbackends/qualcomm/builders/utils.py84 return tensor.op == "placeholder" and not is_parameter(tensor, edge_program)CODE
LOWbackends/qualcomm/builders/utils.py95 if tensor.op == "placeholder" and is_buffer(edge_program, tensor):CODE
LOWbackends/qualcomm/tests/test_qnn_delegate.py7631 "placeholder",STRING
LOWbackends/qualcomm/tests/test_qnn_delegate.py7853 if n.op == "placeholder":STRING
LOWbackends/qualcomm/tests/test_qnn_delegate.py8722 "placeholder",STRING
LOWbackends/qualcomm/tests/rework/src/pattern.py186 if n.op == "placeholder"CODE
LOWbackends/qualcomm/tests/rework/src/pattern.py340 if node.op == "placeholder":CODE
LOWbackends/qualcomm/tests/rework/src/pattern.py345 if node.op == "placeholder" and QCOM_QUANTIZED_IO in node.meta:CODE
LOWbackends/qualcomm/tests/rework/src/pattern.py4733 return torch.uint8 if node.op == "placeholder" else NoneCODE
LOWbackends/qualcomm/tests/rework/src/pattern.py4739 placeholders = [n for n in gm.graph.nodes if n.op == "placeholder"]CODE
LOWbackends/qualcomm/utils/utils.py132 node.op in ("placeholder", "output"),CODE
LOWbackends/qualcomm/_passes/canonicalize_conv.py149 if node.args[ConvParamIdx.WEIGHT].op == "placeholder"CODE
LOWbackends/qualcomm/_passes/convert_mha_to_sha.py563 "placeholder": _visit_placeholder,CODE
LOWbackends/qualcomm/_passes/insert_io_qdq.py50 n.op == "placeholder"CODE
LOWbackends/qualcomm/_passes/recompose_rms_norm.py23 return _is_node(node) and node.op == "placeholder"CODE
LOWbackends/qualcomm/_passes/utils.py216 elif decomposed_node.op == "placeholder":CODE
LOW…ds/qualcomm/_passes/lpai_partition_fallback_support.py293 if q_node.op == "placeholder":CODE
LOWbackends/qualcomm/_passes/i64_to_i32.py141 elif n.op == "placeholder" or n.op == "get_attr":CODE
LOWbackends/qualcomm/debugger/format_outputs.py105 if len(node.users) == 0 and node.op == "placeholder":CODE
LOWbackends/qualcomm/debugger/format_outputs.py143 if len(node.users) == 0 and node.op == "placeholder":CODE
LOWbackends/qualcomm/debugger/format_outputs.py183 if len(node.users) == 0 and node.op == "placeholder":CODE
LOWbackends/qualcomm/partition/qnn_partitioner.py206 if node.op != "placeholder" or len(node.users) != 0:CODE
LOWbackends/qualcomm/quantizer/custom_annotation.py446 if node.op == "placeholder" and "attention_kv_cache_past_" in node.name:CODE
LOW…backend_delegate_passes/permute_memory_formats_pass.py46 if node.op != "placeholder"CODE
LOW…backend_delegate_passes/permute_memory_formats_pass.py83 and exit_node_arg.op != "placeholder"CODE
LOWbackends/cuda/passes/move_cond_predicate_to_cpu.py75 pred_node.op == "placeholder"CODE
LOWbackends/cuda/tests/test_cuda_partitioner.py561 if node.op == "placeholder":CODE
LOWbackends/cuda/tests/test_cuda_partitioner.py622 placeholder = next(n for n in graph.nodes if n.op == "placeholder")CODE
LOWbackends/cuda/tests/test_cuda_partitioner.py669 if n.op == "placeholder" and is_buffer(exported_program, n)CODE
LOWbackends/cuda/tests/test_cuda_partitioner.py674 if n.op == "placeholder" and not is_buffer(exported_program, n)CODE
LOWbackends/cuda/tests/test_cuda_partitioner.py835 if n.op == "placeholder" and is_buffer(exported_program, n)CODE
LOWbackends/webgpu/test/ops/test_rope_hf.py221 if node.op == "placeholder" and node.target == "xq"CODE
LOWbackends/openvino/partitioner.py172 elif node.op == "placeholder":CODE
LOWbackends/openvino/partitioner.py173 if "placeholder" in pattern.op_types:CODE
LOWbackends/openvino/partitioner.py182 const_node.op_types["placeholder"] = NoneCODE
LOWbackends/samsung/enn_preprocess.py95 "placeholder",CODE
LOWbackends/samsung/utils/utils.py28 return node.op == "placeholder" and not is_param_node(exported_program, node)CODE
LOWbackends/samsung/_passes/annotate_scalar_parameters.py40 if input_arg.op not in ("placeholder", "get_attr") or not is_param_node(CODE
LOWbackends/samsung/partition/enn_partitioner.py65 "placeholder",CODE
LOWbackends/samsung/quantizer/annotator.py49 if node.op == "placeholder":CODE
317 more matches not shown…
Modern Structural Boilerplate332 hits · 335 pts
SeverityFileLineSnippetContext
LOWextension/pytree/__init__.py12logger = logging.getLogger(__name__)CODE
LOWextension/llm/runner/__init__.py226__all__ = [CODE
LOWextension/llm/export/__init__.py12__all__ = [CODE
LOWextension/llm/modules/attention.py19logger = logging.getLogger(__name__)CODE
LOWextension/llm/modules/__init__.py16__all__ = [CODE
LOWextension/llm/modules/turboquant/__init__.py9__all__ = [CODE
LOWextension/training/__init__.py17__all__ = [CODE
LOWextension/pybindings/portable_lib.py34logger = logging.getLogger(__name__)CODE
LOWextension/export_util/__init__.py9__all__ = [CODE
LOW.ci/scripts/gather_benchmark_configs.py257def set_output(name: str, val: Any) -> None:CODE
LOW.ci/scripts/gather_test_models.py84def set_output(name: str, val: Any) -> None:CODE
LOWbackends/apple/metal/passes/__init__.py11__all__ = ["DecomposeLinearPass"]CODE
LOWbackends/apple/coreai/__init__.py41__all__ = [CODE
LOWbackends/apple/coreai/passes/__init__.py11__all__ = ["NarrowToCoreAIDtypesPass"]CODE
LOWbackends/apple/coreai/recipes/__init__.py15__all__ = [CODE
LOWbackends/apple/coreai/recipes/recipe_provider.py22logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreai/partition/partitioner.py35logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreai/quantizer/__init__.py9__all__ = [CODE
LOWbackends/apple/coreai/compiler/preprocess.py40logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreai/compiler/io_compat.py23logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreai/compiler/enumerated_shapes.py25logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreml/recipes/__init__.py14__all__ = [CODE
LOWbackends/apple/coreml/partition/__init__.py7__all__ = [CODE
LOWbackends/apple/coreml/partition/coreml_partitioner.py32logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreml/quantizer/__init__.py7__all__ = [CODE
LOWbackends/apple/coreml/compiler/coreml_preprocess.py35logger = logging.getLogger(__name__)CODE
LOWbackends/apple/coreml/compiler/__init__.py7__all__ = [CODE
LOWbackends/nxp/tests/config_importer.py8logger = logging.getLogger(__name__)CODE
LOWbackends/nxp/tests/nsys_testing.py55logger = logging.getLogger(__name__)CODE
LOWbackends/nxp/tests/outputs_dir_importer.py8logger = logging.getLogger(__name__)CODE
LOWbackends/nxp/tests/tester/__init__.py8__all__ = ["NeutronTester"]CODE
LOWbackends/nxp/backend/node_format_inference.py42logger = logging.getLogger(__name__)CODE
LOWbackends/nxp/backend/neutron_map.py227 def _update_neutron_subgraphs_info(self, extracted_graph: str) -> None:CODE
LOW…ckends/nxp/backend/ir/tflite_generator/tflite_model.py31logger = logging.getLogger(__name__)CODE
LOWbackends/nxp/backend/ir/tflite_generator/meta/meta.py21logger = logging.getLogger(__name__)CODE
LOW…r/converter/node_converters/ops_converters/__init__.py135__all__ = [CODE
LOW…n_passes/simulated_linear_bn_fusion_passes/__init__.py13__all__ = [CODE
LOWbackends/native/__init__.py10__all__ = [CODE
LOWbackends/native/serialization/__init__.py19__all__ = [CODE
LOWbackends/native/passes/__init__.py43__all__ = [CODE
LOWbackends/test/harness/__init__.py3__all__ = ["Tester"]CODE
LOWbackends/test/harness/stages/serialize.py11logger = logging.getLogger(__name__)CODE
LOWbackends/test/harness/stages/__init__.py11__all__ = [CODE
LOWbackends/test/suite/__init__.py19logger = logging.getLogger(__name__)CODE
LOWbackends/test/suite/flow.py16logger = logging.getLogger(__name__)CODE
LOWbackends/test/suite/flows/portable.py6logger = logging.getLogger(__name__)CODE
LOWbackends/test/suite/flows/xnnpack.py14logger = logging.getLogger(__name__)CODE
LOWbackends/qualcomm/qnn_preprocess.py45logger = logging.getLogger(__name__)CODE
LOWbackends/qualcomm/builders/__init__.py125__all__ = [CODE
LOWbackends/qualcomm/_passes/__init__.py76__all__ = [CODE
LOW…ends/qualcomm/_passes/lift_constant_scalar_operands.py127 def _update_node(self, node: fx.Node, tensor_args: Dict) -> None:CODE
LOWbackends/qualcomm/_passes/i64_to_i32.py115 def _update_meta(self, node: torch.fx.node) -> None:CODE
LOWbackends/qualcomm/_passes/backends/htp/__init__.py9__all__ = [CODE
LOWbackends/qualcomm/_passes/backends/gpu/__init__.py9__all__ = [CODE
LOWbackends/qualcomm/_passes/backends/lpai/__init__.py9__all__ = [CODE
LOWbackends/qualcomm/genai_pipeline/__init__.py34__all__ = [CODE
LOWbackends/qualcomm/genai_pipeline/stages/__init__.py20__all__ = [CODE
LOWbackends/qualcomm/genai_pipeline/strategies/__init__.py20__all__ = [CODE
LOW…enai_pipeline/strategies/model_preparation/__init__.py17__all__ = [CODE
LOW…l_preparation/executorch_model_preparation_strategy.py35logger = logging.getLogger(__name__)CODE
272 more matches not shown…
Redundant / Tautological Comments216 hits · 326 pts
SeverityFileLineSnippetContext
LOWinstall_executorch.py136 # Check if the directories exist for each required submoduleCOMMENT
LOWsetup.py2055 # Check if QNN SDK is available (via QNN_SDK_ROOT env var), and if so,COMMENT
LOWsetup.py2209 # Set PYTHONPATH to the location of the pip package.COMMENT
LOWinstall_utils.py121 # Check if the detected version is supportedCOMMENT
LOW…tension/llm/custom_ops/test_update_cross_attn_cache.py17# Check if CUDA device has compatible compute capability for Triton kernelsCOMMENT
LOWextension/llm/export/export_passes.py51 # Check if the next node is also a transpose nodeCOMMENT
LOWextension/llm/export/export_passes.py69 # Check if the two transpose nodes undo each otherCOMMENT
LOWextension/llm/export/export_passes.py79 # Check if the next node is also a transpose nodeCOMMENT
LOWextension/llm/export/export_passes.py91 # Check if the two permutes undo each otherCOMMENT
LOWextension/training/examples/CIFAR/train_utils.py132 model.eval() # Set model to evaluation modeCODE
LOW.ci/docker/common/install_cuda_windows_cross_compile.sh95 # Check if already downloaded and extractedCOMMENT
LOW.ci/scripts/download_hf_hub.sh57# Check if script is called directlyCOMMENT
LOW.ci/scripts/compare_dirs.sh10# Check if dir1's files are also found in dir2 with the sameCOMMENT
LOW.ci/scripts/compare_dirs.sh36 # Check if the corresponding file exists in the second directoryCOMMENT
LOWbackends/apple/metal/passes/decompose_linear_pass.py30 # Check if this is a linear operationCOMMENT
LOWbackends/apple/metal/tests/test_metal_partitioner.py59 # Check if we have any tagged nodesCOMMENT
LOWbackends/apple/metal/tests/test_metal_partitioner.py63 # Check if all tagged nodes have the same tagCOMMENT
LOWbackends/apple/metal/tests/run_metal_test.sh13# ./run_metal_test.sh --check-build # Check if runtime is already builtCOMMENT
LOWbackends/apple/metal/tests/run_metal_test.sh55 # Check if we're on macOSCOMMENT
LOWbackends/apple/metal/tests/test_modules.py46# Check if MPS is available for export testsCOMMENT
LOWbackends/apple/metal/tests/test_modules.py52# Check if running in CI (GitHub Actions)COMMENT
LOWbackends/apple/metal/tests/test_modules.py68# Check if executor_runner is builtCOMMENT
LOWbackends/apple/metal/tests/test_modules.py1274 # Check if this model/dtype combination should be skippedCOMMENT
LOWbackends/apple/metal/tests/test_modules.py1308 # Check if this model/dtype combination should be skippedCOMMENT
LOWbackends/apple/coreml/partition/coreml_partitioner.py291 # Check if we're being called from the deprecated to_backend workflowSTRING
LOWbackends/nxp/nxp_backend.py249 # Check if provided intermediates_dir is a correct path (None is decoded to str)COMMENT
LOWbackends/nxp/neutron_partitioner.py488 # Check if the nodes support the partitioning result. Mark the problematic nodes with `NXP_DO_NOT_DELEGATE`.COMMENT
LOWbackends/nxp/tests/graph_verifier.py229 # Check if the node was tagged for delegation during partitioningCOMMENT
LOWbackends/nxp/tests/generic_tests/test_aot_example.py151 # Check if delegated model was created and saved.COMMENT
LOWbackends/nxp/tests/generic_tests/test_aot_example.py157 # Check if nonempty Neutron to Edge map was created.COMMENT
LOWbackends/nxp/tests/generic_tests/test_aot_example.py160 # Check if ETRecord was created and saved.COMMENT
LOW…nxp/tests/generic_tests/test_convert_scalar_to_attr.py59 # Check if the node with scalar arg did not disappear.COMMENT
LOWbackends/nxp/tests/generic_tests/test_quantizer.py190 # Check if QDQ pattern:COMMENT
LOWbackends/nxp/tests/generic_tests/test_quantizer.py201 # Check if input and output quantization is sameCOMMENT
LOWbackends/nxp/tests/generic_tests/test_quantizer.py224 # Check if QDQ pattern:COMMENT
LOWbackends/nxp/backend/neutron_map.py147 # Check if there is two graphs in the input dumpCOMMENT
LOWbackends/nxp/backend/neutron_map.py318 # Check if the neutron input is also the special op (Pad or Transpose)COMMENT
LOWbackends/nxp/backend/neutron_map.py389 # Check if there can be potential issue in mapping.COMMENT
LOW…ckends/nxp/backend/ir/tflite_generator/tflite_model.py599 # Check if any of the inputs is quantizedCOMMENT
LOW…ends/nxp/backend/ir/converter/builder/model_builder.py194 # Check if such tensor already existsCOMMENT
LOW…ckend/ir/neutron_ir_post_processing/pattern_matcher.py648 # Check if it is connected via the inputs.COMMENT
LOW…ckend/ir/neutron_ir_post_processing/pattern_matcher.py740 # Check if it is connected via the inputs.COMMENT
LOW…_processing/optimizations/prune_transpose_operators.py146 # Check if the `Transpose` is doing nothing.COMMENT
LOW…es/remove_additional_quantize_dequantize_nodes_pass.py93 # Check if all quantization params are equal to ensure that QDQ cluster can be removed.COMMENT
LOW…kends/nxp/aten_passes/move_activation_before_concat.py55 # Check if all cat inputs nodes are conv 2D or linear 2D type and their only user is cat.COMMENT
LOW…kends/nxp/aten_passes/move_activation_before_concat.py65 # Check if following activation is supported on Neutron as fused activation.COMMENT
LOW…aten_passes/add_batch_size_for_3d_input_pool_2d_ops.py72 # Check if input is 3D (C, H, W)COMMENT
LOW…ends/nxp/aten_passes/decompose_split_to_slices_pass.py175 # Check if split is even necessary - if not, remove itCOMMENT
LOWbackends/test/suite/runner.py185 # Check if any undelegated ops are in the unsupported ops set.COMMENT
LOWbackends/qualcomm/_passes/utils.py308 # Check if pattern is validCOMMENT
LOWbackends/qualcomm/scripts/build.sh11# Check if running on macOS/DarwinCOMMENT
LOWbackends/qualcomm/scripts/install_qnn_sdk.sh11 # Check if ANDROID_NDK_ROOT is already set and validCOMMENT
LOWbackends/qualcomm/scripts/install_qnn_sdk.sh61 # Check if QNN_SDK_ROOT is already set and validCOMMENT
LOWbackends/qualcomm/scripts/install_qnn_sdk.sh132 # Check if already configured externally and valid.COMMENT
LOWbackends/qualcomm/scripts/install_qnn_sdk.sh212 # Check if we already have a local installationCOMMENT
LOWbackends/cuda/tests/test_cuda_partitioner.py442 # Check if we have any tagged nodesCOMMENT
LOWbackends/cuda/tests/test_cuda_partitioner.py446 # Check if all tagged nodes have the same tagCOMMENT
LOWbackends/cuda/tests/test_cuda_partitioner.py562 # Check if this is a constant (param, buffer, or lifted tensor constant)COMMENT
LOWbackends/cuda/tests/test_cuda_export.py323 # Set module to eval mode to avoid batch norm running statistics mutationsCOMMENT
LOWbackends/openvino/tests/ops/base_openvino_op_test.py46 # Check if the number of partitions created matches the expected number of partitionsCOMMENT
156 more matches not shown…
Verbosity Indicators167 hits · 307 pts
SeverityFileLineSnippetContext
LOWinstall_executorch.py231 # Step 1: Install core dependencies firstCOMMENT
LOWinstall_executorch.py234 # Step 2: Install core packageCOMMENT
LOWinstall_executorch.py256 # Step 3: Extra (optional) packages that is only useful for running examples.COMMENT
LOWextension/module/test/resources/gen_bundled_program.py14# Step 1: ExecuTorch Program ExportCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py54 # Step 2: Construct MethodTestSuite for Each MethodCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py86 # Step 3: Generate BundledProgramCOMMENT
LOWextension/module/test/resources/gen_bundled_program.py89 # Step 4: Serialize BundledProgram to flatbuffer.COMMENT
LOWextension/gguf_util/load_gguf.py96 # Step 1: Build GGUFModelArgsCOMMENT
LOWextension/gguf_util/load_gguf.py100 # Step 2: Build GGUFWeightsCOMMENT
LOWextension/gguf_util/convert_main.py32 # Step 1: Load the GGUF fileCOMMENT
LOWextension/gguf_util/convert_main.py35 # Step 2: Convert the GGUF model to PTECOMMENT
LOWextension/gguf_util/convert_main.py47 # Step 3: Save the PTE program so thatCOMMENT
LOWextension/gguf_util/converters/llama_converter.py110 # Step 1: Create the PyTorch modelCOMMENT
LOWextension/gguf_util/converters/llama_converter.py116 # Step 2: Load the weights into the PyTorch modelCOMMENT
LOWextension/gguf_util/converters/llama_converter.py120 # Step 3: Export to ExecuTorchCOMMENT
LOWextension/image/image_processor.cpp323 // Step 1: orientation (orient -> ROI -> resize). Produce an oriented copy ofCOMMENT
LOWextension/image/image_processor.cpp347 // Step 2: ROI crop (pointer arithmetic).COMMENT
LOWextension/image/image_processor.cpp368 // Step 3: Swizzle BGRA/RGBA → RGB (alpha discarded).COMMENT
LOWextension/image/image_processor.cpp382 // Step 4: Resize.COMMENT
LOWextension/image/image_processor.cpp403 // Step 5: Normalize + layout into the caller's CHW output (padded).COMMENT
LOWextension/image/image_processor_apple.cpp694 // Step 2: orientation. Rotate the BGRA buffer (vImage) so ROI/resize run inCOMMENT
LOWextension/image/image_processor_apple.cpp720 // Step 3: ROI crop (pointer arithmetic on BGRA data).COMMENT
LOWextension/image/image_processor_apple.cpp723 // Step 4: resize. Letterbox padding is applied during normalization.COMMENT
LOWextension/image/image_processor_apple.cpp752 // Step 5: normalize BGRA → CHW float buffer.COMMENT
LOW.ci/scripts/test_coreml_bc.sh61# Step 1: Checkout old version of ExecuTorchCOMMENT
LOW.ci/scripts/test_coreml_bc.sh66# Step 2: Install the old versionCOMMENT
LOW.ci/scripts/test_coreml_bc.sh75# Step 3: Export modelCOMMENT
LOW.ci/scripts/test_coreml_bc.sh124# Step 4: Checkout current version (main)COMMENT
LOW.ci/scripts/test_coreml_bc.sh130# Step 5: Install current versionCOMMENT
LOW.ci/scripts/test_coreml_bc.sh135# Step 6: Run the old pte fileCOMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py95 # Step 1: Permute dim1, dim2 to last positions (if needed)COMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py107 # Step 2: Reshape [..., M, N] -> [..., M*N]COMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py117 # Step 3: Compute flat diagonal indicesCOMMENT
LOWbackends/qualcomm/_passes/decompose_diagonal.py142 # Step 4: index_select on last dimCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py19 # Step 1: Compute differencesCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py22 # Step 2: Square differencesCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py25 # Step 3: Sum of squaresCOMMENT
LOWbackends/qualcomm/_passes/decompose_cdist.py28 # Step 4: Square rootCOMMENT
LOWbackends/qualcomm/_passes/decompose_var.py82 # Step 1: mean_x = mean(x, dim, keepdim=True)COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py94 # Step 2: diff = x - mean_xCOMMENT
LOWbackends/qualcomm/_passes/decompose_var.py102 # Step 3: sq = diff * diff (more efficient than pow(diff, 2))COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py110 # Step 4: var = mean(sq, dim, keepdim)COMMENT
LOWbackends/qualcomm/_passes/decompose_var.py116 # Step 5: Apply correction factor if neededCOMMENT
LOWbackends/qualcomm/_passes/decompose_div_mode.py55 # Step 1: div_result = div(x, y)COMMENT
LOWbackends/qualcomm/_passes/decompose_div_mode.py61 # Step 2: Apply rounding mode if neededCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py148 # Step 1: calibrate inputCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py177 # Step 2: reshape weightCOMMENT
LOWbackends/qualcomm/_passes/convert_linear_to_conv2d.py230 # Step 3: restore original output of linear nodeCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py143 # Step 1: Load modelCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py150 # Step 2: Load tokenizerCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py157 # Step 3: Build the export example inputs from the model itself.COMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py168 # Step 4: Generate calibration data via the cross-stage dataset adapterCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py179 # Step 5: Optionally export tokenizer for runtimeCOMMENT
LOW…l_preparation/executorch_model_preparation_strategy.py190 # Step 6: Extract chat_template from tokenizer (for instruct models).COMMENT
LOW…egies/quantization/executorch_quantization_strategy.py130 # Step 1: Export model. The example inputs describe the model's ownCOMMENT
LOW…egies/quantization/executorch_quantization_strategy.py141 # Step 2: Create quantizerCOMMENT
LOW…egies/quantization/executorch_quantization_strategy.py168 # Step 3: Prepare (insert observers)COMMENT
LOW…egies/quantization/executorch_quantization_strategy.py172 # Step 4: CalibrateCOMMENT
LOW…egies/quantization/executorch_quantization_strategy.py178 # Step 5: Convert to quantized modelCOMMENT
LOWbackends/cuda/runtime/cuda_backend.cpp1049 // Step 1: Enumerate constants and partition into cached/uncachedCOMMENT
107 more matches not shown…
Docstring Block Structure55 hits · 275 pts
SeverityFileLineSnippetContext
HIGHextension/llm/modules/attention.py209 Args: x (torch.Tensor): input tensor with shape [b x s_x x d] for the query y (OptionalSTRING
HIGHextension/llm/modules/kv_cache.py69Update KV cache with the new ``k_val``, ``v_val`` and return the updated cache. Note: When updatingSTRING
HIGHextension/flat_tensor/serialize/serialize.py149Tries to read an flat_tensor header from the provided data. Does not validate that the header is well-formed. CSTRING
HIGH.ci/scripts/gather_benchmark_configs.py147 Generate a list of compatible benchmark configurations for a given model name and target OS. Args: modSTRING
HIGH.ci/scripts/test_huggingface_optimum_model.py233 Determine the tokenizer path based on files saved by tokenizer.save_pretrained(). Args: model_dir: TheSTRING
HIGHbackends/qualcomm/utils/utils.py1162 Helper function generating compiler specs for Qualcomm AI Engine Direct Args: soc_model: The SoC you pSTRING
HIGH…l_preparation/executorch_model_preparation_strategy.py106Prepare the model, tokenizer, and calibration data. Args: context: The pipeline context with globalSTRING
HIGH…gies/model_preparation/default_model_loader_adapter.py159Export tokenizer to disk and return the runtime tokenizer file. ``save_pretrained`` writes several files and reSTRING
HIGH…egies/quantization/executorch_quantization_strategy.py95Quantize the model using ExecuTorch/QNN quantization. Executes the full PT2E quantization pipeline: expSTRING
HIGH…ine/strategies/compilation/default_compiler_adapter.py42Compile the model using ExportSession. Placeholder for the recipe-based compilation flow, which uses ``STRING
HIGH…_pipeline/datasets/default_calibration_data_adapter.py34Generate calibration data as random token sequences. Args: tokenizer: The tokenizer to use. Only ``STRING
HIGH…nai_pipeline/datasets/default_training_data_adapter.py34Return caller-supplied QAT training data. Args: tokenizer: The tokenizer (unused by this implementaSTRING
HIGHbackends/cuda/triton/kernels/sdpa.py117 Validate dimensions and return shape info. Args: query: Query tensor [B, H_q, L_q, D] key: Key STRING
HIGHbackends/transforms/utils.py32 Helper function to create a fake tensor using the fake_mode from existing nodes in the graph. Args: grSTRING
HIGH…kends/xnnpack/serialization/xnnpack_graph_serialize.py134 Converts the given bytes into an XNNHeader object. We check that the magic and length is valid, but doSTRING
HIGH…kends/xnnpack/serialization/xnnpack_graph_serialize.py263Returns the input followed by enough zero bytes to become the requested length. Args: data: The data to padSTRING
HIGHbackends/arm/test/runner_utils.py200Get output QuantizationParams from a program. Args: output_nodes (list(Node)): A list of output nodes to geSTRING
HIGHbackends/arm/operators/op_tosa_rescale.py28Derive integer multipliers and shifts from floating-point scales. TOSA uses the RESCALE operation to scale between STRING
HIGHbackends/arm/operators/node_visitor.py185Define a TOSA operator node. Args: node (torch.fx.Node): FX node being lowered. tosa_grSTRING
HIGHbackends/arm/tosa/backend.py114Lower an exported program to a TOSA flatbuffer. Apply Arm transformation passes to ``edge_program``, then walk STRING
HIGHbackends/arm/tosa/utils.py26Determine whether the fake tensors share a broadcastable shape. Args: fake_tensors (list[FakeTensor]): FakeSTRING
HIGHbackends/arm/tosa/utils.py65Broadcast the FX nodes to a shared shape inside the TOSA graph. This emits the reshape and tile operators needed toSTRING
HIGHbackends/arm/tosa/specification.py192Create a specification from a standard string format. Example: ``TOSA-1.00.0+INT+FP+int4+cf``. Args: STRING
HIGHbackends/arm/tosa/mapping.py85Map a ``torch.dtype`` to a ``ts.DType``. Args: data_type (torch.dtype): PyTorch dtype to convert. RetuSTRING
HIGHbackends/arm/tosa/mapping.py130Extract dtype, shape, and dimension order from FX metadata. Args: meta (dict): FX node ``meta`` containing STRING
HIGHbackends/arm/_passes/rewrite_conv_pass.py74Adjust padding to satisfy TOSA's integer output-size requirement. Torch ``Conv2d`` does not require the result STRING
HIGHbackends/arm/_passes/rewrite_upsample.py50Compute resize coefficients for a single spatial dimension. Args: input_size (int | torch.SymInt): STRING
HIGHbackends/arm/scripts/aot_arm_compiler.py212Resolve a model name into a model instance and example inputs. Args: model_name: Identifier for the model. STRING
HIGHbackends/arm/quantizer/quantization_config.py258Get the derived or validated bias spec. For conv/linear ops, derive bias qparams from the input/weight observerSTRING
HIGHbackends/arm/quantizer/quantization_config.py282Compute bias scale/zero-point from activation/weight observers. Expect two observers or fake-quantize modulSTRING
HIGHbackends/arm/vgf/compile_spec.py74Run VGF environment preflight checks. By default this validates only AoT/export prerequisites. Runtime and STRING
HIGHbackends/mlx/partitioner.py301 Partition the edge program for MLX delegation. Args: edge_program: The ExportedProgram to STRING
HIGHbackends/mlx/pattern_utils.py106 One step in a backward walk through the graph. Used with walk_back() to define pattern chains. Supports both eSTRING
HIGHbackends/mlx/pattern_utils.py201 Walk backwards through a chain of ops, matching against a pattern. Starting from *node*, try to match each steSTRING
HIGHdevtools/inspector/_inspector.py1178 Resolve the reference graph module to use for AOT operations. This method centralizes the logic for deSTRING
HIGH…ctor/numerical_comparator/numerical_comparator_base.py166Compare two outputs, handling both sequence and non-sequence cases. Args: a: The first intermediateSTRING
HIGHexamples/qualcomm/oss_scripts/llama/tokenizer.py146 Validate and normalize a multi-turn prompt sequence, then prepare it into a message list. ThisSTRING
HIGH…/aot_utils/llm_utils/tokenizers_/tokenization_utils.py408Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added toSTRING
HIGH…utils/llm_utils/tokenizers_/tokenization_utils_base.py61Import the DecodeError from protobuf if available. Args: _ (Any): Placeholder argument. Returns: STRING
HIGH…utils/llm_utils/tokenizers_/tokenization_utils_base.py913Adds special tokens. Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to cSTRING
HIGH…utils/llm_utils/tokenizers_/tokenization_utils_base.py1038Add tokens. Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they STRING
HIGH…ples/mediatek/aot_utils/llm_utils/tokenizers_/utils.py374Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_repo_STRING
HIGHexamples/models/model_factory.py23 Create an instance of a model class that implements EagerModelBase and retrieve related data. Args: STRING
HIGHscripts/pick_doc_commits.py46Runs a git command and returns its stdout as a list of lines. Prints the command and its output to debug_log() if vSTRING
HIGHexir/native/native.py361Lower ExportedProgram(s) through the native backend. ``programs`` is a single ``ExportedProgram`` (lowered as the sSTRING
HIGHexir/backend/backend_api.py74 Add overloaded implementations for to_backend: :: def to_backend( backend_id: str, edgSTRING
HIGHexir/backend/test/backend_with_compiler_demo.py30 An example implementation to lower a module. Currently this example only supports the sin operator. The exaSTRING
HIGHexir/_serialize/_program.py92Inserts a header just after the magic string of the provided flatbuffer data. Args: flatbuffer_data: The inSTRING
HIGHexir/_serialize/_program.py190Tries to read an extended header from the provided data. Does not validate that the header is well-formed. CallSTRING
HIGHexir/_serialize/padding.py11Returns the input followed by enough zero bytes to become the requested length. Args: data: The data to padSTRING
HIGHexport/export.py484 Get the ExportedProgram for a specific method after torch export. Args: method_name: Name STRING
HIGHexport/export.py599 Get the example input for a specific method. Args: method_name: Name of the method to get STRING
HIGHexport/export.py628 Run a specific method with the given inputs. Args: method_name: Name of the method to run,STRING
HIGHexport/target_recipes.py63 Get iOS-optimized recipe for specified hardware configuration. Supported configurations: - 'ios-arm64-coreSTRING
HIGHexport/target_recipes.py122 Get Android-optimized recipe for specified hardware configuration. Supported configurations: - 'android-arSTRING
AI Structural Patterns239 hits · 215 pts
SeverityFileLineSnippetContext
LOWextension/llm/custom_ops/custom_ops.py558CODE
LOWextension/llm/custom_ops/test_sdpa_with_kv_cache.py45CODE
LOWextension/llm/custom_ops/preprocess_custom_ops.py56CODE
LOWextension/llm/custom_ops/test_quantized_sdpa.py155CODE
LOWextension/llm/custom_ops/test_quantized_sdpa.py220CODE
LOWextension/llm/export/builder.py79CODE
LOWextension/audio/mel_spectrogram.py44CODE
LOW…ripts/benchmark_tooling/get_benchmark_analysis_data.py603CODE
LOWtest/end2end/test_end2end.py457CODE
LOWbackends/apple/metal/tests/test_modules.py502CODE
LOWbackends/nxp/nxp_backend.py155CODE
LOWbackends/nxp/tests/models.py14CODE
LOWbackends/nxp/tests/models.py43CODE
LOWbackends/nxp/tests/models.py74CODE
LOWbackends/nxp/tests/models.py103CODE
LOWbackends/nxp/tests/models.py134CODE
LOWbackends/nxp/tests/executorch_pipeline.py177CODE
LOWbackends/nxp/tests/executorch_pipeline.py275CODE
LOWbackends/nxp/tests/executors.py310CODE
LOWbackends/nxp/tests/nsys_testing.py410CODE
LOWbackends/nxp/tests/tester/tester.py574CODE
LOW…ir/tflite_generator/builtin_options/conv_3d_options.py29CODE
LOWbackends/test/harness/tester.py228CODE
LOWbackends/test/harness/tester.py316CODE
LOWbackends/test/harness/tester.py543CODE
LOWbackends/test/suite/operators/test_conv1d.py21CODE
LOWbackends/test/suite/operators/test_conv3d.py22CODE
LOWbackends/test/suite/operators/test_conv2d.py22CODE
LOWbackends/test/suite/operators/test_convtranspose2d.py22CODE
LOWbackends/test/suite/operators/test_convtranspose3d.py22CODE
LOWbackends/test/suite/operators/test_convtranspose1d.py22CODE
LOWbackends/test/suite/operators/test_lstm.py27CODE
LOWbackends/qualcomm/export_utils.py502CODE
LOWbackends/qualcomm/export_utils.py652CODE
LOWbackends/qualcomm/tests/models.py988CODE
LOWbackends/qualcomm/tests/models.py1016CODE
LOWbackends/qualcomm/tests/utils.py350CODE
LOWbackends/qualcomm/tests/utils.py664CODE
LOWbackends/qualcomm/tests/utils.py755CODE
LOWbackends/qualcomm/utils/utils.py340CODE
LOWbackends/qualcomm/utils/utils.py1149CODE
LOWbackends/qualcomm/utils/utils.py185CODE
LOWbackends/qualcomm/_passes/decompose_maxpool3d.py54CODE
LOW…comm/quantizer/observers/per_channel_param_observer.py21CODE
LOW…comm/quantizer/observers/per_channel_param_observer.py125CODE
LOW…ckends/qualcomm/quantizer/observers/concat_observer.py17CODE
LOWbackends/cuda/tests/test_chunk_gated_delta_rule.py183CODE
LOWbackends/cuda/tests/test_fused_moe.py104CODE
LOWbackends/cuda/tests/test_cuda_export.py320CODE
LOW…pu/test/ops/dynamic_shape/test_dynamic_shape_export.py103CODE
LOWbackends/transforms/test/test_create_mutable_buffer.py487CODE
LOWbackends/transforms/test/test_create_mutable_buffer.py520CODE
LOWbackends/transforms/test/test_create_mutable_buffer.py553CODE
LOWbackends/transforms/test/test_create_mutable_buffer.py583CODE
LOWbackends/transforms/test/test_create_mutable_buffer.py613CODE
LOWbackends/vulkan/op_registry.py54CODE
LOWbackends/vulkan/custom_ops_lib.py35CODE
LOWbackends/vulkan/custom_ops_lib.py104CODE
LOWbackends/vulkan/custom_ops_lib.py77CODE
LOWbackends/vulkan/custom_ops_lib.py150CODE
179 more matches not shown…
AI Slop Vocabulary51 hits · 117 pts
SeverityFileLineSnippetContext
MEDIUMkernels/portable/test/op_upsample_bilinear2d_aa_test.py11# The comprehensive C++ test suite in op_upsample_bilinear2d_aa_test.cpp providesCOMMENT
MEDIUMkernels/portable/cpu/util/broadcast_util.cpp150 // Essentially, we can broadcast broadcast_from if it meets three conditionsCOMMENT
MEDIUMkernels/optimized/utils/llvmMathExtras.h697/// Essentially, it is a floor operation across the domain of powers of two.COMMENT
MEDIUMkernels/optimized/utils/llvmMathExtras.h705/// Essentially, it is a ceil operation across the domain of powers of two.COMMENT
LOWextension/llm/custom_ops/custom_ops.py357 # workaround. Should we just return cache instead? But I am afraid thatCOMMENT
LOWextension/llm/custom_ops/custom_ops.py377 # workaround. Should we just return cache instead? But I am afraid thatCOMMENT
LOWextension/llm/custom_ops/custom_ops.py601 # no copies, just pass-throughCOMMENT
LOWextension/llm/custom_ops/custom_ops.py618 # Alias is logically a no-op – just pass them through.COMMENT
LOWextension/llm/export/export_passes.py135 # Ignore specified mask simply set the is_causal flag.COMMENT
MEDIUM.ci/scripts/gather_test_models.py126 # comprehensive E2E test of llava.COMMENT
MEDIUM…ripts/benchmark_tooling/analyze_benchmark_stability.py1245 """Generate a comprehensive summary report"""STRING
MEDIUM…webgpu/runtime/ops/layer_norm/native_layer_norm_wgsl.h37// Single-pass, numerically-robust mean+variance via Chan et al.'s parallelCOMMENT
MEDIUM…s/transforms/test/test_decompose_channels_last_pass.py196# tests rather than the single-output _CASES harness.COMMENT
LOWbackends/vulkan/utils.py1051 # or non tensor argument. In this case, just return default storage andCOMMENT
MEDIUM…vulkan/runtime/graph/ops/impl/QuantizedLinearQCSNW.cpp410 // TODO(ssjia): Determine a more robust heuristic to determine when the coopCOMMENT
MEDIUMbackends/vulkan/runtime/graph/ops/impl/Q4gswLinear.cpp127// shape, but (8,8) is within 3% there and is robust acrossCOMMENT
LOWbackends/vulkan/_passes/tag_memory_meta_pass.py75 # Case where the arg node has not been touched yet; in this case, simply set it andCOMMENT
LOWbackends/arm/process_node.py162 # Get item nodes just add tensors, no node visitor is needed.COMMENT
MEDIUMbackends/arm/test/runner_utils.py392 # This is a hack since Q/DQ ops does not handle channels last input correctly: the simplest and most robustCOMMENT
LOWbackends/arm/operators/op_while.py76 # If we have more inputs than outputs, we can just add missing output tensors.COMMENT
MEDIUMbackends/arm/cmsis_pack/test/all_ops/gen_cproject.py183 # sets this; the bare-device harness sets it here. ALL_OPS_ETHOS_U activatesSTRING
LOWbackends/arm/tosa/utils.py94 # Already in the right shape we can just add it to the list.COMMENT
LOWbackends/arm/operator_support/ethos_u55_support.py106 # If we couldn't determine dtype, just return ok.COMMENT
MEDIUMbackends/arm/scripts/aot_arm_compiler.py782 # To create a bundled program, we first create every test cases from input. We leverage eager modelCOMMENT
LOWbackends/cadence/aot/compiler_utils.py197 # If x was quantized per-tensor, simply create a tensor out of the scalarCOMMENT
LOWbackends/mlx/builder/op_helpers.py153 # Both static - just return the sumCOMMENT
MEDIUMbackends/aoti/utils.h33// Map int32_t dtype to ExecuTorch ScalarType (robust version of hardcodedCOMMENT
MEDIUM…ntime/core/portable_type/c10/c10/util/llvmMathExtras.h691/// Essentially, it is a floor operation across the domain of powers of two.COMMENT
MEDIUM…ntime/core/portable_type/c10/c10/util/llvmMathExtras.h699/// Essentially, it is a ceil operation across the domain of powers of two.COMMENT
MEDIUM…source/tutorials_source/devtools-debugging-tutorial.py18# This tutorial will show a full end-to-end flow of how to utilize the Developer Tools to debug a modelCOMMENT
MEDIUM…urce/tutorials_source/devtools-integration-tutorial.py20# This tutorial will show a full end-to-end flow of how to utilize the Developer Tools to profile a model.COMMENT
LOWdevtools/inspector/_inspector.py585 # If it's not a delegated op then we can just use the raw time valuesCOMMENT
MEDIUMexamples/qualcomm/qaihub_scripts/utils/export.py74 # leverage QNN pybind interface to retrieve tensor encodingsCOMMENT
MEDIUMexamples/qualcomm/qaihub_scripts/utils/export.py169 # leverage SimpleADB for model library conversionCOMMENT
MEDIUMexamples/qualcomm/qaihub_scripts/utils/export.py315 # leverage SimpleADB for e2e inferenceCOMMENT
MEDIUMexamples/qualcomm/util_scripts/cli.py111 # leverage QNN pybind interface to retrieve tensor encodingsCOMMENT
MEDIUMexamples/qualcomm/util_scripts/cli.py358 # leverage SimpleADB for e2e inferenceCOMMENT
MEDIUMexamples/models/llama/install_requirements.sh12# Install lm-eval for Model Evaluation with lm-evalution-harness.COMMENT
MEDIUMexamples/models/llama/export_llama_lib.py98# All models that leverage the transformer architecture defined in llama_transformer.py.COMMENT
MEDIUMexamples/models/llama/eval_llama_lib.py363 # See https://github.com/EleutherAI/lm-evaluation-harness/pull/1998/filesCOMMENT
LOW…/models/llama/source_transformation/custom_kv_cache.py187 # When returning float values we just use the last valueCOMMENT
MEDIUMexamples/devtools/scripts/export_bundled_program.py94 # To create a bundled program, we first create every test cases from input. We leverage eager modelCOMMENT
MEDIUM.github/workflows/test-backend-cortex-m.yml35 # Arm's test harness, and importing it pulls in around 350 arm modules --COMMENT
LOW.github/scripts/propose_ghstack_orig_pr.py91 # If there's more than one Differential Revision, let's just return emptyCOMMENT
LOW.github/scripts/trymerge.py737 # so let's just use main insteadSTRING
LOWexir/lowered_backend_module.py698 # the delegate will just return the result of theCOMMENT
LOWexir/backend/backend_api.py795 # this edge program wasn't partitioned, so we can just return it as isCOMMENT
LOWexir/serde/serialize.py131 # Replace the edge op with the original ATen op so that we can just call intoCOMMENT
LOWexir/serde/serialize.py490 # Replace the edge op with the original ATen op so that we can just call intoCOMMENT
LOWexir/serde/schema.py217 # (ex. cond, map) where single tensor returns will just return a singleCOMMENT
MEDIUMexport/tests/test_export_session.py468 # Create comprehensive recipesCOMMENT
Modern AI Meta-Vocabulary23 hits · 66 pts
SeverityFileLineSnippetContext
MEDIUM…/cuda/runtime/shims/tests/gen_plain_mm_test_vectors.py353# Shared emit / check scaffolding.COMMENT
MEDIUMbackends/vulkan/_passes/squeeze_unsqueeze_inputs.py45 # Prefer not to introduce additional orchestration ops by defaultCOMMENT
MEDIUMcodegen/gen.py142# and the scaffolding to call into the dispatcher from these functions.STRING
MEDIUM…es/qualcomm/oss_scripts/llama/wrappers/llm_wrappers.py400 # get embedding modelCOMMENT
MEDIUM…utils/llm_utils/tokenizers_/tokenization_utils_base.py1643 see the RAG section of the [chat templating guide](https://huggingface.co/docs/transformers/main/en/chatSTRING
MEDIUMexamples/models/qwen3_5_moe/export.py1080 # The wrapper.cpp is pure kernel launch orchestration — no heavy compute.COMMENT
MEDIUMexamples/llm_server/python/openai_transcript.py35# The assistant header that precedes a turn's generation scaffold + content.COMMENT
MEDIUMexamples/llm_server/python/openai_transcript.py37# A scaffold region is exactly empty (history strips it before the last user) orCOMMENT
MEDIUMexamples/llm_server/python/openai_transcript.py130 # No scaffold for this turn's mode/template: nothing to reproduce, soCOMMENT
MEDIUMexamples/llm_server/python/openai_transcript.py238 # turn (few-shot exemplar, pre-seeded turn, reused session) shifts thatCOMMENT
MEDIUMexamples/llm_server/python/openai_transcript.py298 # Splice ids and normalize each turn's scaffold; None => ambiguous region.COMMENT
MEDIUMexamples/llm_server/python/protocol.py41 # Optional prior-turn reasoning (chain-of-thought). MirrorsCOMMENT
MEDIUMexamples/llm_server/python/chat_template.py117 # Cache of the (deterministic) generation scaffold per resolved mode, soCOMMENT
MEDIUMexamples/llm_server/python/serving_chat.py342 # possibly a clamp to the context window) — trust it over the token-countCOMMENT
MEDIUMexamples/llm_server/python/serving_chat.py505 # The generation scaffold the worker will prefill ahead of this turn'sCOMMENT
MEDIUMexamples/llm_server/python/serving_chat.py508 # reproduces the exact resident scaffold even if the mode changes betweenCOMMENT
MEDIUMexamples/llm_server/python/worker_client.py53 # stop) or "length" (ran to max_new, possibly clamped to the context window).COMMENT
MEDIUMexamples/llm_server/python/tests/test_sessions.py398 # A client-injected assistant turn we never generated (few-shot exemplar /COMMENT
MEDIUMexamples/llm_server/python/tests/test_contract.py339# context window, so the token-count heuristic can't tell a real stop from aCOMMENT
MEDIUM…s/llm_server/python/tests/test_warm_resume_scaffold.py160 # History stripped the scaffold; the fix inserts exactly one copy.COMMENT
MEDIUM…s/llm_server/python/tests/test_warm_resume_scaffold.py192 # (wrong scaffold) and not append a second one (double-insert).COMMENT
MEDIUM…s/llm_server/python/tests/test_warm_resume_scaffold.py240 # Regression: a no-scaffold template whose assistant header isn't theCOMMENT
MEDIUM…s/llm_server/python/tests/test_warm_resume_scaffold.py722 # on them, so a template whose post-header scaffold depends on tools gets theCOMMENT
Example Usage Blocks20 hits · 30 pts
SeverityFileLineSnippetContext
LOWextension/kernel_util/make_boxed_from_unboxed_functor.h13/// Example usage:COMMENT
LOW.ci/scripts/detect_ci.sh7# Usage:COMMENT
LOW.ci/scripts/build-cadence-xtensa.sh16# Usage:COMMENT
LOW.ci/scripts/setup-xtensa-tools.sh17# Usage:COMMENT
LOWbackends/apple/metal/tests/run_metal_test.sh9# Usage:COMMENT
LOWbackends/xnnpack/utils/gen_xnnpack_constants.sh8# Usage:COMMENT
LOWbackends/arm/cmsis_pack/scripts/build_pack.sh14# Usage:COMMENT
LOWbackends/arm/cmsis_pack/scripts/copy_sources.sh14# Usage:COMMENT
LOWbackends/arm/scripts/utils.sh17# Usage:COMMENT
LOW…kends/arm/scripts/build_executor_runner_vgf_android.sh10# Usage:COMMENT
LOWbackends/aoti/slim/factory/from_etensor.h34/// Example usage:COMMENT
LOWdevtools/scripts/profile_model.sh15# Usage:COMMENT
LOWdevtools/scripts/benchmark_android.sh13# Usage:COMMENT
LOW…qualcomm/oss_scripts/llama/train/config/lr_config.yaml24# Usage:COMMENT
LOWexamples/models/voxtral_realtime/run_rocm_e2e.sh4# Usage:COMMENT
LOWexamples/models/voxtral_tts/run_cuda_e2e.sh7# Usage:COMMENT
LOWexamples/arduino/build_arduino_library.sh11# Usage:COMMENT
LOWexamples/espressif/build.sh15# Usage:COMMENT
LOWscripts/test_ios.sh8# Usage:COMMENT
LOW.github/scripts/trigger_cuda_perf.sh9# Usage:COMMENT
AI Response Leakage4 hits · 30 pts
SeverityFileLineSnippetContext
HIGHbackends/vulkan/runtime/graph/ops/impl/BatchNorm.cpp48 // In this implementation, we pack the weights along the x dimension, andCOMMENT
HIGH…urce/examples-end-to-end-to-lower-model-to-delegate.md53# The submodule runs in a specific backend. In this example, `BackendWithCompilerDemo` backendCOMMENT
HIGHexamples/devtools/CMakeLists.txt9# support. In this example we link devtools and bundled_program libraries intoCOMMENT
HIGHexir/backend/test/test_backends_lifted.py515 # the submodule runs in a specific backend. In this example, `BackendWithCompilerDemo` backendCOMMENT
Slop Phrases8 hits · 10 pts
SeverityFileLineSnippetContext
LOWextension/llm/export/builder.py127 # make sure to re-export this graph module to persist any changes. SeeCOMMENT
LOWruntime/core/exec_aten/util/scalar_type_util.h510 // Don't forget to extend this when adding new QInt typesCOMMENT
LOWruntime/core/exec_aten/util/scalar_type_util.h524 // Don't forget to extend this when adding new QInt typesCOMMENT
LOWruntime/core/exec_aten/util/scalar_type_util.h538 // Don't forget to extend this when adding new QInt typesCOMMENT
MEDIUMdevtools/inspector/tests/inspector_test.py1728 """A simple test model for demonstration purposes."""STRING
MEDIUM…es/qualcomm/oss_scripts/llama/assets/samples/text.json10 "content": "**Example:** \"Guessing Game\"\n\n**Objective:** To create a simple program that asks the user to guCODE
LOW…utils/llm_utils/tokenizers_/tokenization_utils_fast.py715 # make sure to be foward compatibleSTRING
LOWexir/backend/backend_api.py431 # we make sure to remove them after we finished partition_and_lowerCOMMENT
TODO Padding8 hits · 9 pts
SeverityFileLineSnippetContext
LOWextension/data_loader/mman_windows.cpp101 // TODO: implementCOMMENT
LOWbackends/xnnpack/quantizer/xnnpack_quantizer.py398 # TODO: implement the support for None to be canceling out previous annotationsCOMMENT
LOWbackends/arm/quantizer/arm_quantizer.py1152 # TODO: implement the support for None to be canceling out previous annotationsCOMMENT
LOWbackends/cortex_m/ops/operators.py1354 # TODO: implement dilation != 1.COMMENT
LOWdevtools/inspector/_inspector.py1538 # TODO: implementSTRING
LOWdevtools/inspector/_inspector.py1545 # TODO: implementSTRING
LOWexamples/models/llava/model.py217 # TODO: implement _upsample_bicubic_aa.out in portable kernel library.COMMENT
LOWexir/tests/test_quantization.py87 # TODO: implement torch.ops.quantized_decomposed.add_relu.outCOMMENT
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMbackends/cadence/aot/fuse_ops.py424CODE
MEDIUMbackends/cadence/aot/fuse_ops.py426CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWexamples/models/llama/static_attention.py1645 def helper(m):CODE