[Openmp-commits] [PATCH] D137749: [openmp] [test] Unbreak tests that rely on hidden_helper_task on Windows

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 16 15:03:37 PST 2022


mstorsjo updated this revision to Diff 475930.
mstorsjo added a comment.

Updated according to suggestions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137749

Files:
  openmp/runtime/test/lit.cfg
  openmp/runtime/test/tasking/hidden_helper_task/affinity.cpp
  openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
  openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c


Index: openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c
===================================================================
--- openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c
+++ openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile-and-run
+// RUN: %libomp-compile && env LIBOMP_USE_HIDDEN_HELPER_TASK=0 LIBOMP_NUM_HIDDEN_HELPER_THREADS=0 %libomp-run
 /*
   Test for the 'schedule(simd:guided)' clause.
   Compiler needs to generate a dynamic dispatching and pass the schedule
@@ -50,7 +50,7 @@
 static id loc = {0, 2, 0, 0, ";file;func;0;0;;"};
 // This variable is defined in OpenMP RTL but we can't have it exposed so we
 // need to redefine it here.
-static int __kmp_hidden_helper_threads_num = 8;
+static int __kmp_hidden_helper_threads_num = 0;
 
 // ---------------------------------------------------------------------------
 int run_loop_64(i64 loop_lb, i64 loop_ub, i64 loop_st, int loop_chunk) {
Index: openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
===================================================================
--- openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
+++ openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
@@ -1,5 +1,6 @@
 // RUN: %libomp-cxx-compile-and-run
 // RUN: %libomp-cxx-compile && env OMP_NUM_THREADS=1 %libomp-run
+// REQUIRES: hidden-helper
 
 /*
  * This test aims to check whether hidden helper thread has right gtid. We also
Index: openmp/runtime/test/tasking/hidden_helper_task/affinity.cpp
===================================================================
--- openmp/runtime/test/tasking/hidden_helper_task/affinity.cpp
+++ openmp/runtime/test/tasking/hidden_helper_task/affinity.cpp
@@ -1,3 +1,4 @@
+// REQUIRES: hidden-helper
 // RUN: %libomp-cxx-compile
 // RUN: env LIBOMP_USE_HIDDEN_HELPER_TASK=1 LIBOMP_NUM_HIDDEN_HELPER_THREADS=8 \
 // RUN:     KMP_HIDDEN_HELPER_AFFINITY=verbose,granularity=socket,compact %libomp-run 2>&1 | FileCheck --check-prefix=SOCKET %s
Index: openmp/runtime/test/lit.cfg
===================================================================
--- openmp/runtime/test/lit.cfg
+++ openmp/runtime/test/lit.cfg
@@ -108,6 +108,9 @@
 if config.operating_system in ['Linux', 'Windows']:
     config.available_features.add('affinity')
 
+if config.operating_system in ['Linux']:
+    config.available_features.add('hidden-helper')
+
 import multiprocessing
 try:
     if multiprocessing.cpu_count() > 1:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137749.475930.patch
Type: text/x-patch
Size: 2462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221116/2a37c711/attachment.bin>


More information about the Openmp-commits mailing list