Building CuPy on NVIDIA Drive AGX Xavier

9 views
Skip to first unread message

Gibin

unread,
Feb 5, 2023, 6:38:40 PM2/5/23
to CuPy User Group
Hi,
  
I am trying to install CuPy on NVIDIA Drive AGX Xavier deveopment kit. Since, wheels are not available for this architecture, I am building from source using the command CUDA_PATH="/usr/local/cuda-10.2" CFLAGS="-I/usr/local/cuda/include -I/home/nvidia/target/aarch64-linux/include " LDFLAGS="-L/usr/local/cuda/lib64 -L/usr/lib -L/home/nvidia/target/aarch64-linux/lib/stubs" pip3 install cupy --no-cache-dir -vvvv I had to manually copy the cross compiled cuda libraries from host to the target as some of them were not available on the machine. - Hence the additional LDFLAGS and CFLAGS. The compilation errors out as shown below. ` aarch64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/cuda/lib64 -L/usr/lib -L/home/nvidia/target/aarch64-linux/lib/stubs -I/usr/local/cuda/include -I/home/nvidia/target/aarch64-linux/include -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.6/cupy/_core/dlpack.o -L/usr/local/cuda-10.2/lib64 -o build/lib.linux-aarch64-3.6/cupy/_core/dlpack.cpython-36m-aarch64-linux-gnu.so -Wl,--disable-new-dtags,-rpath,/usr/local/cuda-10.2/lib64 error: Command "aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -I/usr/local/cuda/include -I/home/nvidia/target/aarch64-linux/include -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FORCE_INLINES=1 -DCUPY_CUB_VERSION_CODE=100800 -DCUPY_JITIFY_VERSION_CODE=60e9e72 -I/home/nvidia/sandbox/cupy/install/../cupy/_core/include/cupy/cub -I/home/nvidia/sandbox/cupy/install/../cupy/_core/include -I/usr/local/cuda-10.2/include -I/usr/include/python3.6m -c cupy_backends/cuda/libs/cusparse.cpp -o build/temp.linux-aarch64-3.6/cupy_backends/cuda/libs/cusparse.o" failed with exit status 1 ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/nvidia/sandbox/cupy/setup.py'"'"'; __file__='"'"'/home/nvidia/sandbox/cupy/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cnm1_wzj/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nvidia/.local/include/python3.6m/cupy Check the logs for full command output.`

 These are the last lines before erroring out. Has anyone managed to install CuPy on this machine? Is there a way to cross compile it on the host machine (amd64) before transferring the libraries to the target machine?    
Reply all
Reply to author
Forward
0 new messages