The linker wrapper tool uses the 'nvlink' and 'ptxas' binaries to link
and assemble device files. Previously we searched for this using the
binaries in the user's path. This didn't work in cases where the user
passed in a specific Cuda path to Clang. This patch changes the linker
wrapper to accept an argument for the Cuda path we can get from Clang.
This should fix #53573.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for the fix
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
8151–8152 | [style] Avoid "Almost Always Auto" | |
8161–8162 | Since there is no break, would this potentially add multiple --cuda-path? | |
8185 | [nit] unrelated rename | |
8260–8263 | Is moving this relevant? | |
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp | ||
102–103 | [nit] unrelated whitespace change |
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
8161–8162 | Right now the tool chains are initialized based on triples. I don't think it's technically possible for the user to perform an action like -fopenmp-targets=nvptx64-nvidia-cuda,nvptx-nvidia-cuda. The flag is listed ZeroOrMore, so I'm not sure if it's worth explicitly preventing, we'll just take the most recently passed in one. | |
8185 | Avoids shadowing the new D I added. | |
8260–8263 | No, but I wanted to move it so I figured I might as well while I'm here, similar with the other unrelated changes. |
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
8163 | Would be better to keep aligned with clang to use --cuda-path. |
[style] Avoid "Almost Always Auto"