Skip to content
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

Set torch.multiprocessing start method as 'spawn' #1285

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hxdtest
Copy link

@hxdtest hxdtest commented Nov 12, 2024

Set torch.multiprocessing start method as 'spawn'. Otherwise the following error would be raised.

Megatron-LM/megatron/core/extensions/transformer_engine.py", line 957, in get_cpu_offload_context
    context, sync_func = _get_cpu_offload_context(
  File "/opt/conda/lib/python3.8/site-packages/transformer_engine/pytorch/cpu_offload.py", line 502, in get_cpu_offload_context
    cpu_offload_handler = AsyncDoubleBufferGroupOffloadHandler(
  File "/opt/conda/lib/python3.8/site-packages/transformer_engine/pytorch/cpu_offload.py", line 312, in __init__
    self.d2h_stream = torch.cuda.Stream()
  File "/opt/conda/lib/python3.8/site-packages/torch/cuda/streams.py", line 35, in __new__
    return super().__new__(cls, priority=priority, **kwargs)
RuntimeError: CUDA error: initialization error
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

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.

1 participant