The support for enabling and disabling certain architectures for the
OpenMP device RTL is different between AMD and Nvidia. This patch
updates the logic to make it common. This supports the auto format
more generally via the nvptx-arch and amdgpu-arch options. (These
are not availible at CMake time without a runtimes build, or another
install somewhere. But that only prevents users from using auto).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
64 | you are dropping 89 and 90? |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
64 | Didn't notice those were missing, went off an old list. |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
74 | Did you mean they are always built by the clang target outside openmp project? | |
openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake | ||
121–122 | There are a few variables related to ARCH. Could you rename this to LIBOMPTARGET_NVPTX_ARCH_DETECTED_LIST. |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
74 | nvptx-arch and amdgpu-arch are clang tools. They are built unconditionally whenever you build clang, they will be available here during a runtimes build, or if the user has the binary somewhere else. This is only necessary for auto support, which I'm pretty sure already used this transitively after I made a previous change deprecating the use of findCUDA in favor of nvptx-arch. This logic only runs on auto which I feel is fair to require some additional handling to support. Or are you suggesting we make the default only supporting the user's architecture? | |
openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake | ||
121–122 | Sure |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
74 | What I described above is intended for inside the logic block "auto". I don't support having auto as the default. |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
74 | I think this is fine since there's no situation where the user would have one but not the other unless they manually deleted it. |
openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
---|---|---|
74 | Then what we have now is sufficient. Could you extend the error message saying current auto detection only support NV and AMD. |
you are dropping 89 and 90?