This is an archive of the discontinued LLVM Phabricator instance.

[libc] Enable integration tests targeting NVIDIA GPUs
ClosedPublic

Authored by jhuber6 on Mar 24 2023, 7:02 PM.

Details

Summary

This patch adds the necessary build infrastructure to build and run the
integration tests on NVIDIA GPUs. The NVIDIA nvlink linker utility is
what is ultimately used to combine these files into a single executable
image. Unfortunately, their tool does not support static libraries. So
we need to link with every object directly instead. This could be solved
by impelementing a "wrapper" utility around nvlink like we used to use
for OpenMP. But for now this should be sufficient.

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 24 2023, 7:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 24 2023, 7:02 PM
jhuber6 requested review of this revision.Mar 24 2023, 7:02 PM
sivachandra added inline comments.Mar 24 2023, 8:25 PM
libc/cmake/modules/LLVMLibCTestRules.cmake
517

What will the add_library listing on line 472 do in that case?

jhuber6 added inline comments.Mar 25 2023, 5:10 AM
libc/cmake/modules/LLVMLibCTestRules.cmake
517

It'll create the library, the linker just can't use it. I wasn't sure if it was worth putting an if around.

jhuber6 updated this revision to Diff 508306.Mar 25 2023, 7:01 AM

The generator expressions should only be used for NVPTX.

sivachandra accepted this revision.Mar 26 2023, 9:53 PM
This revision is now accepted and ready to land.Mar 26 2023, 9:53 PM
This revision was automatically updated to reflect the committed changes.