[Mlir-commits] [mlir] [MLIR][SCFToOpenMP] Add num-threads option (PR #74854)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Mon Dec 11 07:15:16 PST 2023


================
@@ -886,6 +886,11 @@ def ConvertSCFToOpenMPPass : Pass<"convert-scf-to-openmp", "ModuleOp"> {
   let summary = "Convert SCF parallel loop to OpenMP parallel + workshare "
                 "constructs.";
 
+  let options = [
+    Option<"numThreads", "num-threads", "unsigned",
+           /*default=*/"0", "Number of threads to use">
----------------
ftynse wrote:

It would make sense to define this as a named constant somewhere, e.g., `ParallelOp::kUseOpenMPDefaultNumThreads` to avoid any ambiguity.

https://github.com/llvm/llvm-project/pull/74854


More information about the Mlir-commits mailing list