Skip to content

Commit

Permalink
[heterps]add heterps mode judgement (PaddlePaddle#37298)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmxdream authored Nov 18, 2021
1 parent f85bd5c commit dd7189f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/paddle/distributed/fleet/runtime/the_one_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def sync_strategy_envs():
split_dense_table=self.role_maker._is_heter_parameter_server_mode)
send_ctx = self.compiled_strategy.get_the_one_send_context(
split_dense_table=self.role_maker._is_heter_parameter_server_mode,
use_origin_program=True,
use_origin_program=self.role_maker._is_heter_parameter_server_mode,
ep_list=endpoints)
trainer_config = self.async_strategy.get_trainer_runtime_config()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ def _get_pull_sparse_ops(_program):
if op.type in SPARSE_OP_TYPE_DICT.keys() \
and op.attr('remote_prefetch') is True:
param_name = op.input(SPARSE_OP_TYPE_DICT[op.type])[0]
# trick for matchnet, need to modify
param_name += op.input("Ids")[0][0]
if config.is_heter_ps_mode:
# trick for matchnet, need to modify
param_name += op.input("Ids")[0][0]
ops = pull_sparse_ops.get(param_name, [])
ops.append(op)
pull_sparse_ops[param_name] = ops
Expand Down

0 comments on commit dd7189f

Please sign in to comment.