[AIROCMLIR-546] Fixed parser crash from invalid !migraphx.shaped#2257
[AIROCMLIR-546] Fixed parser crash from invalid !migraphx.shaped#2257
!migraphx.shaped#2257Conversation
2428d2f to
8fa8f04
Compare
!migraphx.shaped
pabloantoniom
left a comment
There was a problem hiding this comment.
Your fix makes sense, but there is something I don't understand.
Why does MIXRShapedType::verify not catch this problem early? I see we already have this check in verify. Does it mean that the verify method is executed after parse? That does not make much sense to me. Can you look into why this happens?
When the number of strides and shapes doesn't match, the parser calls `get()` which crashes the entire program.
I think I figured out what happened. I think the previous fix is quite hacky. It turns out that this is an assertion failure at here: Based on the documentation, I think we should instead be calling |
8fa8f04 to
3eaf165
Compare
Motivation
Running
./bin/rocmlir-opton the following files crashes:Stack trace:
Technical Details
When the number of strides and shapes doesn't match, the parser calls
get()which crashes the entire program. We emit an error here so that it errors out instead of crashing.Test Plan
Added a lit-test in
invalid.mlirTest Result
Passed lit test.
Submission Checklist