-
Notifications
You must be signed in to change notification settings - Fork 87
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
[Re-Opened] Added support for standalone mlir-conv (used to be #2110) #2142
Conversation
a1ba90c
to
8f09284
Compare
This build is OK for merge ✅ |
🔴torchvision-inceptionv3_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴cadene-dpn92_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴slim-inceptionv4_1: FAILED: MIGraphX is not within tolerance - check verbose output |
src/targets/gpu/fuse_mlir.cpp
Outdated
@@ -21,6 +21,7 @@ | |||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
* THE SOFTWARE. | |||
*/ | |||
#include "migraphx/shape.hpp" |
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.
Use angle brackets, but I dont think this header is needed as its already included by the other headers.
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 just removed it. Probably, my vscode included it automatically
src/targets/gpu/fuse_mlir.cpp
Outdated
}; | ||
|
||
MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_MLIR_ENABLE_OPS); | ||
bool is_self_decide() { return env(MIGRAPHX_MLIR_ENABLE_OPS::value()).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.
This should use string_value_of
, otherwise this will read the env everytime which is slow.
Also, what does is_self_decided
mean?
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.
Hi,
-
Ok, changed
-
MIGRAPHX_MLIR_ENABLE_OPS
means that the user specifies concrete operations which rocMLIR has to handle. For example, MIGRAPHX_MLIR_ENABLE_OPS="conv" will only generate convolutions with rocMLIR; fusing will be switched off.
if MIGRAPHX_MLIR_ENABLE_OPS
is not specified by a user then we decide ourselves (named it as self_decide) which operations for rocMLIR to enable - i.e., always use fused operations and, if the underlying GPU is from Navi3x, use standalone convolutions
If you want I can rename MIGRAPHX_MLIR_ENABLE_OPS
to MIGRAPHX_MLIR_USE_SPECIFIC_OPS
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.
Sure, either name is find. Can you add a comment to source code to explain how this is supposed to work and what the valid values are? I would expected to use MIGRAPHX_MLIR_ENABLE_OPS=convolution
not MIGRAPHX_MLIR_ENABLE_OPS=conv
since thats the way we spell the operator, but if its spelled differently for this variable, we should have some comments to document it.
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.
Lets not introduce a another indirection here..
and stick to migraphx op names ?
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.
Hi, @pfultz2 ,
Can you add a comment to source code to explain how this is supposed to work and what the valid values are?
done.
I would expected to use
MIGRAPHX_MLIR_ENABLE_OPS=convolution
fixed
8f09284
to
7fbd297
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2142 +/- ##
========================================
Coverage 91.48% 91.48%
========================================
Files 424 424
Lines 15873 15873
========================================
Hits 14521 14521
Misses 1352 1352 |
7fbd297
to
40398bc
Compare
1c447ff
to
954d1c5
Compare
* renamed the corresponding struct * addressed suggestions of PR #2110
954d1c5
to
3da39e8
Compare
The old discussion used to be in PR #2110 which was created from a forked project. This was blocking some pipelines to start. To avoid this, I just created a PR from my local branch of migraphx repo.