Add a custom parser and printer for omp.target operation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is useful support. Looks good - a comment below.
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
1013 | Use AttrSizedOperandSegments::getOperandSegmentSizeAttr(). |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
411 | Update doc above: I think there isn't a need to define these other than mentioning that they have the same meaning as in the OpenMP standard? |
Thanks @bondhugula! I've switched to AttrSizedOperandSegments::getOperandSegmentSizeAttr() instead of referencing the attribute by name and updated docs to reflect that new arguments have the same meaning as in OpenMP standard.
@bondhugula can you please submit this patch on my behalf? I don't have merge rights to LLVM. Please, use these credentials: Alexander Batashev <alexander.batashev@intel.com>
FWIW, I couldn't see changes from my first changeset in this differential, so I squashed both commits into one and uploaded them again.
It'll be good if someone closely working on the omp dialect also reviews this. I've added a few of them.
Thanks for this patch. In general, we are a bit reluctant to add the privatisation clauses to more operations since the discussion for handling privatisation (https://llvm.discourse.group/t/rfc-privatisation-in-openmp-dialect/3526) in the MLIR dialect has not concluded. Flang which uses the OpenMP dialect deals with privatisation when it lowers to MLIR. We should be back to discussing privatisation soon.
We can take the other changes.
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
855 | Nit: num_threads -> thread_limit. |
@kiranchandramohan thanks for letting me know and pointing to that interesting discussion!
@kiranchandramohan can you please submit this patch on my behalf? I don't have merge rights to LLVM. Please, use these credentials: Alexander Batashev <alexander.batashev@intel.com>
I have submitted the patch for you @alexbatashev. It seems that you have a few patches submitted to llvm, I think you can ask for commit access so that you can merge patches yourself.
You can find the details for obtaining commit access from the following link.
https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
Update doc above: I think there isn't a need to define these other than mentioning that they have the same meaning as in the OpenMP standard?