This patch adds omp.taskloop operation to OpenMP Dialect along with
tests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
681 | Any particular reason to make this I32 and grain_size, num_tasks I64? All are positive integer expressions as per the standard. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
681 | Yes, I made it the way it is accepted in the LLVM OpenMP Runtime functions. I don't mind switching them all to an IntLikeType if you'd like me to. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
681 | Please switch. |
Please double check all the descriptions, which are different from those for task construct.
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
594 | task construct? | |
600 | same as above? | |
605 | same as above? | |
610 | same as above? | |
640 | I don't think this is the right description for taskloop construct. | |
686 | The collpase clause is missed? |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
686 | This comment is not addressed. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
686 | Yes, about that - sorry for missing it. We already have an implementation of the collapse clause translation to LLVM IR for omp.wsloop and I don't think we are using the value of collapse attribute for the translation. It should be removed from the omp.wsloop too because the collapsed loops are already part of the wsloop operation as induction variables. |
LGTM
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
686 | Right. The value of collape clause is equal to the number of loops in the worksharing-loop nest. I checked with OpenMPToLLVMIRTranslation.cpp and it does not use the value of collape clause. When I reread worksharing-loop operation, I found several typos. I will fix them together with the collapse clause. |
task construct?