Make OP_INSTANCE_KEY_START_NUMBER a constant.

PiperOrigin-RevId: 290136248
Change-Id: I4dd68b1d1567022c25ae22daf8c57fe8e7d8ca26
This commit is contained in:
Rick Chao 2020-01-16 13:45:48 -08:00 committed by TensorFlower Gardener
parent fa657fb523
commit c9f7f636eb

View File

@ -35,6 +35,9 @@ from tensorflow.python.ops import math_ops
from tensorflow.python.ops import nccl_ops
OP_INSTANCE_KEY_START_NUMBER = 100
def aggregate_gradients_using_nccl(replica_grads):
"""Aggregate gradients using nccl allreduce."""
agg_all_g_and_v = []
@ -253,7 +256,7 @@ class CollectiveKeys(object):
def __init__(self,
group_key_start=1,
op_instance_key_start=100,
op_instance_key_start=OP_INSTANCE_KEY_START_NUMBER,
variable_instance_key_start=1000000):
"""Initializes the object.