ffi.rs 463 Bytes
Newer Older
yongshk's avatar
yongshk committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use core::ffi::{c_int, c_long, c_void};

extern "C" {
    pub(crate) fn rotary_embedding(
        query: *const c_void,
        key: *const c_void,
        cos_cache: *const c_void,
        sin_cache: *const c_void,

        is_neox: c_int,

        head_size: c_int,
        num_tokens: c_long,
        rot_dim: c_int,
        num_heads: c_int,
        num_kv_heads: c_int,
        query_stride: c_long,
        key_stride: c_long,

        dtype: u32,
    );
}