Versões do controlador, ambiente de execução e kit de ferramentas
Quais componentes precisam ser compatíveis para o CUDA funcionar.
Versões do controlador, ambiente de execução e kit de ferramentas é uma aula grátis de CUDA Academy no CoddyKit. Esta é a aula 1 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de CUDA Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de CUDA Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
Three Moving Parts
Running CUDA needs three pieces to cooperate: the GPU driver, the CUDA runtime, and the CUDA toolkit. When they line up, your code just works. 🧩
The Driver
The driver is the low-level software that lets your operating system actually talk to the physical GPU. It ships with NVIDIA's GPU drivers, separate from the toolkit.
The Runtime
The CUDA runtime is the friendly library your program links against. It offers the cudaMalloc and cudaMemcpy calls you will write every day.
The Toolkit
The CUDA toolkit bundles the compiler, the runtime libraries, and headers. Installing it is how you get nvcc and everything needed to build GPU code.
The Golden Rule
Here is the rule that saves you hours: your driver must be at least as new as the toolkit. A newer driver runs older toolkits, but never the reverse.
Check the Driver Version
To see your driver and the maximum CUDA it supports, run nvidia-smi in a terminal and read the top header line.
nvidia-smiCheck the Toolkit Version
To confirm which CUDA toolkit compiler you have installed, ask nvcc directly. The version it prints is what your builds will target.
nvcc --versionTwo Versions, One System
It is normal for nvidia-smi and nvcc to show different numbers. The first reports the driver's max CUDA; the second reports the installed toolkit. That gap is fine.
Forward Compatibility
Programs you build are tied to a runtime version. A newer driver stays backward compatible, so older CUDA binaries keep running after you upgrade your driver.
When Things Break
Seeing an error like driver version is insufficient almost always means your driver is too old for the toolkit. Update the driver, not the toolkit.
Query Versions in Code
Your program can read both numbers at runtime. The runtime API exposes them so you can log versions or fail early with a clear message.
int rt, drv;
cudaRuntimeGetVersion(&rt);
cudaDriverGetVersion(&drv);Quick Check
Time to test the version relationship.
Recap
You met the driver, runtime, and toolkit, and learned the golden rule: keep the driver as new or newer than the toolkit. Now you can diagnose version errors fast. 🚀
Perguntas Frequentes
A aula “Versões do controlador, ambiente de execução e kit de ferramentas” é grátis?
Sim — o texto completo de “Versões do controlador, ambiente de execução e kit de ferramentas” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de CUDA Academy, atualize para CoddyKit PRO. O curso de CUDA Academy inclui 4 aulas no total.
O que vou aprender em “Versões do controlador, ambiente de execução e kit de ferramentas”?
Quais componentes precisam ser compatíveis para o CUDA funcionar. Você pratica CUDA Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar CUDA Academy?
Nenhuma experiência prévia é necessária. CUDA Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 1 de 4.
Quanto tempo leva a aula “Versões do controlador, ambiente de execução e kit de ferramentas”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de CUDA Academy?
Sim. Cada aula de CUDA Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Versões do controlador, ambiente de execução e kit de ferramentas
- Leia nvidia-smi como um profissional
- Compile com nvcc
- Olá, GPU: seu primeiro arquivo .cu