Previously, the test ran a section with
#pragma omp target thread_limit(4)
and expected it to execute exactly 4 times, even though it would
in practice execute min(cores, 4) times.
Increment a counter and check that it executed 1-4 times.
Differential D159311
[OpenMP] [test] Fix target_thread_limit.cpp to not assume 4 or more cores mstorsjo on Aug 31 2023, 2:39 PM. Authored by
Details Previously, the test ran a section with #pragma omp target thread_limit(4) and expected it to execute exactly 4 times, even though it would Increment a counter and check that it executed 1-4 times.
Diff Detail
Event TimelineComment Actions This does not impact the test in the way you describe. set_num_threads, and thread_limit, are both upper bounds only. We can still pick 1 thread and it is conformant. Comment Actions Check the number of runs with a counter and FileCheck pattern, instead of expecting a certain number of printout lines.
|
Fix the data race on count++