KEMBAR78
Fix triton_reshape to properly expand `Min` keyword in triton codegen by arui-meta · Pull Request #137357 · pytorch/pytorch · GitHub
Skip to content

Conversation

@arui-meta
Copy link
Contributor

@arui-meta arui-meta commented Oct 4, 2024

Summary: Previously triton_reshape will generate code with Min keyword in it, which is incorrect. This diff updates the triton_reshape function to properly expand Min keyword to <.

Test Plan:

buck2 run @//mode/{opt,mtia,inplace} //glow/fb/fx/fba/tests:test_fba_inductor -- -r test_Min_keyword_in_block_shape

Differential Revision: D63850158

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 4, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137357

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 2ce12ff with merge base 932b994 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

@arui-meta
Copy link
Contributor Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Oct 4, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

arui-meta added a commit to arui-meta/pytorch that referenced this pull request Oct 4, 2024
…ytorch#137357)

Summary:

Previously triton_reshape will generate code with `Min` keyword in it, which is incorrect. This diff updates the triton_reshape function to properly expand `Min` keyword to `<`.

Test Plan:
```
buck2 run @//mode/{opt,mtia,inplace} //glow/fb/fx/fba/tests:test_fba_inductor -- -r test_Min_keyword_in_block_shape
```

Differential Revision: D63850158
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

arui-meta added a commit to arui-meta/pytorch that referenced this pull request Oct 7, 2024
…ytorch#137357)

Summary:

Previously triton_reshape will generate code with `Min` keyword in it, which is incorrect. This diff updates the triton_reshape function to properly expand `Min` keyword to `<`.

Test Plan:
```
buck2 run @//mode/{opt,inplace} fbcode//caffe2/test/inductor:torchinductor_strided_blocks -- -r test_complex_reshape_block_ptr
```

Differential Revision: D63850158
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

Copy link
Contributor

@blaine-rister blaine-rister left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix.

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 8, 2024
arui-meta added a commit to arui-meta/pytorch that referenced this pull request Oct 8, 2024
…ytorch#137357)

Summary:

Previously triton_reshape will generate code with `Min` keyword in it, which is incorrect. This diff updates the triton_reshape function to properly expand `Min` keyword to `<`.

Test Plan:
```
buck2 run @//mode/{opt,inplace} fbcode//caffe2/test/inductor:torchinductor_strided_blocks -- -r test_complex_reshape_block_ptr
```

Reviewed By: blaine-rister

Differential Revision: D63850158
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

…ytorch#137357)

Summary:

Previously triton_reshape will generate code with `Min` keyword in it, which is incorrect. This diff updates the triton_reshape function to properly expand `Min` keyword to `<`.

Test Plan:
```
buck2 run @//mode/{opt,inplace} fbcode//caffe2/test/inductor:torchinductor_strided_blocks -- -r test_complex_reshape_block_ptr
```

Reviewed By: blaine-rister

Differential Revision: D63850158
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63850158

@arui-meta arui-meta requested a review from eellison October 9, 2024 13:59
@facebook-github-bot
Copy link
Contributor

@pytorchbot merge -f 'Landed internally'

(Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants