Use channel_handle for ChannelHandles in MHLO ops. This makes the naming of these properties consistent across these ops.

PiperOrigin-RevId: 377309518
This commit is contained in:
A. Unique TensorFlower 2021-06-03 09:48:47 -07:00 committed by TensorFlow MLIR Team
parent 063086dd78
commit fe42a08fc9
2 changed files with 4 additions and 4 deletions

View File

@ -744,7 +744,7 @@ def HLO_SendOp : HLO_Op<"send", []> {
let arguments = (ins
HLO_TensorOrTuple:$operand,
HLO_Token:$token,
ChannelHandle:$channel_id,
ChannelHandle:$channel_handle,
DefaultValuedAttr<BoolAttr, "false">:$is_host_transfer
);
@ -769,7 +769,7 @@ def HLO_RecvOp : HLO_Op<"recv", []> {
let arguments = (ins
HLO_Token:$token,
ChannelHandle:$channel_id,
ChannelHandle:$channel_handle,
DefaultValuedAttr<BoolAttr, "false">:$is_host_transfer
);

View File

@ -682,7 +682,7 @@ func @map_unranked(%arg0: tensor<*xf32>, %arg1: tensor<*xf32>) -> tensor<*xf32>
func @recv_invalid_number_of_results(%token: !mhlo.token) -> tuple<tensor<3x4xi32>, tensor<i32>, !mhlo.token> {
// expected-error@+1 {{result is expected to be a tuple of size 2, but got 3}}
%0 = "mhlo.recv"(%token) {
channel_id = {
channel_handle = {
handle = 5 : i64,
type = 3 : i64 // Host to device channel
},
@ -696,7 +696,7 @@ func @recv_invalid_number_of_results(%token: !mhlo.token) -> tuple<tensor<3x4xi3
func @recv_non_token_second_result(%token: !mhlo.token) -> tuple<tensor<3x4xi32>, tensor<i32>> {
// expected-error@+1 {{second element of result tuple is expected to be of token type, but got 'tensor<i32>'}}
%0 = "mhlo.recv"(%token) {
channel_id = {
channel_handle = {
handle = 5 : i64,
type = 3 : i64 // Host to device channel
},