← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
recurrent_gate_kernels.c File Reference
#include "bf16_utils.h"
#include "ckernel_engine.h"
#include "ck_threadpool.h"
#include <dlfcn.h>
#include <math.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Typedefs

typedef float(* ck_recurrent_libm_f32_fn) (float)
 

Functions

static void ck_bind_recurrent_llama_libm (void)
 
void recurrent_dt_gate_backward (const float *d_gate, const float *alpha, const float *dt_bias, const float *a, float *d_alpha, float *d_dt_bias, float *d_a, int rows, int dim)
 
void recurrent_dt_gate_expanded_forward (const float *alpha, const float *dt_bias, const float *a, float *gate, int rows, int num_heads, int state_dim)
 
void recurrent_dt_gate_forward (const float *alpha, const float *dt_bias, const float *a, float *gate, int rows, int num_heads, int state_dim)
 
void recurrent_dt_gate_forward_pytorch_fp32 (const float *alpha, const float *dt_bias, const float *a, float *gate, int rows, int num_heads, int state_dim)
 
static float recurrent_sigmoid (float x)
 
void recurrent_sigmoid_forward_ggml (const float *x, float *out, int rows, int dim)
 
void recurrent_sigmoid_forward_pytorch_bf16_input_fp32_output (const float *x, float *out, int rows, int dim)
 
void recurrent_silu_backward (const float *d_out, const float *x, float *d_x, int rows, int dim)
 
void recurrent_silu_forward (const float *x, float *out, int rows, int dim)
 
void recurrent_silu_forward_ggml (const float *x, float *out, int rows, int dim)
 
static void recurrent_silu_forward_ggml_rows (int begin, int end, void *opaque)
 
void recurrent_silu_forward_pytorch_bf16_input_fp32_output (const float *x, float *out, int rows, int dim)
 
void recurrent_silu_forward_pytorch_bf16_storage (const float *x, float *out, int rows, int dim)
 
static float recurrent_softplus (float x)
 

Variables

static void * ck_recurrent_libm_handle = NULL
 
static pthread_once_t ck_recurrent_libm_once = PTHREAD_ONCE_INIT
 
static ck_recurrent_libm_f32_fn ck_recurrent_llama_expf = NULL
 
static ck_recurrent_libm_f32_fn ck_recurrent_llama_logf = NULL
 
static ck_recurrent_libm_f32_fn ck_recurrent_pytorch_log1pf = NULL
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 2 of file recurrent_gate_kernels.c.

Typedef Documentation

◆ ck_recurrent_libm_f32_fn

typedef float(* ck_recurrent_libm_f32_fn) (float)

Definition at line 18 of file recurrent_gate_kernels.c.

Function Documentation

◆ ck_bind_recurrent_llama_libm()

static void ck_bind_recurrent_llama_libm ( void  )
static

Definition at line 25 of file recurrent_gate_kernels.c.

26{
27 ck_recurrent_libm_handle = dlopen("libm.so.6", RTLD_NOW | RTLD_LOCAL);
35 }
37 fprintf(stderr,
38 "HARD KERNEL CONTRACT FAULT: llama.cpp recurrent softplus "
39 "requires expf/logf from libm.so.6\n");
40 abort();
41 }
42}
float(* ck_recurrent_libm_f32_fn)(float)
static ck_recurrent_libm_f32_fn ck_recurrent_llama_logf
static void * ck_recurrent_libm_handle
static ck_recurrent_libm_f32_fn ck_recurrent_pytorch_log1pf
static ck_recurrent_libm_f32_fn ck_recurrent_llama_expf

References ck_recurrent_libm_handle, ck_recurrent_llama_expf, ck_recurrent_llama_logf, and ck_recurrent_pytorch_log1pf.

Referenced by recurrent_dt_gate_forward_pytorch_fp32(), and recurrent_softplus().

◆ recurrent_dt_gate_backward()

void recurrent_dt_gate_backward ( const float *  d_gate,
const float *  alpha,
const float *  dt_bias,
const float *  a,
float *  d_alpha,
float *  d_dt_bias,
float *  d_a,
int  rows,
int  dim 
)

Definition at line 105 of file recurrent_gate_kernels.c.

