Add support for the * operation in OpenACC lowering. Support is added
for the types currently supported.
Depends on D151564
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D151565
Add initial support to lower reduction clause to its representation in MLIR.
This patch adds support for addition of integer and real scalar types. Other
operators and types will be added with follow up patches.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D151564
Now that operands have moved to the new data operands lowering, this
function is not used anymore.
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D151357
Simply make the creation of acc.private.recipe accesible through an API.
This will be useful when we will implement passes like the implicit
privatization.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D151230
Update acc.loop private operands list to use the new design
introduced in D150622.
Depends on D150975
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150984
This patch adds the initial infrastructure to lower the private clause to the
new design introduced in D150622. The init region is not implemented yet
and currently only yield the input argument (semantic is then similar with the previous
design currently). Implementation will come in a follow up patch to keep patch.
This patch also re-enable test commented out for `acc serial`, `acc serial loop`,
`acc parallel` and `acc parallel loop` with private clause.
Depends on D150972, D150973
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D150975
Remove old clause operands from acc.kernels operation since
the new dataOperands is now in place.
private and firstprivate will receive some redesign but are
not part of the new dataOperands.
Depends on D150224
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D150225
Remove old clause operands from acc.serial operation since
the new dataOperands is now in place.
private and firstprivate will receive some redesign but are
not part of the new dataOperands.
Depends on D150207
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D150224
The order of operand in clauses that are decomposed was not
preserved. This patch change how operands are handled and preserve
the user ordering for the entry data operation on the acc.parallel
operation.
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D150214
The order of operand in clauses that are decomposed was not
preserved. This patch change how operands are handled and preserve
the user ordering for the entry data operation on the acc.data
operation.
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D150213
Remove old clause operands from acc.parallel operation since
the new dataOperands is now in place.
private, firstprivate and reductions will receive some redesign but are
not part of the new dataOperands.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150207
The lowerbound was not correctly normalized to 0 when the bound
are generated for an array without subscripts.
```
integer :: a(11:20)
!$acc enter data create(a)
```
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150208
Since the new data operand operations have been added in D148389 and
adopted on acc.data in D149673, the old clause operands are no longer
needed.
The LegalizeDataOpForLLVMTranslation will become obsolete when all
operations will be cleaned. For the time being only the appropriate
part are being removed.
processOperands will also receive some updates once all the operands
will be coming from an acc data operand operation.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150155
The lowerbound was not correctly normalized to 0 when the bound
are generated for an array without subscripts.
```
integer :: a(11:20)
!$acc enter data create(a)
```
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150208
Since the new data operand operations have been added in D148389 and
adopted on acc.exit_data in D149601, the old clause operands are no longer
needed.
The LegalizeDataOpForLLVMTranslation will become obsolete when all
operations will be cleaned. For the time being only the appropriate
part are being removed.
processOperands will also receive some updates once all the operands
will be coming from an acc data operand operation.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D150145
Self clause is the same same as the host clause. Lower it
in a simmilar way.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150174
Since the new data operand operations have been added in D148389 and
adopted on acc.enter_data in D148721, the old clause operands are no longer
needed.
The LegalizeDataOpForLLVMTranslation will become obsolete when all
operations will be cleaned. For the time being only the appropriate
part are being removed.
processOperands will also receive some updates once all the operands
will be coming from an acc data operand operation.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D150132
The `if_present` clause is modeled as an attribute on the
acc.update operation. The lowering was not adding correctly the attribute
when the clause was present. This patch update the lowering to add
the attribute when needed.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D150171
Since the new data operand operations have been added in D148389 and
adopted on acc.update in D149909, the old clause operands are no longer
needed. This is a first patch to start cleaning the OpenACC operations
with data clause operands.
The `LegalizeDataOpForLLVMTranslation` will become obsolete when all
operations will be cleaned. For the time being only the appropriate
part are being removed.
`processOperands` will also receive some updates once all the operands
will be coming from an acc data operand operation.
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D150053
Update OpenACC update construct lowering to create
the data operand operations for host and device clauses.
Depends on D149909
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D149910
Introduce acc.update_host and acc.update_device as data
operands operation to be used by the acc.update op.
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D149909
This patch lowers the data clause on the OpenACC compute construct
to their corresponding acc data operand operation.
The decomposition is the same as in D149673.
Note that `private` and `firstprivate` are not lowered to data operand operation as they do not have one and will likely have dedicated design/process.
Depends on D149673
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D149785
This patch lowers the data clause on the OpenACC data construct
to their corresponding acc data operand operation.
The copy clause is decomposed into acc.copyin before and acc.copyout after
the acc.data operation.
The copyout close is decomposed into acc.create before and acc.copyout after
the acc.data operation.
The attach clause is decomposed into acc.attach before and acc.detach after
the acc.data operation.
Depends on D149601
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D149673
Add support to lower data exit operations and use it for the
copyout, detach and delete clause on the `!$acc exit data` construct.
This patch refactor the data entry op creation so most part of the code
can be shared with the data exit op.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D149601
Reduction clause on loop or compute constructs
is not currently lowered but no TODO message was issued.
Add a proper TODO so the user is informed.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D149789
Since we have all the information while lowering, always
add the lowerbound, upperbound and stride information for acc.bounds
create from the Flang frontend.
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D149704
Add lowering support for derived type component appearing
in a data clause to the newly added data operand operations.
Depends on D149297
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D149385
Remove copyinOperands, createOperands, createZeroOperands, attachOperands
SmallVectors as they are not used anymore.
The op itself cannot be cleanup yet because
`mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp`
still depends on it. The final clean up on the op will be down once
the translation uses the new data operand operations.
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D149467
Add support to generate the acc.bound operation when the array is passed without
any subscripts. Without this patch, no bound is generated.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D149297
Add lowering support for allocatable and pointer array sections
to acc.bounds and acc data operations.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D149189
Add lowering for assumed size array in data clause to the newly
added data operand operations.
Depends on D148840
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148969
Update the lowering to match the intent of the newly added operation
as described here D148860.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148932
Add support for array section with constant lower or upper bound.
The current lowering will trigger a TODO when the array is assumed size
or if the lower or upper bound is a variable.
Depends on D148721
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D148748
This is an initial patch that lowers acc.enter_data copyin/create/attach
clauses to the newly added data operand operations. Follow up patches will
add support for array section and derived type and derived type component
as well as support in other data operation.
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148721
As outlined in [1], data clauses are now implemented as separate operations
from the constructs that they belong to. Some of the highlighted benefits:
- Correctly represent dataflow of data operations
- Easier to track debugging information
- Friendlier to add attributes and to optimize operations
For now, all of the other operand lists are being kept until all references
to them in LLVM can be removed (such as those in flang lowering)
[1] https://discourse.llvm.org/t/rfc-openacc-dialect-data-operation-improvements/69825
Reviewed By: clementval, vzakhari
Differential Revision: https://reviews.llvm.org/D148389
Use the assembly format with custom parser/printer
for specific clauses instead of a full custom parser/printer.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D148391
Use the assembly format with custom parser/printer
for specific clauses instead of a full custom parser/printer.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D148391
Lower the parse tree to acc dialects operations. Make use
of the compute construct lowering.
Depends on D148277
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D148278
Lower the parse tree to acc dialects operations. Make use
of the parallel construct lowering and make it suitable
for all compute constructs lowering.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D148273
Trigger the not yet implemented message for
block constructs that are not lowered.
Reviewed By: PeteSteinfeld, razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148253
Remove the custoom parser and printer for the acc.parallel
operation and use the assembly format directly.
Reviewed By: PeteSteinfeld, razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148183
This flips all of the remaining dialects to prefixed except for linalg, which
will be done in a followup.
Differential Revision: https://reviews.llvm.org/D134995
This allows for incrementally updating the old API usages without
needing to update everything at once. These will be left on Both
for a little bit and then flipped to prefixed when all APIs have been
updated.
Differential Revision: https://reviews.llvm.org/D134386
This patch lowers correctly operands with array section
and derived-type component.
Depends on D131764
Reviewed By: razvanlupusoru
Differential Revision: https://reviews.llvm.org/D131765