File tree Expand file tree Collapse file tree
tests/unit/onnx/quantization/autotune Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# limitations under the License.
1515
1616import os
17- import sys
1817import tempfile
1918from pathlib import Path
2019
2120import onnx
2221import pytest
23-
2422from _test_utils .import_helper import skip_if_no_tensorrt , skip_if_no_trtexec
25- import . models as _test_models
23+ from _test_utils . onnx . quantization . autotune import models as _test_models
2624
2725from modelopt .onnx .quantization .autotune .workflows import (
2826 init_benchmark_instance ,
2927 region_pattern_autotuning_workflow ,
3028)
3129
30+
3231@pytest .fixture
3332def simple_conv_model ():
3433 """Simple ONNX model: Input -> Conv -> Relu -> Output. Created via models.py."""
3534 return _test_models ._create_simple_conv_onnx_model ()
3635
36+
3737@pytest .mark .parametrize ("use_trtexec" , [True , False ])
3838def test_export_quantized_model (use_trtexec , simple_conv_model ):
3939 """Test exporting quantized model with Q/DQ."""
@@ -72,9 +72,6 @@ def test_export_quantized_model(use_trtexec, simple_conv_model):
7272 if n .op_type in ["QuantizeLinear" , "DequantizeLinear" ]
7373 ]
7474 assert qdq_nodes , "Q/DQ nodes not found in quantized model"
75-
76- print ("✓ QDQAutotuner export quantized model" )
7775 finally :
7876 if os .path .exists (output_path ):
7977 os .unlink (output_path )
80-
You can’t perform that action at this time.
0 commit comments