113 {
114 for (int col = 0; col < dim; ++col) {
115 d_dt_bias[col] = 0.0f;
116 d_a[col] = 0.0f;
117 }
118
119 for (int row = 0; row < rows; ++row) {
120 const float *d_gate_row = d_gate + (size_t) row * (size_t) dim;
121 const float *alpha_row = alpha + (size_t) row * (size_t) dim;
122 float *d_alpha_row = d_alpha + (size_t) row * (size_t) dim;
123 for (int col = 0; col < dim; ++col) {
124 const float x = alpha_row[col] + dt_bias[col];
125 const float sp = recurrent_softplus(x);
126 const float sig = recurrent_sigmoid(x);
127 const float d_out = d_gate_row[col];
128 d_a[col] += d_out * sp;
129 {
130 const float d_x = d_out * a[col] * sig;
131 d_alpha_row[col] = d_x;
132 d_dt_bias[col] += d_x;
133 }
134 }
135 }
136}
static float recurrent_softplus(float x)
static float recurrent_sigmoid(float x)

References recurrent_sigmoid(), and recurrent_softplus().

◆ recurrent_dt_gate_expanded_forward()

void recurrent_dt_gate_expanded_forward ( const float *  alpha,
const float *  dt_bias,
const float *  a,
float *  gate,
int  rows,
int  num_heads,
int  state_dim 
)

Definition at line 84 of file recurrent_gate_kernels.c.

90 {
91 for (int row = 0; row < rows; ++row) {
92 const float *alpha_row = alpha + (size_t) row * (size_t) num_heads;
93 float *gate_row = gate + (size_t) row * (size_t) num_heads * (size_t) state_dim;
94 for (int h = 0; h < num_heads; ++h) {
95 const float sp = recurrent_softplus(alpha_row[h] + dt_bias[h]);
96 const float *a_head = a + (size_t) h * (size_t) state_dim;
97 float *gate_head = gate_row + (size_t) h * (size_t) state_dim;
98 for (int col = 0; col < state_dim; ++col) {
99 gate_head[col] = sp * a_head[col];
100 }
101 }
102 }
103}

References recurrent_softplus().

◆ recurrent_dt_gate_forward()

void recurrent_dt_gate_forward ( const float *  alpha,
const float *  dt_bias,
const float *  a,
float *  gate,
int  rows,
int  num_heads,
int  state_dim 
)

Definition at line 66 of file recurrent_gate_kernels.c.

72 {
73 const int dim = num_heads * state_dim;
74 for (int row = 0; row < rows; ++row) {
75 const float *alpha_row = alpha + (size_t) row * (size_t) dim;
76 float *gate_row = gate + (size_t) row * (size_t) dim;
77 for (int col = 0; col < dim; ++col) {
78 const float x = alpha_row[col] + dt_bias[col];
79 gate_row[col] = recurrent_softplus(x) * a[col];
80 }
81 }
82}

References recurrent_softplus().

Referenced by ck_test_recurrent_dt_gate().

◆ recurrent_dt_gate_forward_pytorch_fp32()

void recurrent_dt_gate_forward_pytorch_fp32 ( const float *  alpha,
const float *  dt_bias,
const float *  a,
float *  gate,
int  rows,
int  num_heads,
int  state_dim 
)

Definition at line 180 of file recurrent_gate_kernels.c.

