From 439551bd6edb9191b09da101203c55fc211298fd Mon Sep 17 00:00:00 2001 From: Kai Xing Date: Tue, 11 Apr 2023 14:05:15 +0800 Subject: [PATCH] [Test MV] fft (#52634) * [Test MV] fft * Update test_spectral_op.py --- python/paddle/fluid/tests/unittests/CMakeLists.txt | 4 ---- test/CMakeLists.txt | 4 +++- .../paddle/fluid/tests/unittests => test}/fft/CMakeLists.txt | 0 {python/paddle/fluid/tests/unittests => test}/fft/__init__.py | 0 .../fluid/tests/unittests => test}/fft/spectral_op_np.py | 0 {python/paddle/fluid/tests/unittests => test}/fft/test_fft.py | 0 .../unittests => test}/fft/test_fft_with_static_graph.py | 0 .../fluid/tests/unittests => test}/fft/test_spectral_op.py | 2 +- 8 files changed, 4 insertions(+), 6 deletions(-) rename {python/paddle/fluid/tests/unittests => test}/fft/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/fft/__init__.py (100%) rename {python/paddle/fluid/tests/unittests => test}/fft/spectral_op_np.py (100%) rename {python/paddle/fluid/tests/unittests => test}/fft/test_fft.py (100%) rename {python/paddle/fluid/tests/unittests => test}/fft/test_fft_with_static_graph.py (100%) rename {python/paddle/fluid/tests/unittests => test}/fft/test_spectral_op.py (99%) diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 6f461538a7c..491cae67997 100755 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -774,10 +774,6 @@ add_subdirectory(sequence) add_subdirectory(rnn) add_subdirectory(distribution) -if(NOT WIN32 OR NOT WITH_GPU) - add_subdirectory(fft) -endif() - if(WITH_XPU) add_subdirectory(xpu) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d9d9cb5504f..215771713ec 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -107,7 +107,9 @@ if(WITH_TESTING) # add_subdirectory(distributed_passes) # add_subdirectory(distribution) add_subdirectory(dygraph_to_static) - # add_subdirectory(fft) + if(NOT WIN32 OR NOT WITH_GPU) + add_subdirectory(fft) + endif() # add_subdirectory(fleet) if(WITH_IPU) add_subdirectory(ipu) diff --git a/python/paddle/fluid/tests/unittests/fft/CMakeLists.txt b/test/fft/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/fft/CMakeLists.txt rename to test/fft/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/fft/__init__.py b/test/fft/__init__.py similarity index 100% rename from python/paddle/fluid/tests/unittests/fft/__init__.py rename to test/fft/__init__.py diff --git a/python/paddle/fluid/tests/unittests/fft/spectral_op_np.py b/test/fft/spectral_op_np.py similarity index 100% rename from python/paddle/fluid/tests/unittests/fft/spectral_op_np.py rename to test/fft/spectral_op_np.py diff --git a/python/paddle/fluid/tests/unittests/fft/test_fft.py b/test/fft/test_fft.py similarity index 100% rename from python/paddle/fluid/tests/unittests/fft/test_fft.py rename to test/fft/test_fft.py diff --git a/python/paddle/fluid/tests/unittests/fft/test_fft_with_static_graph.py b/test/fft/test_fft_with_static_graph.py similarity index 100% rename from python/paddle/fluid/tests/unittests/fft/test_fft_with_static_graph.py rename to test/fft/test_fft_with_static_graph.py diff --git a/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py b/test/fft/test_spectral_op.py similarity index 99% rename from python/paddle/fluid/tests/unittests/fft/test_spectral_op.py rename to test/fft/test_spectral_op.py index 6b8ab6cc2ff..075d68b68ed 100644 --- a/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py +++ b/test/fft/test_spectral_op.py @@ -29,7 +29,7 @@ import paddle from paddle import _C_ops sys.path.append("../") -from eager_op_test import OpTest +from paddle.fluid.tests.unittests.eager_op_test import OpTest paddle.enable_static() -- GitLab