From 7aa7fc491a63ba801bb326812b943383b753d9f1 Mon Sep 17 00:00:00 2001 From: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:22:08 +0800 Subject: [PATCH] [Test Mv] python/paddle/fluid/tests/custom_op/*.py to test/custom_op (#51948) --- python/paddle/fluid/tests/CMakeLists.txt | 1 - .../fluid/tests/custom_op/CMakeLists.txt | 62 ----------------- .../paddle/fluid/tests/custom_op/__init__.py | 13 ---- test/CMakeLists.txt | 2 +- test/custom_op/CMakeLists.txt | 66 +++++++++++++++++++ .../tests => test}/custom_op/attr_test_op.cc | 0 .../custom_op/concat_and_split.h | 0 .../custom_op/context_pool_test_op.cc | 0 .../custom_op/custom_concat_op.cc | 0 .../custom_op/custom_conj_op.cc | 0 .../custom_op/custom_inplace.cc | 0 .../custom_op/custom_linear_op.cc | 0 .../custom_op_multidevice_model_train.py | 0 .../custom_op/custom_optional.cc | 0 .../custom_op/custom_raw_op_kernel_op.cc | 0 .../custom_op/custom_raw_op_kernel_op.cu | 0 .../custom_op/custom_raw_op_kernel_op.h | 0 .../custom_raw_op_kernel_op_setup.py | 0 .../custom_op/custom_relu_op.cc | 0 .../custom_op/custom_relu_op.cu | 0 .../custom_op/custom_relu_op_dup.cc | 0 .../custom_op/custom_relu_op_xpu.cc | 0 .../custom_op/custom_relu_setup.py | 0 .../custom_op/custom_relu_xpu_setup.py | 0 .../custom_op/custom_simple_slice_op.cc | 0 .../custom_op/custom_tanh_op.cc | 0 .../custom_op/custom_tensor_operator.cc | 0 .../custom_op/dispatch_test_op.cc | 0 .../custom_op/multi_out_test_op.cc | 0 .../setup_for_static_multidevice_test.py | 0 .../custom_op/test_check_abi.py | 0 .../custom_op/test_context_pool.py | 0 .../custom_op/test_custom_attrs_jit.py | 0 .../custom_op/test_custom_concat.py | 0 .../custom_op/test_custom_conj.py | 0 .../custom_op/test_custom_inplace.py | 2 +- .../custom_op/test_custom_linear.py | 0 ...custom_op_relu_model_static_multidevice.py | 0 .../custom_op/test_custom_optional.py | 0 .../custom_op/test_custom_raw_op_kernel_op.py | 0 .../custom_op/test_custom_relu_model.py | 0 .../custom_op/test_custom_relu_op_jit.py | 0 .../custom_op/test_custom_relu_op_setup.py | 0 .../test_custom_relu_op_xpu_setup.py | 0 .../custom_op/test_custom_simple_slice.py | 0 .../custom_op/test_custom_tanh_double_grad.py | 0 .../custom_op/test_custom_tensor_operator.py | 0 .../custom_op/test_dispatch_jit.py | 0 .../custom_op/test_multi_out_jit.py | 0 .../custom_op/test_sysconfig.py | 0 .../fluid/tests => test}/custom_op/utils.py | 0 51 files changed, 68 insertions(+), 78 deletions(-) delete mode 100644 python/paddle/fluid/tests/custom_op/CMakeLists.txt delete mode 100644 python/paddle/fluid/tests/custom_op/__init__.py create mode 100644 test/custom_op/CMakeLists.txt rename {python/paddle/fluid/tests => test}/custom_op/attr_test_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/concat_and_split.h (100%) rename {python/paddle/fluid/tests => test}/custom_op/context_pool_test_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_concat_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_conj_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_inplace.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_linear_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_op_multidevice_model_train.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_optional.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_raw_op_kernel_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_raw_op_kernel_op.cu (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_raw_op_kernel_op.h (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_raw_op_kernel_op_setup.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_op.cu (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_op_dup.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_op_xpu.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_setup.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_relu_xpu_setup.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_simple_slice_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_tanh_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/custom_tensor_operator.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/dispatch_test_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/multi_out_test_op.cc (100%) rename {python/paddle/fluid/tests => test}/custom_op/setup_for_static_multidevice_test.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_check_abi.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_context_pool.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_attrs_jit.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_concat.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_conj.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_inplace.py (99%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_linear.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_op_relu_model_static_multidevice.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_optional.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_raw_op_kernel_op.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_relu_model.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_relu_op_jit.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_relu_op_setup.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_relu_op_xpu_setup.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_simple_slice.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_tanh_double_grad.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_custom_tensor_operator.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_dispatch_jit.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_multi_out_jit.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/test_sysconfig.py (100%) rename {python/paddle/fluid/tests => test}/custom_op/utils.py (100%) diff --git a/python/paddle/fluid/tests/CMakeLists.txt b/python/paddle/fluid/tests/CMakeLists.txt index eb8f163da7f..f2f0880aaa1 100644 --- a/python/paddle/fluid/tests/CMakeLists.txt +++ b/python/paddle/fluid/tests/CMakeLists.txt @@ -10,5 +10,4 @@ endforeach() add_subdirectory(unittests) add_subdirectory(cpp_extension) -add_subdirectory(custom_op) add_subdirectory(custom_runtime) diff --git a/python/paddle/fluid/tests/custom_op/CMakeLists.txt b/python/paddle/fluid/tests/custom_op/CMakeLists.txt deleted file mode 100644 index a58bacac95d..00000000000 --- a/python/paddle/fluid/tests/custom_op/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ -# New custom OP can support Windows/Linux/Mac now -if(WITH_GPU OR APPLE) - py_test(test_custom_relu_op_setup SRCS test_custom_relu_op_setup.py) - py_test(test_custom_relu_op_jit SRCS test_custom_relu_op_jit.py) - py_test(test_custom_relu_model SRCS test_custom_relu_model.py) - py_test(test_context_pool SRCS test_context_pool.py) - - # Compiling shared library will cost some time, but running process is very fast. - set_tests_properties(test_custom_relu_op_setup PROPERTIES TIMEOUT 250) - set_tests_properties(test_custom_relu_op_jit PROPERTIES TIMEOUT 180) - set_tests_properties(test_custom_relu_model PROPERTIES TIMEOUT 180) - set_tests_properties(test_context_pool PROPERTIES TIMEOUT 180) - if($ENV{USE_STANDALONE_EXECUTOR}) - # these test will fail in some server due to PR#42149, temporarily set it use old executor. - set_tests_properties(test_custom_relu_op_setup - PROPERTIES ENVIRONMENT FLAGS_USE_STANDALONE_EXECUTOR=0) - set_tests_properties(test_custom_relu_model - PROPERTIES ENVIRONMENT FLAGS_USE_STANDALONE_EXECUTOR=0) - endif() -endif() - -if(WITH_GPU AND WITH_DISTRIBUTE) - py_test(test_custom_op_relu_model_static_multidevice - SRCS test_custom_op_relu_model_static_multidevice.py) - set_tests_properties(test_custom_op_relu_model_static_multidevice - PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 180) -endif() -if(WITH_XPU AND WITH_DISTRIBUTE) - set(CUSTOM_XPU_ENVS FLAGS_init_allocated_mem=0) - py_test(test_custom_relu_op_xpu_setup SRCS test_custom_relu_op_xpu_setup.py - ENVS ${CUSTOM_XPU_ENVS}) - py_test(test_custom_op_relu_model_static_multidevice - SRCS test_custom_op_relu_model_static_multidevice.py ENVS - ${CUSTOM_XPU_ENVS}) - set_tests_properties(test_custom_op_relu_model_static_multidevice - PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 180) -endif() - -py_test(test_custom_raw_op_kernel_op SRCS test_custom_raw_op_kernel_op.py) -set_tests_properties(test_custom_raw_op_kernel_op PROPERTIES TIMEOUT 180) -py_test(test_custom_tensor_operator SRCS test_custom_tensor_operator.py) -set_tests_properties(test_custom_tensor_operator PROPERTIES TIMEOUT 180) - -# CPU custom op tests: only compile .cc file -py_test(test_dispatch_jit SRCS test_dispatch_jit.py) -py_test(test_multi_out_jit SRCS test_multi_out_jit.py) -py_test(test_custom_attrs_jit SRCS test_custom_attrs_jit.py) -py_test(test_custom_concat SRCS test_custom_concat.py) -py_test(test_custom_conj SRCS test_custom_conj.py) -py_test(test_custom_linear SRCS test_custom_linear.py) -py_test(test_custom_simple_slice SRCS test_custom_simple_slice.py) -py_test(test_custom_tanh_double_grad SRCS test_custom_tanh_double_grad.py) -py_test(test_custom_inplace SRCS test_custom_inplace.py) -py_test(test_custom_optional SRCS test_custom_optional.py) - -# other tests -py_test(test_sysconfig SRCS test_sysconfig.py) -py_test(test_check_abi SRCS test_check_abi.py) - -if(APPLE) - set_tests_properties(test_custom_simple_slice PROPERTIES TIMEOUT 300) -endif() diff --git a/python/paddle/fluid/tests/custom_op/__init__.py b/python/paddle/fluid/tests/custom_op/__init__.py deleted file mode 100644 index 6f0ea85344b..00000000000 --- a/python/paddle/fluid/tests/custom_op/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 297d5ae6e8b..557368d089e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,7 +15,7 @@ if(WITH_TESTING) # add_subdirectory(contrib) add_subdirectory(cpp) add_subdirectory(custom_kernel) - # add_subdirectory(custom_op) + add_subdirectory(custom_op) # add_subdirectory(custom_runtime) # add_subdirectory(dataset) # add_subdirectory(distributed_passes) diff --git a/test/custom_op/CMakeLists.txt b/test/custom_op/CMakeLists.txt new file mode 100644 index 00000000000..e0538d417a6 --- /dev/null +++ b/test/custom_op/CMakeLists.txt @@ -0,0 +1,66 @@ +if(WITH_TESTING) + # New custom OP can support Windows/Linux/Mac now + if(WITH_GPU OR APPLE) + py_test(test_custom_relu_op_setup SRCS test_custom_relu_op_setup.py) + py_test(test_custom_relu_op_jit SRCS test_custom_relu_op_jit.py) + py_test(test_custom_relu_model SRCS test_custom_relu_model.py) + py_test(test_context_pool SRCS test_context_pool.py) + + # Compiling shared library will cost some time, but running process is very fast. + set_tests_properties(test_custom_relu_op_setup PROPERTIES TIMEOUT 250) + set_tests_properties(test_custom_relu_op_jit PROPERTIES TIMEOUT 180) + set_tests_properties(test_custom_relu_model PROPERTIES TIMEOUT 180) + set_tests_properties(test_context_pool PROPERTIES TIMEOUT 180) + if($ENV{USE_STANDALONE_EXECUTOR}) + # these test will fail in some server due to PR#42149, temporarily set it use old executor. + set_tests_properties( + test_custom_relu_op_setup PROPERTIES ENVIRONMENT + FLAGS_USE_STANDALONE_EXECUTOR=0) + set_tests_properties( + test_custom_relu_model PROPERTIES ENVIRONMENT + FLAGS_USE_STANDALONE_EXECUTOR=0) + endif() + endif() + + if(WITH_GPU AND WITH_DISTRIBUTE) + py_test(test_custom_op_relu_model_static_multidevice + SRCS test_custom_op_relu_model_static_multidevice.py) + set_tests_properties(test_custom_op_relu_model_static_multidevice + PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 180) + endif() + if(WITH_XPU AND WITH_DISTRIBUTE) + set(CUSTOM_XPU_ENVS FLAGS_init_allocated_mem=0) + py_test(test_custom_relu_op_xpu_setup SRCS test_custom_relu_op_xpu_setup.py + ENVS ${CUSTOM_XPU_ENVS}) + py_test(test_custom_op_relu_model_static_multidevice + SRCS test_custom_op_relu_model_static_multidevice.py ENVS + ${CUSTOM_XPU_ENVS}) + set_tests_properties(test_custom_op_relu_model_static_multidevice + PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 180) + endif() + + py_test(test_custom_raw_op_kernel_op SRCS test_custom_raw_op_kernel_op.py) + set_tests_properties(test_custom_raw_op_kernel_op PROPERTIES TIMEOUT 180) + py_test(test_custom_tensor_operator SRCS test_custom_tensor_operator.py) + set_tests_properties(test_custom_tensor_operator PROPERTIES TIMEOUT 180) + + # CPU custom op tests: only compile .cc file + py_test(test_dispatch_jit SRCS test_dispatch_jit.py) + py_test(test_multi_out_jit SRCS test_multi_out_jit.py) + py_test(test_custom_attrs_jit SRCS test_custom_attrs_jit.py) + py_test(test_custom_concat SRCS test_custom_concat.py) + py_test(test_custom_conj SRCS test_custom_conj.py) + py_test(test_custom_linear SRCS test_custom_linear.py) + py_test(test_custom_simple_slice SRCS test_custom_simple_slice.py) + py_test(test_custom_tanh_double_grad SRCS test_custom_tanh_double_grad.py) + py_test(test_custom_inplace SRCS test_custom_inplace.py) + py_test(test_custom_optional SRCS test_custom_optional.py) + + # other tests + py_test(test_sysconfig SRCS test_sysconfig.py) + py_test(test_check_abi SRCS test_check_abi.py) + + if(APPLE) + set_tests_properties(test_custom_simple_slice PROPERTIES TIMEOUT 300) + endif() +endif() diff --git a/python/paddle/fluid/tests/custom_op/attr_test_op.cc b/test/custom_op/attr_test_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/attr_test_op.cc rename to test/custom_op/attr_test_op.cc diff --git a/python/paddle/fluid/tests/custom_op/concat_and_split.h b/test/custom_op/concat_and_split.h similarity index 100% rename from python/paddle/fluid/tests/custom_op/concat_and_split.h rename to test/custom_op/concat_and_split.h diff --git a/python/paddle/fluid/tests/custom_op/context_pool_test_op.cc b/test/custom_op/context_pool_test_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/context_pool_test_op.cc rename to test/custom_op/context_pool_test_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_concat_op.cc b/test/custom_op/custom_concat_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_concat_op.cc rename to test/custom_op/custom_concat_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_conj_op.cc b/test/custom_op/custom_conj_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_conj_op.cc rename to test/custom_op/custom_conj_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_inplace.cc b/test/custom_op/custom_inplace.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_inplace.cc rename to test/custom_op/custom_inplace.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_linear_op.cc b/test/custom_op/custom_linear_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_linear_op.cc rename to test/custom_op/custom_linear_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_op_multidevice_model_train.py b/test/custom_op/custom_op_multidevice_model_train.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_op_multidevice_model_train.py rename to test/custom_op/custom_op_multidevice_model_train.py diff --git a/python/paddle/fluid/tests/custom_op/custom_optional.cc b/test/custom_op/custom_optional.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_optional.cc rename to test/custom_op/custom_optional.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.cc b/test/custom_op/custom_raw_op_kernel_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.cc rename to test/custom_op/custom_raw_op_kernel_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.cu b/test/custom_op/custom_raw_op_kernel_op.cu similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.cu rename to test/custom_op/custom_raw_op_kernel_op.cu diff --git a/python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.h b/test/custom_op/custom_raw_op_kernel_op.h similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op.h rename to test/custom_op/custom_raw_op_kernel_op.h diff --git a/python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op_setup.py b/test/custom_op/custom_raw_op_kernel_op_setup.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_raw_op_kernel_op_setup.py rename to test/custom_op/custom_raw_op_kernel_op_setup.py diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_op.cc b/test/custom_op/custom_relu_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_op.cc rename to test/custom_op/custom_relu_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_op.cu b/test/custom_op/custom_relu_op.cu similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_op.cu rename to test/custom_op/custom_relu_op.cu diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_op_dup.cc b/test/custom_op/custom_relu_op_dup.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_op_dup.cc rename to test/custom_op/custom_relu_op_dup.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_op_xpu.cc b/test/custom_op/custom_relu_op_xpu.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_op_xpu.cc rename to test/custom_op/custom_relu_op_xpu.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_setup.py b/test/custom_op/custom_relu_setup.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_setup.py rename to test/custom_op/custom_relu_setup.py diff --git a/python/paddle/fluid/tests/custom_op/custom_relu_xpu_setup.py b/test/custom_op/custom_relu_xpu_setup.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_relu_xpu_setup.py rename to test/custom_op/custom_relu_xpu_setup.py diff --git a/python/paddle/fluid/tests/custom_op/custom_simple_slice_op.cc b/test/custom_op/custom_simple_slice_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_simple_slice_op.cc rename to test/custom_op/custom_simple_slice_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_tanh_op.cc b/test/custom_op/custom_tanh_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_tanh_op.cc rename to test/custom_op/custom_tanh_op.cc diff --git a/python/paddle/fluid/tests/custom_op/custom_tensor_operator.cc b/test/custom_op/custom_tensor_operator.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/custom_tensor_operator.cc rename to test/custom_op/custom_tensor_operator.cc diff --git a/python/paddle/fluid/tests/custom_op/dispatch_test_op.cc b/test/custom_op/dispatch_test_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/dispatch_test_op.cc rename to test/custom_op/dispatch_test_op.cc diff --git a/python/paddle/fluid/tests/custom_op/multi_out_test_op.cc b/test/custom_op/multi_out_test_op.cc similarity index 100% rename from python/paddle/fluid/tests/custom_op/multi_out_test_op.cc rename to test/custom_op/multi_out_test_op.cc diff --git a/python/paddle/fluid/tests/custom_op/setup_for_static_multidevice_test.py b/test/custom_op/setup_for_static_multidevice_test.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/setup_for_static_multidevice_test.py rename to test/custom_op/setup_for_static_multidevice_test.py diff --git a/python/paddle/fluid/tests/custom_op/test_check_abi.py b/test/custom_op/test_check_abi.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_check_abi.py rename to test/custom_op/test_check_abi.py diff --git a/python/paddle/fluid/tests/custom_op/test_context_pool.py b/test/custom_op/test_context_pool.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_context_pool.py rename to test/custom_op/test_context_pool.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_attrs_jit.py b/test/custom_op/test_custom_attrs_jit.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_attrs_jit.py rename to test/custom_op/test_custom_attrs_jit.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_concat.py b/test/custom_op/test_custom_concat.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_concat.py rename to test/custom_op/test_custom_concat.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_conj.py b/test/custom_op/test_custom_conj.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_conj.py rename to test/custom_op/test_custom_conj.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_inplace.py b/test/custom_op/test_custom_inplace.py similarity index 99% rename from python/paddle/fluid/tests/custom_op/test_custom_inplace.py rename to test/custom_op/test_custom_inplace.py index c9ca153a694..0d97c93272b 100644 --- a/python/paddle/fluid/tests/custom_op/test_custom_inplace.py +++ b/test/custom_op/test_custom_inplace.py @@ -41,7 +41,7 @@ custom_inplace = load( ) # Temporarily assemble custom python API -import paddle.fluid.core as core +from paddle.fluid import core from paddle.fluid.core import CustomOpKernelContext from paddle.fluid.framework import in_dygraph_mode from paddle.fluid.layer_helper import LayerHelper diff --git a/python/paddle/fluid/tests/custom_op/test_custom_linear.py b/test/custom_op/test_custom_linear.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_linear.py rename to test/custom_op/test_custom_linear.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_op_relu_model_static_multidevice.py b/test/custom_op/test_custom_op_relu_model_static_multidevice.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_op_relu_model_static_multidevice.py rename to test/custom_op/test_custom_op_relu_model_static_multidevice.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_optional.py b/test/custom_op/test_custom_optional.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_optional.py rename to test/custom_op/test_custom_optional.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_raw_op_kernel_op.py b/test/custom_op/test_custom_raw_op_kernel_op.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_raw_op_kernel_op.py rename to test/custom_op/test_custom_raw_op_kernel_op.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_relu_model.py b/test/custom_op/test_custom_relu_model.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_relu_model.py rename to test/custom_op/test_custom_relu_model.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_relu_op_jit.py b/test/custom_op/test_custom_relu_op_jit.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_relu_op_jit.py rename to test/custom_op/test_custom_relu_op_jit.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_relu_op_setup.py b/test/custom_op/test_custom_relu_op_setup.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_relu_op_setup.py rename to test/custom_op/test_custom_relu_op_setup.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_relu_op_xpu_setup.py b/test/custom_op/test_custom_relu_op_xpu_setup.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_relu_op_xpu_setup.py rename to test/custom_op/test_custom_relu_op_xpu_setup.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_simple_slice.py b/test/custom_op/test_custom_simple_slice.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_simple_slice.py rename to test/custom_op/test_custom_simple_slice.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_tanh_double_grad.py b/test/custom_op/test_custom_tanh_double_grad.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_tanh_double_grad.py rename to test/custom_op/test_custom_tanh_double_grad.py diff --git a/python/paddle/fluid/tests/custom_op/test_custom_tensor_operator.py b/test/custom_op/test_custom_tensor_operator.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_custom_tensor_operator.py rename to test/custom_op/test_custom_tensor_operator.py diff --git a/python/paddle/fluid/tests/custom_op/test_dispatch_jit.py b/test/custom_op/test_dispatch_jit.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_dispatch_jit.py rename to test/custom_op/test_dispatch_jit.py diff --git a/python/paddle/fluid/tests/custom_op/test_multi_out_jit.py b/test/custom_op/test_multi_out_jit.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_multi_out_jit.py rename to test/custom_op/test_multi_out_jit.py diff --git a/python/paddle/fluid/tests/custom_op/test_sysconfig.py b/test/custom_op/test_sysconfig.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/test_sysconfig.py rename to test/custom_op/test_sysconfig.py diff --git a/python/paddle/fluid/tests/custom_op/utils.py b/test/custom_op/utils.py similarity index 100% rename from python/paddle/fluid/tests/custom_op/utils.py rename to test/custom_op/utils.py -- GitLab