Linux/nvidia:修订间差异
来自康健生活
| (未显示同一用户的6个中间版本) | |||
| 第179行: | 第179行: | ||
</pre>}} | </pre>}} | ||
<div class="pageBoxGreen"> | <div class="pageBoxGreen">对应的环境变量。 | ||
# LIBRARY_PATH: 程序编译期间(开发阶段,如 gcc 编译)。 | # LIBRARY_PATH: 程序编译期间(开发阶段,如 gcc 编译)。 | ||
# LD_LIBRARY_PATH: 程序加载运行期间。</div> | # LD_LIBRARY_PATH: 程序加载运行期间。</div> | ||
| 第203行: | 第203行: | ||
Build cuda_11.5.r11.5/compiler.30672275_0 | Build cuda_11.5.r11.5/compiler.30672275_0 | ||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||
=== other === | |||
==== pycuda ==== | |||
{{shc|<syntaxhighlight lang="bash"> | |||
pip3 install pycuda</syntaxhighlight>|$|/home/kangkk}} | |||
== cuDNN == | == cuDNN == | ||
| 第217行: | 第221行: | ||
验证安装是否成功。 | 验证安装是否成功。 | ||
{{Shc_out|<syntaxhighlight lang="bash"> | {{Shc_out|<syntaxhighlight lang="bash"> | ||
cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2 | |||
</syntaxhighlight>|<syntaxhighlight lang="bash"> | </syntaxhighlight>|<syntaxhighlight lang="bash"> | ||
#define CUDNN_MAJOR 8 | |||
#define CUDNN_MINOR 3 | |||
#define CUDNN_PATCHLEVEL 0 | |||
-- | |||
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL) | |||
#endif /* CUDNN_VERSION_H */ | |||
</syntaxhighlight>|$|/home/kangkk}} | |||
== 推理引擎 == | |||
{| class="wikitable" | |||
|- | |||
| [[/TensorRT|TensorRT]] | |||
|} | |||
== 模型引擎 == | |||
[[/ONNX|ONNX]] | |||
== python == | |||
使用 python 检查安装的 cuda、cudnn 版本 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
python3</syntaxhighlight>|<syntaxhighlight lang="bash"> | |||
Python 3.8.8 (default, Apr 13 2021, 19:58:26) | |||
[GCC 7.3.0] :: Anaconda, Inc. on linux | |||
Type "help", "copyright", "credits" or "license" for more information. | |||
>>> import tensorflow | |||
>>> print(tensorflow.__version__) | |||
2.7.0 | |||
>>> import tensorflow.python.platform.build_info as build | |||
>>> print(build.build_info) | |||
OrderedDict([('cpu_compiler', '/dt7/usr/bin/gcc'), ('cuda_compute_capabilities', ['sm_35', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'compute_80']), ('cuda_version', '11.2'), ('cudnn_version', '8'), ('is_cuda_build', True), ('is_rocm_build', False), ('is_tensorrt_build', True)]) | |||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||