This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Replace Nvidia arch lookup with 'nvptx-arch'
ClosedPublic

Authored by jhuber6 on Jan 17 2023, 7:00 AM.

Details

Summary

This method to look up the CUDA architecture is deprecated in newer
versions of CMake. We also have our own way to query this information
that we control now via the nvptx-arch program, which should always be
present in LLVM builds with clang going forward. This is currently only
used for testing so I think we should be okay with the dependency.

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 17 2023, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 7:00 AM
jhuber6 requested review of this revision.Jan 17 2023, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 7:00 AM
jhuber6 updated this revision to Diff 489811.Jan 17 2023, 7:04 AM

Fix conditional in case the program isn't found.

tianshilei1992 added inline comments.Jan 17 2023, 8:37 AM
openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
107

We also have to update this to FindCUDAToolkit.

openmp/libomptarget/test/lit.cfg
88

why this?

jhuber6 added inline comments.Jan 17 2023, 9:00 AM
openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
107

We can't do that until the LLVM CMake version is bumped up in the 17 branch.

jhuber6 added inline comments.Jan 17 2023, 9:02 AM
openmp/libomptarget/test/lit.cfg
88

The indentation was an accident. The slice is because the old version returned just 70 while the new one would output sm_70.

jhuber6 updated this revision to Diff 489855.Jan 17 2023, 9:11 AM

Fix incorrect indentation.

This revision is now accepted and ready to land.Jan 17 2023, 9:14 AM