File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ mlirLinalgInferContractionDimensions(MlirOperation op) {
7777}
7878
7979MLIR_CAPI_EXPORTED MlirLinalgContractionDimensions
80- mlirLinalgInferContractionDimensionsFromMaps (MlirAffineMap const *indexingMaps,
80+ mlirLinalgInferContractionDimensionsFromMaps (const MlirAffineMap *indexingMaps,
8181 intptr_t numMaps) {
8282 MlirLinalgContractionDimensions result{};
8383 if (!indexingMaps || numMaps <= 0 )
@@ -94,18 +94,17 @@ mlirLinalgInferContractionDimensionsFromMaps(MlirAffineMap const *indexingMaps,
9494 if (failed (maybeDims))
9595 return result;
9696
97- const linalg::ContractionDimensions &contractionDims = *maybeDims;
9897 MLIRContext *ctx = maps[0 ].getContext ();
9998
10099 auto toAttr = [&ctx](const SmallVector<unsigned , 2 > &vals) -> MlirAttribute {
101100 return wrap (
102101 DenseI32ArrayAttr::get (ctx, llvm::to_vector_of<int32_t , 2 >(vals)));
103102 };
104103
105- result.batch = toAttr (contractionDims. batch );
106- result.m = toAttr (contractionDims. m );
107- result.n = toAttr (contractionDims. n );
108- result.k = toAttr (contractionDims. k );
104+ result.batch = toAttr (maybeDims-> batch );
105+ result.m = toAttr (maybeDims-> m );
106+ result.n = toAttr (maybeDims-> n );
107+ result.k = toAttr (maybeDims-> k );
109108
110109 return result;
111110}
You can’t perform that action at this time.
0 commit comments