-
Notifications
You must be signed in to change notification settings - Fork 74
Throw exception in ComputeAtLogicalDomainMapBuilder::handle by default #4282
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
base: main
Are you sure you want to change the base?
Conversation
|
!test |
|
Review updated until commit e33bfb8 Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
!test |
|
On a quick first run I see a couple of failures meaning we are missing some handlers, for example for |
|
!test |
|
!test |
| // current fusion entirely. IterDomains that can be mapped each | ||
| // other with computeAt are grouped into the same subset in the | ||
| // DisjointSets. | ||
| class ComputeAtLogicalDomainMapBuilder |
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 did not need to be in the header so I moved it to the .cpp. It is unchanged other than deriving from BackwardVisitorNoDefaultHandlers and implementing a few missing handlers.
| void handle(FullOp* op) override {} | ||
|
|
||
| void handle(GetItem* op) override { | ||
| mapPointwiseLikeOp(op); | ||
| } | ||
|
|
||
| void handle(IotaOp* op) override {} | ||
|
|
||
| void handle(EyeOp* op) override {} |
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.
Added these handlers
|
!test --diff |
| void handle(ScatterOp* op) override { | ||
| // TODO: I think we should map all dims like pointwise here other than | ||
| // op->dim() | ||
| } |
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.
Added this handler. Maybe it should be mapPointwiseOp(op) or similar instead, but since it was missing, this empty override matches current behavior.
|
Codediff seems to be due to nvrtc behavior. Generated CUDA code is unchanged. |
While working on #4211 I missed implementing a handler for
ScanOp, leading to a tricky debugging session. @naoyam suggested we should throw an error if we do not have a handler in place for buildingComputeAtMap, so that's what this PR does.Note that
BackwardVisitorNoDefaultHandlercould also throw for handlingVals and we could override that using a macro as well. It could also go intoiter_visitor.h, along with similar ones for the other visitor classes, if this is useful.