From f2ed4851000a77bc1e532e9eaa79e1f2ae1fc7f6 Mon Sep 17 00:00:00 2001 From: zhiqiu Date: Tue, 23 Mar 2021 07:33:04 +0000 Subject: [PATCH] fix ut --- .../paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py b/python/paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py index 61656dd2ca820..1905976222897 100755 --- a/python/paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py +++ b/python/paddle/fluid/tests/unittests/npu/test_memcpy_op_npu.py @@ -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 @@ -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, @@ -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,