Thread-pool dispatch wrapper for FP32 training GEMM. More...
Go to the source code of this file.
Functions | |
| static void | ck_train_bias_reduce_compute_range (const float *d_output, float *d_bias, int T, int out_start, int out_end, int aligned_out) |
| static void | ck_train_gemm_backward_serial (const float *d_output, const float *input, const float *W, float *d_input, float *d_W, float *d_b, int T, int aligned_in, int aligned_out) |
| static void | ck_train_gemm_backward_work (int ith, int nth, void *argp) |
| static void | ck_train_gemm_nn_compute_rows (const float *A, const float *B, const float *bias, float *C, int row_start, int row_end, int N, int K) |
| static void | ck_train_gemm_nn_work (int ith, int nth, void *argp) |
| static void | ck_train_gemm_nt_compute_rows (const float *A, const float *B, const float *bias, float *C, int row_start, int row_end, int N, int K) |
| static void | ck_train_gemm_tn_compute_rows (const float *A, const float *B, const float *bias, float *C, int row_start, int row_end, int M, int N, int K) |
| static void | ck_train_gemm_work (int ith, int nth, void *argp) |
| static void | ck_train_outer_t1_compute_range (const float *d_output, const float *input, float *d_W, float *d_b, int out_start, int out_end, int aligned_in) |
| static void | ck_train_outer_t1_work (int ith, int nth, void *argp) |
| static int | ck_train_pick_active_threads (int nth, size_t work_items, size_t min_chunk) |
| void | gemm_backward_f32_train_parallel_dispatch (const float *d_output, const float *input, const float *W, float *d_input, float *d_W, float *d_b, int T, int aligned_in, int aligned_out, int num_threads) |
| void | gemm_backward_f32_train_parallel_dispatch_v2 (const float *d_output, const float *input, const float *W, float *d_input, float *d_W, float *d_b, int T, int aligned_in, int aligned_out, int num_threads) |
| void | gemm_blocked_serial_train_parallel_dispatch (const float *A, const float *B, const float *bias, float *C, int M, int N, int K) |
Thread-pool dispatch wrapper for FP32 training GEMM.
The training runtime currently emits many gemm_blocked_serial calls. This wrapper keeps kernel math unchanged and only parallelizes dispatch.
OpenMP removal note: Training backward used to fall back into legacy OpenMP GEMM paths for T>1 micro-batches, which mixed libiomp barriers with the CK threadpool and showed up as fork/barrier overhead in profiling. Keep the hot training path on the CK threadpool here, and leave older kernel-level OpenMP paths as compatibility fallbacks until they are fully retired.
Definition in file ck_parallel_train.c.
|
static |
Definition at line 411 of file ck_parallel_train.c.
Referenced by ck_train_gemm_backward_serial(), and ck_train_gemm_backward_work().
|
static |
Definition at line 453 of file ck_parallel_train.c.
References ck_train_bias_reduce_compute_range(), ck_train_gemm_nn_compute_rows(), and ck_train_gemm_tn_compute_rows().
Referenced by gemm_backward_f32_train_parallel_dispatch(), and gemm_backward_f32_train_parallel_dispatch_v2().
|
static |
Definition at line 556 of file ck_parallel_train.c.
References ck_train_bias_reduce_compute_range(), ck_train_gemm_nn_compute_rows(), and ck_train_gemm_tn_compute_rows().
Referenced by gemm_backward_f32_train_parallel_dispatch(), and gemm_backward_f32_train_parallel_dispatch_v2().
|
static |
Definition at line 274 of file ck_parallel_train.c.
References C.
Referenced by ck_train_gemm_backward_serial(), ck_train_gemm_backward_work(), and ck_train_gemm_nn_work().
|
static |
Definition at line 469 of file ck_parallel_train.c.
References ck_train_gemm_nn_compute_rows().
Referenced by gemm_backward_f32_train_parallel_dispatch_v2().
|
static |
Definition at line 48 of file ck_parallel_train.c.
References C.
Referenced by ck_train_gemm_work().
|
static |
Definition at line 341 of file ck_parallel_train.c.
References C.
Referenced by ck_train_gemm_backward_serial(), and ck_train_gemm_backward_work().
|
static |
Definition at line 119 of file ck_parallel_train.c.
References ck_train_gemm_nt_compute_rows(), and gemm_blocked_serial().
Referenced by gemm_blocked_serial_train_parallel_dispatch().
|
static |
Definition at line 430 of file ck_parallel_train.c.
Referenced by ck_train_outer_t1_work(), gemm_backward_f32_train_parallel_dispatch(), and gemm_backward_f32_train_parallel_dispatch_v2().
|
static |
Definition at line 537 of file ck_parallel_train.c.
References ck_train_outer_t1_compute_range().
Referenced by gemm_backward_f32_train_parallel_dispatch(), and gemm_backward_f32_train_parallel_dispatch_v2().
|
static |
Definition at line 104 of file ck_parallel_train.c.
Referenced by gemm_backward_f32_train_parallel_dispatch(), and gemm_backward_f32_train_parallel_dispatch_v2().
| void gemm_backward_f32_train_parallel_dispatch | ( | const float * | d_output, |
| const float * | input, | ||
| const float * | W, | ||
| float * | d_input, | ||
| float * | d_W, | ||
| float * | d_b, | ||
| int | T, | ||
| int | aligned_in, | ||
| int | aligned_out, | ||
| int | num_threads | ||
| ) |
Definition at line 610 of file ck_parallel_train.c.
References ck_threadpool_dispatch_n(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_train_gemm_backward_serial(), ck_train_gemm_backward_work(), ck_train_outer_t1_compute_range(), ck_train_outer_t1_work(), ck_train_pick_active_threads(), and gemm_nn_simd().
| void gemm_backward_f32_train_parallel_dispatch_v2 | ( | const float * | d_output, |
| const float * | input, | ||
| const float * | W, | ||
| float * | d_input, | ||
| float * | d_W, | ||
| float * | d_b, | ||
| int | T, | ||
| int | aligned_in, | ||
| int | aligned_out, | ||
| int | num_threads | ||
| ) |
Definition at line 699 of file ck_parallel_train.c.
References ck_threadpool_dispatch_n(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_train_gemm_backward_serial(), ck_train_gemm_backward_work(), ck_train_gemm_nn_work(), ck_train_outer_t1_compute_range(), ck_train_outer_t1_work(), ck_train_pick_active_threads(), and gemm_nn_simd().
| void gemm_blocked_serial_train_parallel_dispatch | ( | const float * | A, |
| const float * | B, | ||
| const float * | bias, | ||
| float * | C, | ||
| int | M, | ||
| int | N, | ||
| int | K | ||
| ) |
Definition at line 167 of file ck_parallel_train.c.
References C, ck_threadpool_dispatch_n(), ck_threadpool_global(), ck_threadpool_n_threads(), ck_train_gemm_work(), and gemm_blocked_serial().