-
Notifications
You must be signed in to change notification settings - Fork 187
_LIBCUDACXX_CUDACC_VER major value needs to be computed as the seventh digit #225
_LIBCUDACXX_CUDACC_VER major value needs to be computed as the seventh digit #225
Conversation
The introduction of an extra digit to handle minor CUDACC versions greater than 100 forgot to also increment the major value. Since this meant that all values of _LIBCUDACXX_CUDACC_VER stayed as 6 digits, but we compared against 7 digit values no CUDA versions reported decimal 128 support.
Yeesh, math is hard. I think this is the 4th time we've had to correct this :) Makes me feel like we should abandon trying to have a single representative number for the CUDA version. Is there an easier way to write <11.5 by just looking at the major/minor components?
|
That is a possibility. I don't know what libcudacxx back-compat policy is, but we might need to keep _LIBCUDACXX_CUDACC_VER as a 6 digit number and use your check |
Nobody should be using this value downstream. It's certainly not documented. It's purely an internal computation. Visually I'd prefer the above solution, but I noticed a change I made elsewhere that has a competing idea. from
|
The current usage of CUDACC_VER_MAJOR / CUDACC_VER_MINOR captures both clang and nvcc, while moving over to _LIBCUDACXX_COMPILER_NVCC would drop clang. Now that actually might be desired as I don't know if clang + cuda 11.5 is sufficient for decimal 128 support. |
Right, I would be wary of presuming it for other compilers. I'm happy to stick with the current solution. |
This brings the libcudacxx patch inline with the proposed upstream changes ( NVIDIA/libcudacxx#225 ). This is needed so that CUDA versions are correctly computed and decimal-128 support is enabled when using CUDA 11.5+ Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Conor Hoekstra (https://github.com/codereport) - Mark Harris (https://github.com/harrism) URL: #9579
The introduction of an extra digit to handle minor CUDACC versions greater than 100 forgot to also increment the major value. Since this meant that all values of _LIBCUDACXX_CUDACC_VER stayed as 6 digits, but we compared against 7 digit values no CUDA versions reported decimal 128 support.