Skip to content
Discussion options

You must be logged in to vote

Hi @lg2578 ,

As your error log shows: RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
CUDA can't work with forked multi-processing, please set the num_workers of DataLoader to 0.
Suggest to use ThreadDataLoader for this case, refer to:
https://github.com/Project-MONAI/tutorials/blob/main/acceleration/distributed_training/brats_training_ddp.py#L220

Thanks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lg2578
Comment options

Answer selected by lg2578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants