Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions shardy/dialect/sdy/ir/test/edge_sharding_verification.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,15 @@ module {
return %0 : tensor<8x8xf32>
}
}

// -----

module {
sdy.mesh @mesh = <["dfe"=4]>
func.func @sdy_propagation_edges_works_for_dfe(%arg0: tensor<32x96xf32>, %arg1: tensor<?x?xf32>) -> (tensor<32x96xf32>, tensor<?x?xf32>) {
%0:2 = stablehlo.optimization_barrier %arg0, %arg1 : tensor<32x96xf32>, tensor<?x?xf32>
// expected-error @+1 {{should have a propagation edges attribute of type PropagationEdgesAttr for attr named 'sdy.propagation_edges'}}
%1 = sdy.data_flow_edge %0#0 {sdy.propagation_edges = 64} : tensor<32x96xf32>
return %1, %0#1 : tensor<32x96xf32>, tensor<?x?xf32>
}
}
6 changes: 0 additions & 6 deletions shardy/dialect/sdy/ir/verifiers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1105,12 +1105,6 @@ SmallVector<TensorShardingAttr> getShardingsReferenceByPropagationEdge(

LogicalResult verifyPropagationEdgesShardingAttr(
PropagationEdgesAttr propagationEdges, Operation* op) {
// TODO(b/429645141): add PropagationEdgesAttr verification for
// `DataFlowEdgeOp`
if (isa<DataFlowEdgeOp>(op)) {
return success();
}

SmallVector<TensorShardingAttr> shardings =
getShardingsReferenceByPropagationEdge(propagationEdges, op);

Expand Down
Loading