Compilation error in compiling Apex python library with CUDA
Aug 07, 20242 min read
Problem
CUDA Minor Version Mismatch
Latest PyTorch (v2.3.1) only supports CUDA 12.1. When installing PyTorch with embedded CUDA toolkit, if system CUDA version is not also 12.1, Apex compilation will throw a version mismatch error.
When compilation hits a seemingly random error, such as template error or undefined reference/identifier, it is likely an error caused by incompatible gcc version. Note that even if the gcc version complies with the maximum supported version corresponding to the CUDA Version (for CUDA 12.1, max supported GCC version is 12.2 ref).