Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,我需要检索 cuda 版本,无论是 cuda8 还是 cuda9。
有人知道我可以告诉的方法吗?
我听说 cuda managed 会告诉我,但它所做的只是告诉我驱动程序版本“361.xx”
鉴于您使用的是托管 CUDA,您不能。
托管 CUDA(以及在 JCUDA 和 PyCUDA 等其他语言中使用 CUDA API 的大多数其他框架)使用 CUDA 驱动程序 API。驱动 API 中没有“CUDA 版本”的概念,这严格来说是运行时 API 的一个特性。因此,您无法使用驱动程序 API 获取运行时 API 版本。
驱动程序 API 中唯一相关的版本是驱动程序版本,您已经知道如何访问它。