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

多个GPU时如何设置选择哪个GPU来运行 #75

Open
xiaofeihhu opened this issue Aug 12, 2024 · 1 comment
Open

多个GPU时如何设置选择哪个GPU来运行 #75

xiaofeihhu opened this issue Aug 12, 2024 · 1 comment

Comments

@xiaofeihhu
Copy link

服务器目前有2个GPU,每个16G显存。在运行时好像每次默认只会选择第1个GPU,另外一个空闲着,并且会出现下面的报错。
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 14.57 GiB total capacity; 2.53 GiB already allocated; 12.75 MiB free; 2.60 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
gpu

@nishuone028
Copy link

推理代码哪里 去找cuda设置你的卡

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

No branches or pull requests

2 participants