Merge pull request #1987 from xyproto/archlinux
Let gpu.go and gen_linux.sh also find CUDA on Arch Linux
This commit is contained in:
commit
fccdf4c635
2 changed files with 8 additions and 2 deletions
|
@ -39,6 +39,7 @@ var CudaLinuxGlobs = []string{
|
||||||
"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so*",
|
"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so*",
|
||||||
"/usr/lib/wsl/lib/libnvidia-ml.so*",
|
"/usr/lib/wsl/lib/libnvidia-ml.so*",
|
||||||
"/opt/cuda/lib64/libnvidia-ml.so*",
|
"/opt/cuda/lib64/libnvidia-ml.so*",
|
||||||
|
"/opt/cuda/targets/x86_64-linux/lib/stubs/libnvidia-ml.so*",
|
||||||
"/usr/lib*/libnvidia-ml.so*",
|
"/usr/lib*/libnvidia-ml.so*",
|
||||||
"/usr/local/lib*/libnvidia-ml.so*",
|
"/usr/local/lib*/libnvidia-ml.so*",
|
||||||
"/usr/lib/aarch64-linux-gnu/nvidia/current/libnvidia-ml.so*",
|
"/usr/lib/aarch64-linux-gnu/nvidia/current/libnvidia-ml.so*",
|
||||||
|
|
|
@ -108,11 +108,16 @@ else
|
||||||
echo "Skipping CPU generation step as requested"
|
echo "Skipping CPU generation step as requested"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${CUDA_LIB_DIR}" ]; then
|
# If needed, look for the default CUDA toolkit location
|
||||||
# Try the default location in case it exists
|
if [ -z "${CUDA_LIB_DIR}" ] && [ -d /usr/local/cuda/lib64 ]; then
|
||||||
CUDA_LIB_DIR=/usr/local/cuda/lib64
|
CUDA_LIB_DIR=/usr/local/cuda/lib64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If needed, look for CUDA on Arch Linux
|
||||||
|
if [ -z "${CUDA_LIB_DIR}" ] && [ -d /opt/cuda/targets/x86_64-linux/lib ]; then
|
||||||
|
CUDA_LIB_DIR=/opt/cuda/targets/x86_64-linux/lib
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "${CUDA_LIB_DIR}" ]; then
|
if [ -d "${CUDA_LIB_DIR}" ]; then
|
||||||
echo "CUDA libraries detected - building dynamic CUDA library"
|
echo "CUDA libraries detected - building dynamic CUDA library"
|
||||||
init_vars
|
init_vars
|
||||||
|
|
Loading…
Reference in a new issue