Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for tf.distribute after enabling the update of cluster indices #531
Conversation
|
|
||
| def _distribution_strategies(): | ||
| return [ | ||
| # tf.distribute.experimental.MultiWorkerMirroredStrategy(), |
This comment has been minimized.
This comment has been minimized.
akarmi
Sep 14, 2020
Collaborator
Please, leave in only the strategies we want to be testing here, and remove unnecessary commented code here and in other places below.
This comment has been minimized.
This comment has been minimized.
| for ct, weight in enumerate(self.layer.weights): | ||
| name = self._weight_name(weight.name) | ||
| full_name = self.layer.name + "/" + name | ||
| full_name = '{}{}{}'.format(self.layer.name, '/', name) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
looks good |
6c5fe39
to
b72e2ce
|
Thank you. Just waiting for #519 to land first, before merging this. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Ruomei commentedSep 4, 2020
This PR adds the support for
tf.distributeafter enabling the update of cluster indices. Since these variables are deterministic (they depend on weights but not batch inputs), they are set as SyncOnRead so that they are calculated in each replica independently. In the model exporting time, they will be read from the first replica. Hope in this way we can avoid unnecessary sync for large LUTs.This PR should follow #519, and it tests the change in cluster indices in cross-replica context (in the unit test). That is why it contains two commits.