未验证 提交 0ded3f04 编写于 作者: G gouzil 提交者: GitHub

[test]mv fluid *test* to test (#53472)

* [test]mv fluid *test* to test/cpp/fluid

* [phi] fix link error
上级 5cc6a512
......@@ -151,7 +151,6 @@ if (WITH_GPU OR WITH_ROCM)
set(COMMON_OP_DEPS ${COMMON_OP_DEPS} depthwise_conv prelu bert_encoder_functor)
endif()
if(WITH_XPU)
cc_test(beam_search_decode_op_xpu_test SRCS beam_search_decode_op_xpu_test.cc DEPS lod_tensor)
set(COMMON_OP_DEPS ${COMMON_OP_DEPS} xpulib)
endif()
set(COMMON_OP_DEPS ${COMMON_OP_DEPS} layer)
......@@ -169,25 +168,6 @@ set(COMMON_OP_DEPS ${COMMON_OP_DEPS} op_version_registry)
set(OPERATOR_DEPS ${OPERATOR_DEPS} ${COMMON_OP_DEPS})
set(GLOB_OPERATOR_DEPS ${OPERATOR_DEPS} CACHE INTERNAL "Global Op dependencies")
cc_test(test_common_infer_shape_functions SRCS test_common_infer_shape_functions.cc DEPS common_infer_shape_functions ${COMMON_OP_DEPS} activation_op elementwise_add_op softmax_op softmax)
cc_test(gather_test SRCS gather_test.cc DEPS tensor)
cc_test(assign_op_test SRCS assign_op_test.cc DEPS generated_static_op)
cc_test(scatter_test SRCS scatter_test.cc DEPS tensor math_function)
cc_test(beam_search_decode_op_test SRCS beam_search_decode_op_test.cc DEPS lod_tensor)
cc_test(save_load_op_test SRCS save_load_op_test.cc DEPS save_op load_op)
cc_test(save_load_combine_op_test SRCS save_load_combine_op_test.cc DEPS save_combine_op load_combine_op)
if (WITH_GPU)
nv_test(dropout_op_test SRCS dropout_op_test.cc DEPS dropout_op tensor generator)
nv_test(test_leaky_relu_grad_grad_functor SRCS test_leaky_relu_grad_grad_functor.cc test_leaky_relu_grad_grad_functor.cu DEPS tensor device_context eigen3)
nv_test(feed_forward_test SRCS feed_forward_test.cu DEPS elementwise_add_op matmul_op tensor generator)
elseif(WITH_ROCM)
hip_test(dropout_op_test SRCS dropout_op_test.cc DEPS dropout_op tensor generator)
hip_test(test_leaky_relu_grad_grad_functor SRCS test_leaky_relu_grad_grad_functor.cc test_leaky_relu_grad_grad_functor.cu DEPS tensor device_context eigen3)
else()
cc_test(test_leaky_relu_grad_grad_functor SRCS test_leaky_relu_grad_grad_functor.cc DEPS tensor device_context eigen3)
endif()
cc_test(share_buffer_op_cpp_test SRCS share_buffer_op_test.cc DEPS lod_tensor device_context generated_static_op)
cc_library(tensor_formatter SRCS tensor_formatter.cc DEPS ${OP_HEADER_DEPS})
if (WITH_PYTHON)
cc_library(py_func_op SRCS py_func_op.cc DEPS op_registry python pybind)
......@@ -195,9 +175,6 @@ endif()
set(GLOB_OP_LIB ${OP_LIBRARY} CACHE INTERNAL "Global OP library")
cc_test_old(op_debug_string_test SRCS op_debug_string_test.cc DEPS elementwise_add_op ${COMMON_OP_DEPS})
if(WITH_MKLDNN)
include(mkldnn/inplace_op_tests.cmake)
include(mkldnn/caching_tests.cmake)
......@@ -211,10 +188,6 @@ if(WITH_UNITY_BUILD)
target_link_libraries(paddle_operators_unity ${OP_HEADER_DEPS} ${COMMON_OP_DEPS})
endif()
if (WITH_GPU)
cc_test(copy_cross_scope_test SRCS copy_cross_scope_test.cc DEPS op_registry copy_cross_scope_op scope device_context enforce executor)
endif()
copy_if_different(${pybind_file} ${pybind_file_final})
if (WITH_CUSTOM_DEVICE)
......
......@@ -22,3 +22,88 @@ add_subdirectory(prim_ops)
add_subdirectory(reader)
add_subdirectory(reduce_ops)
# add_subdirectory(tensorrt)
set(COMMON_OP_DEPS ${COMMON_OP_DEPS} executor)
if(WITH_XPU)
cc_test(
beam_search_decode_op_xpu_test
SRCS beam_search_decode_op_xpu_test.cc
DEPS lod_tensor)
set(COMMON_OP_DEPS ${COMMON_OP_DEPS} xpulib)
endif()
cc_test(
test_common_infer_shape_functions
SRCS test_common_infer_shape_functions.cc
DEPS common_infer_shape_functions ${COMMON_OP_DEPS} activation_op
elementwise_add_op softmax_op softmax)
cc_test(
gather_test
SRCS gather_test.cc
DEPS tensor)
cc_test(
assign_op_test
SRCS assign_op_test.cc
DEPS generated_static_op)
cc_test(
scatter_test
SRCS scatter_test.cc
DEPS tensor math_function)
cc_test(
beam_search_decode_op_test
SRCS beam_search_decode_op_test.cc
DEPS lod_tensor)
cc_test(
save_load_op_test
SRCS save_load_op_test.cc
DEPS save_op load_op)
cc_test(
save_load_combine_op_test
SRCS save_load_combine_op_test.cc
DEPS save_combine_op load_combine_op)
if(WITH_GPU)
nv_test(
dropout_op_test
SRCS dropout_op_test.cc
DEPS dropout_op tensor generator)
nv_test(
test_leaky_relu_grad_grad_functor
SRCS test_leaky_relu_grad_grad_functor.cc
test_leaky_relu_grad_grad_functor.cu
DEPS tensor device_context eigen3)
nv_test(
feed_forward_test
SRCS feed_forward_test.cu
DEPS elementwise_add_op matmul_op tensor generator)
elseif(WITH_ROCM)
hip_test(
dropout_op_test
SRCS dropout_op_test.cc
DEPS dropout_op tensor generator)
hip_test(
test_leaky_relu_grad_grad_functor
SRCS test_leaky_relu_grad_grad_functor.cc
test_leaky_relu_grad_grad_functor.cu
DEPS tensor device_context eigen3)
else()
cc_test(
test_leaky_relu_grad_grad_functor
SRCS test_leaky_relu_grad_grad_functor.cc
DEPS tensor device_context eigen3)
endif()
cc_test(
share_buffer_op_cpp_test
SRCS share_buffer_op_test.cc
DEPS lod_tensor device_context generated_static_op)
cc_test_old(op_debug_string_test SRCS op_debug_string_test.cc DEPS
elementwise_add_op ${COMMON_OP_DEPS})
if(WITH_GPU)
cc_test(
copy_cross_scope_test
SRCS copy_cross_scope_test.cc
DEPS op_registry copy_cross_scope_op scope device_context enforce executor)
endif()
......@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle/fluid/operators/test_leaky_relu_grad_grad_functor.h"
#include "test/cpp/fluid/test_leaky_relu_grad_grad_functor.h"
namespace paddle {
namespace operators {
......
......@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle/fluid/operators/test_leaky_relu_grad_grad_functor.h"
#include "test/cpp/fluid/test_leaky_relu_grad_grad_functor.h"
namespace paddle {
namespace operators {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册