Simplify your onnx model
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, | STRING |
| HIGH | tests/test_function_rewriter_vs_onnxscript.py | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, | STRING |
| HIGH | tests/test_function_rewriter.py | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> matmul_add_pattern (x, w, b) => (y) { t = matmul(x, w) y = add(t, | STRING |
| HIGH | README.md | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) } | STRING |
| HIGH | tests/test_function_rewriter_vs_onnxscript.py | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) } | STRING |
| HIGH | tests/test_function_rewriter.py | 0 | <domain: "com.onnxsim.test", opset_import: ["" : 18]> gemm_replacement (x, w, b) => (y) { y = gemm(x, w, b) } | STRING |
| HIGH | tests/test_weight_only_quantize_int4.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_halide_integration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_modelopt_integration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_qoperator_quantize_matmul.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_kv_cache_quantization.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_bias_correction.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_quantize_bf16.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_model_checking.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_weight_only_quantize_int16.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_cross_layer_equalization.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_custom_rewriter.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_qoperator_quantize_concat.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_double_quantization_cpp.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_tvm_integration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_mx_quantization_cpp.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_autoround.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_profiling.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_ternary_quantize.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_entropy_calibration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_ort_matmul_nbits_workaround.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_qoperator_quantize_gemm.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_onnx_safetensors_input.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_double_quantization.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_llm_int8.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_dynamic_quantize_matmul.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_function_rewriter_compile_rule.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_weight_quantization_error.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_simple.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_autoquant.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_static_quantize_conv.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_aqlm.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_duquant.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_nncase_integration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_function_rewriter_vs_onnxscript.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_model_info.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_nf4.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_quantize_fp8.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_quarot_cpp.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_function_rewriter_common_rules.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_hqq.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_spinquant.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_gptq.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_export_transformers_save.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_embedding_quantization.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_quantize_fusion_composition.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_constant_fold_determinism.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_static_quantize_int16.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_qoperator_quantize_where.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_low_rank_compensation.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_smoothquant.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_onnxnet_integration.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_tensorrt_sparsity.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_kmeans_quantization.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| HIGH | tests/test_adaround.py | 0 | < ir_version: {ir_version}, opset_import: ["": {opset}] > {body} | STRING |
| 207 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/onnx-deploy/scripts/make_toy_seq2seq.py | 142 | def make_decoder_with_past_model(enc_seq_len, vocab_size): | CODE |
| LOW | tools/onnx-deploy/scripts/make_toy_int8_kv_decoder.py | 55 | def _cache_sum_logits_subgraph(prefix, cache_name, vocab_size): | CODE |
| LOW | tools/onnx-deploy/scripts/make_toy_int8_kv_decoder.py | 113 | def make_decoder_with_past_model(vocab_size): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 181 | def test_matmul_injection_noop_at_init_and_round_trips(tmp_path): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 205 | def test_gemm_transb_injection_noop_at_init(tmp_path): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 225 | def test_gemm_transa_injection_noop_at_init(tmp_path): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 265 | def test_target_contains_filters_by_name(tmp_path): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 286 | def test_prepare_qlora_excludes_adapter_from_quantization(tmp_path): | CODE |
| LOW | tools/onnx-finetune/tests/test_lora.py | 320 | def test_export_onnx_adapter_matches_merged_model_via_native_lora_adapter(tmp_path): | CODE |
| LOW | tests/test_weight_only_quantize_int4.py | 107 | def test_quantize_gemm_transb_with_bias(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 134 | def test_quantize_scale_shape_matches_block_count(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 160 | def test_quantize_skips_k_not_divisible_by_block_size(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 180 | def test_quantize_conv_pointwise(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 213 | def test_quantize_conv_spatial_kernel_with_bias(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 241 | def test_quantize_conv_skips_inner_not_divisible_by_block_size(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 261 | def test_quantize_skips_non_constant_weight(): | STRING |
| LOW | tests/test_weight_only_quantize_int4.py | 274 | def test_quantize_skips_old_opset(): | STRING |
| LOW | tests/test_halide_integration.py | 339 | def _compile_and_run_with_halide(model: onnx.ModelProto, feeds): | CODE |
| LOW | tests/test_halide_integration.py | 409 | def test_simplified_model_compiles_and_runs_on_halide(name): | CODE |
| LOW | tests/test_halide_integration.py | 430 | def test_simplify_is_bit_exact_on_halide(): | CODE |
| LOW | tests/test_halide_integration.py | 444 | def test_halide_output_matches_onnx_reference(): | CODE |
| LOW | tests/test_halide_integration.py | 461 | def test_simplify_is_required_for_halide_lowering(): | CODE |
| LOW | tests/test_backend.py | 33 | def test_run_model_produces_correct_result(): | CODE |
| LOW | tests/test_backend.py | 40 | def test_reference_evaluator_run_model(monkeypatch): | CODE |
| LOW | tests/test_backend.py | 52 | def test_simplify_without_onnxruntime(monkeypatch): | CODE |
| LOW | tests/test_backend.py | 67 | def test_simplify_with_explicit_provider(): | CODE |
| LOW | tests/test_backend.py | 78 | def test_simplify_with_unavailable_provider_raises(): | CODE |
| LOW | tests/test_backend.py | 93 | def test_reference_evaluator_rejects_custom_lib(monkeypatch): | CODE |
| LOW | tests/test_backend.py | 105 | def test_explicit_cpu_provider_produces_correct_result(): | CODE |
| LOW | tests/test_backend.py | 117 | def test_provider_options_tuple_form(): | CODE |
| LOW | tests/test_backend.py | 131 | def test_unavailable_provider_raises(): | CODE |
| LOW | tests/test_backend.py | 147 | def test_reference_evaluator_rejects_non_cpu_provider(monkeypatch): | CODE |
| LOW | tests/test_qoperator_quantize_matmul.py | 98 | def test_quantize_gemm_transb_with_bias(): | STRING |
| LOW | tests/test_qoperator_quantize_matmul.py | 130 | def test_quantize_skips_non_constant_weight(): | STRING |
| LOW | tests/test_qoperator_quantize_matmul.py | 146 | def test_quantize_skips_non_default_gemm_attrs(): | STRING |
| LOW | tests/test_qoperator_quantize_matmul.py | 163 | def test_quantize_skips_old_opset(): | STRING |
| LOW | tests/test_qoperator_quantize_matmul.py | 181 | def test_list_qoperator_quantizable_outputs_includes_matmul_output(): | STRING |
| LOW | tests/test_qoperator_quantize_matmul.py | 198 | def test_calibrate_with_extra_tensor_names_includes_output(): | STRING |
| LOW | tests/test_mnn_llm_export.py | 245 | def test_onnxsim_slims_mnn_llm_export(tmp_path): | CODE |
| LOW | tests/test_mnn_llm_export.py | 276 | def test_onnxsim_matches_onnxslim_on_mnn_llm_export(tmp_path): | CODE |
| LOW | tests/test_export_transformers.py | 36 | def test_export_transformers_model_simplifies_in_place(tmp_path): | CODE |
| LOW | tests/test_export_transformers.py | 65 | def test_export_transformers_model_returns_check_results(tmp_path): | CODE |
| LOW | tests/test_export_transformers.py | 85 | def test_export_transformers_model_save_as_external_data(tmp_path): | CODE |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 111 | def test_quantize_gemm_transb_with_bias(): | STRING |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 144 | def test_quantize_scale_shape_matches_block_count(): | STRING |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 168 | def test_quantize_handles_k_not_divisible_by_block_size(): | STRING |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 197 | def test_quantize_works_at_low_opset(): | STRING |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 224 | def test_quantize_skips_non_constant_weight(): | STRING |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 237 | def test_quantize_bit_packing_matches_reference_dequantization(): | STRING |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 162 | def _has_shape_arithmetic_scaffolding(model: onnx.ModelProto) -> bool: | CODE |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 201 | def test_onnxsim_removes_kv_cache_shape_scaffolding(exported_and_simplified): | CODE |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 233 | def test_onnxsim_symexpr_matches_torch_shapeenv_symbols(exported_and_simplified): | CODE |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 274 | def test_onnxsim_kv_cache_consistency( | CODE |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 309 | def _capture_dim_expressions_to_metadata_props(model, onnx_program): | CODE |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 346 | def test_onnxsim_captures_symbolic_dim_expressions_to_metadata_props( | CODE |
| LOW | tests/test_kv_cache_quantization.py | 132 | def test_kv_cache_quantization_inserts_quantize_dequantize_around_concat(): | STRING |
| LOW | tests/test_kv_cache_quantization.py | 146 | def test_kv_cache_quantization_two_step_round_trip_close_to_float(): | STRING |
| LOW | tests/test_kv_cache_quantization.py | 191 | def test_kv_cache_quantization_declines_when_past_has_other_consumers(): | STRING |
| LOW | tests/test_kv_cache_quantization.py | 210 | def test_kv_cache_quantization_noop_without_kv_cache_pattern(): | STRING |
| LOW | tests/test_kv_cache_quantization.py | 232 | def test_value_style_matched_by_name_adds_second_scale_stream(): | STRING |
| 951 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_wasm_pyodide.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | build_wasm_pyodide.sh | 21 | # KNOWN GOOD for onnxsim's vendored protobuf (clang-18/Emscripten | COMMENT |
| LOW | build_wasm_pyodide.sh | 41 | # .../xbuildenv/pyodide-root/cpython/installs/python-3.13.2/include/python3.13 | COMMENT |
| LOW | build_wasm_pyodide.sh | 61 | # can fail on a minor-version mismatch against the target headers. | COMMENT |
| LOW | build_wasm_pyodide.sh | 101 | BUILD_DIR=${BUILD_DIR:-build-wasm-pyodide} | COMMENT |
| LOW | build_wasm_pyodide.sh | 141 | # Emscripten's own CMake toolchain file hardcodes | COMMENT |
| LOW | CMakeLists.txt | 1 | cmake_minimum_required(VERSION 3.22) | COMMENT |
| LOW | CMakeLists.txt | 41 | option(ONNXSIM_COVERAGE "Instrument onnxsim's own C++ targets for gcov/llvm-cov coverage" OFF) | COMMENT |
| LOW | CMakeLists.txt | 161 | # Both ways of obtaining ONNX Runtime ship/install headers flat under this | COMMENT |
| LOW | CMakeLists.txt | 281 | # so add scripts/convertmodel to its include path to find js_model_executor.h. | COMMENT |
| LOW | CMakeLists.txt | 301 | # GetFuseAndEliminationPass, ...) and, historically when these were separate | COMMENT |
| LOW | CMakeLists.txt | 321 | # link items through onnxsim/onnx_optimizer), and CMake refuses to link the | COMMENT |
| LOW | CMakeLists.txt | 361 | OPTIONAL_COMPONENTS Development.SABIModule) | COMMENT |
| LOW | CMakeLists.txt | 401 | nanobind_add_module(onnxsim_cpp2py_export onnxsim/cpp2py_export.cc STABLE_ABI FREE_THREADED) | COMMENT |
| LOW | setup.py | 41 | # (pywasmcross-wrapped compilers targeting wasm32-emscripten), CMake's own | COMMENT |
| LOW | setup.py | 161 | # configure | COMMENT |
| LOW | setup.py | 201 | # stderr/fprintf without including <cstdio> -- works by | COMMENT |
| LOW | setup.py | 221 | # directly executable, which it apparently isn't inside | COMMENT |
| LOW | bench/graph_shape_inference_teardown_bench.cpp | 1 | // Microbenchmark for the arena change in graph_shape_inference.cc (ProcessNode). | COMMENT |
| LOW | bench/graph_shape_inference_teardown_bench.cpp | 21 | // [full cycle] build + destroy one node-visit's messages per iteration, a | COMMENT |
| LOW | bench/graph_shape_inference_teardown_bench.cpp | 41 | #include <chrono> | COMMENT |
| LOW | bench/graph_shape_inference_gperftools_repro.py | 81 | # elementwise ops on every block (Add/Mul/Sub), so ConstantDataFor + | COMMENT |
| LOW | bench/fold_teardown_bench.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | bench/fold_teardown_bench.cpp | 1 | // Microbenchmark for the arena change in onnxsim/onnxsim.cpp (RunOp). | COMMENT |
| LOW | bench/fold_teardown_bench.cpp | 21 | // [teardown] build N sub-models first, then time only their destruction | COMMENT |
| LOW | bench/graph_shape_inference_teardown_bench.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h | 1 | // onnx_deploy/kv_cache_pipeline.h | COMMENT |
| LOW | …ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h | 21 | // before constructing any Ort::* object, including KvCachePipeline. | COMMENT |
| LOW | …ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h | 41 | // 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.h | 61 | // | COMMENT |
| LOW | …ls/onnx-deploy/include/onnx_deploy/kv_cache_pipeline.h | 121 | } | COMMENT |
| LOW | …ls/onnx-deploy/include/onnx_deploy/onnx_deploy_c_api.h | 21 | COMMENT | |
| LOW | tools/onnx-deploy/wasm/CMakeLists.txt | 21 | add_executable(onnx_deploy_wasm src/onnx_deploy_wasm.cpp) | COMMENT |
| LOW | tools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp | 1 | // onnx_deploy_wasm.cpp | COMMENT |
| LOW | tools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp | 21 | // The JS/C++ boundary (see ../test/ort_web_runtime.mjs for the reference | COMMENT |
| LOW | tools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp | 101 | // process instead of reliably becoming a catchable C++ exception. Every | COMMENT |
| LOW | tools/onnx-deploy/wasm/src/onnx_deploy_wasm.cpp | 261 | COMMENT | |
| LOW | tools/onnx-deploy/src/onnx_deploy_c_api.cpp | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | tools/onnx-deploy/src/main.cpp | 1 | // onnx-deploy: drive an optimum-onnx export directory's encoder/decoder(-with-past) | COMMENT |
| LOW | tools/onnx-finetune/CMakeLists.txt | 1 | cmake_minimum_required(VERSION 3.18) | COMMENT |
| LOW | tools/onnx-finetune/wasm/CMakeLists.txt | 21 | # | COMMENT |
| LOW | tools/onnx-finetune/wasm/src/onnx_finetune_wasm.cpp | 1 | // onnx-finetune-wasm: the same training loop as ../src/main.cpp, exposed to | COMMENT |
| LOW | tools/onnx-finetune/src/main.cpp | 1 | // onnx-finetune: run an ONNX Runtime on-device training loop against | COMMENT |
| LOW | rust/onnxsim-sys/build.rs | 1 | //! Build script for `onnxsim-sys`. | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 1 | //! Low-level FFI bindings to the ONNX Simplifier (`onnxsim`) C API. | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 41 | // --- DLPack ABI ------------------------------------------------------------ | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 101 | /// Complex number. | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 121 | pub struct DLDataType { | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 141 | /// Number of dimensions. | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 161 | pub dl_tensor: DLTensor, | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 201 | /// `skip_optimizers_is_null != 0` skips every optimizer pass; otherwise all | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 241 | /// `None` `execute_fn` falls back to the built-in executor, making this a | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 341 | COMMENT | |
| LOW | rust/onnxsim-sys/src/lib.rs | 361 | pub fn onnxsim_model_info_diff( | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 381 | /// size in bytes; `out_text`/`out_error`, if non-null, receive owned strings | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 401 | /// # Safety | COMMENT |
| LOW | rust/onnxsim-sys/src/lib.rs | 461 | /// Free a string produced by an `out_error` parameter or | COMMENT |
| LOW | rust/onnxsim/tests/integration.rs | 1 | //! End-to-end tests that require the native `onnxsim_c` library to be linked. | COMMENT |
| LOW | rust/onnxsim/src/lib.rs | 1 | //! Safe Rust bindings to the [ONNX Simplifier](https://github.com/onnxsim/onnxsim) | COMMENT |
| LOW | rust/onnxsim/src/lib.rs | 21 | //! Ok(()) | COMMENT |
| 546 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bench/onnxslim_comparison.py | 17 | CODE | |
| LOW | bench/opset_conversion_profile.py | 25 | CODE | |
| LOW | bench/opset_conversion_profile.py | 31 | CODE | |
| LOW | bench/opset_conversion_profile.py | 35 | CODE | |
| LOW | tools/onnx-deploy/scripts/make_toy_seq2seq.py | 51 | CODE | |
| LOW | scripts/gc_testpypi.py | 43 | CODE | |
| LOW | scripts/apple/worker.py | 35 | CODE | |
| LOW | scripts/apple/models.py | 4 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/models.py | 20 | CODE | |
| LOW | scripts/apple/coreml_backend.py | 26 | CODE | |
| LOW | scripts/apple/coreml_backend.py | 46 | CODE | |
| LOW | scripts/apple/run_coreml_compat.py | 27 | CODE | |
| LOW | scripts/intel/worker.py | 35 | CODE | |
| LOW | scripts/intel/openvino_backend.py | 27 | CODE | |
| LOW | scripts/intel/openvino_backend.py | 47 | CODE | |
| LOW | scripts/intel/run_openvino_compat.py | 27 | CODE | |
| LOW | scripts/intel/models.py | 4 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/intel/models.py | 20 | CODE | |
| LOW | scripts/qualcomm/worker.py | 38 | CODE | |
| LOW | scripts/qualcomm/models.py | 11 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/models.py | 27 | CODE | |
| LOW | scripts/qualcomm/qnn_backend.py | 28 | CODE | |
| LOW | scripts/qualcomm/qnn_backend.py | 49 | CODE | |
| LOW | scripts/qualcomm/qnn_backend.py | 49 | CODE | |
| LOW | scripts/qualcomm/run_qnn_compat.py | 25 | CODE | |
| LOW | scripts/cross/assemble_wheel.py | 12 | CODE | |
| LOW | scripts/amd/worker.py | 35 | CODE | |
| LOW | scripts/amd/models.py | 4 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/models.py | 20 | CODE | |
| LOW | scripts/amd/run_migraphx_compat.py | 28 | CODE | |
| LOW | scripts/amd/migraphx_backend.py | 27 | CODE | |
| LOW | scripts/amd/migraphx_backend.py | 48 | CODE | |
| LOW | scripts/common/synthetic_models.py | 16 | CODE | |
| LOW | scripts/common/ep_numerics.py | 9 | CODE | |
| LOW | scripts/regression/worker.py | 32 | CODE | |
| LOW | scripts/regression/summarize_pass_phases.py | 23 | CODE | |
| 148 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build_wasm_pyodide.sh | 17 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | build_wasm_pyodide.sh | 71 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_halide_integration.py | 188 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_halide_integration.py | 197 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_function_rewriter_compile_rule.py | 134 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | tests/test_function_rewriter_compile_rule.py | 136 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_function_rewriter_vs_onnxscript.py | 25 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_function_rewriter_vs_onnxscript.py | 29 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_function_rewriter_vs_onnxscript.py | 116 | # ========================================================================== | STRING |
| MEDIUM⚡ | tests/test_function_rewriter_vs_onnxscript.py | 118 | # ========================================================================== | STRING |
| MEDIUM⚡ | tests/test_function_rewriter_vs_onnxscript.py | 149 | # ========================================================================== | STRING |
| MEDIUM⚡ | tests/test_function_rewriter_vs_onnxscript.py | 154 | # ========================================================================== | STRING |
| MEDIUM | tests/test_audio8.py | 225 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_audio8.py | 232 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_function_rewriter_common_rules.py | 67 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_function_rewriter_common_rules.py | 69 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_function_rewriter_common_rules.py | 124 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_function_rewriter_common_rules.py | 128 | # -------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_function_rewriter_onnxscript_script.py | 40 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_function_rewriter_onnxscript_script.py | 43 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/run_s390x_tests.sh | 27 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/run_s390x_tests.sh | 29 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/run_s390x_tests.sh | 41 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/run_s390x_tests.sh | 47 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 41 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 122 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 127 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 163 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 165 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 186 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 189 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 223 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 225 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 258 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 260 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 346 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_windows_wheel.sh | 348 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 68 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 71 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 99 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 101 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 134 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/build_s390x_extension.sh | 136 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/bootstrap_s390x_rootfs.sh | 30 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/bootstrap_s390x_rootfs.sh | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/bootstrap_s390x_rootfs.sh | 50 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/cross/bootstrap_s390x_rootfs.sh | 55 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bench/onnxslim_comparison.py | 69 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | bench/onnxslim_comparison.py | 82 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | tests/test_export_transformers.py | 44 | except Exception as e: # network/hub errors surface as a variety of types | CODE |
| LOW | tests/test_export_transformers.py | 74 | except Exception as e: | CODE |
| LOW | tests/test_export_transformers.py | 94 | except Exception as e: | CODE |
| LOW | tests/test_optimum_export_deploy.py | 90 | except Exception as e: # network/hub errors surface as a variety of types | CODE |
| LOW | tests/test_tvm_integration.py | 180 | except Exception: | CODE |
| LOW | tests/test_export_transformers_whisper.py | 51 | except Exception as e: # network/hub errors surface as a variety of types | CODE |
| LOW | tests/test_function_rewriter_compile_rule.py | 100 | except Exception as exc: # pragma: no cover - environment/version guard | CODE |
| LOW | tests/test_nncase_integration.py | 192 | except Exception: | CODE |
| LOW | scripts/gc_testpypi.py | 80 | except Exception: | CODE |
| LOW | scripts/gc_testpypi.py | 233 | except Exception as exc: # noqa: BLE001 - report and continue | CODE |
| LOW | scripts/apple/worker.py | 83 | except Exception as exc: | CODE |
| LOW | scripts/apple/worker.py | 99 | except Exception as exc: | CODE |
| LOW | scripts/apple/worker.py | 109 | except Exception as exc: | CODE |
| LOW | scripts/apple/worker.py | 127 | except Exception as exc: | CODE |
| LOW | scripts/apple/coreml_backend.py | 68 | except Exception as exc: # pragma: no cover - depends on the host | CODE |
| LOW | scripts/apple/coreml_backend.py | 134 | except Exception: | CODE |
| LOW | scripts/intel/worker.py | 83 | except Exception as exc: | CODE |
| LOW | scripts/intel/worker.py | 99 | except Exception as exc: | CODE |
| LOW | scripts/intel/worker.py | 109 | except Exception as exc: | CODE |
| LOW | scripts/intel/worker.py | 127 | except Exception as exc: | CODE |
| LOW | scripts/intel/openvino_backend.py | 69 | except Exception as exc: # pragma: no cover - depends on the host | CODE |
| LOW | scripts/intel/openvino_backend.py | 135 | except Exception: | CODE |
| LOW | scripts/qualcomm/worker.py | 86 | except Exception as exc: | CODE |
| LOW | scripts/qualcomm/worker.py | 102 | except Exception as exc: | CODE |
| LOW | scripts/qualcomm/worker.py | 112 | except Exception as exc: | CODE |
| LOW | scripts/qualcomm/worker.py | 130 | except Exception as exc: | CODE |
| LOW | scripts/qualcomm/qnn_backend.py | 75 | except Exception as exc: # pragma: no cover - depends on the host | CODE |
| LOW | scripts/qualcomm/qnn_backend.py | 200 | except Exception: | CODE |
| LOW | scripts/convertmodel/test/make_fixture.py | 97 | except Exception: # compiled extension unavailable | CODE |
| LOW | scripts/amd/worker.py | 83 | except Exception as exc: | CODE |
| LOW | scripts/amd/worker.py | 99 | except Exception as exc: | CODE |
| LOW | scripts/amd/worker.py | 109 | except Exception as exc: | CODE |
| LOW | scripts/amd/worker.py | 127 | except Exception as exc: | CODE |
| LOW | scripts/amd/migraphx_backend.py | 94 | except Exception as exc: # pragma: no cover - depends on the host | CODE |
| LOW | scripts/amd/migraphx_backend.py | 160 | except Exception: | CODE |
| LOW | scripts/pyodide_demo/index.html | 557 | except Exception as e: | CODE |
| LOW | scripts/pyodide_demo/index.html | 588 | except Exception: | CODE |
| LOW | scripts/pyodide_demo/index.html | 590 | except Exception as e: | CODE |
| LOW | scripts/regression/worker.py | 146 | except Exception: | CODE |
| LOW | scripts/regression/worker.py | 159 | except Exception as e: | CODE |
| LOW | scripts/regression/worker.py | 277 | except Exception as e: | CODE |
| LOW | scripts/regression/profile_sample.py | 128 | except Exception as e: | STRING |
| LOW | scripts/regression/select_models.py | 221 | except Exception as e: # noqa: BLE001 — report and continue | CODE |
| LOW | scripts/regression/yolov5_regression.py | 133 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/yolov5_regression.py | 142 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/ultralytics_export_compare.py | 130 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/ultralytics_export_compare.py | 139 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/ultralytics_export_compare.py | 154 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/ultralytics_export_compare.py | 159 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 125 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 152 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 168 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 193 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/regression/yolox/run_yolox_regression.py | 100 | except Exception as e: | CODE |
| LOW | scripts/regression/yolox/run_yolox_regression.py | 108 | except Exception as e: | CODE |
| LOW | scripts/regression/yolox/run_yolox_regression.py | 158 | except Exception as e: # crash / C++ abort surfaces here | CODE |
| LOW | scripts/regression/yolox/run_yolox_regression.py | 171 | except Exception as e: # onnxslim not installed, ... | CODE |
| LOW | scripts/regression/x2paddle/worker.py | 120 | except Exception as e: | CODE |
| 21 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_halide_integration.py | 211 | """Kahn's algorithm over node I/O names; robust to any valid node order.""" | STRING |
| MEDIUM | tests/test_qoperator_quantize_concat.py | 114 | # own static values, not force-fed through the calibration harness. | STRING |
| MEDIUM | tests/test_qnn_compat.py | 22 | # The QNN harness lives under scripts/qualcomm; reuse it rather than duplicate. | COMMENT |
| MEDIUM | tests/test_openvino_compat.py | 20 | # The OpenVINO harness lives under scripts/intel; reuse it rather than duplicate. | COMMENT |
| MEDIUM | tests/test_hqq.py | 134 | # robust (Lp<2) fit should recover a tighter, more accurate zero-point | STRING |
| MEDIUM | tests/test_hqq.py | 160 | # HQQ's robust fit should show its benefit most clearly. | STRING |
| MEDIUM | tests/test_qoperator_quantize_elementwise.py | 177 | # through the calibration harness. | STRING |
| MEDIUM | tests/test_yolo.py | 19 | # dominates YOLO's node-count reduction. The standalone compatibility harness | COMMENT |
| MEDIUM | tests/test_qoperator_quantize_where.py | 113 | # own static values, not force-fed through the calibration harness. | STRING |
| MEDIUM | tests/test_coreml_compat.py | 19 | # The Core ML harness lives under scripts/apple; reuse it rather than duplicate. | COMMENT |
| LOW | tests/test_quantize_fp16.py | 269 | # quantized model, not just pass the (more lenient) checker. | STRING |
| MEDIUM | tests/test_migraphx_compat.py | 22 | # The MIGraphX harness lives under scripts/amd; reuse it rather than duplicate. | COMMENT |
| LOW | scripts/regression/worker.py | 67 | # isn't (many repos just call it "model.onnx"). | COMMENT |
| MEDIUM | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 194 | # Verification harness failure is not an onnxsim failure; note it but | COMMENT |
| MEDIUM | scripts/yolo/simplify_yolo.py | 54 | # Nano scale keeps the harness fast; the graph structure (what onnxsim | COMMENT |
| MEDIUM | .github/workflows/model-regression.yml | 58 | # Validate the harness itself whenever it changes. | COMMENT |
| MEDIUM | .github/workflows/model-regression.yml | 378 | # pull_request runs, which only validate the harness. | COMMENT |
| MEDIUM | .github/workflows/amd-integration.yml | 48 | # installed wheel on `import onnxsim`. Reference the harness by absolute | COMMENT |
| MEDIUM | .github/workflows/big-endian.yml | 14 | # requests that touch either the harness or the code that actually reads and | COMMENT |
| MEDIUM | .github/workflows/big-endian.yml | 33 | # The harness, so changes to it are validated before they are relied on. | COMMENT |
| MEDIUM | .github/workflows/ep-integration.yml | 18 | # Scheduled + on demand, plus on PRs that touch either harness so they stay | COMMENT |
| MEDIUM | .github/workflows/ep-integration.yml | 94 | # installed wheel on `import onnxsim`. Reference the harness by absolute | COMMENT |
| MEDIUM | .github/workflows/ep-integration.yml | 136 | # installed wheel on `import onnxsim`. Reference the harness by absolute | COMMENT |
| MEDIUM | .github/workflows/apple-integration.yml | 13 | # harness so it stays valid. | COMMENT |
| MEDIUM | .github/workflows/apple-integration.yml | 53 | # installed wheel on `import onnxsim`. Reference the harness by absolute | COMMENT |
| MEDIUM | .github/workflows/backend-integration.yml | 22 | # matrix. Runs on PRs that touch the harness or the simplifier, on a daily | COMMENT |
| MEDIUM | .github/workflows/x2paddle-regression.yml | 23 | # Validate the harness itself whenever it changes. | COMMENT |
| MEDIUM | .github/workflows/mlir-integration.yml | 11 | # harness, on a weekly schedule to catch new torch-mlir releases, and on demand. | COMMENT |
| MEDIUM | onnxsim/sym_shape_infer.h | 25 | // Per the PoC in #532 this is the high-leverage half: with ONNX-only shapes a | COMMENT |
| MEDIUM | onnxsim/sym_shape_infer.h | 25 | // Per the PoC in #532 this is the high-leverage half: with ONNX-only shapes a | COMMENT |
| MEDIUM | onnxsim/hqq.py | 128 | # by which this converges toward an Lp<2 (robust) fit instead of | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | onnxsim/embedding_quantization.py | 228 | target.type.tensor_type.shape.dim.extend(leading_dims) | CODE |
| CRITICAL | onnxsim/embedding_quantization.py | 229 | target.type.tensor_type.shape.dim.add().dim_value = embed_dim // 8 | CODE |
| CRITICAL | onnxsim/kv_cache_quantization.py | 476 | new_dim = past_scale_input.type.tensor_type.shape.dim.add() | CODE |
| CRITICAL | onnxsim/kv_cache_quantization.py | 557 | present_scale_output.type.tensor_type.shape.dim.add() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_symexpr_kv_cache_consistency.py | 3 | # evaluator actually fold the shape scaffolding a real KV-cache transformer | COMMENT |
| MEDIUM | tests/test_symexpr_kv_cache_consistency.py | 22 | # * ``test_onnxsim_removes_kv_cache_shape_scaffolding``: the scaffolding | COMMENT |
| MEDIUM | tests/test_symexpr_kv_cache_consistency.py | 112 | # fix for both the correctness bug and the vacuous scaffolding | COMMENT |
| MEDIUM | tests/test_symexpr_kv_cache_consistency.py | 223 | # actually load-bearing: onnxsim must not make the scaffolding *worse* | COMMENT |
| MEDIUM | tests/test_fireredaudio.py | 7 | # generation (zero-shot/instruct TTS, semantic/acoustic speech editing, voice | COMMENT |
| MEDIUM⚡ | tests/test_simple.py | 371 | # scaffolding standing. The SymExpr evaluator keeps the dim as `384*batch`, | STRING |
| MEDIUM⚡ | tests/test_simple.py | 374 | # batch -- so the scaffolding collapses. | STRING |
| MEDIUM | tests/test_simple.py | 301 | # -- so the whole Shape -> Gather -> Concat scaffolding collapses away. | STRING |
| MEDIUM | tests/test_moved_optimizer_passes.py | 208 | # scaffolding), so no batched MatMul remains. | STRING |
| MEDIUM | tests/test_moved_optimizer_passes.py | 269 | # scaffolding between two linear layers separated by an element-wise op) | STRING |
| MEDIUM | tests/test_moved_optimizer_passes.py | 296 | # The reshape scaffolding around the Relu is cancelled: at most the two | STRING |
| MEDIUM | tests/test_onnxnet_integration.py | 132 | # Node removal: the scaffolding Identity nodes carry no architectural | STRING |
| MEDIUM | tests/test_tensorrt_sparsity.py | 99 | # rank-agnostic reshape/slice scaffold must reproduce this exactly. | STRING |
| MEDIUM | tests/test_tensorrt_sparsity.py | 126 | # (rank-agnostic) scaffold rather than guessing 2-D. onnx.parser has no | STRING |
| MEDIUM | scripts/regression/worker.py | 65 | # The parent directory name is orchestrate()'s `local` (model_id with | COMMENT |
| MEDIUM | onnxsim/tensorrt_sparsity.py | 119 | pass # rank unknown for every tensor -- every node falls back to the general scaffold | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 381 | CODE | |
| LOW | tests/test_halide_integration.py | 339 | CODE | |
| LOW | tests/test_weight_only_quantize_matmul_nbits.py | 237 | CODE | |
| LOW | tests/test_symexpr_kv_cache_consistency.py | 233 | CODE | |
| LOW | tests/test_cross_layer_equalization.py | 76 | CODE | |
| LOW | tests/test_pruning.py | 381 | CODE | |
| LOW | tests/test_pruning.py | 587 | CODE | |
| LOW | tests/test_pruning.py | 664 | CODE | |
| LOW | tests/test_pruning.py | 928 | CODE | |
| LOW | tests/test_pruning.py | 1293 | CODE | |
| LOW | tests/test_simple.py | 226 | CODE | |
| LOW | scripts/regression/worker.py | 220 | CODE | |
| LOW | scripts/regression/summarize_profiles.py | 103 | CODE | |
| LOW | …s/regression/paddle2onnx/run_paddle2onnx_regression.py | 205 | CODE | |
| LOW | scripts/regression/x2paddle/worker.py | 87 | CODE | |
| LOW | onnxsim/embedding_quantization.py | 62 | CODE | |
| LOW | onnxsim/pruning.py | 897 | CODE | |
| LOW | onnxsim/pruning.py | 1334 | CODE | |
| LOW | onnxsim/pruning.py | 1475 | CODE | |
| LOW | onnxsim/pruning.py | 2039 | CODE | |
| LOW | onnxsim/pruning.py | 2323 | CODE | |
| LOW | onnxsim/pruning.py | 2823 | CODE | |
| LOW | onnxsim/pruning.py | 3334 | CODE | |
| LOW | onnxsim/pruning.py | 3520 | CODE | |
| LOW | onnxsim/pruning.py | 3774 | CODE | |
| LOW | onnxsim/pruning.py | 4312 | CODE | |
| LOW | onnxsim/pruning.py | 4596 | CODE | |
| LOW | onnxsim/model_info.py | 1264 | CODE | |
| LOW | onnxsim/adaround.py | 84 | CODE | |
| LOW | onnxsim/kv_cache_quantization.py | 449 | CODE | |
| LOW | onnxsim/model_checking.py | 20 | CODE | |
| LOW | onnxsim/model_checking.py | 127 | CODE | |
| LOW | onnxsim/calibration.py | 128 | CODE | |
| LOW | onnxsim/onnx_simplifier.py | 1419 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_cross_layer_equalization.py | 76 | CODE | |
| LOW | tests/test_pruning.py | 5342 | CODE | |
| LOW | tests/test_pruning.py | 5695 | CODE | |
| LOW | tests/test_pruning.py | 6154 | CODE | |
| LOW | tests/test_pruning.py | 6643 | CODE | |
| LOW | tests/test_pruning.py | 7253 | CODE | |
| LOW | tests/test_fuse_attention.py | 93 | CODE | |
| LOW | tests/test_fuse_attention.py | 287 | CODE | |
| LOW | tests/test_fuse_attention.py | 522 | CODE | |
| LOW | tests/test_dynamic_quantize_attention.py | 73 | CODE | |
| LOW | onnxsim/squeezellm.py | 133 | CODE | |
| LOW | onnxsim/pruning.py | 1128 | CODE | |
| LOW | onnxsim/pruning.py | 1475 | CODE | |
| LOW | onnxsim/optimize_pipeline.py | 100 | CODE | |
| LOW | onnxsim/autoround.py | 227 | CODE | |
| LOW | onnxsim/adaround.py | 250 | CODE | |
| LOW | onnxsim/model_checking.py | 127 | CODE | |
| LOW | onnxsim/onnx_simplifier.py | 1419 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | setup.py | 117 | # This file is generated by setup.py. DO NOT EDIT! | COMMENT |
| MEDIUM | scripts/cross/assemble_wheel.py | 50 | "# This file is generated by assemble_wheel.py. DO NOT EDIT!\n\n" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | onnxsim/pruning.py | 1940 | def _set_conv_group_attr(node: onnx.NodeProto, group: int) -> None: | CODE |
| LOW | onnxsim/profile_plot.py | 37 | __all__ = ["load_node_counts", "plot_node_reduction"] | CODE |
| LOW | onnxsim/__init__.py | 115 | __all__ = [ | CODE |
| LOW | onnxsim/model_info.py | 45 | __all__ = [ | CODE |
| LOW | onnxsim/model_info.py | 1117 | def _set_metadata(proto, key: str, value: str) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_wasm_pyodide.sh | 66 | # Usage: | COMMENT |
| LOW | scripts/test_rust_package_standalone.sh | 14 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | onnxsim/calibration.py | 265 | """KL(P || Q) for two same-length, already-normalized-or-not histograms | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_wasm.sh | 4 | # Check if emcmake is available | COMMENT |