[Openmp-commits] [PATCH] D106236: [OpenMP][Offloading] Add a CMake argument LIBOMPTARGET_LIT_ARGS to control behavior of libomptarget lit test
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jul 18 06:32:39 PDT 2021
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, JonChesterfield.
Herald added subscribers: guansong, yaxunl, mgorny.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
By default, `lit` uses all threads to invoke tests, which can easily cause out
of memory on GPUs because most of OpenMP offloading test usually take about 1GB
GPU memory, but a typical GPU only has 4-8GB memory. This patch introduce a
CMake argument `LIBOMPTARGET_LIT_ARGS` to allow users to control the behavior of
`libomptarget` tests, similar to `LLVM_LIT_ARGS`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106236
Files:
openmp/libomptarget/test/CMakeLists.txt
Index: openmp/libomptarget/test/CMakeLists.txt
===================================================================
--- openmp/libomptarget/test/CMakeLists.txt
+++ openmp/libomptarget/test/CMakeLists.txt
@@ -15,7 +15,11 @@
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}")
foreach(CURRENT_TARGET IN LISTS SYSTEM_TARGETS)
string(STRIP "${CURRENT_TARGET}" CURRENT_TARGET)
- add_openmp_testsuite(check-libomptarget-${CURRENT_TARGET} "Running libomptarget tests" ${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET} DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS})
+ add_openmp_testsuite(check-libomptarget-${CURRENT_TARGET}
+ "Running libomptarget tests"
+ ${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET}
+ DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS}
+ ARGS ${LIBOMPTARGET_LIT_ARGS})
list(APPEND LIBOMPTARGET_LIT_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET})
# Configure the lit.site.cfg.in file
@@ -24,4 +28,9 @@
configure_file(lit.site.cfg.in ${CURRENT_TARGET}/lit.site.cfg @ONLY)
endforeach()
-add_openmp_testsuite(check-libomptarget "Running libomptarget tests" ${LIBOMPTARGET_LIT_TESTSUITES} EXCLUDE_FROM_CHECK_ALL DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS})
\ No newline at end of file
+add_openmp_testsuite(check-libomptarget
+ "Running libomptarget tests"
+ ${LIBOMPTARGET_LIT_TESTSUITES}
+ EXCLUDE_FROM_CHECK_ALL
+ DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS}
+ ARGS ${LIBOMPTARGET_LIT_ARGS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106236.359620.patch
Type: text/x-patch
Size: 1513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210718/f898efa0/attachment.bin>
More information about the Openmp-commits
mailing list