Optimized BF16 GEMM Kernels for AVX-512. More...
#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "bf16_utils.h"#include "ckernel_engine.h"#include "ck_threadpool.h"Go to the source code of this file.
Macros | |
| #define | BLK_K 256 |
| #define | BLK_M 64 |
| #define | BLK_N 64 |
Functions | |
| __attribute__ ((unused)) | |
| static void | ck_bf16_convert_work (int ith, int nth, void *opaque) |
| static void | ck_bf16_round_work (int ith, int nth, void *opaque) |
| int | ck_gemm_bf16_amx_available (void) |
| static void | ck_gemm_bf16_amx_work (int ith, int nth, void *opaque) |
| int | ck_gemm_bf16_fp32out_amx_raw (const uint16_t *A, const uint16_t *B, float *C, int M, int N, int K, int accumulate) |
| static void | ck_gemm_bf16_native_work (int ith, int nth, void *opaque) |
| static void | ck_gemm_nt_bf16_accurate_storage_rows (int begin, int end, void *opaque) |
| static void | ck_gemm_nt_bf16_exact_rows (int begin, int end, void *opaque) |
| static void | ck_gemm_nt_bf16_storage_exact_rows (int begin, int end, void *opaque) |
| static void | ck_gemv_bf16_rows (int begin, int end, void *opaque) |
| static void | ck_gemv_bf16_storage_rows (int begin, int end, void *opaque) |
| static int | ck_min_i (int a, int b) |
| static void | ck_patch_projection_bf16_native_work (int ith, int nth, void *opaque) |
| static void | ck_pytorch_brgemm_fault (const char *message, int M, int N, int K) |
| static void | ck_pytorch_brgemm_workspace_sizes (int M, int N, int K, size_t *input_bytes, size_t *output_bytes, size_t *bias_bytes) |
| void | gemm_backward_bf16_mixed (const uint16_t *d_output, const uint16_t *input, const uint16_t *weight, float *d_input, float *d_weight, float *d_bias, int tokens, int in_dim, int out_dim) |
| void | gemm_bf16_fp32out (const uint16_t *A, const uint16_t *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_blocked_serial_bf16 (const uint16_t *A, const uint16_t *B, const uint16_t *bias, uint16_t *C, int M, int N, int K) |
| void | gemm_nn_bf16 (const uint16_t *A, const uint16_t *B, const uint16_t *bias, uint16_t *C, int M, int N, int K) |
| void | gemm_nt_bf16 (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_accurate_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_accurate_storage_parallel_dispatch (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_accurate_storage_row_range (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, int row_begin, int row_end) |
| void | gemm_nt_bf16_amx_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_amx_bf16_storage_workspace (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, uint16_t *a_bf16, size_t a_bf16_bytes) |
| void | gemm_nt_bf16_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_bf16_storage_parallel_dispatch (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_bf16_storage_row_range (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, int row_begin, int row_end) |
| void | gemm_nt_bf16_native_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_parallel_dispatch (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_prefill_shape_safe_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_prefill_shape_safe_bf16_storage_workspace (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, uint16_t *a_bf16, size_t a_bf16_bytes) |
| void | gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| void | gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage_workspace (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, uint16_t *input_bf16, size_t input_bf16_bytes, uint16_t *output_bf16, size_t output_bf16_bytes, uint16_t *bias_bf16, size_t bias_bf16_bytes) |
| void | gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| static void | gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl (const float *A, const void *B, const float *bias, float *C, int M, int N, int K) |
| static void | gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_workspace_impl (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, uint16_t *input_bf16, size_t input_bf16_bytes, uint16_t *output_bf16, size_t output_bf16_bytes, uint16_t *bias_bf16, size_t bias_bf16_bytes) |
| void | gemm_nt_bf16_row_range (const float *A, const void *B, const float *bias, float *C, int M, int N, int K, int row_begin, int row_end) |
| void | gemm_tn_bf16 (const uint16_t *A, const uint16_t *B, const uint16_t *bias, uint16_t *C, int M, int N, int K) |
| void | gemv_bf16 (float *y, const void *W, const float *x, int M, int K) |
| void | gemv_bf16_bf16_storage (float *y, const void *W, const float *x, int M, int K) |
| void | gemv_bf16_bf16_storage_parallel_dispatch (float *y, const void *W, const float *x, int M, int K) |
| static void | gemv_bf16_bf16_storage_row_range (float *y, const uint16_t *w, const float *x, int M, int K, int row_begin, int row_end) |
| void | gemv_bf16_parallel_dispatch (float *y, const void *W, const float *x, int M, int K) |
| static void | gemv_bf16_row_range (float *y, const uint16_t *w, const float *x, int M, int K, int row_begin, int row_end) |
| void | patch_projection_bf16_pytorch_onednn_conv3d_storage (const float *input, const void *weights, const float *bias, float *output, int batch, int out_channels, int in_channels, int temporal, int patch_h, int patch_w) |
| void | patch_projection_image_bf16_native_storage (const float *image, const void *weights_t0, const void *weights_t1, const float *bias, float *output, int channels, int image_h, int image_w, int patch_size, int out_channels, int merge_size) |
| void | patch_projection_image_bf16_pytorch_onednn_conv3d_storage (const float *image, const void *weights_t0, const void *weights_t1, const float *bias, float *output, int channels, int image_h, int image_w, int patch_size, int out_channels, int merge_size) |
Optimized BF16 GEMM Kernels for AVX-512.
After changes: make test && make llamacpp-parity-full
Layout: A: [M x K] row-major (BF16) B: [N x K] row-major, stored as [out x in] (BF16) C: [M x N] row-major (BF16 or FP32)
Key optimizations:
Definition in file gemm_kernels_bf16.c.
| #define BLK_K 256 |
Definition at line 63 of file gemm_kernels_bf16.c.
| #define BLK_M 64 |
Definition at line 61 of file gemm_kernels_bf16.c.
| #define BLK_N 64 |
Definition at line 62 of file gemm_kernels_bf16.c.
| __attribute__ | ( | (unused) | ) |
Definition at line 71 of file gemm_kernels_bf16.c.
References __attribute__(), bf16_to_float(), C, and float_to_bf16().
|
static |
Definition at line 1107 of file gemm_kernels_bf16.c.
References end, and float_to_bf16().
Referenced by gemm_nt_bf16_amx_bf16_storage_workspace().
|
static |
Definition at line 1193 of file gemm_kernels_bf16.c.
References bf16_to_float(), end, and float_to_bf16().
Referenced by gemm_nt_bf16_amx_bf16_storage_workspace().
| int ck_gemm_bf16_amx_available | ( | void | ) |
Definition at line 1203 of file gemm_kernels_bf16.c.
Referenced by ck_attention_full_bf16_sdpa_amx_range(), gemm_nt_bf16_prefill_shape_safe_bf16_storage(), and gemm_nt_bf16_prefill_shape_safe_bf16_storage_workspace().
|
static |
Definition at line 1126 of file gemm_kernels_bf16.c.
Referenced by gemm_nt_bf16_amx_bf16_storage_workspace().
| int ck_gemm_bf16_fp32out_amx_raw | ( | const uint16_t * | A, |
| const uint16_t * | B, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| int | accumulate | ||
| ) |
Definition at line 1212 of file gemm_kernels_bf16.c.
References C.
Referenced by ck_attention_full_bf16_sdpa_amx_range().
|
static |
Definition at line 976 of file gemm_kernels_bf16.c.
References bf16_to_float(), and float_to_bf16().
Referenced by gemm_nt_bf16_native_bf16_storage().
|
static |
Definition at line 2119 of file gemm_kernels_bf16.c.
References end, and gemm_nt_bf16_accurate_storage_row_range().
Referenced by gemm_nt_bf16_accurate_storage_parallel_dispatch().
|
static |
Definition at line 775 of file gemm_kernels_bf16.c.
References end, and gemm_nt_bf16_row_range().
Referenced by gemm_nt_bf16_parallel_dispatch().
|
static |
Definition at line 2110 of file gemm_kernels_bf16.c.
References end, and gemm_nt_bf16_bf16_storage_row_range().
Referenced by gemm_nt_bf16_bf16_storage_parallel_dispatch().
|
static |
Definition at line 646 of file gemm_kernels_bf16.c.
References end, and gemv_bf16_row_range().
Referenced by gemv_bf16_parallel_dispatch().
|
static |
Definition at line 688 of file gemm_kernels_bf16.c.
References end, and gemv_bf16_bf16_storage_row_range().
Referenced by gemv_bf16_bf16_storage_parallel_dispatch().
|
inlinestatic |
Definition at line 65 of file gemm_kernels_bf16.c.
|
static |
Definition at line 1922 of file gemm_kernels_bf16.c.
References bf16_to_float(), end, and float_to_bf16().
Referenced by patch_projection_image_bf16_native_storage().
|
static |
Definition at line 31 of file gemm_kernels_bf16.c.
Referenced by ck_pytorch_brgemm_workspace_sizes(), gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl(), gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_workspace_impl(), patch_projection_bf16_pytorch_onednn_conv3d_storage(), and patch_projection_image_bf16_pytorch_onednn_conv3d_storage().
|
static |
Definition at line 1430 of file gemm_kernels_bf16.c.
References ck_pytorch_brgemm_fault().
Referenced by gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl(), and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_workspace_impl().
| void gemm_backward_bf16_mixed | ( | const uint16_t * | d_output, |
| const uint16_t * | input, | ||
| const uint16_t * | weight, | ||
| float * | d_input, | ||
| float * | d_weight, | ||
| float * | d_bias, | ||
| int | tokens, | ||
| int | in_dim, | ||
| int | out_dim | ||
| ) |
Definition at line 2194 of file gemm_kernels_bf16.c.
References bf16_to_float().
| void gemm_bf16_fp32out | ( | const uint16_t * | A, |
| const uint16_t * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 460 of file gemm_kernels_bf16.c.
References bf16_to_float(), and C.
Referenced by mlp_token_parallel_bf16(), and mlp_token_parallel_bf16_fp32act().
| void gemm_blocked_serial_bf16 | ( | const uint16_t * | A, |
| const uint16_t * | B, | ||
| const uint16_t * | bias, | ||
| uint16_t * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 431 of file gemm_kernels_bf16.c.
References C.
| void gemm_nn_bf16 | ( | const uint16_t * | A, |
| const uint16_t * | B, | ||
| const uint16_t * | bias, | ||
| uint16_t * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 815 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, and float_to_bf16().
| void gemm_nt_bf16 | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 755 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_row_range().
Referenced by gemm_nt_bf16_parallel_dispatch().
| void gemm_nt_bf16_accurate_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 2185 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_accurate_storage_parallel_dispatch().
| void gemm_nt_bf16_accurate_storage_parallel_dispatch | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 2161 of file gemm_kernels_bf16.c.
References C, ck_gemm_nt_bf16_accurate_storage_rows(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), and gemm_nt_bf16_accurate_storage_row_range().
Referenced by gemm_nt_bf16_accurate_storage().
| void gemm_nt_bf16_accurate_storage_row_range | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| int | row_begin, | ||
| int | row_end | ||
| ) |
Definition at line 2070 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, and float_to_bf16().
Referenced by ck_gemm_nt_bf16_accurate_storage_rows(), and gemm_nt_bf16_accurate_storage_parallel_dispatch().
| void gemm_nt_bf16_amx_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 1318 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_amx_bf16_storage_workspace().
Referenced by gemm_nt_bf16_prefill_shape_safe_bf16_storage().
| void gemm_nt_bf16_amx_bf16_storage_workspace | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| uint16_t * | a_bf16, | ||
| size_t | a_bf16_bytes | ||
| ) |
Definition at line 1265 of file gemm_kernels_bf16.c.
References C, ck_bf16_convert_work(), ck_bf16_round_work(), ck_gemm_bf16_amx_work(), ck_threadpool_dispatch_n(), ck_threadpool_global(), and ck_threadpool_n_threads().
Referenced by gemm_nt_bf16_amx_bf16_storage(), and gemm_nt_bf16_prefill_shape_safe_bf16_storage_workspace().
| void gemm_nt_bf16_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 2152 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_bf16_storage_parallel_dispatch().
| void gemm_nt_bf16_bf16_storage_parallel_dispatch | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 2128 of file gemm_kernels_bf16.c.
References C, ck_gemm_nt_bf16_storage_exact_rows(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), and gemm_nt_bf16_bf16_storage_row_range().
Referenced by gemm_nt_bf16_bf16_storage().
| void gemm_nt_bf16_bf16_storage_row_range | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| int | row_begin, | ||
| int | row_end | ||
| ) |
Definition at line 2054 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, float_to_bf16(), and gemm_nt_bf16_row_range().
Referenced by ck_gemm_nt_bf16_storage_exact_rows(), and gemm_nt_bf16_bf16_storage_parallel_dispatch().
| void gemm_nt_bf16_native_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 1078 of file gemm_kernels_bf16.c.
References C, ck_gemm_bf16_native_work(), ck_threadpool_dispatch_n(), ck_threadpool_global(), and ck_threadpool_n_threads().
Referenced by gemm_nt_bf16_prefill_shape_safe_bf16_storage(), and gemm_nt_bf16_prefill_shape_safe_bf16_storage_workspace().
| void gemm_nt_bf16_parallel_dispatch | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 784 of file gemm_kernels_bf16.c.
References C, ck_gemm_nt_bf16_exact_rows(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), and gemm_nt_bf16().
| void gemm_nt_bf16_prefill_shape_safe_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 1354 of file gemm_kernels_bf16.c.
References C, ck_gemm_bf16_amx_available(), gemm_nt_bf16_amx_bf16_storage(), and gemm_nt_bf16_native_bf16_storage().
| void gemm_nt_bf16_prefill_shape_safe_bf16_storage_workspace | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| uint16_t * | a_bf16, | ||
| size_t | a_bf16_bytes | ||
| ) |
Definition at line 1340 of file gemm_kernels_bf16.c.
References C, ck_gemm_bf16_amx_available(), gemm_nt_bf16_amx_bf16_storage_workspace(), and gemm_nt_bf16_native_bf16_storage().
| void gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 1601 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl().
| void gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage_workspace | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| uint16_t * | input_bf16, | ||
| size_t | input_bf16_bytes, | ||
| uint16_t * | output_bf16, | ||
| size_t | output_bf16_bytes, | ||
| uint16_t * | bias_bf16, | ||
| size_t | bias_bf16_bytes | ||
| ) |
Definition at line 1614 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_workspace_impl().
Referenced by ck_attention_muse_eager_bf16_storage_impl().
| void gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 1586 of file gemm_kernels_bf16.c.
References C, and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl().
|
static |
Definition at line 1559 of file gemm_kernels_bf16.c.
References C, ck_pytorch_brgemm_fault(), ck_pytorch_brgemm_workspace_sizes(), and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_workspace_impl().
Referenced by gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage(), and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage().
|
static |
Definition at line 1451 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, ck_pytorch_brgemm_fault(), ck_pytorch_brgemm_workspace_sizes(), and float_to_bf16().
Referenced by gemm_nt_bf16_pytorch_onednn_3_12_brgemm_bf16_storage_workspace(), and gemm_nt_bf16_pytorch_onednn_brgemm_bf16_storage_impl().
| void gemm_nt_bf16_row_range | ( | const float * | A, |
| const void * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K, | ||
| int | row_begin, | ||
| int | row_end | ||
| ) |
Definition at line 727 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, and float_to_bf16().
Referenced by ck_gemm_nt_bf16_exact_rows(), gemm_nt_bf16(), and gemm_nt_bf16_bf16_storage_row_range().
| void gemm_tn_bf16 | ( | const uint16_t * | A, |
| const uint16_t * | B, | ||
| const uint16_t * | bias, | ||
| uint16_t * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 882 of file gemm_kernels_bf16.c.
References bf16_to_float(), C, and float_to_bf16().
| void gemv_bf16 | ( | float * | y, |
| const void * | W, | ||
| const float * | x, | ||
| int | M, | ||
| int | K | ||
| ) |
Definition at line 629 of file gemm_kernels_bf16.c.
References gemv_bf16_row_range().
Referenced by gemv_bf16_parallel_dispatch().
| void gemv_bf16_bf16_storage | ( | float * | y, |
| const void * | W, | ||
| const float * | x, | ||
| int | M, | ||
| int | K | ||
| ) |
Definition at line 719 of file gemm_kernels_bf16.c.
References gemv_bf16_bf16_storage_parallel_dispatch().
| void gemv_bf16_bf16_storage_parallel_dispatch | ( | float * | y, |
| const void * | W, | ||
| const float * | x, | ||
| int | M, | ||
| int | K | ||
| ) |
Definition at line 695 of file gemm_kernels_bf16.c.
References ck_gemv_bf16_storage_rows(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), and gemv_bf16_bf16_storage_row_range().
Referenced by gemv_bf16_bf16_storage().
|
static |
Definition at line 676 of file gemm_kernels_bf16.c.
References bf16_to_float(), float_to_bf16(), and gemv_bf16_row_range().
Referenced by ck_gemv_bf16_storage_rows(), and gemv_bf16_bf16_storage_parallel_dispatch().
| void gemv_bf16_parallel_dispatch | ( | float * | y, |
| const void * | W, | ||
| const float * | x, | ||
| int | M, | ||
| int | K | ||
| ) |
Definition at line 653 of file gemm_kernels_bf16.c.
References ck_gemv_bf16_rows(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), and gemv_bf16().
|
static |
Definition at line 607 of file gemm_kernels_bf16.c.
References bf16_to_float(), and float_to_bf16().
Referenced by ck_gemv_bf16_rows(), gemv_bf16(), and gemv_bf16_bf16_storage_row_range().
| void patch_projection_bf16_pytorch_onednn_conv3d_storage | ( | const float * | input, |
| const void * | weights, | ||
| const float * | bias, | ||
| float * | output, | ||
| int | batch, | ||
| int | out_channels, | ||
| int | in_channels, | ||
| int | temporal, | ||
| int | patch_h, | ||
| int | patch_w | ||
| ) |
Definition at line 1633 of file gemm_kernels_bf16.c.
References bf16_to_float(), ck_pytorch_brgemm_fault(), and float_to_bf16().
Referenced by patch_projection_image_bf16_pytorch_onednn_conv3d_storage().
| void patch_projection_image_bf16_native_storage | ( | const float * | image, |
| const void * | weights_t0, | ||
| const void * | weights_t1, | ||
| const float * | bias, | ||
| float * | output, | ||
| int | channels, | ||
| int | image_h, | ||
| int | image_w, | ||
| int | patch_size, | ||
| int | out_channels, | ||
| int | merge_size | ||
| ) |
Definition at line 2009 of file gemm_kernels_bf16.c.
References ck_patch_projection_bf16_native_work(), ck_threadpool_dispatch_n(), ck_threadpool_global(), and ck_threadpool_n_threads().
| void patch_projection_image_bf16_pytorch_onednn_conv3d_storage | ( | const float * | image, |
| const void * | weights_t0, | ||
| const void * | weights_t1, | ||
| const float * | bias, | ||
| float * | output, | ||
| int | channels, | ||
| int | image_h, | ||
| int | image_w, | ||
| int | patch_size, | ||
| int | out_channels, | ||
| int | merge_size | ||
| ) |
Definition at line 1819 of file gemm_kernels_bf16.c.
References ck_pytorch_brgemm_fault(), and patch_projection_bf16_pytorch_onednn_conv3d_storage().