-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Libomptarget] Fix block and thread limit environment variables not b…
…eing respected The next-gen plugins did not properly set the values from `OMP_NUM_TEAMS` and `OMP_TEAMS_THREAD_LIMIT`. This is because these maximum values are set by each plugin to its hardware maximum. This happens *after* the previous initialization. Move it to the correct place and then add a test. Fixes #61082 Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D145105
- Loading branch information
Showing
2 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: %libomptarget-compile-generic | ||
// RUN: env OMP_NUM_TEAMS=1 OMP_TEAMS_THREAD_LIMIT=1 LIBOMPTARGET_INFO=16 \ | ||
// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic | ||
|
||
#define N 256 | ||
|
||
int main() { | ||
// CHECK: Launching kernel [[KERNEL:.+_main_.+]] with 1 blocks and 1 threads | ||
#pragma omp target teams | ||
#pragma omp parallel | ||
{} | ||
} |