[all-commits] [llvm/llvm-project] 221b01: [LLVM] Make the GPU loader utilities an LLVM tool ...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Mar 20 12:18:06 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 221b0117fd21d45098ead779a040a4b939a5c84f
https://github.com/llvm/llvm-project/commit/221b0117fd21d45098ead779a040a4b939a5c84f
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-03-20 (Thu, 20 Mar 2025)
Changed paths:
M libc/CMakeLists.txt
R libc/utils/gpu/CMakeLists.txt
R libc/utils/gpu/loader/CMakeLists.txt
R libc/utils/gpu/loader/Loader.h
R libc/utils/gpu/loader/Main.cpp
R libc/utils/gpu/loader/amdgpu/CMakeLists.txt
R libc/utils/gpu/loader/amdgpu/amdhsa-loader.cpp
R libc/utils/gpu/loader/nvptx/CMakeLists.txt
R libc/utils/gpu/loader/nvptx/nvptx-loader.cpp
M llvm/CMakeLists.txt
M llvm/runtimes/CMakeLists.txt
A llvm/tools/llvm-gpu-loader/CMakeLists.txt
A llvm/tools/llvm-gpu-loader/amdhsa.cpp
A llvm/tools/llvm-gpu-loader/llvm-gpu-loader.cpp
A llvm/tools/llvm-gpu-loader/llvm-gpu-loader.h
A llvm/tools/llvm-gpu-loader/nvptx.cpp
Log Message:
-----------
[LLVM] Make the GPU loader utilities an LLVM tool (#132096)
Summary:
These tools `amdhsa-loader` and `nvptx-loader` are used to execute unit
tests directly on the GPU. We use this for `libc` and `libcxx` unit
tests as well as general GPU experimentation. It looks like this.
```console
> clang++ main.cpp --target=amdgcn-amd-amdhsa -mcpu=native -flto -lc ./lib/amdgcn-amd-amdhsa/crt1.o
> llvm-gpu-loader a.out
Hello World!
```
Currently these are a part of the `libc` project, but this creates
issues as `libc` itself depends on them to run tests. Right now we get
around this by force-including the `libc` project prior to running the
runtimes build so that this dependency can be built first. We should
instead just make this a simple LLVM tool so it's always available.
This has the effect of installing these by default now instead of just
when `libc` was enabled, but they should be relatively small. Right now
this only supports a 'static' configuration. That is, we locate the CUDA
and HSA dependencies at LLVM compile time. In the future we should be
able to provide this by default using `dlopen` and some API.
I don't know if it's required to reformat all of these names since they
used the `libc` naming convention so I just left it for now.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list