File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff 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 (),
You can’t perform that action at this time.
0 commit comments