[Reland] Use static_assert to detect get_type_index used in device code#139966
[Reland] Use static_assert to detect get_type_index used in device code#139966cyyever wants to merge 4 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139966
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit e919546 with merge base 5ef33e4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@huydhn Help |
|
@pytorchbot label "topic: not user facing" |
|
@cyyever what was the reason for previous revert? (Perhaps would be good to reference it in PR description) |
malfet
left a comment
There was a problem hiding this comment.
If CI is green, than sure, why not
|
@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
I have imported the diff, will land it internally if the signals look good there |
|
@huydhn Have to re-import |
|
@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@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 |
|
@pytorchbot revert -m "This approach will prevent one from using get_type_index from device code" -c weird |
|
@pytorchbot successfully started a revert job. Check the current status here. |
…evice code (#139966)" This reverts commit ca7fdfe. Reverted #139966 on behalf of https://github.com/malfet due to This approach will prevent one from using get_type_index from device code ([comment](#139966 (comment)))
|
@cyyever your PR has been successfully reverted. |
|
@cyyever see this example https://gist.github.com/malfet/b9488d51110f431eac1af2c0159eafd5 - i.e. even if template is only instantiated from the host code, nvcc (as of CUDA-12.6 ) will still instantiate it during GPU compilation and will abort the compilation |
Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
60bf2cb to
e919546
Compare
|
@malfet host will prevent it from being used in host code. |
|
@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 jobs have failed, first few of them are: Meta Internal-Only Changes Check Details for Dev Infra teamRaised by workflow job |
…de (pytorch#139966) pytorch#139173 was reverted due to an internal build break of using get_type_index in device code. This PR is created for ease of importing into META to further investigation. Pull Request resolved: pytorch#139966 Approved by: https://github.com/malfet, https://github.com/huydhn Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
…evice code (pytorch#139966)" This reverts commit ca7fdfe. Reverted pytorch#139966 on behalf of https://github.com/malfet due to This approach will prevent one from using get_type_index from device code ([comment](pytorch#139966 (comment)))
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
#139173 was reverted due to an internal build break of using get_type_index in device code. This PR is created for ease of importing into META to further investigation.