1/*******************************************************************************
2* Copyright 2018-2020 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_GEMM_DRIVER_HPP
18#define CPU_X64_GEMM_GEMM_DRIVER_HPP
19
20#include "oneapi/dnnl/dnnl_types.h"
21
22#include "common/c_types_map.hpp"
23
24#include "cpu/x64/gemm/gemm_info.hpp"
25#include "cpu/x64/gemm/gemm_pack_storage.hpp"
26
27namespace dnnl {
28namespace impl {
29namespace cpu {
30namespace x64 {
31
32template <typename a_type, typename b_type, typename c_type>
33dnnl_status_t gemm_driver(const char *transA, const char *transB,
34 const char *offsetC, const dim_t *m, const dim_t *n, const dim_t *k,
35 const float *alpha, const a_type *a, const dim_t *lda, const a_type *oa,
36 const b_type *b, const dim_t *ldb, const b_type *ob, const float *beta,
37 c_type *c, const dim_t *ldc, const c_type *oc,
38 const bool force_jit_nocopy_gemm, pack_type packing = pack_type::none,
39 gemm_pack_storage_t *pack_dst = NULL, bool measure_only = false);
40
41void prep_ref_gemm_s8u8s32_pack(
42 bool do_a, dim_t rows, dim_t cols, gemm_pack_storage_t *pack_dst);
43
44dnnl_status_t ref_gemm_s8u8s32_pack(const void *src, dim_t ld_src, dim_t rows,
45 dim_t cols, int trans, gemm_pack_storage_t *dst_pack);
46
47} // namespace x64
48} // namespace cpu
49} // namespace impl
50} // namespace dnnl
51
52#endif // CPU_X64_GEMM_GEMM_DRIVER_HPP
53