[libc-commits] [PATCH] D139839: [libc] Add a loader utility for AMDHSA architectures for testing

Johannes Doerfert via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Dec 13 17:46:30 PST 2022


jdoerfert added a comment.

Trying to rephrase (and shorten) what @sivachandra said in the last comment (https://reviews.llvm.org/D139839#3993369):
"As long as libc does not depend on outside code, we are fine."

So the "self contained" arguments raised here are not all the same.
My proposed approach will make libc testing "self contained" via 20 lines of code (+CMake).
It will work for all targets (=GPUs and more). 
The only downside is that you need to enable the OpenMP offloading runtime for your clang build (as you need to enable libc GPU support explicitly).
I listed sufficient downsides with this approach already but let's add two more:

- The fact that we are about to modify the AMDGPU kernel issue code due to the "code object v5" switch should be another indication that this approach is not the right one.
- How do you imagine to test these functions with multiple threads? Implement a mapping layer to translate "get_id", barrier, atomic, ... calls to intrinsics and such? I can already see yet another device runtime.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139839/new/

https://reviews.llvm.org/D139839



More information about the libc-commits mailing list