Closed artbataev closed 1 year ago
CUDA 12.x build is broken in Docker (when compiling without GPU / for all architectures).
Dockerfile:
Dockerfile
# nvidia-pytorch official docker image ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:23.04-py3 FROM ${BASE_IMAGE} RUN K2_MAKE_ARGS="-j" pip install -v "git+https://github.com/k2-fsa/k2#egg=k2" || { echo "k2 installation failed"; exit 1; }
Execute:
docker build --tag pytorch_k2_cuda12 .
Error:
... #6 70.68 [ 8%] Building CXX object _deps/kaldifeat-build/kaldifeat/csrc/CMakeFiles/kaldifeat_core.dir/online-feature.cc.o #6 70.69 nvcc fatal : Unsupported gpu architecture 'compute_35' #6 70.69 make[2]: *** [k2/csrc/CMakeFiles/k2_log.dir/build.make:76: k2/csrc/CMakeFiles/k2_log.dir/log.cu.o] Error 1 #6 70.69 make[1]: *** [CMakeFiles/Makefile2:364: k2/csrc/CMakeFiles/k2_log.dir/all] Error 2 ...
Remove 35 from K2_COMPUTE_ARCH_CANDIDATES for CUDA 12.x
35
K2_COMPUTE_ARCH_CANDIDATES
Closing via #1200
CUDA 12.x build is broken in Docker (when compiling without GPU / for all architectures).
How to reproduce
Dockerfile
:Execute:
Error:
Potential solution
Remove
35
fromK2_COMPUTE_ARCH_CANDIDATES
for CUDA 12.x