Skip to content

Commit 16f3c6d

Browse files
committed
move workflow test to gpu tests
Signed-off-by: Will Guo <willg@nvidia.com>
1 parent 88b0bc0 commit 16f3c6d

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

modelopt/onnx/quantization/autotune/__main__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ def run_autotune() -> int:
112112
logger.error("Failed to initialize TensorRT benchmark")
113113
return 1
114114

115-
logger.info("Autotuning Mode: Pattern-Based")
116-
117115
try:
118116
node_filter_list = None
119117
if args.node_filter_list:

tests/_test_utils/onnx/quantization/autotune/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
def _create_simple_conv_onnx_model():
2727
"""Build ONNX model: Input -> Conv -> Relu -> Output (minimal for autotuner tests)."""
28-
input_tensor = helper.make_tensor_value_info("input", onnx.TensorProto.FLOAT, [1, 3, 224, 224])
28+
input_tensor = helper.make_tensor_value_info("input", onnx.TensorProto.FLOAT, [32, 3, 224, 224])
2929
output_tensor = helper.make_tensor_value_info(
30-
"output", onnx.TensorProto.FLOAT, [1, 64, 224, 224]
30+
"output", onnx.TensorProto.FLOAT, [32, 64, 224, 224]
3131
)
3232
conv_node = helper.make_node(
3333
"Conv", inputs=["input", "conv_weight"], outputs=["conv_out"], name="conv"

tests/unit/onnx/quantization/autotune/test_workflow.py renamed to tests/gpu/onnx/quantization/autotune/test_workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def test_export_quantized_model(use_trtexec, simple_conv_model):
5252
output_path = output_dir + ".quant.onnx"
5353

5454
try:
55-
init_benchmark_instance(use_trtexec=use_trtexec)
55+
init_benchmark_instance(use_trtexec=use_trtexec, timing_runs=100)
5656
autotuner = region_pattern_autotuning_workflow(baseline_model_path, Path(output_dir))
5757

5858
# Export model with Q/DQ insertion
59-
autotuner.export_onnx(output_path, insert_qdq=True)
59+
autotuner.export_onnx(output_path, insert_qdq=True, best=True)
6060

6161
# Verify file was created
6262
assert os.path.exists(output_path)

0 commit comments

Comments
 (0)