-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[mlir][OpenMP] inscan reduction modifier and scan op mlir support #114737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
59ac266
1be9aa4
eb274aa
5c984a0
2adadc1
56c1105
807be08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,7 +178,7 @@ def ParallelOp : OpenMP_Op<"parallel", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -223,7 +223,7 @@ def TeamsOp : OpenMP_Op<"teams", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -282,7 +282,7 @@ def SectionsOp : OpenMP_Op<"sections", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -469,7 +469,7 @@ def LoopOp : OpenMP_Op<"loop", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -521,7 +521,7 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -575,7 +575,7 @@ def SimdOp : OpenMP_Op<"simd", traits = [ | |
|
|
||
| let assemblyFormat = clausesAssemblyFormat # [{ | ||
| custom<PrivateReductionRegion>($region, $private_vars, type($private_vars), | ||
| $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $private_syms, $reduction_mod, $reduction_vars, type($reduction_vars), $reduction_byref, | ||
| $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -782,7 +782,7 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [ | |
| custom<InReductionPrivateReductionRegion>( | ||
| $region, $in_reduction_vars, type($in_reduction_vars), | ||
| $in_reduction_byref, $in_reduction_syms, $private_vars, | ||
| type($private_vars), $private_syms, $reduction_vars, | ||
| type($private_vars), $private_syms, $reduction_mod, $reduction_vars, | ||
| type($reduction_vars), $reduction_byref, $reduction_syms) attr-dict | ||
| }]; | ||
|
|
||
|
|
@@ -1706,6 +1706,26 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [ | |
| let hasVerifier = 1; | ||
| } | ||
|
|
||
| def ScanOp : OpenMP_Op<"scan", [ | ||
|
||
| AttrSizedOperandSegments, MemoryEffects<[MemWrite]> | ||
| ], clauses = [ | ||
| OpenMP_InclusiveClause, OpenMP_ExclusiveClause]> { | ||
| let summary = "scan directive"; | ||
| let description = [{ | ||
| The scan directive allows to specify scan reductions. It should be | ||
| enclosed within a parent directive along with which a reduction clause | ||
| with `inscan` modifier must be specified. The scan directive allows to | ||
| split code blocks into input phase and scan phase in the region | ||
| enclosed by the parent. | ||
| }] # clausesDescription; | ||
|
|
||
| let builders = [ | ||
| OpBuilder<(ins CArg<"const ScanOperands &">:$clauses)> | ||
| ]; | ||
|
|
||
| let hasVerifier = 1; | ||
| } | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // 2.19.5.7 declare reduction Directive | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.