Nvidia cuda toolkit compatibility7/30/2023 ![]() However, there are sometimes scenarios where the CUDA Runtime that our CUDA application or library links to at build time is different from the CUDA Runtime library in the execution environment. So the CUDA application compatibility also depends on CUDA Runtime. Sometimes, there can be multiple builds for different versions of CUDA Runtime libraries as well. Therefore, for released CUDA software, such as cuDNN, it will always mention the version of the CUDA (Runtime library) it links to. The exceptions are there are CUDA applications or libraries that link to CUDA Driver library. CUDA Runtime CompatibilityĬUDA Runtime library is a library that CUDA applications or libraries will always have to link to, sometimes without having to specify explicitly, during building in most cases. ![]() The application or developer should always check carefully about the dependency library compatibilities beforehand. However, this is sometimes not the case, which makes it impossible for our CUDA application or library being forward or backward compatible. Now, if our CUDA application or library has dependencies on other CUDA libraries, such as cuDNN, cuBLAS, in order to archive the forward or backward compatibilities, those CUDA libraries should also be built to have the same forward or backward compatibilities as our CUDA application or library. The backward compatibility can be disabled by disabling the generation of PTX code and old architecture specific binaries as part of the binary file. The forward compatibility can be disabled by disabling the generation of PTX code as part of the binary file. ![]() On the computer that has the NVIDIA GPU of the old architecture, when the CUDA application or library is executed, it will be executed directly if it has been compiled to binaries for the architecture, or the PTX code will be JIT compiled to binaries for the old architecture by CUDA Runtime, therefore the application or software built on the computer has an NVIDIA GPU of a new architecture can be backward compatible on a computer has an NVIDIA GPU of an old architecture. NVCC compilation allows us to specify not only the PTX code but also the compiled binary generation for an old architecture. On the contrary, if we have a computer that has an NVIDIA GPU of a new architecture, we want to build a CUDA application or library that also runs on a computer that has an NVIDIA GPU of an old architecture. We will not discuss performance in this article as compatibility is what we want to achieve. Of course, the drawback of being forward compatible is that the PTX code generated for the old architecture cannot take the advantage of the new feature of the new architecture which potentially will bring a large performance gain. On the computer that has the NVIDIA GPU of the new architecture, when the CUDA application or library is executed, the PTX code will be JIT compiled to binaries for the new architecture by CUDA Runtime, therefore the application or software built on the computer has an NVIDIA GPU of an old architecture can be forward compatible on a computer has an NVIDIA GPU of a new architecture. NVCC compilation can generate PTX code when we build the CUDA application or library on the computer has an NVIDIA GPU of an old architecture as part of the compiled binary file. If we have a computer that has an NVIDIA GPU of an old architecture, we want to build a CUDA application or library that also runs on a computer that has an NVIDIA GPU of a new architecture or something even more future. CUDA Application Compatibilityįor simplicity, let’s first assume our CUDA application or library has no dependency on other CUDA libraries, such as cuDNN, cuBLAS, etc. In this blog post, I would like to discuss CUDA forward and backward compatibilities from the perspectives of CUDA application or library compatibility (with the GPU architecture), CUDA Runtime compatibility (with the CUDA application or library), and CUDA Driver compatibility (with the CUDA Runtime library). NVIDIA offers CUDA compatibilities at different levels. Creating portable CUDA application and libraries that works for a variety of NVIDIA platforms and software environments is sometimes important.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |