Skip to content

Commit

Permalink
fix queuedataset set_use_ps_gpu fun;test=develop
Browse files Browse the repository at this point in the history
  • Loading branch information
danleifeng committed May 8, 2021
1 parent dc6d15d commit a8801cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/paddle/fluid/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,9 @@ def _run_from_dataset(self,
trainer._gen_trainer_desc()

self._dump_debug_info(program=program, trainer=trainer)
dataset._set_use_ps_gpu(trainer.proto_desc.use_ps_gpu)
# in case of calling _set_use_ps_gpu explicitly
if dataset.use_ps_gpu is False:
dataset._set_use_ps_gpu(trainer.proto_desc.use_ps_gpu)
dataset._dynamic_adjust_before_train(trainer.proto_desc.thread_num)

trainer_instance = self._default_executor.init_for_dataset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def test_communicator_ps_gpu(self):
dataset.init(
batch_size=32, thread_num=1, pipe_command="cat", use_var=slots_vars)
dataset.set_filelist(["test_communicator_ps_gpu.txt"])
dataset._set_use_ps_gpu(1)
dataset.load_into_memory()

os.environ["TEST_MODE"] = "1"
Expand Down

1 comment on commit a8801cd

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.