Skip to content

fix notebook launcher cuda init#4059

Open
SunMarc wants to merge 2 commits into
mainfrom
fix-notebook
Open

fix notebook launcher cuda init#4059
SunMarc wants to merge 2 commits into
mainfrom
fix-notebook

Conversation

@SunMarc
Copy link
Copy Markdown
Member

@SunMarc SunMarc commented May 29, 2026

What does this PR do?

This PR fixes notebook_launcher that broke due to numa + elastic launch what trigger cuda somehow for some version of torch.

Fixes #3925

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

The NUMA auto-detect that loads CUDA in the parent exists on torch 2.9 too
(torch.numa was introduced in 2.9), so gating the workaround on
is_torch_version(">=", "2.10") left notebook_launcher broken on torch 2.9.x.
Gate on `hasattr(torch, "numa")` instead, which matches the actual import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notebook_launcher raises "Cannot re-initialize CUDA in forked subprocess"

2 participants