187{
188 if (!alpha || !dt_bias || !a || !gate || rows < 0 || num_heads < 0 || state_dim != 1) {
189 fprintf(stderr,
190 "HARD KERNEL CONTRACT FAULT: invalid PyTorch FP32 recurrent dt-gate arguments\n");
191 abort();
192 }
193#if defined(__AVX512F__)
194 pthread_once(&ck_recurrent_sleef_once, ck_bind_recurrent_pytorch_sleef);
195 if (!ck_recurrent_pytorch_expf16 || !ck_recurrent_pytorch_log1pf16) {
196 fprintf(stderr,
197 "HARD KERNEL CONTRACT FAULT: PyTorch FP32 recurrent dt gate requires "
198 "SLEEF Sleef_expf16_u10 and Sleef_log1pf16_u10; set CK_SLEEF_LIBRARY\n");
199 abort();
200 }
201 if ((num_heads & 15) != 0) {
202 fprintf(stderr,
203 "HARD KERNEL CONTRACT FAULT: PyTorch AVX-512 recurrent dt gate requires "
204 "a head count divisible by 16 (got %d)\n",
205 num_heads);
206 abort();
207 }
210 fprintf(stderr,
211 "HARD KERNEL CONTRACT FAULT: PyTorch FP32 recurrent dt gate requires "
212 "log1pf from libm.so.6\n");
213 abort();
214 }
215 const __m512 threshold = _mm512_set1_ps(20.0f);
216 const int count = rows * num_heads;
217 int index = 0;
218 for (; index + 32 <= count; index += 32) {
219 for (int half = 0; half < 2; ++half) {
220 float x_lanes[16] __attribute__((aligned(64)));
221 float a_lanes[16] __attribute__((aligned(64)));
222 const int base = index + half * 16;
223 for (int lane = 0; lane < 16; ++lane) {
224 const int head = (base + lane) % num_heads;
225 x_lanes[lane] = alpha[base + lane] + dt_bias[head];
226 a_lanes[lane] = a[head];
227 }
228 const __m512 x = _mm512_load_ps(x_lanes);
229 const __m512 softplus = _mm512_mask_blend_ps(
230 _mm512_cmp_ps_mask(x, threshold, _CMP_GT_OQ),
231 ck_recurrent_pytorch_log1pf16(ck_recurrent_pytorch_expf16(x)),
232 x);
233 _mm512_storeu_ps(
234 gate + base,
235 _mm512_mul_ps(softplus, _mm512_load_ps(a_lanes)));
236 }
237 }
238 for (; index < count; ++index) {
239 const int head = index % num_heads;
240 const float x = alpha[index] + dt_bias[head];
241 const float softplus = x > 20.0f
242 ? x
244 gate[index] = softplus * a[head];
245 }
246#else
247 fprintf(stderr,
248 "HARD KERNEL CONTRACT FAULT: PyTorch FP32 recurrent dt gate requires AVX-512\n");
249 abort();
250#endif
251}
static void ck_bind_recurrent_llama_libm(void)
static pthread_once_t ck_recurrent_libm_once
__attribute__((visibility("default"))) CKTokenizer *ck_tokenizer_create(CKTokenizerType type)
const uint8_t size_t count
Definition true_bpe.h:209

References __attribute__(), ck_bind_recurrent_llama_libm(), ck_recurrent_libm_once, ck_recurrent_llama_expf, ck_recurrent_pytorch_log1pf, and count.

◆ recurrent_sigmoid()

static float recurrent_sigmoid ( float  x)
inlinestatic

Definition at line 55 of file recurrent_gate_kernels.c.

55 {
56 if (x >= 0.0f) {
57 float z = expf(-x);
58 return 1.0f / (1.0f + z);
59 }
60 {
61 float z = expf(x);
62 return z / (1.0f + z);
63 }
64}

Referenced by recurrent_dt_gate_backward(), recurrent_silu_backward(), and recurrent_silu_forward().

◆ recurrent_sigmoid_forward_ggml()

void recurrent_sigmoid_forward_ggml ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 543 of file recurrent_gate_kernels.c.

546 {
547 float (*volatile llama_expf)(float) = expf;
548 for (int row = 0; row < rows; ++row) {
549 const float *x_row = x + (size_t) row * (size_t) dim;
550 float *out_row = out + (size_t) row * (size_t) dim;
551 for (int col = 0; col < dim; ++col) {
552 out_row[col] = 1.0f / (1.0f + llama_expf(-x_row[col]));
553 }
554 }
555}

Referenced by hyper_connection_mix_quantized(), and recurrent_norm_sigmoid_gate_llama_avx2_forward().

◆ recurrent_sigmoid_forward_pytorch_bf16_input_fp32_output()

void recurrent_sigmoid_forward_pytorch_bf16_input_fp32_output ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 340 of file recurrent_gate_kernels.c.

