rope.h 943 Bytes
Newer Older
1
2
#ifndef __INFINIOP_ROPE_API_H__
#define __INFINIOP_ROPE_API_H__
PanZezhongQY's avatar
PanZezhongQY committed
3

PanZezhong's avatar
PanZezhong committed
4
#include "../operator_descriptor.h"
PanZezhongQY's avatar
PanZezhongQY committed
5

6
typedef struct InfiniopDescriptor *infiniopRoPEDescriptor_t;
PanZezhongQY's avatar
PanZezhongQY committed
7

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

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

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

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

#endif