It looks like 11.1 doesn't have a version.txt file, so I changed the default guess in this case from CUDA 7.0 to 11.1.
Diff Detail
Unit Tests
Event Timeline
It looks like 11.1 doesn't have a version.txt file
Yikes, this is a problem if we can't tell the difference between CUDA versions!
It looks like a blunder from NVIDIA, CUDA 11.1 actually miss most of the documentation (pdf files etc).
Generally speaking the default should be conservative. It does us no good if we generate PTX 99.99, but discover that ptxas does not support it. Granted, these days 7.0 is also the wrong default as it's pretty ancient. IMO bumping it to 9.0 and GPU arch to sm_30 would be sensible.
Now, as for the missing version file, we should probably allow explicitly specifying the version. We already do it for HIP.
clang/lib/Driver/ToolChains/Cuda.cpp | ||
---|---|---|
662 | I do not think LLVM has this feature implemented. I'm not sure how it reacts to clang specifying non-existing feature. |
This patch is also missing corresponding LLVM changes that define features for sm_86 and ptx71.
See https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/NVPTX/NVPTX.td
clang/lib/Driver/ToolChains/Cuda.cpp | ||
---|---|---|
158–160 | This should not be needed any more. Clang now extracts CUDA version from cuda.h. |
This should not be needed any more. Clang now extracts CUDA version from cuda.h.