Skip to content

Commit 093cac5

Browse files
authored
Remove unnecessary change in common code (#2064)
Signed-off-by: Tiotto, Ettore <[email protected]>
1 parent c5bbeb5 commit 093cac5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Dialect/Triton/IR/Ops.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ DotOp::inferReturnTypes(MLIRContext *context, std::optional<Location> location,
270270
auto retEnc = accTy.getEncoding();
271271
if (aEnc) {
272272
assert(bEnc);
273-
Dialect &dialect = retEnc.getDialect();
273+
Dialect &dialect = aEnc.getDialect();
274274
auto interface = dyn_cast<DialectInferLayoutInterface>(&dialect);
275275
if (interface->inferDotOpEncoding(aEnc, 0, retEnc, location).failed())
276276
return failure();
@@ -294,11 +294,7 @@ LogicalResult DotOp::verify() {
294294
// Verify that the encodings are valid.
295295
if (!aEncoding || !bEncoding)
296296
return emitError("mismatching encoding between A and B operands");
297-
298-
// type is the same as the accumulator
299-
auto accTy = cast<RankedTensorType>(getOperand(2).getType());
300-
auto retEnc = accTy.getEncoding();
301-
Dialect &dialect = retEnc.getDialect();
297+
Dialect &dialect = aEncoding.getDialect();
302298
auto interface = cast<DialectInferLayoutInterface>(&dialect);
303299
return interface->verifyDotOpEncodingCompatibility(getOperation(), aEncoding,
304300
bEncoding);

0 commit comments

Comments
 (0)