Recently the nvptx-arch tool was added to address the lack of a
similar tool for detecting locally installed NVIDIA GPUs. This patch
adds similar functionality for the already existing amdgpu-arch tool
in libc. These will be used to run tests on the user's system in the
future. On a system with both GPUs installed we will just go with the
first GPU detected. In the future we may want to configure the tests to
run on both of them.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/cmake/modules/prepare_libc_gpu_build.cmake | ||
---|---|---|
53 | How can one pick between AMD or Nvidia GPUs? |
libc/cmake/modules/prepare_libc_gpu_build.cmake | ||
---|---|---|
53 | I wasn't sure if it warranted a special case right now. Since this is a contingency for a system with both an Nvidia and AMD GPU installed, which is uncommon but not unheard of. Right now I wasn't sure how much effort it would be to support testing multiple builds at the same time, so I figured it would be easier to just stick with one for now. I could maybe make an override flag. Maybe that would also be useful for ensuring the tests get built even without a GPU installed (as would be the case if someone build LLVM on a cluster's home node and then switched to a compute node). |
libc/cmake/modules/prepare_libc_gpu_build.cmake | ||
---|---|---|
53 |
You don't need to address this in this patch but I had this exact use case in mind. |
libc/cmake/modules/prepare_libc_gpu_build.cmake | ||
---|---|---|
53 | Yes, I think it would be best to focus on getting the tests up and running first. Right now my plans are
Once we have that we can probably start thinking about wrapping the existing unit tests into integration tests as well. Do you have any suggestions for how that support should look? I see there have been a few changes in libc since I last looked so I want to make sure I'm up-to-date. Basically the next patches would be like libc/startup/gpu/amdgpu/start.cpp libc/startup/gpu/nvptx/start.cpp Then libc/utils/gpu/Loader/openmp/Loader.cpp and finally libc/utils/gpu/RPC/Server.h |
How can one pick between AMD or Nvidia GPUs?