summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/target_parallel_num_threads_strict_codegen.cpp
AgeCommit message (Collapse)Author
2025-09-26[OpenMP][clang] Set num_threads 'strict' to unsupported on GPUs (#160659)Robert Imschweiler
Setting the prescriptiveness of the num_threads clause to 'strict' and having a corresponding check (with message and severity clauses) does not align well with how OpenMP should be handled for GPUs. The num_threads expression may be an arbitrary integer expression which is evaluated on the target, in correspondance to the OpenMP spec. This prevents the check from being done before launching the kernel, especially considering that the num_threads clause is associated with the parallel directive and that there may be multiple parallel directives with different num_threads clauses in a single target region. Acting on the result of the 'strict' check on the GPU would require doing I/O on the GPU, which can introduce performance regressions. Delaying any actions resulting from the 'strict' check and doing them on the host after executing the target region involves additional data copies and is not really semantically correct. For now, the 'strict' modifier for the num_threads clause and its associated message and severity clause are set to be unsupported on GPUs. Targets other than GPUs still support the aforementioned features in the context of an OpenMP target region.
2025-09-11[offload][OpenMP] Remove device code for num_threads strict (#157893)Robert Imschweiler
Due to potential performance issues, this commit temporarily removes support for the num_threads 'strict' modifier and its corresponding message and severity clauses on the device.
2025-08-28Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (#155839)Robert Imschweiler
OpenMP 6.0 12.1.2 specifies the behavior of the strict modifier for the num_threads clause on parallel directives, along with the message and severity clauses. This commit implements necessary codegen changes.
2025-08-28Revert "[OpenMP][clang] 6.0: num_threads strict (part 3: codegen)" (#155809)Robert Imschweiler
Reverts llvm/llvm-project#146405
2025-08-28[OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (#146405)Robert Imschweiler
OpenMP 6.0 12.1.2 specifies the behavior of the strict modifier for the num_threads clause on parallel directives, along with the message and severity clauses. This commit implements necessary codegen changes.