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

Ron Lieberman via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 26 06:47:07 PDT 2021


Author: Ron Lieberman
Date: 2021-10-26T13:46:42Z
New Revision: be03ef3ed1d18b8d5cf34816369dda94f474ccad

URL: https://github.com/llvm/llvm-project/commit/be03ef3ed1d18b8d5cf34816369dda94f474ccad
DIFF: https://github.com/llvm/llvm-project/commit/be03ef3ed1d18b8d5cf34816369dda94f474ccad.diff

LOG: [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

Added: 
    

Modified: 
    openmp/libomptarget/test/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg
index 850b492ac65a..f0e106c1d2e8 100644
--- a/openmp/libomptarget/test/lit.cfg
+++ b/openmp/libomptarget/test/lit.cfg
@@ -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']


        


More information about the Openmp-commits mailing list