Raise an error if you're using a CUDA installation that's too old for
the requested architectures. In practice, this means that you need a
CUDA 8 install to compile for sm_6*.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
32 ↗ | (On Diff #62301) | Is it supposed to be two dashes or one? |
include/clang/Driver/Options.td | ||
1722–1724 ↗ | (On Diff #62301) | IMO we should use double-dash for this option. -nocudalib/-nocudainc were mimicking existing -nostdlib/-nostdinc and thus ended with single dash in front. |
lib/Driver/ToolChains.cpp | ||
1704 ↗ | (On Diff #62301) | Might add an example of what's in that file, so it's easier to understand what the code below is doing. |
1793 ↗ | (On Diff #62301) | What if it's cuda-8, but we've failed to read the file due to permissions. |
4711 ↗ | (On Diff #62301) | -nocudainc should not preclude CUDA version check, IMO. |
Address review comments.
include/clang/Driver/Options.td | ||
---|---|---|
1722–1724 ↗ | (On Diff #62301) | I guess I have to do a double dash because --no-cuda-noopt-device-debug is thus spelled. Notice there's also a dash after "no". ...this is so screwed up. |
lib/Driver/ToolChains.cpp | ||
1793 ↗ | (On Diff #62301) | Urgh. I feel like simpler is probably better. Like, I would rather say:
Than the more complicated
Especially because as we make things more complicated, our next step will probably be to change the algorithm to something like:
I do agree that if someone hits a permission problem on version.txt, that would be very difficult for them to debug. I suppose we could raise a proper error if version.txt is present but not readable? I'm not sure it's worth doing that, though... |
4711 ↗ | (On Diff #62301) | We also do a check if you invoke ptxas. So the only circumstances under which we don't do a check is -nocudainc and no invocation of ptxas. In which case the only thing we're using from the CUDA install is fatbinary, which doesn't care about the sm version (afaik). We could add a version check on the fatbin invocation too if you want. My goal was just that if we don't use anything from the CUDA install, we should not check its version. |