345{
346 if (!x || !out || rows < 0 || dim < 0) {
347 fprintf(stderr, "HARD KERNEL CONTRACT FAULT: invalid BF16-input FP32-output sigmoid arguments\n");
348 abort();
349 }
350#if defined(__AVX512F__)
351 pthread_once(&ck_recurrent_sleef_once, ck_bind_recurrent_pytorch_sleef);
352 if (!ck_recurrent_pytorch_expf16) {
353 fprintf(stderr,
354 "HARD KERNEL CONTRACT FAULT: PyTorch BF16-input sigmoid requires "
355 "SLEEF Sleef_expf16_u10; set CK_SLEEF_LIBRARY\n");
356 abort();
357 }
358#endif
359 const int count = rows * dim;
360 int i = 0;
361#if defined(__AVX512F__)
362 for (; i + 16 <= count; i += 16) {
363 float lanes[16] __attribute__((aligned(64)));
364 for (int lane = 0; lane < 16; ++lane) {
365 lanes[lane] = bf16_to_float(float_to_bf16(x[i + lane]));
366 }
367 const __m512 values = _mm512_load_ps(lanes);
368 const __m512 denominator = _mm512_add_ps(
369 _mm512_set1_ps(1.0f),
370 ck_recurrent_pytorch_expf16(
371 _mm512_sub_ps(_mm512_setzero_ps(), values)));
372 _mm512_storeu_ps(out + i,
373 _mm512_div_ps(_mm512_set1_ps(1.0f), denominator));
374 }
375#endif
376 for (; i < count; ++i) {
377 const float value = bf16_to_float(float_to_bf16(x[i]));
378 out[i] = 1.0f / (1.0f + expf(-value));
379 }
380}
static uint16_t float_to_bf16(float f)
Definition bf16_utils.h:90
static float bf16_to_float(uint16_t v)
Definition bf16_utils.h:38

References __attribute__(), bf16_to_float(), count, and float_to_bf16().

Referenced by attn_gate_sigmoid_mul_pytorch_bf16_storage(), and recurrent_norm_sigmoid_gate_pytorch_bf16_storage().

◆ recurrent_silu_backward()

void recurrent_silu_backward ( const float *  d_out,
const float *  x,
float *  d_x,
int  rows,
int  dim 
)

Definition at line 557 of file recurrent_gate_kernels.c.

561 {
562 for (int row = 0; row < rows; ++row) {
563 const float *d_out_row = d_out + (size_t) row * (size_t) dim;
564 const float *x_row = x + (size_t) row * (size_t) dim;
565 float *d_x_row = d_x + (size_t) row * (size_t) dim;
566 for (int col = 0; col < dim; ++col) {
567 const float xv = x_row[col];
568 const float sig = recurrent_sigmoid(xv);
569 d_x_row[col] = d_out_row[col] * (sig + xv * sig * (1.0f - sig));
570 }
571 }
572}

References recurrent_sigmoid().

◆ recurrent_silu_forward()

void recurrent_silu_forward ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 138 of file recurrent_gate_kernels.c.

141 {
142 for (int row = 0; row < rows; ++row) {
143 const float *x_row = x + (size_t) row * (size_t) dim;
144 float *out_row = out + (size_t) row * (size_t) dim;
145 for (int col = 0; col < dim; ++col) {
146 const float xv = x_row[col];
147 out_row[col] = xv * recurrent_sigmoid(xv);
148 }
149 }
150}

References recurrent_sigmoid().

Referenced by audio_fastconformer_block_f32(), and ck_test_recurrent_silu().

◆ recurrent_silu_forward_ggml()

void recurrent_silu_forward_ggml ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 510 of file recurrent_gate_kernels.c.

513 {
514 if (!x || !out || rows <= 0 || dim <= 0) {
515 return;
516 }
517
518 ck_recurrent_silu_ggml_args_t args = {x, out, dim};
519 const size_t elements = (size_t)rows * (size_t)dim;
520 const size_t minimum_elements_per_thread = 65536u;
521 if (rows < 2 || elements < 2u * minimum_elements_per_thread) {
522 recurrent_silu_forward_ggml_rows(0, rows, &args);
523 return;
524 }
525
526 ck_threadpool_t *pool = ck_threadpool_global();
527 int active = pool ? ck_threadpool_n_threads(pool) : 1;
528 size_t useful_threads =
529 (elements + minimum_elements_per_thread - 1u) /
530 minimum_elements_per_thread;
531 if ((size_t)active > useful_threads) active = (int)useful_threads;
532 if (active > rows) active = rows;
533
534 if (active > 1 && ck_threadpool_thread_id(pool) <= 0) {
536 pool, active, 0, rows, 1,
538 } else {
539 recurrent_silu_forward_ggml_rows(0, rows, &args);
540 }
541}
void ck_threadpool_parallel_for_n(ck_threadpool_t *pool, int active_threads, int begin, int end, int grain_size, ck_range_fn_t fn, void *args)
ck_threadpool_t * ck_threadpool_global(void)
int ck_threadpool_thread_id(const ck_threadpool_t *pool)
int ck_threadpool_n_threads(const ck_threadpool_t *pool)
static void recurrent_silu_forward_ggml_rows(int begin, int end, void *opaque)

