Skip to content
Merged
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
4 changes: 2 additions & 2 deletions examples/resnet/resnet_ptq_cpu.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{
"name": "accuracy_custom",
"priority": 1, "higher_is_better": true,
"goal": {"type": "max-degradation", "value": 0.01}
"goal": {"type": "max-degradation", "value": 0.1}
}
],
"user_config":{
Expand All @@ -41,7 +41,7 @@
{
"name": "avg",
"priority": 2,
"goal": {"type": "percent-min-improvement", "value": 20}
"goal": {"type": "percent-min-improvement", "value": 10}
}
],
"user_config":{
Expand Down
2 changes: 1 addition & 1 deletion examples/test/test_resnet_vitis_ai_ptq_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup():
@pytest.mark.parametrize("system", ["local_system", "aml_system"])
@pytest.mark.parametrize("olive_json", ["resnet_vitis_ai_ptq_cpu.json"])
@pytest.mark.skipif(
version.parse(OrtVersion) == version.parse("1.16.0"),
version.parse(OrtVersion) == version.parse("1.16.0") or version.parse(OrtVersion) == version.parse("1.16.1"),
reason="VitisAIQuantization is not supported in ORT 1.16.0 with TensorsData",
)
def test_resnet(search_algorithm, execution_order, system, olive_json):
Expand Down
166 changes: 0 additions & 166 deletions olive/passes/onnx/quant_pre_process.py

This file was deleted.

3 changes: 1 addition & 2 deletions olive/passes/onnx/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,9 @@ def _run_for_config(
return model_proto_to_olive_model(onnx_model, output_model_path, config)

def _quant_preprocess(self, model: ONNXModel, output_model_path: Union[str, Path]) -> ONNXModel:
from olive.passes.onnx.quant_pre_process import quant_pre_process
from onnxruntime.quantization.preprocess import quant_pre_process

try:
# TODO(myguo): use ORT version once the Windows issue is fixed
quant_pre_process(
input_model_path=model.model_path,
output_model_path=str(output_model_path),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def dummy_calibration_reader(data_dir=None, batch_size=1, *args, **kwargs):


@pytest.mark.skipif(
version.parse(OrtVersion) == version.parse("1.16.0"),
version.parse(OrtVersion) == version.parse("1.16.0") or version.parse(OrtVersion) == version.parse("1.16.1"),
reason="VitisAIQuantization is not supported in ORT 1.16.0 with TensorsData",
)
def test_vitis_ai_quantization_pass(tmp_path):
Expand Down