Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
josel-amd committed Aug 21, 2024
1 parent 81503ea commit e995188
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Dialect/XTenNN/IR/XTenNNOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,5 +579,9 @@ LogicalResult TopK::inferReturnTypeComponents(
bool TopK::isCompatibleReturnTypes(mlir::TypeRange l, mlir::TypeRange r) {
if (l.size() != r.size() || l.size() != 2)
return false;
return succeeded(verifyCompatibleShapes(l, r));

auto sameElementType =
getElementTypeOrSelf(l[0]) == getElementTypeOrSelf(r[0]) &&
getElementTypeOrSelf(l[1]) == getElementTypeOrSelf(r[1]);
return sameElementType && succeeded(verifyCompatibleShapes(l, r));
}

0 comments on commit e995188

Please sign in to comment.