Skip to content

Commit e7536da

Browse files
committed
Error on invalid mlir config to fix test
1 parent bc8a391 commit e7536da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/Dialect/TTL/IR/TTLOps.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ mlir::LogicalResult mlir::tt::ttl::CopyOp::verify() {
190190
<< rankedTensorTy;
191191
}
192192

193+
// Non-pipe transfers require direction-typed handles so lowering can select
194+
// the appropriate barrier (read vs write).
195+
auto handleType = mlir::cast<TransferHandleType>(getXf().getType());
196+
if (!handleType.getKind()) {
197+
return emitOpError() << "expects transfer handle to be direction-typed "
198+
"(!ttl.transfer_handle<read> or "
199+
"!ttl.transfer_handle<write>)";
200+
}
201+
193202
// MVP: every transfer must be synchronized explicitly. Requiring a `ttl.wait`
194203
// use ensures we do not silently drop transfers.
195204
if (failed(mlir::tt::ttl::verify::isEventuallyWaitedOn(getOperation(),

0 commit comments

Comments
 (0)