#include "ckernel_head_backward.h"#include "ckernel_grouped_weighted_rows.h"#include <float.h>#include <math.h>#include <string.h>Go to the source code of this file.
Functions | |
| static int | check_regions (const void **ptrs, const size_t *sizes, size_t count, size_t read_count) |
| int | ck_gelu_erf_backward_f32 (const float *input, size_t input_elements, size_t input_stride, const float *d_output, size_t d_output_elements, size_t d_output_stride, float *d_input, size_t d_input_elements, size_t d_input_stride, float *scratch, size_t scratch_elements, size_t rows, size_t channels) |
| int | ck_grouped_weighted_rows_backward_f32 (const float *options, size_t option_elements, size_t option_stride, const float *fields, size_t field_elements, size_t field_stride, const int32_t *group_counts, size_t count_elements, const float *d_output, size_t d_output_elements, size_t d_output_stride, float *d_options, size_t d_options_elements, size_t d_options_stride, float *d_fields, size_t d_fields_elements, size_t d_fields_stride, float *scratch, size_t scratch_elements, size_t groups, size_t option_rows, size_t channels) |
| int | ck_token_span_mean_backward_f32 (const float *d_output, size_t d_output_elements, size_t d_output_stride, const int32_t *spans, size_t span_elements, size_t span_count, float *d_input, size_t d_input_elements, size_t d_input_stride, float *scratch, size_t scratch_elements, size_t token_capacity, size_t valid_tokens, size_t channels) |
| static int | finite_rows (const float *p, size_t rows, size_t cols, size_t stride) |
| static int | mul (size_t a, size_t b, size_t *out) |
| static int | overlaps (const void *a, size_t n, const void *b, size_t m) |
| static void | publish (float *dest, size_t stride, const float *src, size_t rows, size_t cols) |
| static int | region (const void *p, size_t n) |
| static int | span (size_t rows, size_t cols, size_t stride, size_t elements) |
| static int | store (float *p, double x) |
|
static |
Definition at line 23 of file head_backward.c.
References count, overlaps(), and region().
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), and ck_token_span_mean_backward_f32().
| int ck_gelu_erf_backward_f32 | ( | const float * | input, |
| size_t | input_elements, | ||
| size_t | input_stride, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| float * | d_input, | ||
| size_t | d_input_elements, | ||
| size_t | d_input_stride, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | rows, | ||
| size_t | channels ) |
Definition at line 69 of file head_backward.c.
References check_regions(), finite_rows(), mul(), publish(), span(), and store().
Referenced by ck_gelu_erf_backward_bf16().
| int ck_grouped_weighted_rows_backward_f32 | ( | const float * | options, |
| size_t | option_elements, | ||
| size_t | option_stride, | ||
| const float * | fields, | ||
| size_t | field_elements, | ||
| size_t | field_stride, | ||
| const int32_t * | group_counts, | ||
| size_t | count_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| float * | d_options, | ||
| size_t | d_options_elements, | ||
| size_t | d_options_stride, | ||
| float * | d_fields, | ||
| size_t | d_fields_elements, | ||
| size_t | d_fields_stride, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | groups, | ||
| size_t | option_rows, | ||
| size_t | channels ) |
Definition at line 92 of file head_backward.c.
References check_regions(), ck_grouped_softmax_weighted_rows_f32(), count, finite_rows(), mul(), publish(), span(), and store().
Referenced by ck_grouped_weighted_rows_backward_bf16().
| int ck_token_span_mean_backward_f32 | ( | const float * | d_output, |
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| const int32_t * | spans, | ||
| size_t | span_elements, | ||
| size_t | span_count, | ||
| float * | d_input, | ||
| size_t | d_input_elements, | ||
| size_t | d_input_stride, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | token_capacity, | ||
| size_t | valid_tokens, | ||
| size_t | channels ) |
Definition at line 42 of file head_backward.c.
References check_regions(), finite_rows(), mul(), publish(), span(), and store().
Referenced by ck_token_span_mean_backward_bf16().
|
static |
Definition at line 30 of file head_backward.c.
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), and ck_token_span_mean_backward_f32().
|
static |
Definition at line 7 of file head_backward.c.
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), ck_token_span_mean_backward_f32(), pointwise_range(), and quantize_row_q8_0().
|
static |
Definition at line 20 of file head_backward.c.
Referenced by check_regions().
|
static |
Definition at line 39 of file head_backward.c.
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), and ck_token_span_mean_backward_f32().
|
static |
Definition at line 16 of file head_backward.c.
Referenced by check_regions().
|
static |
Definition at line 11 of file head_backward.c.
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), and ck_token_span_mean_backward_f32().
|
static |
Definition at line 35 of file head_backward.c.
Referenced by ck_gelu_erf_backward_f32(), ck_grouped_weighted_rows_backward_f32(), and ck_token_span_mean_backward_f32().