RuntimeError: FlashAttention is only supported on CUDA 11 and above

慈云数据 2024-03-13 技术支持 54 0

RuntimeError: FlashAttention is only supported on CUDA 11 and above

  • 问题描述
  • 解决方案

    问题描述

    RuntimeError: FlashAttention is only supported on CUDA 11 and above

    在这里插入图片描述

    解决方案

    此错误的原因可能是 nvcc 的 CUDA 版本(通过键入“nvcc -V”获得,可能

    类似问题在这里解决:

    https://stackoverflow.com/questions/40517083/multiple-cuda-versions-on-machine-nvcc-v-confusion

    我解决了这个问题通过:

    首先:

    vim ~/.bashrc
    

    在最后一行加上:

    export PATH=/usr/local/cuda-11.7/bin:$PATH
    

    然后:

    source ~/.bashrc
    

    注意这里的cuda-11.7需要依据自己电脑或者服务器上面的版本来改,找到/usr/local目录下来看。改成自己需要的版本。

    在这里插入图片描述

    感谢

    参考1

    的haoychen3的帮助。

微信扫一扫加客服

微信扫一扫加客服

点击启动AI问答
Draggable Icon