[libc-commits] [PATCH] D146681: [libc] Add a loader utility for NVPTX architectures for testing
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 22 18:09:55 PDT 2023
jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, tra, tianshilei1992, JonChesterfield, kevinsala, sivachandra, michaelrj, lntue.
Herald added subscribers: libc-commits, mikhail.ramalho, mattd, gchakrabarti, asavonic, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
This patch adds a loader utility targeting the CUDA driver API to launch
NVPTX images called `nvptx_loader`. This takes a GPU image on the
command line and launches the `_start` kernel with the appropriate
arguments. The `_start` kernel is provided by the already implemented
`nvptx/start.cpp`. So, an application with a `main` function can be
compiled and run as follows.
clang++ --target=nvptx64-nvidia-cuda main.cpp crt1.o -march=sm_70 -o image
./nvptx_loader image args to kernel
This implementation is not tested and does not yet support RPC. This
requires further development to work around NVIDIA specific limitations
in atomics and linking.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146681
Files:
libc/utils/gpu/loader/CMakeLists.txt
libc/utils/gpu/loader/nvptx/CMakeLists.txt
libc/utils/gpu/loader/nvptx/Loader.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146681.507571.patch
Type: text/x-patch
Size: 6748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230323/2a355806/attachment-0001.bin>
More information about the libc-commits
mailing list