disabled unused primitives

This commit is contained in:
Attila Afra
2018-12-12 23:23:31 +02:00
parent a513cfa26a
commit 29ba11ae67
5 changed files with 268 additions and 52 deletions
+172 -6
View File
@@ -20,18 +20,184 @@ file(GLOB_RECURSE HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h
${CMAKE_CURRENT_SOURCE_DIR}/../include/*.hpp
)
file(GLOB_RECURSE SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/*.c
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/*.h
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
)
#file(GLOB_RECURSE SOURCES
# ${CMAKE_CURRENT_SOURCE_DIR}/*.c
# ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/*.h
# ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
# )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/common
${CMAKE_CURRENT_SOURCE_DIR}/cpu/xbyak
)
# Add only files that are actually used
file(GLOB_RECURSE SOURCES
common/*.cpp
common/*.hpp
cpu/cpu_barrier.cpp
cpu/cpu_barrier.hpp
cpu/cpu_batch_normalization_pd.hpp
#cpu/cpu_batch_normalization_utils.cpp
#cpu/cpu_batch_normalization_utils.hpp
cpu/cpu_concat.cpp
cpu/cpu_concat.hpp
cpu/cpu_convolution_pd.hpp
cpu/cpu_deconvolution_pd.hpp
cpu/cpu_eltwise_pd.hpp
cpu/cpu_engine.cpp
cpu/cpu_engine.hpp
cpu/cpu_inner_product_pd.hpp
cpu/cpu_isa_traits.hpp
cpu/cpu_lrn_pd.hpp
cpu/cpu_memory.cpp
cpu/cpu_memory.hpp
cpu/cpu_pooling_pd.hpp
cpu/cpu_primitive.hpp
cpu/cpu_reducer.cpp
cpu/cpu_reducer.hpp
cpu/cpu_reorder.cpp
cpu/cpu_reorder_pd.hpp
cpu/cpu_rnn_pd.hpp
cpu/cpu_shuffle_pd.hpp
cpu/cpu_softmax_pd.hpp
cpu/cpu_sum.cpp
cpu/cpu_sum.hpp
#cpu/gemm_convolution.cpp
#cpu/gemm_convolution.hpp
#cpu/gemm_convolution_utils.cpp
#cpu/gemm_convolution_utils.hpp
#cpu/gemm/gemm.cpp
#cpu/gemm/gemm.hpp
#cpu/gemm/gemm_utils.cpp
#cpu/gemm/gemm_utils.hpp
#cpu/gemm_inner_product.cpp
#cpu/gemm_inner_product.hpp
#cpu/gemm/jit_avx512_common_gemm_f32.cpp
#cpu/gemm/jit_avx512_common_gemm_f32.hpp
#cpu/gemm/jit_avx_gemm_f32.cpp
#cpu/gemm/jit_avx_gemm_f32.hpp
#cpu/gemm/os_blas.hpp
#cpu/gemm/ref_gemm.cpp
#cpu/gemm_u8s8s32x_inner_product.cpp
#cpu/gemm_u8s8s32x_inner_product.hpp
#cpu/gemm_x8s8s32x_convolution.cpp
#cpu/gemm_x8s8s32x_convolution.hpp
#cpu/jit_avx2_1x1_conv_kernel_f32.cpp
#cpu/jit_avx2_1x1_conv_kernel_f32.hpp
#cpu/jit_avx2_1x1_convolution.cpp
#cpu/jit_avx2_1x1_convolution.hpp
cpu/jit_avx2_conv_kernel_f32.cpp
cpu/jit_avx2_conv_kernel_f32.hpp
cpu/jit_avx2_convolution.cpp
cpu/jit_avx2_convolution.hpp
#cpu/jit_avx512_common_1x1_conv_kernel.cpp
#cpu/jit_avx512_common_1x1_conv_kernel.hpp
#cpu/jit_avx512_common_1x1_convolution.cpp
#cpu/jit_avx512_common_1x1_convolution.hpp
cpu/jit_avx512_common_conv_kernel.cpp
cpu/jit_avx512_common_conv_kernel.hpp
cpu/jit_avx512_common_convolution.cpp
cpu/jit_avx512_common_convolution.hpp
cpu/jit_avx512_common_convolution_winograd.cpp
cpu/jit_avx512_common_convolution_winograd.hpp
cpu/jit_avx512_common_conv_winograd_kernel_f32.cpp
cpu/jit_avx512_common_conv_winograd_kernel_f32.hpp
#cpu/jit_avx512_common_lrn.cpp
#cpu/jit_avx512_common_lrn.hpp
cpu/jit_avx512_core_fp32_wino_conv_2x3.cpp
cpu/jit_avx512_core_fp32_wino_conv_2x3.hpp
cpu/jit_avx512_core_fp32_wino_conv_4x3.cpp
cpu/jit_avx512_core_fp32_wino_conv_4x3.hpp
cpu/jit_avx512_core_fp32_wino_conv_4x3_kernel.cpp
cpu/jit_avx512_core_fp32_wino_conv_4x3_kernel.hpp
#cpu/jit_avx512_core_i8i8_pooling.cpp
#cpu/jit_avx512_core_i8i8_pooling.hpp
#cpu/jit_avx512_core_u8s8s32x_deconvolution.cpp
#cpu/jit_avx512_core_u8s8s32x_deconvolution.hpp
#cpu/jit_avx512_core_u8s8s32x_wino_convolution.cpp
#cpu/jit_avx512_core_u8s8s32x_wino_convolution.hpp
#cpu/jit_avx512_core_x8s8s32x_1x1_conv_kernel.cpp
#cpu/jit_avx512_core_x8s8s32x_1x1_conv_kernel.hpp
#cpu/jit_avx512_core_x8s8s32x_1x1_convolution.cpp
#cpu/jit_avx512_core_x8s8s32x_1x1_convolution.hpp
#cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp
#cpu/jit_avx512_core_x8s8s32x_conv_kernel.hpp
#cpu/jit_avx512_core_x8s8s32x_convolution.cpp
#cpu/jit_avx512_core_x8s8s32x_convolution.hpp
cpu/jit_generator.hpp
cpu/jit_primitive_conf.hpp
#cpu/jit_sse42_1x1_conv_kernel_f32.cpp
#cpu/jit_sse42_1x1_conv_kernel_f32.hpp
#cpu/jit_sse42_1x1_convolution.cpp
#cpu/jit_sse42_1x1_convolution.hpp
cpu/jit_sse42_conv_kernel_f32.cpp
cpu/jit_sse42_conv_kernel_f32.hpp
cpu/jit_sse42_convolution.cpp
cpu/jit_sse42_convolution.hpp
cpu/jit_transpose_src_utils.cpp
cpu/jit_transpose_src_utils.hpp
#cpu/jit_uni_1x1_conv_utils.hpp
#cpu/jit_uni_batch_normalization.cpp
#cpu/jit_uni_batch_normalization.hpp
#cpu/jit_uni_dw_conv_kernel_f32.cpp
#cpu/jit_uni_dw_conv_kernel_f32.hpp
#cpu/jit_uni_dw_convolution.cpp
#cpu/jit_uni_dw_convolution.hpp
#cpu/jit_uni_eltwise.cpp
#cpu/jit_uni_eltwise.hpp
#cpu/jit_uni_lrn.cpp
#cpu/jit_uni_lrn.hpp
#cpu/jit_uni_lrn_kernel_f32.cpp
#cpu/jit_uni_lrn_kernel_f32.hpp
cpu/jit_uni_pooling.cpp
cpu/jit_uni_pooling.hpp
cpu/jit_uni_pool_kernel_f32.cpp
cpu/jit_uni_pool_kernel_f32.hpp
cpu/jit_uni_reorder.cpp
cpu/jit_uni_reorder.hpp
cpu/jit_uni_reorder_utils.cpp
#cpu/nchw_pooling.cpp
#cpu/nchw_pooling.hpp
#cpu/ncsp_batch_normalization.cpp
#cpu/ncsp_batch_normalization.hpp
#cpu/nhwc_pooling.cpp
#cpu/nhwc_pooling.hpp
#cpu/nspc_batch_normalization.cpp
#cpu/nspc_batch_normalization.hpp
#cpu/ref_batch_normalization.cpp
#cpu/ref_batch_normalization.hpp
#cpu/ref_concat.hpp
#cpu/ref_convolution.cpp
#cpu/ref_convolution.hpp
#cpu/ref_deconvolution.cpp
#cpu/ref_deconvolution.hpp
#cpu/ref_eltwise.cpp
#cpu/ref_eltwise.hpp
#cpu/ref_inner_product.cpp
#cpu/ref_inner_product.hpp
#cpu/ref_lrn.cpp
#cpu/ref_lrn.hpp
#cpu/ref_pooling.cpp
#cpu/ref_pooling.hpp
#cpu/ref_rnn.cpp
#cpu/ref_rnn.hpp
#cpu/ref_shuffle.cpp
#cpu/ref_shuffle.hpp
#cpu/ref_softmax.cpp
#cpu/ref_softmax.hpp
#cpu/ref_sum.hpp
#cpu/simple_concat.cpp
#cpu/simple_concat.hpp
cpu/simple_q10n.hpp
cpu/simple_reorder.hpp
#cpu/simple_sum.cpp
#cpu/simple_sum.hpp
cpu/wino_reorder.hpp
cpu/xbyak/*.h
)
# propagate SRC specific flags
append(CMAKE_C_FLAGS "${CMAKE_SRC_CCXX_FLAGS}")
append(CMAKE_CXX_FLAGS "${CMAKE_SRC_CCXX_FLAGS}")
+80 -44
View File
@@ -24,44 +24,44 @@
#include "cpu_concat.hpp"
#include "cpu_sum.hpp"
#include "cpu/ref_rnn.hpp"
//#include "cpu/ref_rnn.hpp"
#include "cpu/jit_avx512_core_x8s8s32x_1x1_convolution.hpp"
#include "cpu/jit_avx512_common_1x1_convolution.hpp"
//#include "cpu/jit_avx512_core_x8s8s32x_1x1_convolution.hpp"
//#include "cpu/jit_avx512_common_1x1_convolution.hpp"
#include "cpu/jit_avx512_core_fp32_wino_conv_4x3.hpp"
#include "cpu/jit_avx512_common_convolution_winograd.hpp"
#include "cpu/jit_avx512_core_x8s8s32x_convolution.hpp"
//#include "cpu/jit_avx512_core_x8s8s32x_convolution.hpp"
#include "cpu/jit_avx512_common_convolution.hpp"
#include "cpu/jit_avx2_1x1_convolution.hpp"
#include "cpu/jit_sse42_1x1_convolution.hpp"
//#include "cpu/jit_avx2_1x1_convolution.hpp"
//#include "cpu/jit_sse42_1x1_convolution.hpp"
#include "cpu/jit_avx2_convolution.hpp"
#include "cpu/jit_sse42_convolution.hpp"
#include "cpu/gemm_convolution.hpp"
#include "cpu/gemm_x8s8s32x_convolution.hpp"
#include "cpu/ref_convolution.hpp"
#include "cpu/jit_avx512_core_u8s8s32x_deconvolution.hpp"
#include "cpu/ref_deconvolution.hpp"
#include "cpu/ref_shuffle.hpp"
#include "cpu/jit_uni_eltwise.hpp"
#include "cpu/ref_eltwise.hpp"
#include "cpu/ref_softmax.hpp"
//#include "cpu/gemm_convolution.hpp"
//#include "cpu/gemm_x8s8s32x_convolution.hpp"
//#include "cpu/ref_convolution.hpp"
//#include "cpu/jit_avx512_core_u8s8s32x_deconvolution.hpp"
//#include "cpu/ref_deconvolution.hpp"
//#include "cpu/ref_shuffle.hpp"
//#include "cpu/jit_uni_eltwise.hpp"
//#include "cpu/ref_eltwise.hpp"
//#include "cpu/ref_softmax.hpp"
#include "cpu/jit_uni_pooling.hpp"
#include "cpu/jit_avx512_core_i8i8_pooling.hpp"
#include "cpu/ref_pooling.hpp"
#include "cpu/nchw_pooling.hpp"
#include "cpu/nhwc_pooling.hpp"
#include "cpu/jit_avx512_common_lrn.hpp"
#include "cpu/jit_uni_lrn.hpp"
#include "cpu/ref_lrn.hpp"
#include "cpu/jit_uni_batch_normalization.hpp"
#include "cpu/ref_batch_normalization.hpp"
#include "cpu/ncsp_batch_normalization.hpp"
#include "cpu/nspc_batch_normalization.hpp"
#include "cpu/ref_inner_product.hpp"
#include "cpu/gemm_inner_product.hpp"
#include "cpu/gemm_u8s8s32x_inner_product.hpp"
#include "cpu/jit_uni_dw_convolution.hpp"
#include "cpu/jit_avx512_core_u8s8s32x_wino_convolution.hpp"
//#include "cpu/jit_avx512_core_i8i8_pooling.hpp"
//#include "cpu/ref_pooling.hpp"
//#include "cpu/nchw_pooling.hpp"
//#include "cpu/nhwc_pooling.hpp"
//#include "cpu/jit_avx512_common_lrn.hpp"
//#include "cpu/jit_uni_lrn.hpp"
//#include "cpu/ref_lrn.hpp"
//#include "cpu/jit_uni_batch_normalization.hpp"
//#include "cpu/ref_batch_normalization.hpp"
//#include "cpu/ncsp_batch_normalization.hpp"
//#include "cpu/nspc_batch_normalization.hpp"
//#include "cpu/ref_inner_product.hpp"
//#include "cpu/gemm_inner_product.hpp"
//#include "cpu/gemm_u8s8s32x_inner_product.hpp"
//#include "cpu/jit_uni_dw_convolution.hpp"
//#include "cpu/jit_avx512_core_u8s8s32x_wino_convolution.hpp"
#include "cpu/jit_avx512_core_fp32_wino_conv_2x3.hpp"
namespace mkldnn {
@@ -96,9 +96,12 @@ using namespace mkldnn::impl::data_type;
#define INSTANCE(...) &primitive_desc_t::create<__VA_ARGS__::pd_t>
static const pd_create_f cpu_impl_list[] = {
/* RNN */
/*
INSTANCE(ref_rnn_fwd_t),
INSTANCE(ref_rnn_bwd_t),
*/
/* conv */
/*
INSTANCE(jit_avx512_common_dw_convolution_fwd_t),
INSTANCE(jit_avx512_common_dw_convolution_bwd_data_t),
INSTANCE(jit_avx512_common_dw_convolution_bwd_weights_t),
@@ -107,16 +110,18 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(jit_avx512_common_1x1_convolution_bwd_weights_t),
INSTANCE(jit_avx512_common_1x1_convolution_fwd_s16s16s32_t),
INSTANCE(jit_avx512_common_1x1_convolution_bwd_data_s16s16s32_t),
*/
INSTANCE(jit_avx512_core_fp32_wino_conv_2x3_fwd_t),
INSTANCE(jit_avx512_core_fp32_wino_conv_4x3_fwd_t),
INSTANCE(jit_avx512_core_fp32_wino_conv_4x3_bwd_data_t),
INSTANCE(jit_avx512_core_fp32_wino_conv_4x3_bwd_weights_t),
//INSTANCE(jit_avx512_core_fp32_wino_conv_4x3_bwd_data_t),
//INSTANCE(jit_avx512_core_fp32_wino_conv_4x3_bwd_weights_t),
INSTANCE(jit_avx512_common_convolution_winograd_fwd_t),
INSTANCE(jit_avx512_common_convolution_winograd_bwd_data_t),
INSTANCE(jit_avx512_common_convolution_winograd_bwd_weights_t),
//INSTANCE(jit_avx512_common_convolution_winograd_bwd_data_t),
//INSTANCE(jit_avx512_common_convolution_winograd_bwd_weights_t),
INSTANCE(jit_avx512_common_convolution_fwd_t<f32>),
INSTANCE(jit_avx512_common_convolution_bwd_data_t<f32>),
INSTANCE(jit_avx512_common_convolution_bwd_weights_t<f32>),
//INSTANCE(jit_avx512_common_convolution_bwd_data_t<f32>),
//INSTANCE(jit_avx512_common_convolution_bwd_weights_t<f32>),
/*
INSTANCE(jit_avx2_dw_convolution_fwd_t),
INSTANCE(jit_avx2_dw_convolution_bwd_data_t),
INSTANCE(jit_avx2_dw_convolution_bwd_weights_t),
@@ -127,17 +132,21 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(jit_sse42_dw_convolution_bwd_data_t),
INSTANCE(jit_sse42_dw_convolution_bwd_weights_t),
INSTANCE(jit_sse42_1x1_convolution_fwd_t),
*/
INSTANCE(jit_avx2_convolution_fwd_t),
INSTANCE(jit_avx2_convolution_bwd_data_t),
INSTANCE(jit_avx2_convolution_bwd_weights_t),
//INSTANCE(jit_avx2_convolution_bwd_data_t),
//INSTANCE(jit_avx2_convolution_bwd_weights_t),
INSTANCE(jit_sse42_convolution_fwd_t),
/*
INSTANCE(gemm_convolution_fwd_t),
INSTANCE(gemm_convolution_bwd_data_t),
INSTANCE(gemm_convolution_bwd_weights_t),
INSTANCE(ref_convolution_fwd_t<f32>),
INSTANCE(ref_convolution_bwd_data_t<f32, f32, f32, f32>),
INSTANCE(ref_convolution_bwd_weights_t<f32, f32, f32, f32>),
*/
/* conv (int) */
/*
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_fwd_t<f32>),
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_fwd_t<s32>),
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_fwd_t<s8>),
@@ -184,7 +193,9 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(ref_convolution_bwd_data_t<s8, s8, u8, s32>),
INSTANCE(ref_convolution_bwd_data_t<u8, s8, u8, s32>),
INSTANCE(ref_convolution_bwd_weights_t<s16, s32, s16, s32>),
*/
/* deconv */
/*
INSTANCE(_jit_avx512_core_u8s8s32x_deconvolution_fwd_t<s32>),
INSTANCE(_jit_avx512_core_u8s8s32x_deconvolution_fwd_t<u8>),
INSTANCE(_jit_avx512_core_u8s8s32x_deconvolution_fwd_t<s8>),
@@ -192,10 +203,14 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(ref_deconvolution_bwd_weights_t),
INSTANCE(ref_deconvolution_bwd_data_t),
INSTANCE(ref_deconvolution_fwd_t),
*/
/* shuffle */
INSTANCE(ref_shuffle_t<4>), /* f32 or s32 */
INSTANCE(ref_shuffle_t<1>), /* s8 or u8 */
/*
INSTANCE(ref_shuffle_t<4>), // f32 or s32
INSTANCE(ref_shuffle_t<1>), // s8 or u8
*/
/* eltwise */
/*
INSTANCE(jit_uni_eltwise_fwd_t<avx512_common>),
INSTANCE(jit_uni_eltwise_bwd_t<avx512_common>),
INSTANCE(jit_uni_eltwise_fwd_t<avx2>),
@@ -204,30 +219,38 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(jit_uni_eltwise_bwd_t<sse42>),
INSTANCE(ref_eltwise_fwd_t<f32>),
INSTANCE(ref_eltwise_bwd_t<f32>),
*/
/* eltwise (int) */
/*
INSTANCE(ref_eltwise_fwd_t<s32>),
INSTANCE(ref_eltwise_fwd_t<s16>),
INSTANCE(ref_eltwise_fwd_t<s8>),
INSTANCE(ref_eltwise_fwd_t<u8>),
INSTANCE(ref_eltwise_bwd_t<s32>),
INSTANCE(ref_eltwise_bwd_t<s16>),
*/
/* softmax */
/*
INSTANCE(ref_softmax_fwd_t<f32>),
INSTANCE(ref_softmax_bwd_t<f32>),
*/
/* pool */
INSTANCE(jit_uni_pooling_fwd_t<avx512_common>),
INSTANCE(jit_uni_pooling_bwd_t<avx512_common>),
//INSTANCE(jit_uni_pooling_bwd_t<avx512_common>),
INSTANCE(jit_uni_pooling_fwd_t<avx>),
INSTANCE(jit_uni_pooling_bwd_t<avx>),
//INSTANCE(jit_uni_pooling_bwd_t<avx>),
INSTANCE(jit_uni_pooling_fwd_t<sse42>),
INSTANCE(jit_uni_pooling_bwd_t<sse42>),
//INSTANCE(jit_uni_pooling_bwd_t<sse42>),
/*
INSTANCE(nchw_pooling_fwd_t<f32>),
INSTANCE(nchw_pooling_bwd_t<f32>),
INSTANCE(nhwc_pooling_fwd_t<f32>),
INSTANCE(nhwc_pooling_bwd_t<f32>),
INSTANCE(ref_pooling_fwd_t<f32>),
INSTANCE(ref_pooling_bwd_t<f32>),
*/
/* pool (int) */
/*
INSTANCE(jit_avx512_core_i8i8_pooling_fwd_t),
INSTANCE(ref_pooling_fwd_t<s32>),
INSTANCE(ref_pooling_fwd_t<s16, s32>),
@@ -235,7 +258,9 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(ref_pooling_fwd_t<u8, s32>),
INSTANCE(ref_pooling_bwd_t<s32>),
INSTANCE(ref_pooling_bwd_t<s16, s32>),
*/
/* lrn */
/*
INSTANCE(jit_avx512_common_lrn_fwd_t),
INSTANCE(jit_avx512_common_lrn_bwd_t),
INSTANCE(jit_uni_lrn_fwd_t<avx2>),
@@ -243,7 +268,9 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(jit_uni_lrn_fwd_t<sse42>),
INSTANCE(ref_lrn_fwd_t<f32>),
INSTANCE(ref_lrn_bwd_t<f32>),
*/
/* batch normalization */
/*
INSTANCE(jit_uni_batch_normalization_fwd_t<avx512_common>),
INSTANCE(jit_uni_batch_normalization_bwd_t<avx512_common>),
INSTANCE(jit_uni_batch_normalization_fwd_t<avx2>),
@@ -256,14 +283,18 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(nspc_batch_normalization_bwd_t),
INSTANCE(ref_batch_normalization_fwd_t<f32>),
INSTANCE(ref_batch_normalization_bwd_t<f32>),
*/
/* inner product */
/*
INSTANCE(gemm_inner_product_fwd_t<f32>),
INSTANCE(gemm_inner_product_bwd_data_t<f32>),
INSTANCE(gemm_inner_product_bwd_weights_t<f32>),
INSTANCE(ref_inner_product_fwd_t<f32>),
INSTANCE(ref_inner_product_bwd_data_t<f32, f32, f32, f32>),
INSTANCE(ref_inner_product_bwd_weights_t<f32>),
*/
/* inner product (int) */
/*
INSTANCE(gemm_u8s8s32x_inner_product_fwd_t<u8>),
INSTANCE(gemm_u8s8s32x_inner_product_fwd_t<s8>),
INSTANCE(gemm_u8s8s32x_inner_product_fwd_t<s32>),
@@ -274,7 +305,9 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(ref_inner_product_fwd_t<u8, s8, f32, s32>),
INSTANCE(ref_inner_product_fwd_t<s16, s16, s32, s32>),
INSTANCE(ref_inner_product_bwd_data_t<s32, s16, s16, s32>),
*/
/* conv_eltwise */
/*
INSTANCE(jit_avx512_common_dw_convolution_relu_t),
INSTANCE(jit_avx512_common_convolution_winograd_relu_t),
INSTANCE(jit_avx512_common_1x1_convolution_relu_f32_t),
@@ -287,7 +320,9 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(jit_sse42_convolution_relu_t),
INSTANCE(gemm_convolution_relu_t),
INSTANCE(ref_convolution_relu_t<f32>),
*/
/* conv_eltwise (int) */
/*
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_relu_t<f32>),
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_relu_t<s32>),
INSTANCE(jit_avx512_core_u8s8s32x_wino_convolution_relu_t<s8>),
@@ -322,6 +357,7 @@ static const pd_create_f cpu_impl_list[] = {
INSTANCE(ref_convolution_relu_t<u8, s8, s32, s32>),
INSTANCE(ref_convolution_relu_t<u8, s8, s8, s32>),
INSTANCE(ref_convolution_relu_t<u8, s8, u8, s32>),
*/
/* eol */
nullptr,
};
+4
View File
@@ -265,6 +265,7 @@ status_t cpu_memory_t::typed_zero_pad() {
const auto fmt = mpd.format();
/* data */
/*
# define MAYBE_DATA(f) if (fmt == f) \
{ typed_zero_pad_data<dt, f>(mpd, data); return success; }
MAYBE_DATA(nCw8c);
@@ -273,8 +274,10 @@ status_t cpu_memory_t::typed_zero_pad() {
MAYBE_DATA(nCdhw8c);
MAYBE_DATA(nChw16c);
MAYBE_DATA(nCdhw16c);
*/
/* weights */
/*
# define MAYBE_WEIGHTS(f) if (fmt == f) \
{ typed_zero_pad_weights<dt, f>(mpd, data); return success; }
MAYBE_WEIGHTS(OIdhw8i8o);
@@ -344,6 +347,7 @@ status_t cpu_memory_t::typed_zero_pad() {
MAYBE_WEIGHTS(Goihw8g);
MAYBE_WEIGHTS(Goihw16g);
# undef MAYBE_WEIGHTS
*/
// the last line of defence
if (types::format_normalize(fmt) == blocked) {
+10
View File
@@ -61,6 +61,7 @@ static const rpd_create_f cpu_reorder_impl_list[] = {
#ifdef __INTEL_COMPILER
/* direct copy for icc, which is faster than jitted code */
/*
REG_SR_DIRECT_COPY(f32, s32),
REG_SR_DIRECT_COPY(f32, s8),
REG_SR_DIRECT_COPY(f32, u8),
@@ -76,12 +77,14 @@ static const rpd_create_f cpu_reorder_impl_list[] = {
REG_SR_DIRECT_COPY(u8, s32),
REG_SR_DIRECT_COPY(u8, s8),
REG_SR_DIRECT_COPY(u8, u8),
*/
#endif
/* jit */
jit_uni_reorder_create,
/* fp32: flat <-> blocked with tail */
/*
REG_SR_BIDIR(f32, any, f32, nCw8c),
REG_SR_BIDIR(f32, any, f32, OIw8i8o),
REG_SR_BIDIR(f32, any, f32, OIw8o8i),
@@ -133,9 +136,11 @@ static const rpd_create_f cpu_reorder_impl_list[] = {
REG_SR_BIDIR(f32, any, f32, gOdhwi16o),
REG_SR_BIDIR(f32, any, f32, gOIdhw16o16i),
REG_SR_BIDIR(f32, any, f32, gOIdhw16i16o),
*/
/* int: flat <-> blocked with tail */
/*
REG_SR_BIDIR(f32, any, s32, nChw16c),
REG_SR_BIDIR(f32, any, s8, nChw16c),
REG_SR_BIDIR(f32, any, u8, nChw16c),
@@ -165,16 +170,20 @@ static const rpd_create_f cpu_reorder_impl_list[] = {
REG_SR(f32, any, s8, hwigo_s8s8, fmt_order::keep),
REG_SR(f32, oihw, s8, OIhw4i16o4i_s8s8, fmt_order::keep),
REG_SR(f32, goihw, s8, gOIhw4i16o4i_s8s8, fmt_order::keep),
*/
/* s16 <-> s16 */
/*
REG_SR_DIRECT_COPY(s16, s16),
REG_SR_BIDIR(s16, any, s16, OIhw8i16o2i),
REG_SR_BIDIR(s16, any, s16, gOIhw8i16o2i),
REG_SR_BIDIR(s16, OIhw8i16o2i, s16, OIhw8o16i2o),
REG_SR_BIDIR(s16, gOIhw8i16o2i, s16, gOIhw8o16i2o),
*/
/* reference: the last line of defence */
/*
REG_SR(f32, any, f32, any, fmt_order::any, spec::reference),
REG_SR(f32, any, s32, any, fmt_order::any, spec::reference),
REG_SR(f32, any, s16, any, fmt_order::any, spec::reference),
@@ -200,6 +209,7 @@ static const rpd_create_f cpu_reorder_impl_list[] = {
REG_SR(u8, any, s32, any, fmt_order::any, spec::reference),
REG_SR(u8, any, u8, any, fmt_order::any, spec::reference),
REG_SR(u8, any, s8, any, fmt_order::any, spec::reference),
*/
/* eol */
nullptr,
+2 -2
View File
@@ -85,13 +85,13 @@ template <SIMPLE_REORDER_TEMPL_DECL, typename spec = void>
struct simple_reorder_impl {};
namespace {
bool simple_fmt_check(bool order_keep, impl::memory_format_t fmt_i,
inline bool simple_fmt_check(bool order_keep, impl::memory_format_t fmt_i,
impl::memory_format_t fmt_o, const memory_desc_wrapper &input_d,
const memory_desc_wrapper &output_d) {
return input_d.format() == (order_keep ? fmt_i : fmt_o)
&& output_d.format() == (order_keep ? fmt_o : fmt_i);
}
bool simple_attr_check(const primitive_attr_t *attr, bool many_scales_support) {
inline bool simple_attr_check(const primitive_attr_t *attr, bool many_scales_support) {
if (many_scales_support)
return true;
return IMPLICATION(attr, attr->output_scales_.mask_ == 0);