如何在 Linux 机器上获取我的 CUDA 规格?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8582841/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I get my CUDA specs on a Linux machine?
提问by Michael Eilers Smith
I'm accessing a remote machine that has a good nVidia card for CUDA computing, but I can't find a way to know which card it uses and what are the CUDA specs (version, etc.). I used the "lspci" command on the terminal, but there is no sign of a nvidia card. I'm pretty sure it has a nVidia card, and nvcc seems to be installed.
我正在访问一台具有用于 CUDA 计算的良好 nVidia 卡的远程机器,但我找不到一种方法来知道它使用的是哪种卡以及 CUDA 规格(版本等)是什么。我在终端上使用了“lspci”命令,但是没有 nvidia 卡的迹象。我很确定它有一个 nVidia 卡,而且似乎安装了 nvcc。
But I really want to figure out the card and CUDA specs. Any ideas?
但我真的很想弄清楚卡和 CUDA 规格。有任何想法吗?
Thanks!
谢谢!
采纳答案by Paul R
If you can find where the CUDA SDK directory has been installed then you can just run the deviceQuery
example which will tell you all you need to know and more. The executable should be at $(SDK)/C/bin/linux/release/deviceQuery
- if it's not there then you may need to build the samples first:
如果您可以找到 CUDA SDK 目录的安装位置,那么您只需运行该deviceQuery
示例即可,该示例将告诉您所有需要了解的信息以及更多信息。可执行文件应该在$(SDK)/C/bin/linux/release/deviceQuery
- 如果它不存在,那么您可能需要先构建示例:
$ cd $(SDK)
$ make
$ ./C/bin/linux/release/deviceQuery
The CUDA SDK directory is typically named NVIDIA_GPU_Computing_SDK
(more recent CUDA versions) or just NVIDIA_CUDA_SDK
(older CUDA versions).
CUDA SDK 目录通常命名为NVIDIA_GPU_Computing_SDK
(更新的 CUDA 版本)或仅命名NVIDIA_CUDA_SDK
(旧的 CUDA 版本)。
回答by Mick_Edward
If you have all the Cuda installed, then just run
如果您安装了所有 Cuda,则只需运行
nvidia-smi
英伟达-smi