diff --git a/src/include/migraphx/matcher.hpp b/src/include/migraphx/matcher.hpp index 32c166d17da..6e7e57c67bf 100644 --- a/src/include/migraphx/matcher.hpp +++ b/src/include/migraphx/matcher.hpp @@ -598,8 +598,9 @@ MIGRAPHX_PRED_MATCHER(same_inputs, instruction_ref ins) { if(ins->inputs().empty()) return false; - auto s = ins->inputs().front(); - return std::all_of(ins->inputs().begin(), ins->inputs().end(), [&](auto x) { return x == s; }); + auto input = ins->inputs().front(); + return std::all_of( + ins->inputs().begin(), ins->inputs().end(), [&](auto x) { return x == input; }); } MIGRAPHX_PRED_MATCHER(has_same_value, instruction_ref ins) diff --git a/src/quantization.cpp b/src/quantization.cpp index 2c97073f089..89a8a6d7feb 100644 --- a/src/quantization.cpp +++ b/src/quantization.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include namespace migraphx { @@ -58,7 +57,6 @@ void quantize_fp16(program& prog, const std::vector& ins_names) { run_passes(prog, {normalize_ops{}, - rewrite_low_precision{}, optimize_module{{"quantizelinear", "dequantizelinear"}}, quantize_fp16_pass{ins_names}, optimize_module{{"quantizelinear", "dequantizelinear"}}}); diff --git a/src/targets/gpu/target.cpp b/src/targets/gpu/target.cpp index 2cf139aceee..cc0a136892d 100644 --- a/src/targets/gpu/target.cpp +++ b/src/targets/gpu/target.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -154,6 +155,7 @@ std::vector target::get_passes(migraphx::context& gctx, const compile_opti eliminate_data_type{{migraphx::shape::fp8e4m3fnuz_type}, shape::float_type, unsupported_fp8_ops}, dead_code_elimination{}, rewrite_reduce{}, + rewrite_low_precision{}, dead_code_elimination{}, optimize_module{}, fuse_pointwise{},