[libc-commits] [PATCH] D153157: [libc] Add an option to use a job pool for GPU tests

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 16 12:06:36 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG27f326334f35: [libc] Add an option to use a job pool for GPU tests (authored by jhuber6).

Changed prior to commit:
  https://reviews.llvm.org/D153157?vs=532222&id=532258#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153157/new/

https://reviews.llvm.org/D153157

Files:
  libc/cmake/modules/LLVMLibCTestRules.cmake
  libc/cmake/modules/prepare_libc_gpu_build.cmake


Index: libc/cmake/modules/prepare_libc_gpu_build.cmake
===================================================================
--- libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -71,6 +71,16 @@
                       "build")
 endif()
 
+# Optionally set up a job pool to limit the number of GPU tests run in parallel.
+# This is sometimes necessary as running too many tests in parallel can cause
+# the GPU or driver to run out of resources.
+set(LIBC_GPU_TEST_JOBS "" CACHE STRING "Number of jobs to run in parallel for "
+                                       "GPU tests")
+if(LIBC_GPU_TEST_JOBS)
+  set_property(GLOBAL PROPERTY JOB_POOLS LIBC_GPU_TEST_POOL=${LIBC_GPU_TEST_JOBS})
+  set(LIBC_HERMETIC_TEST_JOB_POOL JOB_POOL LIBC_GPU_TEST_POOL)
+endif()
+
 set(LIBC_GPU_TEST_ARCHITECTURE "" CACHE STRING "Architecture for the GPU tests")
 
 set(gpu_test_architecture "")
Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -725,6 +725,7 @@
     COMMAND ${test_cmd}
     COMMAND_EXPAND_LISTS
     COMMENT "Running hermetic test ${fq_target_name}"
+    ${LIBC_HERMETIC_TEST_JOB_POOL}
   )
 
   add_dependencies(${HERMETIC_TEST_SUITE} ${fq_target_name})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153157.532258.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230616/ee7e7232/attachment.bin>


More information about the libc-commits mailing list