未验证 提交 903c5638 编写于 作者: G gouzil 提交者: GitHub

[test]mv fluid op fused to test/cpp/fluid/fused (#53434)

上级 7f9ab2bd
...@@ -74,10 +74,6 @@ if(WITH_GPU OR WITH_ROCM) ...@@ -74,10 +74,6 @@ if(WITH_GPU OR WITH_ROCM)
# fusion_group # fusion_group
if(NOT APPLE AND NOT WIN32) if(NOT APPLE AND NOT WIN32)
op_library(fusion_group_op DEPS device_code) op_library(fusion_group_op DEPS device_code)
cc_test(
test_fusion_group_op
SRCS fusion_group_op_test.cc
DEPS fusion_group_op)
endif() endif()
# fused_bn_add_activation # fused_bn_add_activation
# HIP not support bn act fuse in MIOPEN # HIP not support bn act fuse in MIOPEN
...@@ -87,37 +83,6 @@ if(WITH_GPU OR WITH_ROCM) ...@@ -87,37 +83,6 @@ if(WITH_GPU OR WITH_ROCM)
# fused_dropout # fused_dropout
# only support CUDA # only support CUDA
if(NOT WITH_ROCM) if(NOT WITH_ROCM)
nv_test(
test_fused_residual_dropout_bias
SRCS fused_residual_dropout_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
nv_test(
test_fused_dropout_act_bias
SRCS fused_dropout_act_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
nv_test(
test_fused_layernorm_residual_dropout_bias
SRCS fused_layernorm_residual_dropout_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
op_library(fused_feedforward_op) op_library(fused_feedforward_op)
# fused_attention_op # fused_attention_op
op_library(fused_attention_op) op_library(fused_attention_op)
...@@ -128,30 +93,6 @@ if(WITH_GPU OR WITH_ROCM) ...@@ -128,30 +93,6 @@ if(WITH_GPU OR WITH_ROCM)
# resnet_unit needs cudnn 8.0 above # resnet_unit needs cudnn 8.0 above
if((NOT WITH_ROCM) AND (NOT ${CUDNN_VERSION} VERSION_LESS 8000)) if((NOT WITH_ROCM) AND (NOT ${CUDNN_VERSION} VERSION_LESS 8000))
op_library(resnet_unit_op) op_library(resnet_unit_op)
cc_test(
test_cudnn_norm_conv
SRCS cudnn_norm_conv_test.cc
DEPS conv_op
blas
im2col
vol2col
depthwise_conv
eigen_function
tensor
op_registry
device_context
generator
memory)
cc_test(
test_cudnn_bn_add_relu
SRCS cudnn_bn_add_relu_test.cc
DEPS batch_norm_op
fused_bn_add_activation_op
tensor
op_registry
device_context
generator
memory)
endif() endif()
if(CUDA_VERSION GREATER_EQUAL 11.6) if(CUDA_VERSION GREATER_EQUAL 11.6)
......
...@@ -6,7 +6,7 @@ endif() ...@@ -6,7 +6,7 @@ endif()
# add_subdirectory(detection) # add_subdirectory(detection)
# add_subdirectory(dlnne) # add_subdirectory(dlnne)
add_subdirectory(elementwise) add_subdirectory(elementwise)
# add_subdirectory(fused) add_subdirectory(fused)
if(WITH_LITE) if(WITH_LITE)
add_subdirectory(lite) add_subdirectory(lite)
endif() endif()
......
if(WITH_GPU OR WITH_ROCM)
# fusion_group
if(NOT APPLE AND NOT WIN32)
cc_test(
test_fusion_group_op
SRCS fusion_group_op_test.cc
DEPS fusion_group_op)
endif()
if(NOT WITH_ROCM)
nv_test(
test_fused_residual_dropout_bias
SRCS fused_residual_dropout_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
nv_test(
test_fused_dropout_act_bias
SRCS fused_dropout_act_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
nv_test(
test_fused_layernorm_residual_dropout_bias
SRCS fused_layernorm_residual_dropout_bias_test.cu
DEPS tensor
op_registry
dropout_op
layer_norm_op
device_context
generator
memory)
endif()
# resnet_unit needs cudnn 8.0 above
if((NOT WITH_ROCM) AND (NOT ${CUDNN_VERSION} VERSION_LESS 8000))
cc_test(
test_cudnn_norm_conv
SRCS cudnn_norm_conv_test.cc
DEPS conv_op
blas
im2col
vol2col
depthwise_conv
eigen_function
tensor
op_registry
device_context
generator
memory)
cc_test(
test_cudnn_bn_add_relu
SRCS cudnn_bn_add_relu_test.cc
DEPS batch_norm_op
fused_bn_add_activation_op
tensor
op_registry
device_context
generator
memory)
endif()
endif()
...@@ -19,9 +19,9 @@ limitations under the License. */ ...@@ -19,9 +19,9 @@ limitations under the License. */
#include "paddle/fluid/operators/amp/fp16_type_traits.h" #include "paddle/fluid/operators/amp/fp16_type_traits.h"
#include "paddle/fluid/operators/fused/fused_dropout_act_bias.h" #include "paddle/fluid/operators/fused/fused_dropout_act_bias.h"
#include "paddle/fluid/operators/fused/fused_dropout_test.h"
#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/kernels/funcs/functors.h" #include "paddle/phi/kernels/funcs/functors.h"
#include "test/cpp/fluid/fused/fused_dropout_test.h"
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT); PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT);
......
...@@ -17,9 +17,9 @@ limitations under the License. */ ...@@ -17,9 +17,9 @@ limitations under the License. */
#include <random> #include <random>
#include <vector> #include <vector>
#include "paddle/fluid/operators/fused/fused_dropout_test.h"
#include "paddle/fluid/operators/fused/fused_layernorm_residual_dropout_bias.h" #include "paddle/fluid/operators/fused/fused_layernorm_residual_dropout_bias.h"
#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/kernel_registry.h"
#include "test/cpp/fluid/fused/fused_dropout_test.h"
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT); PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT);
......
...@@ -17,9 +17,9 @@ limitations under the License. */ ...@@ -17,9 +17,9 @@ limitations under the License. */
#include <random> #include <random>
#include <vector> #include <vector>
#include "paddle/fluid/operators/fused/fused_dropout_test.h"
#include "paddle/fluid/operators/fused/fused_residual_dropout_bias.h" #include "paddle/fluid/operators/fused/fused_residual_dropout_bias.h"
#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/kernel_registry.h"
#include "test/cpp/fluid/fused/fused_dropout_test.h"
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT); PD_DECLARE_KERNEL(dropout, GPU, ALL_LAYOUT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册