Repository Analysis

onnxsim/onnxsim

Simplify your onnx model

21.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of onnxsim/onnxsim, a Python project with 4,392 GitHub stars. SynthScan v2.0 examined 144,095 lines of code across 521 source files, recording 2335 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 21.3 places this repository in the Moderate 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).

21.3
Adjusted Score
21.3
Raw Score
100%
Time Factor
2026-08-29
Last Push
4.4K
Stars
Python
Language
144.1K
Lines of Code
521
Files
2.3K
Pattern Hits
2026-08-29
Scan Date
0.52
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 4HIGH 268MEDIUM 95LOW 1968

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 2335 distinct pattern matches across 16 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.

Cross-File Repetition267 hits · 1335 pts
SeverityFileLineSnippetContext
HIGHREADME.md0<domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, STRING
HIGHtests/test_function_rewriter_vs_onnxscript.py0<domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, STRING
HIGHtests/test_function_rewriter.py0<domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, STRING
HIGHREADME.md0<domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) }STRING
HIGHtests/test_function_rewriter_vs_onnxscript.py0<domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) }STRING
HIGHtests/test_function_rewriter.py0<domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) }STRING
HIGHtests/test_weight_only_quantize_int4.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_halide_integration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_modelopt_integration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_qoperator_quantize_matmul.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_kv_cache_quantization.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_bias_correction.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_quantize_bf16.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_model_checking.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_weight_only_quantize_int16.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_cross_layer_equalization.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_custom_rewriter.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_qoperator_quantize_concat.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_double_quantization_cpp.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_tvm_integration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_mx_quantization_cpp.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_autoround.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_profiling.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_ternary_quantize.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_entropy_calibration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_ort_matmul_nbits_workaround.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_qoperator_quantize_gemm.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_onnx_safetensors_input.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_double_quantization.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_llm_int8.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_dynamic_quantize_matmul.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_function_rewriter_compile_rule.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_weight_quantization_error.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_simple.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_autoquant.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_static_quantize_conv.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_aqlm.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_duquant.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_nncase_integration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_function_rewriter_vs_onnxscript.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_model_info.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_nf4.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_quantize_fp8.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_quarot_cpp.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_function_rewriter_common_rules.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_hqq.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_spinquant.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_gptq.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_export_transformers_save.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_embedding_quantization.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_quantize_fusion_composition.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_constant_fold_determinism.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_static_quantize_int16.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_qoperator_quantize_where.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_low_rank_compensation.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_smoothquant.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_onnxnet_integration.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_tensorrt_sparsity.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_kmeans_quantization.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
HIGHtests/test_adaround.py0< ir_version: {ir_version}, opset_import: ["": {opset}] > {body}STRING
207 more matches not shown…
Hyper-Verbose Identifiers1011 hits · 578 pts
SeverityFileLineSnippetContext
LOWtools/onnx-deploy/scripts/make_toy_seq2seq.py142def make_decoder_with_past_model(enc_seq_len, vocab_size):CODE
LOWtools/onnx-deploy/scripts/make_toy_int8_kv_decoder.py55def _cache_sum_logits_subgraph(prefix, cache_name, vocab_size):CODE
LOWtools/onnx-deploy/scripts/make_toy_int8_kv_decoder.py113def make_decoder_with_past_model(vocab_size):CODE
LOWtools/onnx-finetune/tests/test_lora.py181def test_matmul_injection_noop_at_init_and_round_trips(tmp_path):CODE
LOWtools/onnx-finetune/tests/test_lora.py205def test_gemm_transb_injection_noop_at_init(tmp_path):CODE
LOWtools/onnx-finetune/tests/test_lora.py225def test_gemm_transa_injection_noop_at_init(tmp_path):CODE
LOWtools/onnx-finetune/tests/test_lora.py265def test_target_contains_filters_by_name(tmp_path):CODE
LOWtools/onnx-finetune/tests/test_lora.py286def test_prepare_qlora_excludes_adapter_from_quantization(tmp_path):CODE
LOWtools/onnx-finetune/tests/test_lora.py320def test_export_onnx_adapter_matches_merged_model_via_native_lora_adapter(tmp_path):CODE
LOWtests/test_weight_only_quantize_int4.py107def test_quantize_gemm_transb_with_bias():STRING
LOWtests/test_weight_only_quantize_int4.py134def test_quantize_scale_shape_matches_block_count():STRING
LOWtests/test_weight_only_quantize_int4.py160def test_quantize_skips_k_not_divisible_by_block_size():STRING
LOWtests/test_weight_only_quantize_int4.py180def test_quantize_conv_pointwise():STRING
LOWtests/test_weight_only_quantize_int4.py213def test_quantize_conv_spatial_kernel_with_bias():STRING
LOWtests/test_weight_only_quantize_int4.py241def test_quantize_conv_skips_inner_not_divisible_by_block_size():STRING
LOWtests/test_weight_only_quantize_int4.py261def test_quantize_skips_non_constant_weight():STRING
LOWtests/test_weight_only_quantize_int4.py274def test_quantize_skips_old_opset():STRING
LOWtests/test_halide_integration.py339def _compile_and_run_with_halide(model: onnx.ModelProto, feeds):CODE
LOWtests/test_halide_integration.py409def test_simplified_model_compiles_and_runs_on_halide(name):CODE
LOWtests/test_halide_integration.py430def test_simplify_is_bit_exact_on_halide():CODE
LOWtests/test_halide_integration.py444def test_halide_output_matches_onnx_reference():CODE
LOWtests/test_halide_integration.py461def test_simplify_is_required_for_halide_lowering():CODE
LOWtests/test_backend.py33def test_run_model_produces_correct_result():CODE
LOWtests/test_backend.py40def test_reference_evaluator_run_model(monkeypatch):CODE
LOWtests/test_backend.py52def test_simplify_without_onnxruntime(monkeypatch):CODE
LOWtests/test_backend.py67def test_simplify_with_explicit_provider():CODE
LOWtests/test_backend.py78def test_simplify_with_unavailable_provider_raises():CODE
LOWtests/test_backend.py93def test_reference_evaluator_rejects_custom_lib(monkeypatch):CODE
LOWtests/test_backend.py105def test_explicit_cpu_provider_produces_correct_result():CODE
LOWtests/test_backend.py117def test_provider_options_tuple_form():CODE
LOWtests/test_backend.py131def test_unavailable_provider_raises():CODE
LOWtests/test_backend.py147def test_reference_evaluator_rejects_non_cpu_provider(monkeypatch):CODE
LOWtests/test_qoperator_quantize_matmul.py98def test_quantize_gemm_transb_with_bias():STRING
LOWtests/test_qoperator_quantize_matmul.py130def test_quantize_skips_non_constant_weight():STRING
LOWtests/test_qoperator_quantize_matmul.py146def test_quantize_skips_non_default_gemm_attrs():STRING
LOWtests/test_qoperator_quantize_matmul.py163def test_quantize_skips_old_opset():STRING
LOWtests/test_qoperator_quantize_matmul.py181def test_list_qoperator_quantizable_outputs_includes_matmul_output():STRING
LOWtests/test_qoperator_quantize_matmul.py198def test_calibrate_with_extra_tensor_names_includes_output():STRING
LOWtests/test_mnn_llm_export.py245def test_onnxsim_slims_mnn_llm_export(tmp_path):CODE
LOWtests/test_mnn_llm_export.py276def test_onnxsim_matches_onnxslim_on_mnn_llm_export(tmp_path):CODE
LOWtests/test_export_transformers.py36def test_export_transformers_model_simplifies_in_place(tmp_path):CODE
LOWtests/test_export_transformers.py65def test_export_transformers_model_returns_check_results(tmp_path):CODE
LOWtests/test_export_transformers.py85def test_export_transformers_model_save_as_external_data(tmp_path):CODE
LOWtests/test_weight_only_quantize_matmul_nbits.py111def test_quantize_gemm_transb_with_bias():STRING
LOWtests/test_weight_only_quantize_matmul_nbits.py144def test_quantize_scale_shape_matches_block_count():STRING
LOWtests/test_weight_only_quantize_matmul_nbits.py168def test_quantize_handles_k_not_divisible_by_block_size():STRING
LOWtests/test_weight_only_quantize_matmul_nbits.py197def test_quantize_works_at_low_opset():STRING
LOWtests/test_weight_only_quantize_matmul_nbits.py224def test_quantize_skips_non_constant_weight():STRING
LOWtests/test_weight_only_quantize_matmul_nbits.py237def test_quantize_bit_packing_matches_reference_dequantization():STRING
LOWtests/test_symexpr_kv_cache_consistency.py162def _has_shape_arithmetic_scaffolding(model: onnx.ModelProto) -> bool:CODE
LOWtests/test_symexpr_kv_cache_consistency.py201def test_onnxsim_removes_kv_cache_shape_scaffolding(exported_and_simplified):CODE
LOWtests/test_symexpr_kv_cache_consistency.py233def test_onnxsim_symexpr_matches_torch_shapeenv_symbols(exported_and_simplified):CODE
LOWtests/test_symexpr_kv_cache_consistency.py274def test_onnxsim_kv_cache_consistency(CODE
LOWtests/test_symexpr_kv_cache_consistency.py309def _capture_dim_expressions_to_metadata_props(model, onnx_program):CODE
LOWtests/test_symexpr_kv_cache_consistency.py346def test_onnxsim_captures_symbolic_dim_expressions_to_metadata_props(CODE
LOWtests/test_kv_cache_quantization.py132def test_kv_cache_quantization_inserts_quantize_dequantize_around_concat():STRING
LOWtests/test_kv_cache_quantization.py146def test_kv_cache_quantization_two_step_round_trip_close_to_float():STRING
LOWtests/test_kv_cache_quantization.py191def test_kv_cache_quantization_declines_when_past_has_other_consumers():STRING
LOWtests/test_kv_cache_quantization.py210def test_kv_cache_quantization_noop_without_kv_cache_pattern():STRING
LOWtests/test_kv_cache_quantization.py232def test_value_style_matched_by_name_adds_second_scale_stream():STRING
951 more matches not shown…
Over-Commented Block606 hits · 571 pts
SeverityFileLineSnippetContext
LOWbuild_wasm_pyodide.sh1#!/usr/bin/env bashCOMMENT
LOWbuild_wasm_pyodide.sh21# KNOWN GOOD for onnxsim's vendored protobuf (clang-18/EmscriptenCOMMENT
LOWbuild_wasm_pyodide.sh41# .../xbuildenv/pyodide-root/cpython/installs/python-3.13.2/include/python3.13COMMENT
LOWbuild_wasm_pyodide.sh61# can fail on a minor-version mismatch against the target headers.COMMENT
LOWbuild_wasm_pyodide.sh101BUILD_DIR=${BUILD_DIR:-build-wasm-pyodide}COMMENT
LOWbuild_wasm_pyodide.sh141# Emscripten's own CMake toolchain file hardcodesCOMMENT
LOWCMakeLists.txt1cmake_minimum_required(VERSION 3.22)COMMENT
LOWCMakeLists.txt41option(ONNXSIM_COVERAGE "Instrument onnxsim's own C++ targets for gcov/llvm-cov coverage" OFF)COMMENT
LOWCMakeLists.txt161 # Both ways of obtaining ONNX Runtime ship/install headers flat under thisCOMMENT
LOWCMakeLists.txt281 # so add scripts/convertmodel to its include path to find js_model_executor.h.COMMENT
LOWCMakeLists.txt301 # GetFuseAndEliminationPass, ...) and, historically when these were separateCOMMENT
LOWCMakeLists.txt321 # link items through onnxsim/onnx_optimizer), and CMake refuses to link theCOMMENT
LOWCMakeLists.txt361 OPTIONAL_COMPONENTS Development.SABIModule)COMMENT
LOWCMakeLists.txt401 nanobind_add_module(onnxsim_cpp2py_export onnxsim/cpp2py_export.cc STABLE_ABI FREE_THREADED)COMMENT
LOWsetup.py41# (pywasmcross-wrapped compilers targeting wasm32-emscripten), CMake's ownCOMMENT
LOWsetup.py161 # configureCOMMENT
LOWsetup.py201 # stderr/fprintf without including <cstdio> -- works byCOMMENT
LOWsetup.py221 # directly executable, which it apparently isn't insideCOMMENT
LOWbench/graph_shape_inference_teardown_bench.cpp1// Microbenchmark for the arena change in graph_shape_inference.cc (ProcessNode).COMMENT
LOWbench/graph_shape_inference_teardown_bench.cpp21// [full cycle] build + destroy one node-visit's messages per iteration, aCOMMENT
LOWbench/graph_shape_inference_teardown_bench.cpp41#include <chrono>COMMENT
LOWbench/graph_shape_inference_gperftools_repro.py81 # elementwise ops on every block (Add/Mul/Sub), so ConstantDataFor +COMMENT
LOWbench/fold_teardown_bench.sh1#!/usr/bin/env bashCOMMENT
LOWbench/fold_teardown_bench.cpp1// Microbenchmark for the arena change in onnxsim/onnxsim.cpp (RunOp).COMMENT
LOWbench/fold_teardown_bench.cpp21// [teardown] build N sub-models first, then time only their destructionCOMMENT
LOWbench/graph_shape_inference_teardown_bench.sh1#!/usr/bin/env bashCOMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h1// onnx_deploy/kv_cache_pipeline.hCOMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h21// before constructing any Ort::* object, including KvCachePipeline.COMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h41// input name (e.g. "past_key_values.0.decoder.key"). Values are owned here;COMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h61//COMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h121}COMMENT
LOW…ls/onnx-deploy/include/onnx_deploy/onnx_deploy_c_api.h21COMMENT
LOWtools/onnx-deploy/wasm/CMakeLists.txt21add_executable(onnx_deploy_wasm src/onnx_deploy_wasm.cpp)COMMENT
LOWtools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp1// onnx_deploy_wasm.cppCOMMENT
LOWtools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp21// The JS/C++ boundary (see ../test/ort_web_runtime.mjs for the referenceCOMMENT
LOWtools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp101// process instead of reliably becoming a catchable C++ exception. EveryCOMMENT
LOWtools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp261COMMENT
LOWtools/onnx-deploy/src/onnx_deploy_c_api.cpp1// SPDX-License-Identifier: Apache-2.0COMMENT
LOWtools/onnx-deploy/src/main.cpp1// onnx-deploy: drive an optimum-onnx export directory's encoder/decoder(-with-past)COMMENT
LOWtools/onnx-finetune/CMakeLists.txt1cmake_minimum_required(VERSION 3.18)COMMENT
LOWtools/onnx-finetune/wasm/CMakeLists.txt21#COMMENT
LOWtools/onnx-finetune/wasm/src/onnx_finetune_wasm.cpp1// onnx-finetune-wasm: the same training loop as ../src/main.cpp, exposed toCOMMENT
LOWtools/onnx-finetune/src/main.cpp1// onnx-finetune: run an ONNX Runtime on-device training loop againstCOMMENT
LOWrust/onnxsim-sys/build.rs1//! Build script for `onnxsim-sys`.COMMENT
LOWrust/onnxsim-sys/src/lib.rs1//! Low-level FFI bindings to the ONNX Simplifier (`onnxsim`) C API.COMMENT
LOWrust/onnxsim-sys/src/lib.rs41// --- DLPack ABI ------------------------------------------------------------COMMENT
LOWrust/onnxsim-sys/src/lib.rs101 /// Complex number.COMMENT
LOWrust/onnxsim-sys/src/lib.rs121pub struct DLDataType {COMMENT
LOWrust/onnxsim-sys/src/lib.rs141 /// Number of dimensions.COMMENT
LOWrust/onnxsim-sys/src/lib.rs161 pub dl_tensor: DLTensor,COMMENT
LOWrust/onnxsim-sys/src/lib.rs201 /// `skip_optimizers_is_null != 0` skips every optimizer pass; otherwise allCOMMENT
LOWrust/onnxsim-sys/src/lib.rs241 /// `None` `execute_fn` falls back to the built-in executor, making this aCOMMENT
LOWrust/onnxsim-sys/src/lib.rs341COMMENT
LOWrust/onnxsim-sys/src/lib.rs361 pub fn onnxsim_model_info_diff(COMMENT
LOWrust/onnxsim-sys/src/lib.rs381 /// size in bytes; `out_text`/`out_error`, if non-null, receive owned stringsCOMMENT
LOWrust/onnxsim-sys/src/lib.rs401 /// # SafetyCOMMENT
LOWrust/onnxsim-sys/src/lib.rs461 /// Free a string produced by an `out_error` parameter orCOMMENT
LOWrust/onnxsim/tests/integration.rs1//! End-to-end tests that require the native `onnxsim_c` library to be linked.COMMENT
LOWrust/onnxsim/src/lib.rs1//! Safe Rust bindings to the [ONNX Simplifier](https://github.com/onnxsim/onnxsim)COMMENT
LOWrust/onnxsim/src/lib.rs21//! Ok(())COMMENT
546 more matches not shown…
Unused Imports208 hits · 168 pts
SeverityFileLineSnippetContext
LOWbench/onnxslim_comparison.py17CODE
LOWbench/opset_conversion_profile.py25CODE
LOWbench/opset_conversion_profile.py31CODE
LOWbench/opset_conversion_profile.py35CODE
LOWtools/onnx-deploy/scripts/make_toy_seq2seq.py51CODE
LOWscripts/gc_testpypi.py43CODE
LOWscripts/apple/worker.py35CODE
LOWscripts/apple/models.py4CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/models.py20CODE
LOWscripts/apple/coreml_backend.py26CODE
LOWscripts/apple/coreml_backend.py46CODE
LOWscripts/apple/run_coreml_compat.py27CODE
LOWscripts/intel/worker.py35CODE
LOWscripts/intel/openvino_backend.py27CODE
LOWscripts/intel/openvino_backend.py47CODE
LOWscripts/intel/run_openvino_compat.py27CODE
LOWscripts/intel/models.py4CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/intel/models.py20CODE
LOWscripts/qualcomm/worker.py38CODE
LOWscripts/qualcomm/models.py11CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/models.py27CODE
LOWscripts/qualcomm/qnn_backend.py28CODE
LOWscripts/qualcomm/qnn_backend.py49CODE
LOWscripts/qualcomm/qnn_backend.py49CODE
LOWscripts/qualcomm/run_qnn_compat.py25CODE
LOWscripts/cross/assemble_wheel.py12CODE
LOWscripts/amd/worker.py35CODE
LOWscripts/amd/models.py4CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/models.py20CODE
LOWscripts/amd/run_migraphx_compat.py28CODE
LOWscripts/amd/migraphx_backend.py27CODE
LOWscripts/amd/migraphx_backend.py48CODE
LOWscripts/common/synthetic_models.py16CODE
LOWscripts/common/ep_numerics.py9CODE
LOWscripts/regression/worker.py32CODE
LOWscripts/regression/summarize_pass_phases.py23CODE
148 more matches not shown…
Decorative Section Separators48 hits · 127 pts
SeverityFileLineSnippetContext
MEDIUMbuild_wasm_pyodide.sh17# ---------------------------------------------------------------------------COMMENT
MEDIUMbuild_wasm_pyodide.sh71# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_halide_integration.py188# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_halide_integration.py197# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_rewriter_compile_rule.py134# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_compile_rule.py136# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_vs_onnxscript.py25# --------------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_rewriter_vs_onnxscript.py29# --------------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_rewriter_vs_onnxscript.py116# ==========================================================================STRING
MEDIUMtests/test_function_rewriter_vs_onnxscript.py118# ==========================================================================STRING
MEDIUMtests/test_function_rewriter_vs_onnxscript.py149# ==========================================================================STRING
MEDIUMtests/test_function_rewriter_vs_onnxscript.py154# ==========================================================================STRING
MEDIUMtests/test_audio8.py225# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_audio8.py232# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_rewriter_common_rules.py67# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_common_rules.py69# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_common_rules.py124# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_common_rules.py128# --------------------------------------------------------------------------STRING
MEDIUMtests/test_function_rewriter_onnxscript_script.py40# --------------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_rewriter_onnxscript_script.py43# --------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/run_s390x_tests.sh27# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/run_s390x_tests.sh29# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/run_s390x_tests.sh41# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/run_s390x_tests.sh47# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh39# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh41# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh122# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh127# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh163# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh165# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh186# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh189# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh223# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh225# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh258# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh260# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh346# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_windows_wheel.sh348# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh68# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh71# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh99# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh101# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh134# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/build_s390x_extension.sh136# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/bootstrap_s390x_rootfs.sh30# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/bootstrap_s390x_rootfs.sh33# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/bootstrap_s390x_rootfs.sh50# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/cross/bootstrap_s390x_rootfs.sh55# ---------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping81 hits · 80 pts
SeverityFileLineSnippetContext
LOWbench/onnxslim_comparison.py69 except Exception as e: # noqa: BLE001CODE
LOWbench/onnxslim_comparison.py82 except Exception as e: # noqa: BLE001CODE
LOWtests/test_export_transformers.py44 except Exception as e: # network/hub errors surface as a variety of typesCODE
LOWtests/test_export_transformers.py74 except Exception as e:CODE
LOWtests/test_export_transformers.py94 except Exception as e:CODE
LOWtests/test_optimum_export_deploy.py90 except Exception as e: # network/hub errors surface as a variety of typesCODE
LOWtests/test_tvm_integration.py180 except Exception:CODE
LOWtests/test_export_transformers_whisper.py51 except Exception as e: # network/hub errors surface as a variety of typesCODE
LOWtests/test_function_rewriter_compile_rule.py100except Exception as exc: # pragma: no cover - environment/version guardCODE
LOWtests/test_nncase_integration.py192 except Exception:CODE
LOWscripts/gc_testpypi.py80 except Exception:CODE
LOWscripts/gc_testpypi.py233 except Exception as exc: # noqa: BLE001 - report and continueCODE
LOWscripts/apple/worker.py83 except Exception as exc:CODE
LOWscripts/apple/worker.py99 except Exception as exc:CODE
LOWscripts/apple/worker.py109 except Exception as exc:CODE
LOWscripts/apple/worker.py127 except Exception as exc:CODE
LOWscripts/apple/coreml_backend.py68except Exception as exc: # pragma: no cover - depends on the hostCODE
LOWscripts/apple/coreml_backend.py134 except Exception:CODE
LOWscripts/intel/worker.py83 except Exception as exc:CODE
LOWscripts/intel/worker.py99 except Exception as exc:CODE
LOWscripts/intel/worker.py109 except Exception as exc:CODE
LOWscripts/intel/worker.py127 except Exception as exc:CODE
LOWscripts/intel/openvino_backend.py69except Exception as exc: # pragma: no cover - depends on the hostCODE
LOWscripts/intel/openvino_backend.py135 except Exception:CODE
LOWscripts/qualcomm/worker.py86 except Exception as exc:CODE
LOWscripts/qualcomm/worker.py102 except Exception as exc:CODE
LOWscripts/qualcomm/worker.py112 except Exception as exc:CODE
LOWscripts/qualcomm/worker.py130 except Exception as exc:CODE
LOWscripts/qualcomm/qnn_backend.py75except Exception as exc: # pragma: no cover - depends on the hostCODE
LOWscripts/qualcomm/qnn_backend.py200 except Exception:CODE
LOWscripts/convertmodel/test/make_fixture.py97 except Exception: # compiled extension unavailableCODE
LOWscripts/amd/worker.py83 except Exception as exc:CODE
LOWscripts/amd/worker.py99 except Exception as exc:CODE
LOWscripts/amd/worker.py109 except Exception as exc:CODE
LOWscripts/amd/worker.py127 except Exception as exc:CODE
LOWscripts/amd/migraphx_backend.py94except Exception as exc: # pragma: no cover - depends on the hostCODE
LOWscripts/amd/migraphx_backend.py160 except Exception:CODE
LOWscripts/pyodide_demo/index.html557except Exception as e:CODE
LOWscripts/pyodide_demo/index.html588 except Exception:CODE
LOWscripts/pyodide_demo/index.html590except Exception as e:CODE
LOWscripts/regression/worker.py146 except Exception:CODE
LOWscripts/regression/worker.py159 except Exception as e:CODE
LOWscripts/regression/worker.py277 except Exception as e:CODE
LOWscripts/regression/profile_sample.py128 except Exception as e:STRING
LOWscripts/regression/select_models.py221 except Exception as e: # noqa: BLE001 — report and continueCODE
LOWscripts/regression/yolov5_regression.py133 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/yolov5_regression.py142 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/ultralytics_export_compare.py130 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/ultralytics_export_compare.py139 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/ultralytics_export_compare.py154 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/ultralytics_export_compare.py159 except Exception as e: # noqa: BLE001CODE
LOW…s/regression/paddle2onnx/run_paddle2onnx_regression.py125 except Exception as e: # noqa: BLE001CODE
LOW…s/regression/paddle2onnx/run_paddle2onnx_regression.py152 except Exception as e: # noqa: BLE001CODE
LOW…s/regression/paddle2onnx/run_paddle2onnx_regression.py168 except Exception as e: # noqa: BLE001CODE
LOW…s/regression/paddle2onnx/run_paddle2onnx_regression.py193 except Exception as e: # noqa: BLE001CODE
LOWscripts/regression/yolox/run_yolox_regression.py100 except Exception as e:CODE
LOWscripts/regression/yolox/run_yolox_regression.py108 except Exception as e:CODE
LOWscripts/regression/yolox/run_yolox_regression.py158 except Exception as e: # crash / C++ abort surfaces hereCODE
LOWscripts/regression/yolox/run_yolox_regression.py171 except Exception as e: # onnxslim not installed, ...CODE
LOWscripts/regression/x2paddle/worker.py120 except Exception as e:CODE
21 more matches not shown…
AI Slop Vocabulary31 hits · 77 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_halide_integration.py211 """Kahn's algorithm over node I/O names; robust to any valid node order."""STRING
MEDIUMtests/test_qoperator_quantize_concat.py114 # own static values, not force-fed through the calibration harness.STRING
MEDIUMtests/test_qnn_compat.py22# The QNN harness lives under scripts/qualcomm; reuse it rather than duplicate.COMMENT
MEDIUMtests/test_openvino_compat.py20# The OpenVINO harness lives under scripts/intel; reuse it rather than duplicate.COMMENT
MEDIUMtests/test_hqq.py134 # robust (Lp<2) fit should recover a tighter, more accurate zero-pointSTRING
MEDIUMtests/test_hqq.py160 # HQQ's robust fit should show its benefit most clearly.STRING
MEDIUMtests/test_qoperator_quantize_elementwise.py177 # through the calibration harness.STRING
MEDIUMtests/test_yolo.py19# dominates YOLO's node-count reduction. The standalone compatibility harnessCOMMENT
MEDIUMtests/test_qoperator_quantize_where.py113 # own static values, not force-fed through the calibration harness.STRING
MEDIUMtests/test_coreml_compat.py19# The Core ML harness lives under scripts/apple; reuse it rather than duplicate.COMMENT
LOWtests/test_quantize_fp16.py269 # quantized model, not just pass the (more lenient) checker.STRING
MEDIUMtests/test_migraphx_compat.py22# The MIGraphX harness lives under scripts/amd; reuse it rather than duplicate.COMMENT
LOWscripts/regression/worker.py67 # isn't (many repos just call it "model.onnx").COMMENT
MEDIUM…s/regression/paddle2onnx/run_paddle2onnx_regression.py194 # Verification harness failure is not an onnxsim failure; note it butCOMMENT
MEDIUMscripts/yolo/simplify_yolo.py54# Nano scale keeps the harness fast; the graph structure (what onnxsimCOMMENT
MEDIUM.github/workflows/model-regression.yml58 # Validate the harness itself whenever it changes.COMMENT
MEDIUM.github/workflows/model-regression.yml378 # pull_request runs, which only validate the harness.COMMENT
MEDIUM.github/workflows/amd-integration.yml48 # installed wheel on `import onnxsim`. Reference the harness by absoluteCOMMENT
MEDIUM.github/workflows/big-endian.yml14# requests that touch either the harness or the code that actually reads andCOMMENT
MEDIUM.github/workflows/big-endian.yml33 # The harness, so changes to it are validated before they are relied on.COMMENT
MEDIUM.github/workflows/ep-integration.yml18# Scheduled + on demand, plus on PRs that touch either harness so they stayCOMMENT
MEDIUM.github/workflows/ep-integration.yml94 # installed wheel on `import onnxsim`. Reference the harness by absoluteCOMMENT
MEDIUM.github/workflows/ep-integration.yml136 # installed wheel on `import onnxsim`. Reference the harness by absoluteCOMMENT
MEDIUM.github/workflows/apple-integration.yml13# harness so it stays valid.COMMENT
MEDIUM.github/workflows/apple-integration.yml53 # installed wheel on `import onnxsim`. Reference the harness by absoluteCOMMENT
MEDIUM.github/workflows/backend-integration.yml22# matrix. Runs on PRs that touch the harness or the simplifier, on a dailyCOMMENT
MEDIUM.github/workflows/x2paddle-regression.yml23 # Validate the harness itself whenever it changes.COMMENT
MEDIUM.github/workflows/mlir-integration.yml11# harness, on a weekly schedule to catch new torch-mlir releases, and on demand.COMMENT
MEDIUMonnxsim/sym_shape_infer.h25// Per the PoC in #532 this is the high-leverage half: with ONNX-only shapes aCOMMENT
MEDIUMonnxsim/sym_shape_infer.h25// Per the PoC in #532 this is the high-leverage half: with ONNX-only shapes aCOMMENT
MEDIUMonnxsim/hqq.py128 # by which this converges toward an Lp<2 (robust) fit instead ofCOMMENT
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICALonnxsim/embedding_quantization.py228 target.type.tensor_type.shape.dim.extend(leading_dims)CODE
CRITICALonnxsim/embedding_quantization.py229 target.type.tensor_type.shape.dim.add().dim_value = embed_dim // 8CODE
CRITICALonnxsim/kv_cache_quantization.py476 new_dim = past_scale_input.type.tensor_type.shape.dim.add()CODE
CRITICALonnxsim/kv_cache_quantization.py557 present_scale_output.type.tensor_type.shape.dim.add()CODE
Modern AI Meta-Vocabulary16 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_symexpr_kv_cache_consistency.py3# evaluator actually fold the shape scaffolding a real KV-cache transformerCOMMENT
MEDIUMtests/test_symexpr_kv_cache_consistency.py22# * ``test_onnxsim_removes_kv_cache_shape_scaffolding``: the scaffoldingCOMMENT
MEDIUMtests/test_symexpr_kv_cache_consistency.py112 # fix for both the correctness bug and the vacuous scaffoldingCOMMENT
MEDIUMtests/test_symexpr_kv_cache_consistency.py223 # actually load-bearing: onnxsim must not make the scaffolding *worse*COMMENT
MEDIUMtests/test_fireredaudio.py7# generation (zero-shot/instruct TTS, semantic/acoustic speech editing, voiceCOMMENT
MEDIUMtests/test_simple.py371 # scaffolding standing. The SymExpr evaluator keeps the dim as `384*batch`,STRING
MEDIUMtests/test_simple.py374 # batch -- so the scaffolding collapses.STRING
MEDIUMtests/test_simple.py301 # -- so the whole Shape -> Gather -> Concat scaffolding collapses away.STRING
MEDIUMtests/test_moved_optimizer_passes.py208 # scaffolding), so no batched MatMul remains.STRING
MEDIUMtests/test_moved_optimizer_passes.py269# scaffolding between two linear layers separated by an element-wise op)STRING
MEDIUMtests/test_moved_optimizer_passes.py296 # The reshape scaffolding around the Relu is cancelled: at most the twoSTRING
MEDIUMtests/test_onnxnet_integration.py132 # Node removal: the scaffolding Identity nodes carry no architecturalSTRING
MEDIUMtests/test_tensorrt_sparsity.py99 # rank-agnostic reshape/slice scaffold must reproduce this exactly.STRING
MEDIUMtests/test_tensorrt_sparsity.py126 # (rank-agnostic) scaffold rather than guessing 2-D. onnx.parser has noSTRING
MEDIUMscripts/regression/worker.py65 # The parent directory name is orchestrate()'s `local` (model_id withCOMMENT
MEDIUMonnxsim/tensorrt_sparsity.py119 pass # rank unknown for every tensor -- every node falls back to the general scaffoldCODE
Deep Nesting34 hits · 27 pts
SeverityFileLineSnippetContext
LOWsetup.py381CODE
LOWtests/test_halide_integration.py339CODE
LOWtests/test_weight_only_quantize_matmul_nbits.py237CODE
LOWtests/test_symexpr_kv_cache_consistency.py233CODE
LOWtests/test_cross_layer_equalization.py76CODE
LOWtests/test_pruning.py381CODE
LOWtests/test_pruning.py587CODE
LOWtests/test_pruning.py664CODE
LOWtests/test_pruning.py928CODE
LOWtests/test_pruning.py1293CODE
LOWtests/test_simple.py226CODE
LOWscripts/regression/worker.py220CODE
LOWscripts/regression/summarize_profiles.py103CODE
LOW…s/regression/paddle2onnx/run_paddle2onnx_regression.py205CODE
LOWscripts/regression/x2paddle/worker.py87CODE
LOWonnxsim/embedding_quantization.py62CODE
LOWonnxsim/pruning.py897CODE
LOWonnxsim/pruning.py1334CODE
LOWonnxsim/pruning.py1475CODE
LOWonnxsim/pruning.py2039CODE
LOWonnxsim/pruning.py2323CODE
LOWonnxsim/pruning.py2823CODE
LOWonnxsim/pruning.py3334CODE
LOWonnxsim/pruning.py3520CODE
LOWonnxsim/pruning.py3774CODE
LOWonnxsim/pruning.py4312CODE
LOWonnxsim/pruning.py4596CODE
LOWonnxsim/model_info.py1264CODE
LOWonnxsim/adaround.py84CODE
LOWonnxsim/kv_cache_quantization.py449CODE
LOWonnxsim/model_checking.py20CODE
LOWonnxsim/model_checking.py127CODE
LOWonnxsim/calibration.py128CODE
LOWonnxsim/onnx_simplifier.py1419CODE
AI Structural Patterns18 hits · 14 pts
SeverityFileLineSnippetContext
LOWtests/test_cross_layer_equalization.py76CODE
LOWtests/test_pruning.py5342CODE
LOWtests/test_pruning.py5695CODE
LOWtests/test_pruning.py6154CODE
LOWtests/test_pruning.py6643CODE
LOWtests/test_pruning.py7253CODE
LOWtests/test_fuse_attention.py93CODE
LOWtests/test_fuse_attention.py287CODE
LOWtests/test_fuse_attention.py522CODE
LOWtests/test_dynamic_quantize_attention.py73CODE
LOWonnxsim/squeezellm.py133CODE
LOWonnxsim/pruning.py1128CODE
LOWonnxsim/pruning.py1475CODE
LOWonnxsim/optimize_pipeline.py100CODE
LOWonnxsim/autoround.py227CODE
LOWonnxsim/adaround.py250CODE
LOWonnxsim/model_checking.py127CODE
LOWonnxsim/onnx_simplifier.py1419CODE
Self-Referential Comments2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMsetup.py117 # This file is generated by setup.py. DO NOT EDIT!COMMENT
MEDIUMscripts/cross/assemble_wheel.py50 "# This file is generated by assemble_wheel.py. DO NOT EDIT!\n\n"CODE
Modern Structural Boilerplate5 hits · 5 pts
SeverityFileLineSnippetContext
LOWonnxsim/pruning.py1940def _set_conv_group_attr(node: onnx.NodeProto, group: int) -> None:CODE
LOWonnxsim/profile_plot.py37__all__ = ["load_node_counts", "plot_node_reduction"]CODE
LOWonnxsim/__init__.py115__all__ = [CODE
LOWonnxsim/model_info.py45__all__ = [CODE
LOWonnxsim/model_info.py1117def _set_metadata(proto, key: str, value: str) -> None:CODE
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWbuild_wasm_pyodide.sh66# Usage:COMMENT
LOWscripts/test_rust_package_standalone.sh14# Usage:COMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHonnxsim/calibration.py265 """KL(P || Q) for two same-length, already-normalized-or-not histogramsSTRING
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWbuild_wasm.sh4# Check if emcmake is availableCOMMENT