[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.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.