Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[BE] Import CUDATemplateCaller non-lazily in select_algorithm.py #153765

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 4 commits into from

Conversation

henrylhtsang
Copy link
Contributor

@henrylhtsang henrylhtsang commented May 16, 2025

Copy link

pytorch-bot bot commented May 16, 2025

🔗 Helpful Links

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

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

❌ 4 New Failures

As of commit ed685eb with merge base c45515c (image):

NEW FAILURES - The following jobs have failed:

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

henrylhtsang added a commit that referenced this pull request May 16, 2025
Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)

ghstack-source-id: 284551003
Pull Request resolved: #153765
@facebook-github-bot
Copy link
Contributor

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

Skylion007
Skylion007 previously approved these changes May 17, 2025
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 17, 2025
…thm.py"

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)

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

[ghstack-poisoned]
henrylhtsang added a commit that referenced this pull request May 19, 2025
Pull Request resolved: #153765

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)
ghstack-source-id: 284881312
@facebook-github-bot
Copy link
Contributor

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

@henrylhtsang henrylhtsang added the topic: not user facing topic category label May 19, 2025
…thm.py"

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)

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

[ghstack-poisoned]
henrylhtsang added a commit that referenced this pull request May 19, 2025
Pull Request resolved: #153765


ghstack-source-id: 284892017

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)
@facebook-github-bot
Copy link
Contributor

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

…thm.py"

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)

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

[ghstack-poisoned]
henrylhtsang added a commit that referenced this pull request May 19, 2025
Pull Request resolved: #153765


ghstack-source-id: 284959940

Differential Revision: [D74911280](https://our.internmc.facebook.com/intern/diff/D74911280/)
@facebook-github-bot
Copy link
Contributor

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

@Skylion007
Copy link
Collaborator

Just to be sure, this doesn't do any poisoning of the CUDA context when torch is imported, right?

@Skylion007 Skylion007 dismissed their stale review May 20, 2025 15:10

Actually, double check CUDA context poisoning

@henrylhtsang
Copy link
Contributor Author

Just to be sure, this doesn't do any poisoning of the CUDA context when torch is imported, right?

good question. What do you mean by poisoning the cuda context?

@Skylion007
Copy link
Collaborator

Just to be sure, this doesn't do any poisoning of the CUDA context when torch is imported, right?

good question. What do you mean by poisoning the cuda context?

Accidentally initializing CUDA when it's not necessary (and loading memory onto the GPU etc). IE. Imagine a dataloader process that only create CPU tensor wasitng GPU memory for every worker.

@henrylhtsang
Copy link
Contributor Author

Just to be sure, this doesn't do any poisoning of the CUDA context when torch is imported, right?

good question. What do you mean by poisoning the cuda context?

Accidentally initializing CUDA when it's not necessary (and loading memory onto the GPU etc). IE. Imagine a dataloader process that only create CPU tensor wasitng GPU memory for every worker.

I think it shouldn't, but unless I know what to look for, it is hard to test.

I am fine with either of the following options:

  1. land it and see if it gets reverted. This is the reason why I make this PR so lightweight
  2. Forget about it, since this is BE only.

also @ColinPeppler who proposed this change.

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.