Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiu committed Mar 23, 2021
1 parent 75ed850 commit f2ed485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard

paddle.enable_static()
SEED = 2021
Expand Down Expand Up @@ -74,7 +75,7 @@ def test_npu_cpoy_to_cpu(self):
type='memcpy',
inputs={'X': npu_var},
outputs={'Out': cpu_var},
attrs={'dst_place_type': 3})
attrs={'dst_place_type': 0})
place = fluid.NPUPlace(0)
exe = fluid.Executor(place)
npu_, cpu_ = exe.run(main_program,
Expand All @@ -89,7 +90,7 @@ def test_cpu_cpoy_gpu(self):
type='memcpy',
inputs={'X': cpu_var},
outputs={'Out': npu_var},
attrs={'dst_place_type': 2})
attrs={'dst_place_type': 4})
place = fluid.NPUPlace(0)
exe = fluid.Executor(place)
npu_, cpu_ = exe.run(main_program,
Expand Down

0 comments on commit f2ed485

Please sign in to comment.