We have an Android app using CUDA. Previously, we could successfully run it on the Shield TV. At the moment, we can only successfully run it on the Shield K1 tablet.
When we try to run the app on the Shield TV, we get cudaErrorInsufficientDriver.
We’re using the CUDA for Android Toolkit 7.0.
When targeting the Shield TV, we compile our CUDA code for the Maxwell GPU, as per the Makefile below:
TARGET_ARCH := aarch64 # Customise the path below to point to the NDK directory from the CUDA for Android Codeworks package NDK_ROOT := /opt/NVPACK/android-ndk-r15c # Customise the path below to point to the CUDA for Android directory CUDA_TOOLKIT_ROOT := /opt/NVPACK/cuda-7.0 GCC_FLAGS = --std c++11 -g # Set up configuration based on target architecture ifeq ($(TARGET_ARCH),armv7l) # NVIDIA Shield K1 Tablet, NVidia Kepler GPU, TK1 / GK20A, compute capability 3.2 HOST_COMPILER ?= $(NDK_ROOT)/standalone-toolchain-32/bin/arm-linux-androideabi-g++ TARGET_SIZE := 32 SM_ARCH ?= 32 else ifeq ($(TARGET_ARCH),aarch64) # Android Shield TV TX1, NVidia Maxwell GPU, TX1, compute capability 5.3 HOST_COMPILER ?= $(NDK_ROOT)/standalone-toolchain-64/bin/aarch64-linux-android-g++ TARGET_SIZE := 64 SM_ARCH ?= 53 else $(error TARGET_ARCH must be set to either "armv7l" or "aarch64") endif NVCC := $(CUDA_TOOLKIT_ROOT)/bin/nvcc -ccbin $(HOST_COMPILER) $(GCC_FLAGS) -m$(TARGET_SIZE) -arch=sm_$(SM_ARCH)
We embed the libcudart_static.a library into the APK.
The Shield K1 tablet is running Android 7.0 and the Shield TV is running Android 8.0.
We have these questions please:
- Does cudaErrorInsufficientDriver mean we're using too old or too new CUDA toolkit version? The documentation is contradicting our situation. The documentation says "This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library.". But the Android version on the Shield TV is newer than the one on the Shield K1.
- What is the latest available version of CUDA toolkit for Android? The latest Codeworks for Android installer (1R7) doesn't include any version of CUDA for Android. We had to use the previous version of Codeworks for Android (1R6). This only has CUDA 6.5 and CUDA 7.0 for Android.
- What CUDA toolkit version should we use to target the Shield TV running Android 8.0?
- Is downgrading the Shield TV from Android 8.0 to an older version supported?