[Mlir-commits] [mlir] [MLIR][OpenMP] Add omp.simd operation (PR #79843)

Dominik Adamski llvmlistbot at llvm.org
Fri Feb 2 01:53:52 PST 2024


DominikAdamski wrote:

@skatrak Thanks for great work with summarizing the OpenMP constructs.

Let me express my thoughts:
1) Lowering of composite operations will be harder because we will need to combine some lowering steps into one operation (for example: `omp.distparwsloop` will require to generate two runtime calls for the device call (one for enabling parallel execution -> kmpc_parallel_51 and one for workshare loop ). Wrapper operations are aligned with current code generation schemes. 
2) Some composite operations can denote the same. For example `omp.wssimdloop` and `omp.wsloop` are exactly the same if `simd length = 1`. Having said that, the MLIR optimization opportunities can be lower for composite operations.
3) Maybe we have to split OpenMP dialect in to two sub-dialects. The high level dialect will contain composite operations. The lower one will reflect LLVM IR code structure. The MLIR lowering pass can simplify OpenMPIRBuilder logic.
4) I don't know how reductions will play with composite operations.
 

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


More information about the Mlir-commits mailing list