Skip to content

Use bounds_check_indices v2 on ROCm #3916

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

Closed
wants to merge 1 commit into from

Conversation

sryap
Copy link
Contributor

@sryap sryap commented Apr 2, 2025

Summary:
This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs. Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Differential Revision: D72334377

Copy link

pytorch-bot bot commented Apr 2, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

@facebook-github-bot
Copy link
Contributor

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

Copy link

netlify bot commented Apr 2, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit e9ac760
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/67eec568a5853900072c5e01
😎 Deploy Preview https://deploy-preview-3916--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

sryap added a commit to sryap/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1005


This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

Differential Revision: D72334377
sryap added a commit to sryap/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1005


This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

Differential Revision: D72334377
sryap added a commit to sryap/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1005


This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

Differential Revision: D72334377
@sryap sryap force-pushed the export-D72334377 branch from 44fd294 to b27a9a2 Compare April 3, 2025 04:58
sryap added a commit to sryap/FBGEMM that referenced this pull request Apr 3, 2025
Summary:
X-link: facebookresearch/FBGEMM#1005


This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

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

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

Summary:
X-link: facebookresearch/FBGEMM#1005


This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

Differential Revision: D72334377
@sryap sryap force-pushed the export-D72334377 branch from b27a9a2 to e9ac760 Compare April 3, 2025 17:29
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b25dec3.

q10 pushed a commit to q10/FBGEMM that referenced this pull request Apr 10, 2025
Summary:
Pull Request resolved: facebookresearch/FBGEMM#1005

X-link: pytorch#3916

This diff forces using bounds_check_indices v2 on ROCm because ROCm
has a constraint that the gridDim * blockDim has to be smaller than
2^32. The v1 kernel can be launched with gridDim * blockDim > 2^32
while the v2 kernel limits the gridDim size to 64 * # of SMs.  Thus,
its gridDim * blockDim is guaranteed to be smaller than 2^32

Reviewed By: q10, jianyuh, joebos

Differential Revision: D72334377

fbshipit-source-id: 9c955b691e4462721d500b5b643e037d71e13e0c
@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 00690ec.

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.

3 participants