Token/position embedding lookup kernels for BF16. More...
Go to the source code of this file.
Functions | |
| void | embedding_backward_bf16 (const int32_t *token_ids, int token_count, const uint16_t *d_output, uint16_t *d_token_embeddings, uint16_t *d_pos_embeddings, int vocab_size, int embed_dim, int aligned_embed_dim, int context_window, int add_pos) |
| void | embedding_forward_bf16 (const int32_t *token_ids, int token_count, int vocab_size, const uint16_t *token_embeddings, const uint16_t *pos_embeddings, uint16_t *output, int embed_dim, int aligned_embed_dim, int context_window, int add_pos) |
Token/position embedding lookup kernels for BF16.
After changes: make test && make llamacpp-parity-full
Definition in file embedding_kernels_bf16.c.
| void embedding_backward_bf16 | ( | const int32_t * | token_ids, |
| int | token_count, | ||
| const uint16_t * | d_output, | ||
| uint16_t * | d_token_embeddings, | ||
| uint16_t * | d_pos_embeddings, | ||
| int | vocab_size, | ||
| int | embed_dim, | ||
| int | aligned_embed_dim, | ||
| int | context_window, | ||
| int | add_pos | ||
| ) |
Definition at line 72 of file embedding_kernels_bf16.c.
References bf16_to_float(), float_to_bf16(), and vocab_size.
| void embedding_forward_bf16 | ( | const int32_t * | token_ids, |
| int | token_count, | ||
| int | vocab_size, | ||
| const uint16_t * | token_embeddings, | ||
| const uint16_t * | pos_embeddings, | ||
| uint16_t * | output, | ||
| int | embed_dim, | ||
| int | aligned_embed_dim, | ||
| int | context_window, | ||
| int | add_pos | ||
| ) |
Definition at line 21 of file embedding_kernels_bf16.c.
References bf16_to_float(), float_to_bf16(), and vocab_size.