This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Make `-fopenmp-target=` use the `nvptx-arch` tool
ClosedPublic

Authored by jhuber6 on Jan 13 2023, 10:38 AM.

Details

Summary

Previously, if the user did not provide an architecture when using
-fopenmp-targets=nvptx64 we used the value from
CLANG_OPENMP_DEFAULT_NVPTX_ARCH which is defined at compile time. This
isn't ideal because it means that the default is set when the LLVM
compiler it built. Instead this patch uses the nvptx-arch tool to
query it at runtime. This matches the existing behaviour of the AMDGPU
toolchain with its amdgpu-arch tool.

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 13 2023, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 10:38 AM
jhuber6 requested review of this revision.Jan 13 2023, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 10:38 AM
This revision is now accepted and ready to land.Jan 13 2023, 2:43 PM