[Mlir-commits] [mlir] [MLIR][OpenMP] Skip host omp ops when compiling for the target device (PR #85239)

Jan Leyonberg llvmlistbot at llvm.org
Fri Mar 22 06:52:56 PDT 2024


================
@@ -3043,116 +3199,15 @@ LogicalResult OpenMPDialectLLVMIRTranslationInterface::convertOperation(
     LLVM::ModuleTranslation &moduleTranslation) const {
 
   llvm::OpenMPIRBuilder *ompBuilder = moduleTranslation.getOpenMPBuilder();
+  if (ompBuilder->Config.isTargetDevice()) {
+    if (isInternalTargetDeviceOp(op)) {
+      return convertInternalTargetOp(op, builder, moduleTranslation);
----------------
jsjodin wrote:

We can, but we'd have to re-introduce this kind of logic in a subsequent patch anyway, since we're going to have specialized lowering on the target side (distribute parallel wsloop reductions) that does not apply to the host codegen. I was thinking it might be better to put in the more permanent code structure right away, but if you have strong opinions about it we can change it.

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


More information about the Mlir-commits mailing list