@@ -1095,8 +1095,7 @@ def Mesh_UpdateHaloOp : Mesh_Op<"update_halo", [
10951095 TypesMatchWith<
10961096 "result has same type as destination",
10971097 "result", "destination", "$_self">,
1098- DeclareOpInterfaceMethods<SymbolUserOpInterface>,
1099- AttrSizedOperandSegments
1098+ DeclareOpInterfaceMethods<SymbolUserOpInterface>
11001099]> {
11011100 let summary = "Update halo data.";
11021101 let description = [{
@@ -1105,7 +1104,7 @@ def Mesh_UpdateHaloOp : Mesh_Op<"update_halo", [
11051104 on the remote devices. Changes might be caused by mutating operations
11061105 and/or if the new halo regions are larger than the existing ones.
11071106
1108- Source and destination might have different halo sizes .
1107+ Destination is supposed to be initialized with the local data (not halos) .
11091108
11101109 Assumes all devices hold tensors with same-sized halo data as specified
11111110 by `source_halo_sizes/static_source_halo_sizes` and
@@ -1117,25 +1116,21 @@ def Mesh_UpdateHaloOp : Mesh_Op<"update_halo", [
11171116
11181117 }];
11191118 let arguments = (ins
1120- AnyTypeOf<[AnyNon0RankedMemRef, AnyNon0RankedTensor]>:$source,
11211119 AnyTypeOf<[AnyNon0RankedMemRef, AnyNon0RankedTensor]>:$destination,
11221120 FlatSymbolRefAttr:$mesh,
11231121 Mesh_MeshAxesArrayAttr:$split_axes,
1124- Variadic<I64>:$source_halo_sizes,
1125- DefaultValuedAttr<DenseI64ArrayAttr, "{}">:$static_source_halo_sizes,
1126- Variadic<I64>:$destination_halo_sizes,
1127- DefaultValuedAttr<DenseI64ArrayAttr, "{}">:$static_destination_halo_sizes
1122+ Variadic<I64>:$halo_sizes,
1123+ DefaultValuedAttr<DenseI64ArrayAttr, "{}">:$static_halo_sizes
11281124 );
11291125 let results = (outs
11301126 AnyTypeOf<[AnyNon0RankedMemRef, AnyNon0RankedTensor]>:$result
11311127 );
11321128 let assemblyFormat = [{
1133- $source `into` $ destination
1129+ $destination
11341130 `on` $mesh
11351131 `split_axes` `=` $split_axes
1136- (`source_halo_sizes` `=` custom<DynamicIndexList>($source_halo_sizes, $static_source_halo_sizes)^)?
1137- (`destination_halo_sizes` `=` custom<DynamicIndexList>($destination_halo_sizes, $static_destination_halo_sizes)^)?
1138- attr-dict `:` type($source) `->` type($result)
1132+ (`halo_sizes` `=` custom<DynamicIndexList>($halo_sizes, $static_halo_sizes)^)?
1133+ attr-dict `:` type($result)
11391134 }];
11401135 let extraClassDeclaration = [{
11411136 MutableOperandRange getDpsInitsMutable() { return getDestinationMutable(); }
0 commit comments