References ck_threadpool_global(), ck_threadpool_n_threads(), ck_threadpool_parallel_for_n(), ck_threadpool_thread_id(), and recurrent_silu_forward_ggml_rows().

Referenced by hyper_connection_mix_quantized(), qwen4_ple_gate_conv_inject_impl(), and recurrent_norm_gate_llama_avx2_forward().

◆ recurrent_silu_forward_ggml_rows()

static void recurrent_silu_forward_ggml_rows ( int  begin,
int  end,
void *  opaque 
)
static

Definition at line 475 of file recurrent_gate_kernels.c.

477 {
478 const ck_recurrent_silu_ggml_args_t *args =
479 (const ck_recurrent_silu_ggml_args_t *)opaque;
480 const int dim = args->dim;
481 for (int row = begin; row < end; ++row) {
482 const float *x_row = args->x + (size_t)row * (size_t)dim;
483 float *out_row = args->out + (size_t)row * (size_t)dim;
484 int col = 0;
485#if defined(__AVX512F__) && defined(__AVX512DQ__)
486 for (; col + 16 <= dim; col += 16) {
487 const __m512 xv = _mm512_loadu_ps(x_row + col);
488 const __m512 neg = _mm512_sub_ps(_mm512_setzero_ps(), xv);
489 const __m512 denom = _mm512_add_ps(
490 _mm512_set1_ps(1.0f), recurrent_ggml_expf_avx512(neg));
491 _mm512_storeu_ps(out_row + col, _mm512_div_ps(xv, denom));
492 }
493#elif defined(__AVX2__) && defined(__FMA__)
494 for (; col + 8 <= dim; col += 8) {
495 const __m256 xv = _mm256_loadu_ps(x_row + col);
496 const __m256 neg = _mm256_sub_ps(_mm256_setzero_ps(), xv);
497 const __m256 denom = _mm256_add_ps(
498 _mm256_set1_ps(1.0f), recurrent_ggml_expf_avx2(neg));
499 _mm256_storeu_ps(out_row + col, _mm256_div_ps(xv, denom));
500 }
501#endif
502 float (*volatile llama_expf)(float) = expf;
503 for (; col < dim; ++col) {
504 const float xv = x_row[col];
505 out_row[col] = xv / (1.0f + llama_expf(-xv));
506 }
507 }
508}
uint32_t end
Definition utf8.c:215

References end.

Referenced by recurrent_silu_forward_ggml().

◆ recurrent_silu_forward_pytorch_bf16_input_fp32_output()

void recurrent_silu_forward_pytorch_bf16_input_fp32_output ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 300 of file recurrent_gate_kernels.c.

304{
305 if (!x || !out || rows < 0 || dim < 0) {
306 fprintf(stderr, "HARD KERNEL CONTRACT FAULT: invalid BF16-input FP32-output SiLU arguments\n");
307 abort();
308 }
309#if defined(__AVX512F__)
310 pthread_once(&ck_recurrent_sleef_once, ck_bind_recurrent_pytorch_sleef);
311 if (!ck_recurrent_pytorch_expf16) {
312 fprintf(stderr,
313 "HARD KERNEL CONTRACT FAULT: PyTorch BF16-input SiLU requires "
314 "SLEEF Sleef_expf16_u10; set CK_SLEEF_LIBRARY\n");
315 abort();
316 }
317#endif
318 const int count = rows * dim;
319 int i = 0;
320#if defined(__AVX512F__)
321 for (; i + 16 <= count; i += 16) {
322 float lanes[16] __attribute__((aligned(64)));
323 for (int lane = 0; lane < 16; ++lane) {
324 lanes[lane] = bf16_to_float(float_to_bf16(x[i + lane]));
325 }
326 const __m512 values = _mm512_load_ps(lanes);
327 const __m512 denominator = _mm512_add_ps(
328 _mm512_set1_ps(1.0f),
329 ck_recurrent_pytorch_expf16(
330 _mm512_sub_ps(_mm512_setzero_ps(), values)));
331 _mm512_storeu_ps(out + i, _mm512_div_ps(values, denominator));
332 }
333#endif
334 for (; i < count; ++i) {
335 const float value = bf16_to_float(float_to_bf16(x[i]));
336 out[i] = value / (1.0f + expf(-value));
337 }
338}

