mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-10-20 05:59:32 +08:00
Round-3 bot review flagged five items on top of ``c7d455e``. This commit
addresses all five.
op_types.py -- revert Gelu from get_activation_ops
==================================================
An earlier round added ``"Gelu"`` to ``get_activation_ops()``, which
consumers in ``autotuner_base.py:547`` treat as a cross-cutting behavior
change on Gelu-containing autotuned models (see the reviewer's note that
the addition was undocumented in both CHANGELOG and PR body). Reverting
restores the pre-round-2 behavior and keeps this PR scoped to the
sensitivity primitive only. If autotune needs the Gelu recognition as a
bug fix, it will land in a follow-up PR against ``autotuner_base.py``
with its own CHANGELOG entry.
examples/onnx_ptq/README.md -- collapse mode-description comment
================================================================
A previous edit left a hybrid fragment ("Coverage mode (default) leaves
the / walks targets in descending score order ..."). Collapsed the whole
paragraph to a single line -- the mode semantics are already documented
in the Sphinx guide (``_onnx_quantization.rst``) and in the
``suggest_exclusion`` docstring; the example README doesn't need to
re-explain them.
tests/gpu/onnx/quantization/sensitivity/test_score.py
=====================================================
- Import path: switched ``from tests._test_utils....`` to
``from _test_utils....`` to match the repo convention across every
other ONNX test file (``tests/`` is on ``pythonpath`` per
``pyproject.toml``, so the shorter form is what actually collects
under a plain ``pytest tests/gpu/...`` invocation).
- Hoisted ``import math`` and ``import shutil`` from inside test bodies
to the module-level import block. Both are stdlib and unconditional.
modelopt/onnx/quantization/sensitivity/__main__.py
==================================================
``main()``'s docstring promised "non-zero if ``score`` raises" but
uncaught exceptions actually propagate to the caller (the CLI unit
tests assert ``pytest.raises`` on the ONNX-oversize and empty-calib-dir
paths). Reworded the ``Returns:`` block to describe the real behavior:
``0`` on success; exceptions propagate; Python's default non-zero exit
code applies at the process boundary.
Signed-off-by: gcunhase <4861122+gcunhase@users.noreply.github.com>
Co-Authored-By: modelopt-fix-agent-bot (Opus 4.7) <noreply@anthropic.com>