Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/124930
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4e45442 with merge base b03fb49 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| except ValueError: | ||
| # No dim with stride 1 found, return 1 | ||
| return 1 |
There was a problem hiding this comment.
hm does the exception block need to cover all these lines, or just line 297?
| do_continue = False | ||
| for dim in range(len(size)): | ||
| # All non-contiguous strides must be aligned | ||
| if dim == contiguous_dim: | ||
| continue | ||
| dim_stride = int(inductor_layout.stride[dim]) | ||
| if dim_stride % alignment != 0: | ||
| do_continue = True | ||
| break | ||
| if do_continue: | ||
| continue |
There was a problem hiding this comment.
nit: I think an if any(...): continue expression here would be more readable / less imperative
| def test_get_max_alignment(self): | ||
| l4 = FixedLayout("cpu", torch.half, size=(1, 2, 4), stride=(0, 4, 1)) | ||
| m4 = get_max_alignment(l4) | ||
| assert ( |
There was a problem hiding this comment.
I think python tests should use self.assertEquals?
There was a problem hiding this comment.
Thanks for the review. I addressed all comments.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
Fixes cutlass_utils.get_max_alignment() which was so far not checking the alignment properly. Basically
the method so far assumed that the passed layout is contiguous and row-major, which does not have to be true.
Test Plan:
CI - test_cutlass_backend.py to prevent regressions
Added unit test
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @muchulee8 @ColinPeppler @amjames @desertfire @chauhang