我想根据https://github.com/soumith/torch-android上显示的程序在服务器(Ubuntu)上构建torch-android。但是当我运行build.sh时,脚本找不到GPU(服务器有特斯拉K80):
CMake Error at install/share/cmake/torch/FindCUDA/select_compute_arch.cmake:91 (message):
Only
Fermi;Kepler;Kepler+Tegra;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;All;Manual;Auto
architecture names are supported.
Call Stack (most recent call first):
distro/extra/cutorch/lib/THC/CMakeLists.txt:62 (CUDA_SELECT_NVCC_ARCH_FLAGS)
打开build.sh,我们可以找到
#!/bin/bash
# have ndk-build in your $PATH and the script figures out where your ANDROID_NDK is at.
# optionally, modify the variables below as needed.
NDKABI=21
NDKVER=toolchains/arm-linux-androideabi-4.9
ARCH=${ARCH:-"v7n"}
if [[ "$ARCH" == "v8" ]]; then
APP_ABI=arm64-v8a
M_ARCH=-march=arm8-a
ABI_NAME=aarch64-linux-androideabi
COMPUTE_NAME=Maxwell-M
elif [[ "$ARCH" == "v7n" ]]; then
APP_ABI="armeabi-v7a with NEON"
M_ARCH="-march=armv7-a"
ABI_NAME=armv7-linux-androideabi
COMPUTE_NAME=Kepler-M
elif [[ "$ARCH" == "v7" ]]; then
APP_ABI="armeabi-v7a"
M_ARCH="-march=armv7-a"
ABI_NAME=armv7-linux-androideabi
COMPUTE_NAME=Kepler
fi
NVCC=`which nvcc`
export MAKE=make
export MAKEARGS=-j$(getconf _NPROCESSORS_ONLN)
我想我应该修改build.sh,但我不知道它。有谁知道如何解决这个问题?
答案 0 :(得分:2)
你是否在ternimal中运行这些命令?
cd ~/torch-android;
git submodule update --init --recursive;
./build;