Skip to content

Commit

Permalink
modify get_and_set_rng_state to use _current_expected_place_ (#66978)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff41404 authored Aug 12, 2024
1 parent fb16242 commit 9c18824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/paddle/framework/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_rng_state(
"""
state_list = []
if device is None:
place = paddle.framework._current_expected_place()
place = paddle.framework._current_expected_place_()
else:
place = paddle.device._convert_to_place(device)

Expand Down Expand Up @@ -176,7 +176,7 @@ def set_rng_state(
"""
if device is None:
place = paddle.framework._current_expected_place()
place = paddle.framework._current_expected_place_()
else:
place = device._convert_to_place(device)

Expand Down
4 changes: 2 additions & 2 deletions python/paddle/incubate/framework/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_state(generator):

state_list = []
if device is None:
place = base.framework._current_expected_place()
place = base.framework._current_expected_place_()
else:
place = paddle.device._convert_to_place(device)

Expand Down Expand Up @@ -169,7 +169,7 @@ def set_state(generator, state):
generator.set_state(state)

if device is None:
place = base.framework._current_expected_place()
place = base.framework._current_expected_place_()
else:
place = device._convert_to_place(device)

Expand Down

0 comments on commit 9c18824

Please sign in to comment.