File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
mlir/lib/Dialect/OpenACC/IR Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,13 @@ checkValidModifier(Op op, acc::DataClauseModifier validModifiers) {
492492
493493template <typename OpT, typename RecipeOpT>
494494static LogicalResult checkRecipe (OpT op, llvm::StringRef operandName) {
495+ // Mappable types do not need a recipe because it is possible to generate one
496+ // from its API. Reject reductions though because no API is available for them
497+ // at this time.
498+ if (mlir::acc::isMappableType (op.getVar ().getType ()) &&
499+ !std::is_same_v<OpT, acc::ReductionOp>)
500+ return success ();
501+
495502 mlir::SymbolRefAttr operandRecipe = op.getRecipeAttr ();
496503 if (!operandRecipe)
497504 return op->emitOpError () << " recipe expected for " << operandName;
You can’t perform that action at this time.
0 commit comments