rotary_embedding.h 888 Bytes
Newer Older
PanZezhongQY's avatar
PanZezhongQY committed
1
2
3
4
5
6
7
#ifndef __INFINIOP_ROTARY_EMBEDDING_H__
#define __INFINIOP_ROTARY_EMBEDDING_H__

#include "../operator.h"

typedef InfiniopDescriptor *infiniopRoPEDescriptor_t;

PanZezhong's avatar
PanZezhong committed
8
__C __export infiniStatus_t infiniopCreateRoPEDescriptor(
PanZezhongQY's avatar
PanZezhongQY committed
9
10
11
12
13
14
15
    infiniopHandle_t handle,
    infiniopRoPEDescriptor_t *desc_ptr,
    infiniopTensorDescriptor_t t,
    infiniopTensorDescriptor_t pos_ids,
    infiniopTensorDescriptor_t sin_table,
    infiniopTensorDescriptor_t cos_table);

PanZezhong's avatar
PanZezhong committed
16
__C __export infiniStatus_t infiniopGetRoPEWorkspaceSize(infiniopRoPEDescriptor_t desc, size_t *size);
PanZezhongQY's avatar
PanZezhongQY committed
17

PanZezhong's avatar
PanZezhong committed
18
__C __export infiniStatus_t infiniopRoPE(
PanZezhongQY's avatar
PanZezhongQY committed
19
20
21
22
23
24
25
26
27
    infiniopRoPEDescriptor_t desc,
    void *workspace,
    size_t workspace_size,
    void *t,
    void const *pos_ids,
    void const *sin_table,
    void const *cos_table,
    void *stream);

PanZezhong's avatar
PanZezhong committed
28
__C __export infiniStatus_t infiniopDestroyRoPEDescriptor(infiniopRoPEDescriptor_t desc);
PanZezhongQY's avatar
PanZezhongQY committed
29
30

#endif