← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
ckernel_embedding_checked.h
Go to the documentation of this file.
1#ifndef CKE_EMBEDDING_CHECKED_H
2#define CKE_EMBEDDING_CHECKED_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7/* Token-major FP32 word + type + position lookup, followed by per-token
8 * population-variance LayerNorm. Positions are 0..tokens-1. All tables use
9 * weight_stride; output uses output_stride. Padding is never written.
10 * Returns -1 before any output write for invalid geometry, IDs or nonfinite
11 * inputs. All pointers are nonaliasing and caller owned. Inference only. */
13 const int32_t *word_ids, const int32_t *type_ids, size_t id_elements,
14 const float *word, size_t word_elements, size_t vocab_size,
15 const float *position, size_t position_elements, size_t position_count,
16 const float *token_type, size_t type_elements, size_t type_count,
17 const float *gamma, const float *beta, size_t norm_elements,
18 float *output, size_t output_elements, size_t tokens, size_t channels,
19 size_t weight_stride, size_t output_stride, float epsilon);
20
21#endif
int embedding_three_table_layer_norm_f32(const int32_t *word_ids, const int32_t *type_ids, size_t id_elements, const float *word, size_t word_elements, size_t vocab_size, const float *position, size_t position_elements, size_t position_count, const float *token_type, size_t type_elements, size_t type_count, const float *gamma, const float *beta, size_t norm_elements, float *output, size_t output_elements, size_t tokens, size_t channels, size_t weight_stride, size_t output_stride, float epsilon)
int vocab_size
Definition true_bpe.h:197