#include <limits.h>#include <math.h>#include <stddef.h>#include <stdint.h>#include "bf16_utils.h"#include "ckernel_engine.h"Go to the source code of this file.
Typedefs | |
| typedef void(* | rmsnorm_forward_fn) (const float *, const float *, float *, float *, int, int, int, float) |
Functions | |
| int | ck_adaptive_rmsnorm_rows_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *modulation, size_t modulation_elements, const uint16_t *register_weight, size_t register_weight_elements, uint16_t *output, size_t output_elements, uint16_t *gate, size_t gate_elements, float *work, size_t work_elements, size_t rows, size_t width, size_t register_rows, float epsilon) |
| int | ck_rmsnorm_rows_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *gamma, size_t gamma_elements, uint16_t *output, size_t output_elements, float *work, size_t work_elements, size_t rows, size_t width, float epsilon) |
| int | ck_rmsnorm_rows_centered_single_round_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *gamma, size_t gamma_elements, uint16_t *output, size_t output_elements, float *work, size_t work_elements, size_t rows, size_t width, float epsilon) |
| int | ck_rmsnorm_rows_weighted_single_round_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *gamma, size_t gamma_elements, uint16_t *output, size_t output_elements, float *work, size_t work_elements, size_t rows, size_t width, float epsilon) |
| static int | overlap (const void *a, size_t a_bytes, const void *b, size_t b_bytes) |
| static int | rmsnorm_rows_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *gamma, size_t gamma_elements, uint16_t *output, size_t output_elements, float *work, size_t work_elements, size_t rows, size_t width, float epsilon, rmsnorm_forward_fn normalize) |
| static int | valid_span (const void *base, size_t length, size_t element_size) |
| typedef void(* rmsnorm_forward_fn) (const float *, const float *, float *, float *, int, int, int, float) |
Definition at line 22 of file rmsnorm_bf16_checked.c.
| int ck_adaptive_rmsnorm_rows_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | modulation, | ||
| size_t | modulation_elements, | ||
| const uint16_t * | register_weight, | ||
| size_t | register_weight_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| uint16_t * | gate, | ||
| size_t | gate_elements, | ||
| float * | work, | ||
| size_t | work_elements, | ||
| size_t | rows, | ||
| size_t | width, | ||
| size_t | register_rows, | ||
| float | epsilon ) |
Definition at line 113 of file rmsnorm_bf16_checked.c.
References bf16_to_float(), buffers(), count, float_to_bf16(), overlap(), start, and valid_span().
| int ck_rmsnorm_rows_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | gamma, | ||
| size_t | gamma_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| float * | work, | ||
| size_t | work_elements, | ||
| size_t | rows, | ||
| size_t | width, | ||
| float | epsilon ) |
Definition at line 83 of file rmsnorm_bf16_checked.c.
References rmsnorm_forward_pytorch_bf16_storage(), and rmsnorm_rows_bf16_checked().
| int ck_rmsnorm_rows_centered_single_round_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | gamma, | ||
| size_t | gamma_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| float * | work, | ||
| size_t | work_elements, | ||
| size_t | rows, | ||
| size_t | width, | ||
| float | epsilon ) |
Definition at line 103 of file rmsnorm_bf16_checked.c.
References rmsnorm_forward_muse_centered_pytorch_bf16_storage(), and rmsnorm_rows_bf16_checked().
| int ck_rmsnorm_rows_weighted_single_round_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | gamma, | ||
| size_t | gamma_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| float * | work, | ||
| size_t | work_elements, | ||
| size_t | rows, | ||
| size_t | width, | ||
| float | epsilon ) |
Definition at line 93 of file rmsnorm_bf16_checked.c.
References rmsnorm_forward_muse_weighted_pytorch_bf16_storage(), and rmsnorm_rows_bf16_checked().
|
static |
Definition at line 16 of file rmsnorm_bf16_checked.c.
Referenced by ck_adaptive_rmsnorm_rows_bf16_checked(), and rmsnorm_rows_bf16_checked().
|
static |
Definition at line 25 of file rmsnorm_bf16_checked.c.
References bf16_to_float(), count, float_to_bf16(), overlap(), and valid_span().
Referenced by ck_rmsnorm_rows_bf16_checked(), ck_rmsnorm_rows_centered_single_round_bf16_checked(), and ck_rmsnorm_rows_weighted_single_round_bf16_checked().
|
static |
Definition at line 10 of file rmsnorm_bf16_checked.c.
Referenced by ck_adaptive_rmsnorm_rows_bf16_checked(), and rmsnorm_rows_bf16_checked().