未验证 提交 dd7189ff 编写于 作者: Z zmx 提交者: GitHub

[heterps]add heterps mode judgement (#37298)

上级 f85bd5c9
...@@ -528,7 +528,7 @@ class TheOnePSRuntime(RuntimeBase): ...@@ -528,7 +528,7 @@ class TheOnePSRuntime(RuntimeBase):
split_dense_table=self.role_maker._is_heter_parameter_server_mode) split_dense_table=self.role_maker._is_heter_parameter_server_mode)
send_ctx = self.compiled_strategy.get_the_one_send_context( send_ctx = self.compiled_strategy.get_the_one_send_context(
split_dense_table=self.role_maker._is_heter_parameter_server_mode, 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) ep_list=endpoints)
trainer_config = self.async_strategy.get_trainer_runtime_config() trainer_config = self.async_strategy.get_trainer_runtime_config()
......
...@@ -105,8 +105,9 @@ def distributed_ops_pass(program, config, use_ps_gpu=False): ...@@ -105,8 +105,9 @@ def distributed_ops_pass(program, config, use_ps_gpu=False):
if op.type in SPARSE_OP_TYPE_DICT.keys() \ if op.type in SPARSE_OP_TYPE_DICT.keys() \
and op.attr('remote_prefetch') is True: and op.attr('remote_prefetch') is True:
param_name = op.input(SPARSE_OP_TYPE_DICT[op.type])[0] param_name = op.input(SPARSE_OP_TYPE_DICT[op.type])[0]
# trick for matchnet, need to modify if config.is_heter_ps_mode:
param_name += op.input("Ids")[0][0] # trick for matchnet, need to modify
param_name += op.input("Ids")[0][0]
ops = pull_sparse_ops.get(param_name, []) ops = pull_sparse_ops.get(param_name, [])
ops.append(op) ops.append(op)
pull_sparse_ops[param_name] = ops pull_sparse_ops[param_name] = ops
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册