Skip to content

Commit

Permalink
Merge pull request #25 from ROCmSoftwarePlatform/disable_fast_math_mi…
Browse files Browse the repository at this point in the history
…gx_ep

Add set_false_math to false to solve accuracy issue for gelu test.
  • Loading branch information
TedThemistokleous authored Nov 29, 2023
2 parents ef01cdb + be084ee commit d876d37
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,9 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
// perform static quantization on the programs
migraphx::quantize_int8(prog, t_, quant_opts);
}
prog.compile(t_);
migraphx::compile_options co;
co.set_fast_math(false);
prog.compile(t_, co);
auto prog_output_shapes = prog.get_output_shapes();
for (std::size_t i = 0; i < output_names.size(); ++i) {
auto out_len = prog_output_shapes[i].lengths();
Expand Down Expand Up @@ -1262,7 +1264,9 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
migraphx::quantize_int8(prog, t, quant_opts);
}

prog.compile(t);
migraphx::compile_options co;
co.set_fast_math(false);
prog.compile(t, co);
mgx_state->prog = prog;
param_shapes = prog.get_parameter_shapes();
no_input_shape = false;
Expand Down

0 comments on commit d876d37

Please sign in to comment.