llvm-project/libc/cmake/modules
Joseph Huber 39e91098b5 [libc] Enable integration tests targeting the GPU
This patch enables integration tests running on the GPU. This uses the
RPC interface implemented in 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

Reviewed By: sivachandra, JonChesterfield

Differential Revision: https://reviews.llvm.org/D146256
2023-03-17 12:55:32 -05:00
..
cpu_features [libc][NFC] Move cpu_features.h to properties subfolder 2023-02-09 09:30:24 +00:00
LLVMLibCArchitectures.cmake [libc] Small improvements to libc cmake 2023-03-08 09:02:02 -03:00
LLVMLibCCheckCpuFeatures.cmake [libc] Do not attempt to determine CPU features in GPU mode 2023-03-15 20:44:12 -05:00
LLVMLibCCheckMPFR.cmake [libc] Don't try to use MPFR with the GPU build for now 2023-02-08 08:51:47 -06:00
LLVMLibCFlagRules.cmake [libc] Add float type and flag for nearest_integer to enable SSE4.2. 2022-07-22 09:29:41 -04:00
LLVMLibCHeaderRules.cmake [libc] Use a prebuilt libc-hdrgen binary if available. 2023-01-27 19:52:55 +00:00
LLVMLibCLibraryRules.cmake [libc] Make errno an entrypoint. 2023-03-03 06:59:19 +00:00
LLVMLibCObjectRules.cmake [libc] Remove leftover debug prints 2023-03-14 15:14:12 -05:00
LLVMLibCRules.cmake [libc] Add a target to install libc in the full build mode. 2022-08-17 22:49:02 +00:00
LLVMLibCTargetNameUtils.cmake [libc] Add fully-qualified target names. 2020-04-10 18:01:52 -07:00
LLVMLibCTestRules.cmake [libc] Enable integration tests targeting the GPU 2023-03-17 12:55:32 -05:00
prepare_libc_gpu_build.cmake [libc] Fix LIBC_GPU_ARCHITECTURES not being used 2023-02-21 13:00:16 -06:00