未验证 提交 fb5910f4 编写于 作者: C chalsliu 提交者: GitHub

Fix flashattn build error on jetson (#51665)

* Fix flashattn build error on jetson

* Fix nvcc not found on jetson
上级 cabf3921
......@@ -87,6 +87,7 @@ ExternalProject_Add(
-DCMAKE_CXX_FLAGS_DEBUG=${FLASHATTN_CXX_FLAGS_DEBUG}
-DCMAKE_INSTALL_PREFIX=${FLASHATTN_INSTALL_DIR}
-DWITH_GPU=${WITH_GPU}
-DCMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER}
-DWITH_ROCM=${WITH_ROCM}
-DWITH_OMP=${USE_OMP}
-DBUILD_SHARED=ON
......
......@@ -18,11 +18,6 @@ echo "#!/usr/bin/env bash" >> $1
echo "unset GREP_OPTIONS" >> $1
echo "set -e" >> $1
echo -e >> $1
echo "if [[ \$# -le 8 ]]; then" >> $1
echo " nvcc \"\$@\"" >> $1
echo " exit 0" >> $1
echo "fi" >> $1
echo -e >> $1
echo "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved." >> $1
echo "#" >> $1
echo "# Licensed under the Apache License, Version 2.0 (the \"License\");" >> $1
......@@ -44,6 +39,11 @@ echo "# set cicc PATH for Centos" >> $1
echo "export PATH=\$PATH:$2/bin" >> $1
echo "export PATH=\$PATH:$2/nvvm/bin" >> $1
echo -e >> $1
echo "if [[ \$# -le 8 ]]; then" >> $1
echo " nvcc \"\$@\"" >> $1
echo " exit 0" >> $1
echo "fi" >> $1
echo -e >> $1
echo "# check nvcc version, if nvcc >= 11.7, just run nvcc itself" >> $1
echo "CUDA_VERSION=\$(nvcc --version | grep -oP '(?<=V)\d*\.\d*')" >> $1
echo "CUDA_VERSION_MAJOR=\${CUDA_VERSION%.*}" >> $1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册