[libc-commits] [PATCH] D146256: [libc] Enable integration tests targeting the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Mar 16 13:19:38 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, michaelrj, lntue, JonChesterfield, jdoerfert, tianshilei1992, tra.
Herald added subscribers: libc-commits, mikhail.ramalho, kosarev, ecnelises, kerbowa, tschuett, tpr, jvesely.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

This patch enables integration tests running on the GPU. This uses the
RPC interface implemented in D145913 <https://reviews.llvm.org/D145913> to compile the necessary
dependencies for the integration test object. We can then use this to
compile the objects for the GPU directly and execute them using the AMD
HSA loader combined with its RPC server. For example, the compiler is
performing the following actions to execute the integration tests.

  $ clang++ --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -nostdlib -flto -ffreestanding \
      crt1.o io.o quick_exit.o test.o rpc_client.o args_test.o -o image
  $ ./amdhsa_loader image 1 2 5
  args_test.cpp:24: Expected 'my_streq(argv[3], "3")' to be true, but is false

This currently only works with a single threaded client implementation
running on AMDGPU. Further work will implement multiple clients for AMD
and the ability to run on NVPTX as well.

Depends on D145913 <https://reviews.llvm.org/D145913>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146256

Files:
  libc/CMakeLists.txt
  libc/cmake/modules/LLVMLibCTestRules.cmake
  libc/startup/gpu/amdgpu/CMakeLists.txt
  libc/test/CMakeLists.txt
  libc/test/IntegrationTest/CMakeLists.txt
  libc/test/integration/startup/gpu/CMakeLists.txt
  libc/test/integration/startup/gpu/args_test.cpp
  libc/utils/gpu/loader/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146256.505912.patch
Type: text/x-patch
Size: 8620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230316/08b52385/attachment.bin>


More information about the libc-commits mailing list