Skip to content

[Inductor cutlass backend] Fix cutlass_utils.get_max_alignment() for strided layouts. - #124930

Closed
kadeng wants to merge 7 commits into
gh/kadeng/59/basefrom
gh/kadeng/59/head
Closed

kadeng wants to merge 7 commits into
gh/kadeng/59/basefrom
gh/kadeng/59/head

Conversation

@kadeng

@kadeng kadeng commented Apr 25, 2024 •

Copy link
Copy Markdown
Contributor

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Apr 25, 2024 •

Copy link
Copy Markdown

🔗 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 Failures

As of commit 4e45442 with merge base b03fb49 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

kadeng added 2 commits April 25, 2024 13:25
[ghstack-poisoned]
[ghstack-poisoned]
@kadeng kadeng added the topic: not user facing topic category label Apr 25, 2024
[ghstack-poisoned]
@kadeng
kadeng marked this pull request as ready for review April 30, 2024 18:58
Comment on lines +319 to +321
except ValueError:
# No dim with stride 1 found, return 1
return 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm does the exception block need to cover all these lines, or just line 297?

Comment on lines +306 to +316
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think an if any(...): continue expression here would be more readable / less imperative

Comment thread test/inductor/test_cutlass_backend.py Outdated
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 (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think python tests should use self.assertEquals?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I addressed all comments.

kadeng added 2 commits May 2, 2024 19:10
[ghstack-poisoned]
[ghstack-poisoned]
@kadeng

kadeng commented May 3, 2024

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 3, 2024
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

[ghstack-poisoned]
@kadeng

kadeng commented May 3, 2024

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@github-actions
github-actions Bot deleted the gh/kadeng/59/head branch June 5, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants