summaryrefslogtreecommitdiff
path: root/inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp')
-rw-r--r--inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp378
1 files changed, 126 insertions, 252 deletions
diff --git a/inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp b/inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp
index fbba44e71..ad791e6ff 100644
--- a/inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp
+++ b/inference-engine/thirdparty/mkl-dnn/src/cpu/cpu_reorder.cpp
@@ -34,261 +34,135 @@ namespace {
using namespace mkldnn::impl::data_type;
using namespace mkldnn::impl::memory_format;
+#define REG_SR(idt, ifmt, odt, ofmt, ...) \
+ simple_reorder_t<idt, ifmt, odt, ofmt, __VA_ARGS__>::pd_t::create
+
+#define REG_SR_BIDIR(idt, ifmt, odt, ofmt) \
+ REG_SR(idt, ifmt, odt, ofmt, fmt_order::keep), \
+ REG_SR(idt, ifmt, odt, ofmt, fmt_order::reverse)
+
+#define REG_SR_DIRECT_COPY(idt, odt) \
+ REG_SR(idt, any, odt, any, fmt_order::any, spec::direct_copy), \
+ REG_SR(idt, any, odt, any, fmt_order::any, spec::direct_copy_except_dim_0)
+
static const rpd_create_f cpu_reorder_impl_list[] = {
- /* fp32 <-> fp32 */
- simple_reorder_t<f32, any, f32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<f32, any, f32, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
+ /* winograd */
+ wino_reorder_t<f32, f32>::pd_t::create,
+ wino_reorder_t<f32, s8>::pd_t::create,
+
+#ifdef __INTEL_COMPILER
+ /* direct copy for icc, which is faster than jitted code */
+ REG_SR_DIRECT_COPY(f32, f32),
+ REG_SR_DIRECT_COPY(f32, s32),
+ REG_SR_DIRECT_COPY(f32, s8),
+// REG_SR_DIRECT_COPY(f32, u8), FIXME: Disabled due to accuracy failure on int8 network
+ REG_SR_DIRECT_COPY(s32, f32),
+ REG_SR_DIRECT_COPY(s32, s32),
+ REG_SR_DIRECT_COPY(s32, s8),
+ REG_SR_DIRECT_COPY(s32, u8),
+ REG_SR_DIRECT_COPY(s8, f32),
+ REG_SR_DIRECT_COPY(s8, s32),
+ REG_SR_DIRECT_COPY(s8, s8),
+ REG_SR_DIRECT_COPY(s8, u8),
+ REG_SR_DIRECT_COPY(u8, f32),
+ 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 <-> fp32 blocked with tail */
- simple_reorder_t<f32, any, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, nCdhw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, nCdhw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, Oihw16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, Oihw16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, Ohwi16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, Ohwi16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, Oidhw16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, Oidhw16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, Odhwi16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, Odhwi16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIhw16i16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIhw16i16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIdhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIdhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIdhw16i16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, OIdhw16i16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, IOhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, IOhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOihw16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOihw16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOhwi16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOhwi16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOidhw16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOidhw16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOdhwi16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOdhwi16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIhw16i16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIhw16i16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIdhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIdhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIdhw16i16o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gOIdhw16i16o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, gIOhw16o16i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, f32, gIOhw16o16i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nchw, f32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nchw, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, f32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, f32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nchw, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nChw8c, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nChw8c, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, any, f32, any, fmt_order::any, spec::reference>::pd_t::create,
- /* reorder with quantization */
- wino_reorder_t<f32, goihw, s8, wino_fmt, fmt_order::keep>::pd_t::create,
- wino_reorder_t<f32, oihw, s8, wino_fmt, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<f32, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<f32, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, f32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, f32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, f32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- /* nchw <-> nhwc */
- simple_reorder_t<f32, nchw, s32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, s32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nchw, s8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, s8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nchw, u8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nchw, u8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nchw, f32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nchw, f32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nchw, f32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nchw, s32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nchw, s8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nchw, s8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nchw, u8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nchw, u8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nchw, f32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nchw, f32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nchw, s32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nchw, s32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nchw, s8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nchw, s8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nchw, u8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nchw, u8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nchw, f32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nchw, f32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nchw, s32, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nchw, s32, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nchw, s8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nchw, s8, nhwc, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nchw, u8, nhwc, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nchw, u8, nhwc, fmt_order::reverse>::pd_t::create,
- /* nhwc <-> nChw8c */
- simple_reorder_t<s8, nhwc, f32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, f32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, s32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, s32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, s8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, s8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, u8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, u8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, s32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, s32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, s8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, s8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, u8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, u8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, s8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, s8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, s32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, s32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, f32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, f32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, u8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, u8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, s8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, s8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, s32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, s32, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, u8, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, u8, nChw8c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, f32, nChw8c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, f32, nChw8c, fmt_order::reverse>::pd_t::create,
- /* nhwc <-> nChw16c */
- simple_reorder_t<s8, nhwc, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, s32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, s32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, s8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, s8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, nhwc, u8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, nhwc, u8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, s32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, s32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, s8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, s8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<f32, nhwc, u8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<f32, nhwc, u8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, s8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, s8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, s32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, s32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, nhwc, u8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, nhwc, u8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, s8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, s8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, s32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, s32, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, u8, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, u8, nChw16c, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, nhwc, f32, nChw16c, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, nhwc, f32, nChw16c, fmt_order::reverse>::pd_t::create,
- /* s32 <-> fp32 */
- simple_reorder_t<f32, any, s32, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s32, any, f32, any, fmt_order::any, spec::reference>::pd_t::create,
- /* s16 <-> fp32 */
- simple_reorder_t<f32, any, s16, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s16, any, f32, any, fmt_order::any, spec::reference>::pd_t::create,
- /* s8 <-> fp32 */
- simple_reorder_t<f32, any, s8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s8, any, f32, any, fmt_order::any, spec::reference>::pd_t::create,
- /* u8 <-> fp32 */
- simple_reorder_t<f32, any, u8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<u8, any, f32, any, fmt_order::any, spec::reference>::pd_t::create,
- /* int{8,32} <-> int{8, 32} */
- simple_reorder_t<s8, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, s8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<u8, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, u8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s8, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, u8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<u8, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, s8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<u8, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<u8, any, s32, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s8, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s8, any, s32, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s32, any, u8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, u8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s32, any, s8, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, s8, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s32, any, s32, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s32, any, s32, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s8, oihw, s8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, oihw, s8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, goihw, s8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, goihw, s8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, oihw, u8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, oihw, u8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, goihw, u8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, goihw, u8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, oihw, s8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, oihw, s8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, goihw, s8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, goihw, s8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, oihw, u8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, oihw, u8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, goihw, u8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, goihw, u8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, oihw, s32, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, oihw, s32, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, goihw, s32, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<u8, goihw, s32, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, oihw, s32, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, oihw, s32, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s8, goihw, s32, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s8, goihw, s32, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, oihw, u8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, oihw, u8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, goihw, u8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, goihw, u8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, oihw, s8, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, oihw, s8, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, goihw, s8, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, goihw, s8, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, oihw, s32, OIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, oihw, s32, OIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s32, goihw, s32, gOIhw4i16o4i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s32, goihw, s32, gOIhw4i16o4i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<u8, any, s8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s8, any, u8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<u8, any, s32, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s32, any, u8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s8, any, s32, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s32, any, s8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s32, any, s32, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<s8, any, s8, any, fmt_order::any, spec::reference>::pd_t::create,
- simple_reorder_t<u8, any, u8, any, fmt_order::any, spec::reference>::pd_t::create,
+
+ /* fp32: flat <-> blocked with tail */
+ REG_SR_BIDIR(f32, any, f32, nChw8c),
+ REG_SR_BIDIR(f32, any, f32, nChw16c),
+ REG_SR_BIDIR(f32, any, f32, nCdhw16c),
+ REG_SR_BIDIR(f32, nChw8c, f32, nChw16c),
+
+ REG_SR_BIDIR(f32, any, f32, Oihw16o),
+ REG_SR_BIDIR(f32, any, f32, Ohwi16o),
+ REG_SR_BIDIR(f32, any, f32, Oidhw16o),
+ REG_SR_BIDIR(f32, any, f32, Odhwi16o),
+ REG_SR_BIDIR(f32, any, f32, OIhw16o16i),
+ REG_SR_BIDIR(f32, any, f32, OIhw16i16o),
+ REG_SR_BIDIR(f32, any, f32, OIdhw16o16i),
+ REG_SR_BIDIR(f32, any, f32, OIdhw16i16o),
+ REG_SR_BIDIR(f32, any, f32, IOhw16o16i),
+ REG_SR_BIDIR(f32, any, f32, gOihw16o),
+ REG_SR_BIDIR(f32, any, f32, gOhwi16o),
+ REG_SR_BIDIR(f32, any, f32, gOidhw16o),
+ REG_SR_BIDIR(f32, any, f32, gOdhwi16o),
+ REG_SR_BIDIR(f32, any, f32, gOIhw16o16i),
+ REG_SR_BIDIR(f32, any, f32, gOIhw16i16o),
+ REG_SR_BIDIR(f32, any, f32, gOIdhw16o16i),
+ REG_SR_BIDIR(f32, any, f32, gOIdhw16i16o),
+ REG_SR_BIDIR(f32, any, f32, gIOhw16o16i),
+
+ /* int: flat <-> blocked with tail */
+ REG_SR_BIDIR(f32, nhwc, s32, nChw16c),
+ REG_SR_BIDIR(f32, nhwc, s8, nChw16c),
+ REG_SR_BIDIR(f32, nhwc, u8, nChw16c),
+ REG_SR_BIDIR(s32, nhwc, f32, nChw16c),
+ REG_SR_BIDIR(s32, nhwc, s32, nChw16c),
+ REG_SR_BIDIR(s32, nhwc, s8, nChw16c),
+ REG_SR_BIDIR(s32, nhwc, u8, nChw16c),
+ REG_SR_BIDIR(s8, nhwc, f32, nChw16c),
+ REG_SR_BIDIR(s8, nhwc, s32, nChw16c),
+ REG_SR_BIDIR(s8, nhwc, s8, nChw16c),
+ REG_SR_BIDIR(s8, nhwc, u8, nChw16c),
+ REG_SR_BIDIR(u8, nhwc, f32, nChw16c),
+ REG_SR_BIDIR(u8, nhwc, s32, nChw16c),
+ REG_SR_BIDIR(u8, nhwc, s8, nChw16c),
+ REG_SR_BIDIR(u8, nhwc, u8, nChw16c),
+
+ REG_SR_BIDIR(f32, oihw, f32, OIhw4i16o4i),
+ REG_SR_BIDIR(f32, oihw, s8, OIhw4i16o4i),
+ REG_SR_BIDIR(s8, oihw, f32, OIhw4i16o4i),
+ REG_SR_BIDIR(s8, oihw, s8, OIhw4i16o4i),
+ REG_SR_BIDIR(f32, goihw, s8, gOIhw4i16o4i),
+ REG_SR_BIDIR(s8, goihw, f32, gOIhw4i16o4i),
+ REG_SR_BIDIR(f32, goihw, f32, gOIhw4i16o4i),
+ REG_SR_BIDIR(s8, goihw, s8, gOIhw4i16o4i),
+
/* s16 <-> s16 */
- simple_reorder_t<s16, any, s16, any, fmt_order::any, spec::direct_copy>::pd_t::create,
- simple_reorder_t<s16, any, s16, any, fmt_order::any, spec::direct_copy_except_dim_0>::pd_t::create,
- simple_reorder_t<s16, oihw, s16, OIhw8i16o2i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s16, oihw, s16, OIhw8i16o2i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s16, goihw, s16, gOIhw8i16o2i, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s16, goihw, s16, gOIhw8i16o2i, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s16, OIhw8i16o2i, s16, OIhw8o16i2o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s16, OIhw8i16o2i, s16, OIhw8o16i2o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s16, gOIhw8i16o2i, s16, gOIhw8o16i2o, fmt_order::keep>::pd_t::create,
- simple_reorder_t<s16, gOIhw8i16o2i, s16, gOIhw8o16i2o, fmt_order::reverse>::pd_t::create,
- simple_reorder_t<s16, any, s16, any, fmt_order::any, spec::reference>::pd_t::create,
+ REG_SR_DIRECT_COPY(s16, s16),
+ REG_SR_BIDIR(s16, oihw, s16, OIhw8i16o2i),
+ REG_SR_BIDIR(s16, goihw, s16, gOIhw8i16o2i),
+ REG_SR_BIDIR(s16, OIhw8i16o2i, s16, OIhw8o16i2o),
+ REG_SR_BIDIR(s16, gOIhw8i16o2i, s16, gOIhw8o16i2o),
+
+ /* WA to prevent fallback on reference implementations */
+ REG_SR_DIRECT_COPY(u8, f32),
+ REG_SR_BIDIR(u8, nchw, f32, nChw8c),
+ REG_SR_BIDIR(u8, nchw, f32, nChw16c),
+
+ /* 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),
+ REG_SR(f32, any, s8, any, fmt_order::any, spec::reference),
+ REG_SR(f32, any, u8, any, fmt_order::any, spec::reference),
+
+ REG_SR(s32, any, f32, any, fmt_order::any, spec::reference),
+ REG_SR(s32, any, s32, any, fmt_order::any, spec::reference),
+ REG_SR(s32, any, s16, any, fmt_order::any, spec::reference),
+ REG_SR(s32, any, s8, any, fmt_order::any, spec::reference),
+ REG_SR(s32, any, u8, any, fmt_order::any, spec::reference),
+
+ REG_SR(s16, any, f32, any, fmt_order::any, spec::reference),
+ REG_SR(s16, any, s32, any, fmt_order::any, spec::reference),
+ REG_SR(s16, any, s16, any, fmt_order::any, spec::reference),
+
+ REG_SR(s8, any, f32, any, fmt_order::any, spec::reference),
+ REG_SR(s8, any, s32, any, fmt_order::any, spec::reference),
+ REG_SR(s8, any, s8, any, fmt_order::any, spec::reference),
+ REG_SR(s8, any, u8, any, fmt_order::any, spec::reference),
+
+ REG_SR(u8, any, f32, any, fmt_order::any, spec::reference),
+ 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,
};