-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show mlir program when tracing benchmarking #2741
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2741 +/- ##
========================================
Coverage 92.01% 92.01%
========================================
Files 490 490
Lines 19434 19434
========================================
Hits 17883 17883
Misses 1551 1551 ☔ View full report in Codecov by Sentry. |
This build is OK for merge ✅ |
🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output |
if(not inputs.empty()) | ||
{ | ||
mm = m; | ||
mr = &mm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it require const_ref ? Shouldn't just copied module mm
work ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only want to copy the module if there is no input shapes because we wont be adjusting the parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module with empty input shape is unlikely case it would have been const-folded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to assume inputs are not empty. it would be simpler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is two overloads to dump_mlir
. One just takes the module(which we dont want to copy) and the other overload takes the input shapes, which might be different than the shapes in the module so we need to modify the module which we will use a copy for this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the other overload takes the input shapes, which might be different than the shapes in the module so we need to modify the module which we will use a copy for this case.
Yes but those input shapes parameter would be input arguments to the precompile_op instruction. If they are empty that means MLIR module also doesn't take any inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the inputs are empty it means skip doing param adjustments.
@@ -179,6 +185,8 @@ struct compile_plan | |||
std::cout << "No binary" << std::endl; | |||
return std::numeric_limits<double>::max(); | |||
} | |||
if(trace_level > 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this option to documents
const compiled_result& benchmark() const | ||
{ | ||
const auto trace_level = value_of(MIGRAPHX_TRACE_BENCHMARKING{}); | ||
if(trace_level > 0 and not results.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest you consolidate some of these checks with if ... or ...
This will show the mlir program when using
MIGRAPHX_TRACE_BENCHMARKING=3
.