From a445466f29b5e450c564a4110786e78f36cb546a Mon Sep 17 00:00:00 2001 From: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Date: Thu, 30 Mar 2023 17:12:58 +0800 Subject: [PATCH] [Move Test] Move prim cpp (#52173) * update * update * update --- paddle/fluid/prim/CMakeLists.txt | 1 - test/cpp/CMakeLists.txt | 1 + {paddle/fluid/prim/tests => test/cpp/prim}/CMakeLists.txt | 0 {paddle/fluid/prim/tests => test/cpp/prim}/init_env_utils.cc | 2 +- {paddle/fluid/prim/tests => test/cpp/prim}/init_env_utils.h | 0 {paddle/fluid/prim/tests => test/cpp/prim}/test_eager_prim.cc | 2 +- {paddle/fluid/prim/tests => test/cpp/prim}/test_static_prim.cc | 0 7 files changed, 3 insertions(+), 3 deletions(-) rename {paddle/fluid/prim/tests => test/cpp/prim}/CMakeLists.txt (100%) rename {paddle/fluid/prim/tests => test/cpp/prim}/init_env_utils.cc (95%) rename {paddle/fluid/prim/tests => test/cpp/prim}/init_env_utils.h (100%) rename {paddle/fluid/prim/tests => test/cpp/prim}/test_eager_prim.cc (99%) rename {paddle/fluid/prim/tests => test/cpp/prim}/test_static_prim.cc (100%) diff --git a/paddle/fluid/prim/CMakeLists.txt b/paddle/fluid/prim/CMakeLists.txt index ec5e30bcab1..f80b1349895 100644 --- a/paddle/fluid/prim/CMakeLists.txt +++ b/paddle/fluid/prim/CMakeLists.txt @@ -1,6 +1,5 @@ add_subdirectory(api) add_subdirectory(utils) -add_subdirectory(tests) set(static_prim_deps prim_utils static_global_utils static_utils static_prim_api) set(eager_prim_deps prim_utils eager_prim_api) diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt index 193600b00df..752fa86168a 100644 --- a/test/cpp/CMakeLists.txt +++ b/test/cpp/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(phi) add_subdirectory(jit) add_subdirectory(new_executor) +add_subdirectory(prim) add_subdirectory(imperative) diff --git a/paddle/fluid/prim/tests/CMakeLists.txt b/test/cpp/prim/CMakeLists.txt similarity index 100% rename from paddle/fluid/prim/tests/CMakeLists.txt rename to test/cpp/prim/CMakeLists.txt diff --git a/paddle/fluid/prim/tests/init_env_utils.cc b/test/cpp/prim/init_env_utils.cc similarity index 95% rename from paddle/fluid/prim/tests/init_env_utils.cc rename to test/cpp/prim/init_env_utils.cc index 78479a8f728..2b7d2aed290 100644 --- a/paddle/fluid/prim/tests/init_env_utils.cc +++ b/test/cpp/prim/init_env_utils.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "paddle/fluid/prim/tests/init_env_utils.h" +#include "test/cpp/prim/init_env_utils.h" #include "paddle/fluid/prim/utils/eager/eager_tensor_operants.h" #include "paddle/fluid/prim/utils/static/static_tensor_operants.h" #include "paddle/phi/api/include/operants_manager.h" diff --git a/paddle/fluid/prim/tests/init_env_utils.h b/test/cpp/prim/init_env_utils.h similarity index 100% rename from paddle/fluid/prim/tests/init_env_utils.h rename to test/cpp/prim/init_env_utils.h diff --git a/paddle/fluid/prim/tests/test_eager_prim.cc b/test/cpp/prim/test_eager_prim.cc similarity index 99% rename from paddle/fluid/prim/tests/test_eager_prim.cc rename to test/cpp/prim/test_eager_prim.cc index 98061cb0eff..5055e439c40 100644 --- a/paddle/fluid/prim/tests/test_eager_prim.cc +++ b/test/cpp/prim/test_eager_prim.cc @@ -21,11 +21,11 @@ #include "paddle/fluid/eager/api/utils/hook_utils.h" #include "paddle/fluid/eager/backward.h" #include "paddle/fluid/eager/tests/test_utils.h" -#include "paddle/fluid/prim/tests/init_env_utils.h" #include "paddle/fluid/prim/utils/utils.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/tensor_meta.h" +#include "test/cpp/prim/init_env_utils.h" DECLARE_string(tensor_operants_mode); diff --git a/paddle/fluid/prim/tests/test_static_prim.cc b/test/cpp/prim/test_static_prim.cc similarity index 100% rename from paddle/fluid/prim/tests/test_static_prim.cc rename to test/cpp/prim/test_static_prim.cc -- GitLab