This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NVPTX] Refined CMake logic to choose compute capabilites
ClosedPublic

Authored by tianshilei1992 on Jan 29 2021, 10:10 AM.

Details

Summary

This patch refines the logic to choose compute capabilites via the
environment variable LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES. It supports the
following values (all case insensitive):

  • "all": Build deviceRTLs for all supported compute capabilites;
  • "auto": Only build for the compute capability auto detected. Note that this requires CUDA. If CUDA is not found, a CMake fatal error will be raised.
  • "xx,yy" or "xx;yy": Build for compute capabilities xx and yy.

If LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES is not set, it is equivalent to set
it to all.

Diff Detail

Event Timeline

tianshilei1992 requested review of this revision.Jan 29 2021, 10:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 29 2021, 10:10 AM
jdoerfert added inline comments.Jan 30 2021, 8:31 AM
openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
103

Ye said before we probably don't want this so new capabilities can be compiled for in the future. I guess a warning is better.

tianshilei1992 marked an inline comment as done.Jan 30 2021, 10:24 AM
This revision is now accepted and ready to land.Jan 30 2021, 11:48 AM