"torchvision/vscode:/vscode.git/clone" did not exist on "874481f27cc1b9fcdc0d245265db7f0401d5421c"
Commit b329ac7f authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Revert "Run optimize_module for int8 quantization (#2300)"

This reverts commit 94fcfc02.
parent 0a4254a2
...@@ -70,10 +70,6 @@ void quantize_int8(program& prog, ...@@ -70,10 +70,6 @@ void quantize_int8(program& prog,
MIGRAPHX_THROW("QUANTIZE_INT8: only support DOT and CONVOLUTION operation"); MIGRAPHX_THROW("QUANTIZE_INT8: only support DOT and CONVOLUTION operation");
} }
// Run optimize_module() before converting to int8 to const eval and fold in FP32 to
// avoid loss of precision.
run_passes(prog, {optimize_module{}});
std::shared_ptr<std::vector<std::pair<float, float>>> int8_quant_params = std::shared_ptr<std::vector<std::pair<float, float>>> int8_quant_params =
std::make_shared<std::vector<std::pair<float, float>>>(); std::make_shared<std::vector<std::pair<float, float>>>();
std::shared_ptr<std::vector<float>> max_abs_vals = std::make_shared<std::vector<float>>(); std::shared_ptr<std::vector<float>> max_abs_vals = std::make_shared<std::vector<float>>();
...@@ -147,7 +143,10 @@ void quantize_int8(program& prog, ...@@ -147,7 +143,10 @@ void quantize_int8(program& prog,
run_passes(prog, run_passes(prog,
{quantize_int8_pass{ins_names, *int8_quant_params}, {quantize_int8_pass{ins_names, *int8_quant_params},
optimize_module{}, eliminate_common_subexpression{},
dead_code_elimination{},
simplify_reshapes{},
dead_code_elimination{},
simplify_qdq{}, simplify_qdq{},
dead_code_elimination{}}); dead_code_elimination{}});
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment