Skip to content

[Reland] Use static_assert to detect get_type_index used in device code#139966

Closed
cyyever wants to merge 4 commits intopytorch:mainfrom
cyyever:static_assert_reland
Closed

[Reland] Use static_assert to detect get_type_index used in device code#139966
cyyever wants to merge 4 commits intopytorch:mainfrom
cyyever:static_assert_reland

Conversation

@cyyever
Copy link
Collaborator

@cyyever cyyever commented Nov 7, 2024

#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.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 7, 2024

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

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit e919546 with merge base 5ef33e4 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@cyyever cyyever requested a review from huydhn November 7, 2024 04:10
@cyyever
Copy link
Collaborator Author

cyyever commented Nov 7, 2024

@huydhn Help

@cyyever
Copy link
Collaborator Author

cyyever commented Nov 7, 2024

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Nov 7, 2024
@malfet
Copy link
Contributor

malfet commented Nov 7, 2024

@cyyever what was the reason for previous revert? (Perhaps would be good to reference it in PR description)

@cyyever cyyever requested a review from malfet November 7, 2024 04:43
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

If CI is green, than sure, why not

@facebook-github-bot
Copy link
Contributor

@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 7, 2024
@huydhn
Copy link
Contributor

huydhn commented Nov 7, 2024

I have imported the diff, will land it internally if the signals look good there

@cyyever
Copy link
Collaborator Author

cyyever commented Nov 7, 2024

@huydhn Have to re-import

@facebook-github-bot
Copy link
Contributor

@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@huydhn
Copy link
Contributor

huydhn commented Nov 7, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
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

@malfet
Copy link
Contributor

malfet commented Nov 8, 2024

@pytorchbot revert -m "This approach will prevent one from using get_type_index from device code" -c weird

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot added a commit that referenced this pull request Nov 8, 2024
…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)))
@pytorchmergebot
Copy link
Collaborator

@cyyever your PR has been successfully reverted.

@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Nov 8, 2024
@malfet
Copy link
Contributor

malfet commented Nov 8, 2024

@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

cyyever and others added 4 commits November 10, 2024 09:02
Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
@cyyever cyyever force-pushed the static_assert_reland branch from 60bf2cb to e919546 Compare November 10, 2024 01:03
@cyyever
Copy link
Collaborator Author

cyyever commented Nov 10, 2024

@malfet host will prevent it from being used in host code.

@cyyever
Copy link
Collaborator Author

cyyever commented Nov 15, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
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
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: Meta Internal-Only Changes Check

Details for Dev Infra team Raised by workflow job

pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…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>
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…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)))
@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Jan 14, 2025
@github-actions github-actions bot closed this Feb 13, 2025
@cyyever cyyever deleted the static_assert_reland branch December 21, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/trunk Trigger trunk jobs on your pull request Merged open source Reverted Stale topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants