1 /*******************************************************************************
2 * Copyright 2019-2021 Intel Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 #ifndef CPU_X64_GEMM_BF16_COMMON_S16_HPP
18 #define CPU_X64_GEMM_BF16_COMMON_S16_HPP
19 
20 #include "cpu/x64/jit_generator.hpp"
21 
22 #define S16_COPY_KERNEL_CODE_SIZE (4096L * 8)
23 
24 namespace dnnl {
25 namespace impl {
26 namespace cpu {
27 namespace x64 {
28 
29 class jit_avx512_core_s16_48x8_copy_an_kern : public jit_generator {
30     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_48x8_copy_an_kern);
31     void generate() override ATTRIBUTE_OPTIMIZE;
32 
33 public:
34     jit_avx512_core_s16_48x8_copy_an_kern();
35 };
36 
37 class jit_avx512_core_s16_48x8_copy_at_kern : public jit_generator {
38     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_48x8_copy_at_kern);
39     void generate() override ATTRIBUTE_OPTIMIZE;
40 
41 public:
42     jit_avx512_core_s16_48x8_copy_at_kern();
43 };
44 
45 class jit_avx512_core_s16_48x8_copy_bn_kern : public jit_generator {
46     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_48x8_copy_bn_kern);
47     void generate() override ATTRIBUTE_OPTIMIZE;
48 
49 public:
50     jit_avx512_core_s16_48x8_copy_bn_kern();
51 };
52 
53 class jit_avx512_core_s16_48x8_copy_bt_kern : public jit_generator {
54     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_48x8_copy_bt_kern);
55     void generate() override ATTRIBUTE_OPTIMIZE;
56 
57 public:
58     jit_avx512_core_s16_48x8_copy_bt_kern();
59 };
60 
61 class jit_avx512_core_s16_24x8_copy_an_kern : public jit_generator {
62     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_24x8_copy_an_kern);
63     void generate() override ATTRIBUTE_OPTIMIZE;
64 
65 public:
66     jit_avx512_core_s16_24x8_copy_an_kern();
67 };
68 
69 class jit_avx512_core_s16_24x8_copy_at_kern : public jit_generator {
70     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_24x8_copy_at_kern);
71     void generate() override ATTRIBUTE_OPTIMIZE;
72 
73 public:
74     jit_avx512_core_s16_24x8_copy_at_kern();
75 };
76 
77 class jit_avx512_core_s16_24x8_copy_bn_kern : public jit_generator {
78     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_24x8_copy_bn_kern);
79     void generate() override ATTRIBUTE_OPTIMIZE;
80 
81 public:
82     jit_avx512_core_s16_24x8_copy_bn_kern();
83 };
84 
85 class jit_avx512_core_s16_24x8_copy_bt_kern : public jit_generator {
86     DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_avx512_core_s16_24x8_copy_bt_kern);
87     void generate() override ATTRIBUTE_OPTIMIZE;
88 
89 public:
90     jit_avx512_core_s16_24x8_copy_bt_kern();
91 };
92 
93 } // namespace x64
94 } // namespace cpu
95 } // namespace impl
96 } // namespace dnnl
97 #endif // CPU_X64_GEMM_BF16_COMMON_S16_HPP
98