-
Notifications
You must be signed in to change notification settings - Fork 329
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
lower if #1693
lower if #1693
Conversation
dd37ae9
to
2c0796d
Compare
@chentong319 can you review this PR as it is closely related to the LOOP and sequence work you have done, big thanks |
added lit tests and backend test updated SupportedONNXOps-cpu.md Signed-off-by: Soren Lassen <[email protected]>
2c0796d
to
4a93bb8
Compare
rewriter, loc, ifOp.then_branch(), scfIfOp.getThenRegion()); | ||
graphToScfBranch( | ||
rewriter, loc, ifOp.else_branch(), scfIfOp.getElseRegion()); | ||
UnrealizedConversionCastOp castOp = |
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.
To my understanding, this statement converts the result of scf.if back to tensor types. But the lit test case shows the return is memref. Can you tell me the reason?
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.
good point, the cast was unnecessary
removed
Signed-off-by: Soren Lassen <[email protected]>
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.
LGTM!
I noticed that after this change the lit tests no longer pass on Windows in Debug. Windows Debug is often special in that it explicitly sets everything to null if it's not initialized, pads structures with known patterns (and other similar things) to more explicitly guard against bugs. In this case, there is an access violation in the new test for lowering
|
I only have a Mac and can only test on Mac and Linux so I can't reproduce the failure thanks for sharing the backtrace, I can't conclusively say what the issue is but my hunch is that it has to do with the way the returnOp's block was erased so I wrote PR #1717 as an experiment - are you able to run that change to see if it fixes the issue? or can you recommend how I can troubleshoot this? |
@sstamenova can you clarify for my education why this was not picked up by the normal CIs? Window does not test in Debug? Tx |
Right now we don't run a debug build in the Windows CI. They are longer and use more memory, so it may or may not work on the available machines. We can try it out and see what happens. |
@sorenlassen : The new changes fail on Windows and Ubuntu both. The callstack for Ubuntu:
The callstack for Windows:
|
* lower if added lit tests and backend test updated SupportedONNXOps-cpu.md Signed-off-by: Soren Lassen <[email protected]> * remove unnecessary cast Signed-off-by: Soren Lassen <[email protected]> Signed-off-by: Soren Lassen <[email protected]> Co-authored-by: chentong319 <[email protected]> Signed-off-by: Stella Stamenova <[email protected]>
@sstamenova I updated my attempted fix in PR #1717, can you please try to run the Windows Debug lit tests with that PR again? |
All green now. Thank you! |
added lit tests and backend test
updated SupportedONNXOps-cpu.md
Signed-off-by: Soren Lassen [email protected]