This is an archive of the discontinued LLVM Phabricator instance.

[libc] Fix using the `libcgpu.a` for NVPTX in non-LTO builds
ClosedPublic

Authored by jhuber6 on Jul 10 2023, 9:52 AM.

Details

Summary

CUDA requires a PTX feature to be compiled generally, because the
libcgpu.a archive contains LLVM-IR we need to have one present to
compile it. Currently, the wrapper fatbinary format we use to
incorporate these into single-source offloading languages has a special
option to provide this. Since this was not present in the builds, if the
user did not specify it via -foffload-lto it would not compile from
CUDA or OpenMP due to the missing PTX features. Fix this by passing it
to the packager invocation.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 10 2023, 9:52 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 10 2023, 9:52 AM
jhuber6 requested review of this revision.Jul 10 2023, 9:52 AM
jdoerfert accepted this revision.Jul 10 2023, 10:41 AM
This revision is now accepted and ready to land.Jul 10 2023, 10:41 AM