Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ repos:
modelopt/torch/quantization/utils/calib_utils.py|
modelopt/torch/quantization/ggml/codebooks.py|
modelopt/onnx/quantization/operators.py|
modelopt/onnx/quantization/ort_patching.py|
modelopt/onnx/quantization/ort_calibration.py|
modelopt/onnx/quantization/ort_calibration_per_node.py|
modelopt/onnx/quantization/ort_quantization.py|
modelopt/onnx/quantization/ort_session.py|
modelopt/torch/_deploy/utils/onnx_utils.py|
modelopt/torch/export/transformer_engine.py|
modelopt/torch/puzzletron/anymodel/models/gpt_oss/gpt_oss_pruned_to_mxfp4.py|
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Changelog

**Backward Breaking Changes**

- The ``modelopt.onnx.quantization.ort_patching`` module has been removed with no
compatibility shim; update direct imports to use ``ort_session`` for model loading
and session setup, ``ort_calibration`` or ``ort_calibration_per_node`` for calibration,
``ort_quantization`` for static Q/DQ quantization, and ``ort_patches`` for patch composition.
- The ``modelopt.onnx.quantization.graph_utils`` module has been removed with no
compatibility shim; update direct imports using this migration map:

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ See [`modelopt/torch/quantization/utils/calib_utils.py`](./modelopt/torch/quanti

We use [pytest](https://docs.pytest.org/) for all tests. For any new features / examples, make sure to add tests and that the coverage check in your PR passes. The tests are organized into the following directories:

Test filenames must mirror the production module they primarily cover: tests for `foo.py` belong in `test_foo.py`. When a production module is renamed, split, or removed, rename or split its tests in the same change so test filenames do not preserve obsolete module names. A cross-module integration test may use a feature-oriented name only when no single production module owns the behavior.

- `tests/unit`: Fast cpu-based unit tests for the core ModelOpt library. They should not take more than a few seconds to run.
- `tests/gpu`: Fast GPU-based unit tests for the core ModelOpt library. In most cases, they should not take more than a few seconds to run.
- `tests/gpu_megatron`: Fast GPU-based unit tests for the core ModelOpt library for Megatron-Core features. In most cases, they should not take more than a few seconds to run.
Expand Down
2 changes: 1 addition & 1 deletion modelopt/onnx/quantization/fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
find_nodes_to_exclude,
)
from modelopt.onnx.quantization.int8 import _find_nodes_to_quantize
from modelopt.onnx.quantization.ort_patching import _quantize_static as quantize_static
from modelopt.onnx.quantization.ort_quantization import _quantize_static as quantize_static
from modelopt.onnx.quantization.ort_utils import configure_ort
from modelopt.onnx.quantization.precision_utils import (
_convert_to_runtime_precision,
Expand Down
2 changes: 1 addition & 1 deletion modelopt/onnx/quantization/int8.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
find_nodes_from_matmul_to_exclude,
find_nodes_to_exclude,
)
from modelopt.onnx.quantization.ort_patching import _quantize_static as quantize_static
from modelopt.onnx.quantization.ort_quantization import _quantize_static as quantize_static
from modelopt.onnx.quantization.ort_utils import configure_ort
from modelopt.onnx.quantization.partitioning import (
find_fusible_partitions,
Expand Down
Loading
Loading