1    def replicate_states(self, state_coll_name):
2    state_list = self._metagraph.collection_def[state_coll_name]
3    num_states = len(state_list.node_list.value)
4    for replica_id in range(1, FLAGS.num_gpus):
5      for i in range(num_states):
6        state_list.node_list.value.append(state_list.node_list.value[i])
7    for replica_id in range(FLAGS.num_gpus):
8      for i in range(num_states):
9        index = replica_id * num_states + i
10       state_list.node_list.value[index] = with_autoparallel_prefix(
11           replica_id, state_list.node_list.value[index])

沒有輸出?

results matching ""

    No results matching ""