[openmp][lit] Add support to OpenMP lit.cfg for ROCR_VISIBLE_DEVICES env-var

add support for ROCR_VISIBLE_DEVICES similar to name and purpose
as CUDA_VISIBLE_DEVICES

Differential Revision: https://reviews.llvm.org/D112503
This commit is contained in:
Ron Lieberman 2021-10-26 01:53:15 +00:00
parent 04f30795f1
commit be03ef3ed1
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ if 'PYLINT_IMPORT' in os.environ:
if 'CUDA_VISIBLE_DEVICES' in os.environ:
config.environment['CUDA_VISIBLE_DEVICES'] = os.environ['CUDA_VISIBLE_DEVICES']
# Use the ROCR device as suggested by the env
if 'ROCR_VISIBLE_DEVICES' in os.environ:
config.environment['ROCR_VISIBLE_DEVICES'] = os.environ['ROCR_VISIBLE_DEVICES']
# Allow running the tests with omptarget debug output
if 'LIBOMPTARGET_DEBUG' in os.environ:
config.environment['LIBOMPTARGET_DEBUG'] = os.environ['LIBOMPTARGET_DEBUG']