[Mlir-commits] [mlir] [MLIR][SCFToOpenMP] Add num-threads option (PR #74854)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Mon Dec 11 07:15:15 PST 2023
================
@@ -1,9 +1,9 @@
-// RUN: mlir-opt -convert-scf-to-openmp %s | FileCheck %s
+// RUN: mlir-opt -convert-scf-to-openmp='num-threads=4' %s | FileCheck %s
// CHECK-LABEL: @parallel
func.func @parallel(%arg0: index, %arg1: index, %arg2: index,
%arg3: index, %arg4: index, %arg5: index) {
- // CHECK: omp.parallel {
+ // CHECK: omp.parallel num_threads(%[[NTH:.*]] : i32) {
----------------
ftynse wrote:
You can capture a substring and use it:
```mlir
// CHECK: %[[FOUR:.+]] = llvm.mlir.constant(4 : i32) : i32
// CHECK: omp.parallel num_threads(%[[FOUR]]
```
https://github.com/llvm/llvm-project/pull/74854
More information about the Mlir-commits
mailing list