References __attribute__(), bf16_to_float(), count, and float_to_bf16().

Referenced by recurrent_norm_gate_pytorch_bf16_storage().

◆ recurrent_silu_forward_pytorch_bf16_storage()

void recurrent_silu_forward_pytorch_bf16_storage ( const float *  x,
float *  out,
int  rows,
int  dim 
)

Definition at line 253 of file recurrent_gate_kernels.c.

257{
258 if (!x || !out || rows < 0 || dim < 0) {
259 fprintf(stderr, "HARD KERNEL CONTRACT FAULT: invalid PyTorch BF16 recurrent SiLU arguments\n");
260 abort();
261 }
262#if defined(__AVX512F__)
263 pthread_once(&ck_recurrent_sleef_once, ck_bind_recurrent_pytorch_sleef);
264 if (!ck_recurrent_pytorch_expf16) {
265 fprintf(stderr,
266 "HARD KERNEL CONTRACT FAULT: PyTorch BF16 recurrent SiLU requires "
267 "SLEEF Sleef_expf16_u10; set CK_SLEEF_LIBRARY\n");
268 abort();
269 }
270#endif
271 for (int row = 0; row < rows; ++row) {
272 const float *src = x + (size_t)row * (size_t)dim;
273 float *dst = out + (size_t)row * (size_t)dim;
274 int col = 0;
275#if defined(__AVX512F__)
276 for (; col + 16 <= dim; col += 16) {
277 float lanes[16] __attribute__((aligned(64)));
278 for (int lane = 0; lane < 16; ++lane) {
279 lanes[lane] = bf16_to_float(float_to_bf16(src[col + lane]));
280 }
281 const __m512 values = _mm512_load_ps(lanes);
282 const __m512 denominator = _mm512_add_ps(
283 _mm512_set1_ps(1.0f),
284 ck_recurrent_pytorch_expf16(
285 _mm512_sub_ps(_mm512_setzero_ps(), values)));
286 _mm512_store_ps(lanes, _mm512_div_ps(values, denominator));
287 for (int lane = 0; lane < 16; ++lane) {
288 dst[col + lane] = bf16_to_float(float_to_bf16(lanes[lane]));
289 }
290 }
291#endif
292 for (; col < dim; ++col) {
293 const float value = bf16_to_float(float_to_bf16(src[col]));
294 const float silu = value / (1.0f + expf(-value));
295 dst[col] = bf16_to_float(float_to_bf16(silu));
296 }
297 }
298}
static void silu(float *x, int n)

References __attribute__(), bf16_to_float(), float_to_bf16(), and silu().

◆ recurrent_softplus()

static float recurrent_softplus ( float  x)
inlinestatic

Variable Documentation

◆ ck_recurrent_libm_handle

void* ck_recurrent_libm_handle = NULL
static

Definition at line 22 of file recurrent_gate_kernels.c.

Referenced by ck_bind_recurrent_llama_libm().

◆ ck_recurrent_libm_once

pthread_once_t ck_recurrent_libm_once = PTHREAD_ONCE_INIT
static

◆ ck_recurrent_llama_expf

ck_recurrent_libm_f32_fn ck_recurrent_llama_expf = NULL
static

◆ ck_recurrent_llama_logf

ck_recurrent_libm_f32_fn ck_recurrent_llama_logf = NULL
static

Definition at line 20 of file recurrent_gate_kernels.c.

Referenced by ck_bind_recurrent_llama_libm(), and recurrent_softplus().

◆ ck_recurrent_pytorch_log1pf

ck_recurrent_libm_f32_fn ck_recurrent_pytorch_log1pf = NULL
static