إصدارات Driver وRuntime وToolkit
تعرّف على المكوّنات التي يجب أن تتوافق لتشغيل CUDA.
إصدارات Driver وRuntime وToolkit درس مجاني في CUDA Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في CUDA Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة CUDA Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
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. 🚀
الأسئلة الشائعة
هل درس «إصدارات Driver وRuntime وToolkit» مجاني؟
نعم — نص درس «إصدارات Driver وRuntime وToolkit» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة CUDA Academy، انتقل إلى CoddyKit PRO. تتضمن دورة CUDA Academy 4 دروس في المجموع.
ماذا ستتعلم في «إصدارات Driver وRuntime وToolkit»؟
تعرّف على المكوّنات التي يجب أن تتوافق لتشغيل CUDA. تتمرن على CUDA Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ CUDA Academy؟
لا تُشترط خبرة سابقة. CUDA Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «إصدارات Driver وRuntime وToolkit»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس CUDA Academy هذا؟
نعم. كل درس في CUDA Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- إصدارات Driver وRuntime وToolkit
- قراءة nvidia-smi باحتراف
- الترجمة باستخدام nvcc
- مرحبًا بـ GPU: أول ملف .cu لك