#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| int | ck_attention_cross_backward_f32 (const float *query, size_t query_elements, const float *key, size_t key_elements, const float *value, size_t value_elements, const float *d_output, size_t d_output_elements, float *d_query, size_t d_query_elements, float *d_key, size_t d_key_elements, float *d_value, size_t d_value_elements, float *scratch, size_t scratch_elements, size_t query_tokens, size_t memory_tokens, size_t heads, size_t head_dim) |
| int | ck_gelu_erf_backward_bf16 (const uint16_t *input, size_t input_elements, size_t input_stride, const uint16_t *d_output, size_t d_output_elements, size_t d_output_stride, uint16_t *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_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_bf16 (const uint16_t *options, size_t option_elements, size_t option_stride, const uint16_t *fields, size_t field_elements, size_t field_stride, const int32_t *group_counts, size_t count_elements, const uint16_t *d_output, size_t d_output_elements, size_t d_output_stride, uint16_t *d_options, size_t d_options_elements, size_t d_options_stride, uint16_t *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_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_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) |
| int | ck_token_span_mean_backward_bf16 (const uint16_t *d_output, size_t d_output_elements, size_t d_output_stride, const int32_t *spans, size_t span_elements, size_t span_count, uint16_t *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) |
| 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) |
| int ck_attention_cross_backward_f32 | ( | const float * | query, |
| size_t | query_elements, | ||
| const float * | key, | ||
| size_t | key_elements, | ||
| const float * | value, | ||
| size_t | value_elements, | ||
| const float * | d_output, | ||
| size_t | d_output_elements, | ||
| float * | d_query, | ||
| size_t | d_query_elements, | ||
| float * | d_key, | ||
| size_t | d_key_elements, | ||
| float * | d_value, | ||
| size_t | d_value_elements, | ||
| float * | scratch, | ||
| size_t | scratch_elements, | ||
| size_t | query_tokens, | ||
| size_t | memory_tokens, | ||
| size_t | heads, | ||
| size_t | head_dim ) |
Definition at line 116 of file attention_cross_token_major_checked.c.
References attention_scores(), ck_checked_finite(), ck_checked_overlap(), ck_checked_region(), and dot().
| int ck_gelu_erf_backward_bf16 | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| size_t | input_stride, | ||
| const uint16_t * | d_output, | ||
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| uint16_t * | 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 72 of file head_backward_bf16.c.
References ck_gelu_erf_backward_f32(), expand(), extent(), product(), publish(), regions(), and roundable().
| 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_bf16 | ( | const uint16_t * | options, |
| size_t | option_elements, | ||
| size_t | option_stride, | ||
| const uint16_t * | fields, | ||
| size_t | field_elements, | ||
| size_t | field_stride, | ||
| const int32_t * | group_counts, | ||
| size_t | count_elements, | ||
| const uint16_t * | d_output, | ||
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| uint16_t * | d_options, | ||
| size_t | d_options_elements, | ||
| size_t | d_options_stride, | ||
| uint16_t * | 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 93 of file head_backward_bf16.c.
References ck_grouped_weighted_rows_backward_f32(), expand(), extent(), product(), publish(), regions(), roundable(), and sum_size().
| 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_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().
| int ck_token_span_mean_backward_bf16 | ( | const uint16_t * | d_output, |
| size_t | d_output_elements, | ||
| size_t | d_output_stride, | ||
| const int32_t * | spans, | ||
| size_t | span_elements, | ||
| size_t | span_count, | ||
| uint16_t * | 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 48 of file head_backward_bf16.c.
References ck_token_span_mean_backward_f32(), expand(), extent(), product(), publish(), regions(), roundable(), and sum_size().
| 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().