Open zsaladin opened 4 months ago
Hi @zsaladin - the cuda runtime version and the cuda version that is bundled with torch can be different, so that is the reason why we need to be able to check the actual cuda runtime version that is installed.
@loadams Thanks for replying. I have some questions about your answer.
As you mentioned versions of cuda runtime installed globally and bundled with torch can be different. The cuda runtime bundled with torch is in virtual environment. Does deepspeed use cuda runtime in virtual environment? If deepspeed uses cuda runtime in virtual environment then the version conflict cannot happen. So it would be great that deepspeed will use bundled cuda runtime if deepspeed doesn't use it now.
When I use deepspeed==0.12.6
it doesn't require nvcc
. nvcc
is a compiler not for checking version.
I'm not sure that but deepspeed needs to complie cuda code?
Hi @zsaladin - DeepSpeed uses the version of cuda runtime that is installed on the system, it cannot "use" the version that torch is built with, as that doesn't have nvcc
/cuda drivers, it is just what the installed pytorch is built against.
As for why it didn't require nvcc in 0.12.6, we will have to check the code to see what changes have taken place that would cause this. With 0.12.6 does DeepSpeed detect that you are using an Nvidia GPU? Are you able to run nvidia-smi on your system with DeepSpeed 0.14.x?
Describe the bug
It seems that deepspeed doesn't use cuda installed in virtual environment.
To Reproduce Steps to reproduce the behavior:
deepspeed==0.14.2
Write codes below and run it.
source code
error log
But cuda is located in virtual environment.
Expected behavior
It might be better if deepspeed uses cuda installed in virtual environment.
Assume that cuda runtime is installed globally 11.6 and torch uses cuda runtime 12.1. In this case deepspeed and pytorch don't use same version of cuda. It can cause confusion.
deepspeed requires cuda installed globally and torch install cuda in virtual environment. It increases docker image size.
nvcc
might be unnecessary to check cuda version.nvcc
is a compiler. To minimize docker images I don't want to installnvcc
. But deepspeed uses it to check cuda version. We can use torch and printtorch.cuda.version
withoutnvcc
.System info (please complete the following information):