#include "ckernel_head_backward.h"#include "checked_float_buffer.h"#include <float.h>#include <math.h>#include <string.h>Go to the source code of this file.
Macros | |
| #define | ARGS |
| #define | PASS |
Functions | |
| int | ck_indexed_cosine_rows_backward_f32 (const float *left, size_t left_elements, const float *right, size_t right_elements, const int32_t *indices, size_t indices_elements, const float *d_output, size_t d_output_elements, float *d_left, size_t d_left_elements, float *d_right, size_t d_right_elements, float *scratch, size_t scratch_elements, size_t groups, size_t rows, size_t channels, float epsilon) |
| int | ck_indexed_normalized_dot_backward_f32 (const float *left, size_t left_elements, const float *right, size_t right_elements, const int32_t *indices, size_t indices_elements, const float *d_output, size_t d_output_elements, float *d_left, size_t d_left_elements, float *d_right, size_t d_right_elements, float *scratch, size_t scratch_elements, size_t groups, size_t rows, size_t channels, float epsilon) |
| int | ck_indexed_pair_features_backward_f32 (const float *left, size_t left_elements, const float *right, size_t right_elements, const int32_t *indices, size_t indices_elements, const float *d_output, size_t d_output_elements, float *d_left, size_t d_left_elements, float *d_right, size_t d_right_elements, float *scratch, size_t scratch_elements, size_t groups, size_t rows, size_t channels) |
| int | ck_scalar_exp_clamped_backward_f32 (const float *input, size_t input_elements, const float *d_output, size_t d_output_elements, float *d_input, size_t d_input_elements, float maximum) |
| int | ck_scalar_sigmoid_backward_f32 (const float *input, size_t input_elements, const float *d_output, size_t d_output_elements, float *d_input, size_t d_input_elements) |
| int | ck_scale_vector_backward_f32 (const float *input, size_t input_elements, const float *gain, size_t gain_elements, const float *d_output, size_t d_output_elements, float *d_input, size_t d_input_elements, float *d_gain, size_t d_gain_elements, float *scratch, size_t scratch_elements, size_t rows) |
| static int | cosine_backward (const float *left, size_t left_elements, const float *right, size_t right_elements, const int32_t *indices, size_t indices_elements, const float *d_output, size_t d_output_elements, float *d_left, size_t d_left_elements, float *d_right, size_t d_right_elements, float *scratch, size_t scratch_elements, size_t groups, size_t rows, size_t channels, float epsilon, int straight_through_clamp) |
| static int | product (size_t a, size_t b, size_t *out) |
| static int | publish (const int32_t *indices, float *dl, float *dr, float *scratch, size_t groups, size_t rows, size_t channels, size_t nl, size_t nr) |
| static int | scalar_vjp_validate (const float *input, size_t input_elements, const float *dy, size_t dy_elements, float *dx, size_t dx_elements) |
| static int | store (float *p, double value) |
| static int | validate (const float *left, size_t ln, const float *right, size_t rn, const int32_t *indices, size_t in, const float *dy, size_t yn, float *dl, size_t dln, float *dr, size_t drn, float *scratch, size_t sn, size_t groups, size_t rows, size_t channels, int pair, size_t *nl, size_t *nr) |
| #define ARGS |
Definition at line 106 of file decision_scoring_backward.c.
Referenced by ck_indexed_cosine_rows_backward_f32(), and ck_indexed_normalized_dot_backward_f32().
| #define PASS |
Definition at line 110 of file decision_scoring_backward.c.
Referenced by ck_indexed_cosine_rows_backward_f32(), and ck_indexed_normalized_dot_backward_f32().
| int ck_indexed_cosine_rows_backward_f32 | ( | const float * | left, |
| size_t | left_elements, | ||
| const float * | right, | ||
| size_t | right_elements, | ||
| const int32_t * | indices, | ||
| size_t | indices_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_left, | ||
| size_t | d_left_elements, | ||
| float * | d_right, | ||
| size_t | d_right_elements, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | groups, | ||
| size_t | rows, | ||
| size_t | channels, | ||
| float | epsilon ) |
Definition at line 113 of file decision_scoring_backward.c.
References ARGS, cosine_backward(), and PASS.
| int ck_indexed_normalized_dot_backward_f32 | ( | const float * | left, |
| size_t | left_elements, | ||
| const float * | right, | ||
| size_t | right_elements, | ||
| const int32_t * | indices, | ||
| size_t | indices_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_left, | ||
| size_t | d_left_elements, | ||
| float * | d_right, | ||
| size_t | d_right_elements, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | groups, | ||
| size_t | rows, | ||
| size_t | channels, | ||
| float | epsilon ) |
Definition at line 112 of file decision_scoring_backward.c.
References ARGS, cosine_backward(), and PASS.
| int ck_indexed_pair_features_backward_f32 | ( | const float * | left, |
| size_t | left_elements, | ||
| const float * | right, | ||
| size_t | right_elements, | ||
| const int32_t * | indices, | ||
| size_t | indices_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_left, | ||
| size_t | d_left_elements, | ||
| float * | d_right, | ||
| size_t | d_right_elements, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | groups, | ||
| size_t | rows, | ||
| size_t | channels ) |
Definition at line 46 of file decision_scoring_backward.c.
References left, publish(), right, store(), and validate().
| int ck_scalar_exp_clamped_backward_f32 | ( | const float * | input, |
| size_t | input_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_input, | ||
| size_t | d_input_elements, | ||
| float | maximum ) |
Definition at line 126 of file decision_scoring_backward.c.
References scalar_vjp_validate(), and store().
| int ck_scalar_sigmoid_backward_f32 | ( | const float * | input, |
| size_t | input_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_input, | ||
| size_t | d_input_elements ) |
Definition at line 138 of file decision_scoring_backward.c.
References scalar_vjp_validate(), and store().
| int ck_scale_vector_backward_f32 | ( | const float * | input, |
| size_t | input_elements, | ||
| const float * | gain, | ||
| size_t | gain_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_input, | ||
| size_t | d_input_elements, | ||
| float * | d_gain, | ||
| size_t | d_gain_elements, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | rows ) |
Definition at line 149 of file decision_scoring_backward.c.
References ck_checked_finite(), ck_checked_overlap(), ck_checked_region(), product(), and store().
|
static |
Definition at line 66 of file decision_scoring_backward.c.
References left, publish(), right, store(), and validate().
Referenced by ck_indexed_cosine_rows_backward_f32(), and ck_indexed_normalized_dot_backward_f32().
|
static |
Definition at line 8 of file decision_scoring_backward.c.
Referenced by validate().
|
static |
Definition at line 36 of file decision_scoring_backward.c.
References store().
Referenced by ck_indexed_pair_features_backward_f32(), cosine_backward(), linear_rows_q8_0_checked(), and rope_split_partial_position_f32_checked().
|
static |
Definition at line 117 of file decision_scoring_backward.c.
References ck_checked_overlap(), and ck_checked_region().
Referenced by ck_scalar_exp_clamped_backward_f32(), and ck_scalar_sigmoid_backward_f32().
|
static |
Definition at line 12 of file decision_scoring_backward.c.
Referenced by ck_indexed_pair_features_backward_f32(), ck_scalar_exp_clamped_backward_f32(), ck_scalar_sigmoid_backward_f32(), ck_scale_vector_backward_f32(), cosine_backward(), and publish().
|
static |
Definition at line 16 of file decision_scoring_backward.c.
References ck_checked_finite(), ck_checked_overlap(), ck_checked_region(), left, product(), and right.
Referenced by ck_indexed_pair_features_backward_f32(), and cosine_backward().