Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test]mv fluid op mkldnn to test #53458

Merged
merged 4 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions paddle/fluid/operators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ endif()

set(GLOB_OP_LIB ${OP_LIBRARY} CACHE INTERNAL "Global OP library")

if(WITH_MKLDNN)
include(mkldnn/inplace_op_tests.cmake)
include(mkldnn/caching_tests.cmake)
include(mkldnn/nhwc_op_tests.cmake)
endif()

if(WITH_UNITY_BUILD)
# Using Unity Build to compile operators, `register_operator` will cause
# the unity library to lose some symbols.
Expand Down
20 changes: 0 additions & 20 deletions paddle/fluid/operators/mkldnn/caching_tests.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions paddle/fluid/operators/mkldnn/inplace_op_tests.cmake

This file was deleted.

18 changes: 0 additions & 18 deletions paddle/fluid/operators/mkldnn/nhwc_op_tests.cmake

This file was deleted.

6 changes: 3 additions & 3 deletions test/cpp/fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if(WITH_LITE)
add_subdirectory(lite)
endif()
add_subdirectory(math)
# if(WITH_MKLDNN)
# add_subdirectory(mkldnn)
# endif()
if(WITH_MKLDNN)
add_subdirectory(mkldnn)
endif()
add_subdirectory(nccl)
if(WITH_PSCORE)
add_subdirectory(pscore)
Expand Down
52 changes: 52 additions & 0 deletions test/cpp/fluid/mkldnn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
cc_test(
test_mkldnn_op_inplace
SRCS test_mkldnn_op_inplace.cc
DEPS op_registry
elementwise_add_op
activation_op
softmax_op
softmax
scope
device_context
enforce
executor)

set(TEST_MKLDNN_CACHING_DEPS
op_registry
elementwise_mul_op
elementwise_add_op
activation_op
softmax_op
conv_op
im2col
vol2col
softmax
scope
device_context
enforce)
if(WITH_GPU OR WITH_ROCM)
set(TEST_MKLDNN_CACHING_DEPS ${TEST_MKLDNN_CACHING_DEPS} depthwise_conv)
endif()
cc_test(
test_mkldnn_caching
SRCS test_mkldnn_caching.cc
DEPS ${TEST_MKLDNN_CACHING_DEPS})

cc_test_old(
test_mkldnn_op_nhwc
SRCS
test_mkldnn_op_nhwc.cc
DEPS
op_registry
pool_op
shape_op
crop_op
activation_op
generated_op
pooling
transpose_op
fused_transpose_op
scope
device_context
enforce
executor)