[Mlir-commits] [mlir] Add support of param type for transform.structured.tile_using_forall (PR #72097)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 17 15:57:22 PST 2024
================
@@ -98,12 +98,34 @@ static DiagnosedSilenceableFailure unpackSingleIndexResultPayloadOperations(
result.push_back(ofr);
continue;
}
- auto payloadOps = state.getPayloadOps(ofr.get<Value>());
+
+ Value transformValue = ofr.get<Value>();
+ if (isa<ParamType>(transformValue.getType())) {
+ ArrayRef<Attribute> params = state.getParams(transformValue);
+ if (!isa<IntegerAttr>(params[0]))
+ return transformOp.emitDefiniteFailure() << "expected IntegerAttr";
+ result.push_back(params[0]);
+ continue;
+ }
+ if (isa<AnyParamType>(transformValue.getType())) {
+ ArrayRef<Attribute> params = state.getParams(transformValue);
+ if (!isa<ArrayAttr>(params[0]))
+ return transformOp.emitDefiniteFailure() << "expected ArrayAttr";
+ ArrayAttr paramsArray = cast<ArrayAttr>(params[0]);
+ for (Attribute param : paramsArray.getValue()) {
+ if (!isa<IntegerAttr>(param))
+ return transformOp.emitDefiniteFailure() << "expected IntegerAttr";
+ result.push_back(param);
----------------
jinchen62 wrote:
Please review, thanks!
https://github.com/llvm/llvm-project/pull/72097
More information about the Mlir-commits
mailing list