1 | /* |
2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
3 | * All rights reserved. |
4 | * This source code is licensed under the BSD-style license found in the |
5 | * LICENSE file in the root directory of this source tree. |
6 | */ |
7 | #pragma once |
8 | |
9 | #include <cstdint> // for std::int32_t |
10 | #include "fbgemm/FbgemmBuild.h" |
11 | |
12 | namespace fbgemm { |
13 | |
14 | /** |
15 | * @brief Sum a given vector. |
16 | */ |
17 | FBGEMM_API std::int32_t reduceAvx2(const std::uint8_t* A, int len); |
18 | |
19 | /** |
20 | * @brief Transpose 8 rows from source matrix. |
21 | */ |
22 | void transpose_8rows( |
23 | int N, |
24 | const uint8_t* src, |
25 | int ld_src, |
26 | uint8_t* dst, |
27 | int ld_dst); |
28 | |
29 | /** |
30 | * @brief avx2 part of the spmdm code. |
31 | */ |
32 | void spmdmKernelAvx2( |
33 | int N, |
34 | const uint8_t* A_buffer, |
35 | const int32_t* colptr, |
36 | const int8_t* values, |
37 | const int16_t* rowidx, |
38 | int32_t* C_buffer); |
39 | |
40 | } // namespace fbgemm |
41 | |