← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
ckernel_normalization_checked.h
Go to the documentation of this file.
1#ifndef CK_NORMALIZATION_CHECKED_H
2#define CK_NORMALIZATION_CHECKED_H
3#include <stddef.h>
4/* Checked inference adapters. Scratch may change on rejection; output must not.
5 * Buffers are caller-owned and nonoverlapping. No allocation or hidden state.
6 * Arithmetic remains the selected legacy provider's contract, not a promise of
7 * bitwise agreement with arbitrary PyTorch versions/backends. */
8int layernorm_rows_checked_workspace(size_t rows, size_t channels, size_t *elements);
9int layernorm_rows_checked_f32(const float *input, size_t input_elements, size_t input_stride,
10 const float *gamma, size_t gamma_elements, const float *beta, size_t beta_elements,
11 float *output, size_t output_elements, size_t output_stride,
12 float *scratch, size_t scratch_elements, size_t rows, size_t channels, float epsilon);
13int gelu_rows_tanh_checked_f32(const float *input, size_t input_elements, size_t input_stride,
14 float *output, size_t output_elements, size_t output_stride,
15 float *scratch, size_t scratch_elements, size_t rows, size_t channels);
16#endif
int layernorm_rows_checked_f32(const float *input, size_t input_elements, size_t input_stride, const float *gamma, size_t gamma_elements, const float *beta, size_t beta_elements, float *output, size_t output_elements, size_t output_stride, float *scratch, size_t scratch_elements, size_t rows, size_t channels, float epsilon)
int gelu_rows_tanh_checked_f32(const float *input, size_t input_elements, size_t input_stride, float *output, size_t output_elements, size_t output_stride, float *scratch, size_t scratch_elements, size_t rows, size_t channels)
int layernorm_rows_checked_workspace(size_t rows, size_t channels, size_t *elements)