8000 Fix poision child process issue when call getAccelerator() by pytorchbot · Pull Request #144541 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Fix poision child process issue when call getAccelerator() #144541

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

Conversation

pytorchbot
Copy link
Collaborator

Stack from ghstack (oldest at bottom):

Motivation

fix #144152

Solution

  • Align at::globalContext()::hasXXX to determine if accelerator XXX is built with PyTorch or an extension already registered to PyTorch.
  • Define at::hasXXX to determine if accelerator XXX is available at runtime.
  • Use at::globalContext()::hasXXX in getAccelerator rather than at::hasXXX to avoid initializing the XXX runtime (which can poison child processes) while detecting the current accelerator.

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @albanD

# Motivation
fix #144152

# Solution

- Align `at::globalContext()::hasXXX` to determine if accelerator XXX is built with PyTorch or an extension already registered to PyTorch.
- Define `at::hasXXX` to determine if accelerator XXX is available at runtime.
- Use `at::globalContext()::hasXXX` in `getAccelerator` rather than `at::hasXXX` to avoid initializing the XXX runtime (which can poison child processes) while detecting the current accelerator.

Pull Request resolved: #144368
Approved by: https://github.com/albanD, https://github.com/atalman, https://github.com/gujinghui

(cherry picked from commit 2583d83)
Copy link
pytorch-bot bot commented Jan 10, 2025

🔗 Helpful Links

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

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 75020ef with merge base f7e621c (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link
Contributor
@kit1980 kit1980 left a comment

Choose a reason for hiding this comment

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

This caused a regression #144567

@guangyey guangyey closed this Jan 13, 2025
@github-actions github-actions bot deleted the cherry-pick-144368-by-pytorch_bot_bot_ branch February 12, 2025 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oncall: jit Add this issue/PR to JIT oncall triage queue open source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0