BUG解决:安装问题transformer_engine+pytorch
安装命令
pip install transformer_engine[pytorch]
或
pip install git+https://github.com/NVIDIA/TransformerEngine.git@main
Cmake报错信息解决
如果出现cmake相关CUDA/CUDNN错误:
(eg.缺少cudnn.h)
更改CUDA_PATH和CUDNN_PATH
版本检查CUDA 12.0+ and cuDNN 8.1+.
首先找到环境下合适的cuda 版本,比如12.1
之后
vim ~/.bashrc
export PATH=/usr/local/cuda-12.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64:$LD_LIBRARY_PATH
export CUDA_PATH=/usr/local/cuda-12.1
export CUDA_HOME=/usr/local/cuda-12.1
export CUDNN_PATH=/usr/local/cuda/include
ESC键 + :wq + 回车键
source ~/.bashrc
nvcc -V