[TIR][Compute-at] Enable complex floordiv/floormod expressions in compute_at#14854
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
…pute_at Right now, compute_at is not able to handle movement of blocks if the indices of tensors contain complex floordiv/floormod operations. For ex. if a layout of tensor contains (width % 2) // 2, compute_at fails with an error. This change is to handle complex expressions.
73813d6 to
3371722
Compare
|
cc @Hzfengsy , @junrushao , @quic-sanirudh , @shingjan |
quic-sanirudh
left a comment
There was a problem hiding this comment.
LGTM, but I'll prefer if someone else also reviews this as I'm not too familiar with arith pattern matching.
|
Thank you @wrongtest-intellif for the review. Currently, I'm working on fixing your comments. |
There was a problem hiding this comment.
Thank you @wrongtest-intellif for the review comments. Apologies for replying late. I have fixed the review comments.
22c41d5 to
fff360b
Compare
There was a problem hiding this comment.
Thank you @wrongtest-intellif for sharing more details. Sorry for coming back late but I was trying to fix your review comments and finding an appropriate test case to verify the LOC changed. I have updated the PR with new changes. Request you to please review the PR for any additional feedback.
17090e9 to
c2e7c5e
Compare
|
Hi @wrongtest-intellif , Could you please review this PR ? |
c2e7c5e to
34ba225
Compare
abhikran-quic
left a comment
There was a problem hiding this comment.
Thank you @wrongtest-intellif for the comments. I have fixed them. Please review the PR for any more feedback.
b2db447 to
5b4f145
Compare
- Merge conditions for floordiv and floormods respectively to handle recursion - Update test case to handle non-bijective index map - Update new_required to be in between [required_min, +inf]
5b4f145 to
dec82f8
Compare
wrongtest-intellif
left a comment
There was a problem hiding this comment.
Thanks, now it looks good to me.
|
@tvm-bot rerun |
Right now,
compute_atis not able to handle movement of blocks if the indices of tensors contain complex floordiv/floormod operations. For ex. if a layout of tensor contains(width % 2) // 2,compute_atfails with an error.Check failed: (dom_var.defined()) is false: ValueError: BufferRegion pattern match failed: v2 % T.int64(2) // T.int64(2)This change is to handle complex expressions in
compute_at.