Fix decomposition of ResourceApplyCenteredRMSProp op pattern.
AssignSubVariableOp only needs the resource handle and the tensor to be subtracted from it. PiperOrigin-RevId: 316597384 Change-Id: I26a99cb6fe210cc66429ebca13765af3109748ae
This commit is contained in:
parent
552604a2ef
commit
c118bc4b5e
@ -411,6 +411,7 @@ func @decompose_resource_apply_centered_RMS_prop(%arg0: tensor<f32>, %arg1: tens
|
||||
|
||||
// CHECK: [[VAR:%.*]] = "tf.ReadVariableOp"([[VAR_HANDLE]])
|
||||
// CHECK: [[VAR_NEW:%.*]] = "tf.Sub"([[VAR]], [[MOM_NEW]])
|
||||
// CHECK: "tf.AssignVariableOp"([[VAR_HANDLE]], [[VAR_NEW]])
|
||||
|
||||
"tf.ResourceApplyCenteredRMSProp"(%0, %1, %2, %3, %arg4, %arg5, %arg6, %arg7, %arg8) {use_locking = false} : (tensor<*x!tf.resource>, tensor<*x!tf.resource>, tensor<*x!tf.resource>, tensor<*x!tf.resource>, tensor<f32>, tensor<f32>, tensor<f32>, tensor<f32>, tensor<f32>) -> ()
|
||||
return
|
||||
|
@ -387,9 +387,6 @@ def DecomposeResourceApplyCenteredRMSProp :
|
||||
),
|
||||
(TF_AssignVariableOp $mom_resource, $mom_new),
|
||||
// var <- var - mom
|
||||
(TF_AssignSubVariableOp $var_resource,
|
||||
(TF_SubOp (CreateTFReadVariableOp $src_op, $grad, $var_resource),
|
||||
$mom_new)
|
||||
)
|
||||
(TF_AssignSubVariableOp $var_resource, $mom_new)
|
||||
]
|
||||
>;
|
||||
|
Loading…
Reference in New Issue
Block a user