causal_softmax.h 851 Bytes
Newer Older
PanZezhong's avatar
PanZezhong committed
1
2
#ifndef __INFINIOP_CAUSAL_SOFTMAX_API_H__
#define __INFINIOP_CAUSAL_SOFTMAX_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 *infiniopCausalSoftmaxDescriptor_t;
PanZezhongQY's avatar
PanZezhongQY committed
7

8
9
10
11
12
__C __export infiniStatus_t infiniopCreateCausalSoftmaxDescriptor(
    infiniopHandle_t handle,
    infiniopCausalSoftmaxDescriptor_t *desc_ptr,
    infiniopTensorDescriptor_t y_desc,
    infiniopTensorDescriptor_t x_desc);
PanZezhongQY's avatar
PanZezhongQY committed
13

PanZezhong's avatar
PanZezhong committed
14
__C __export infiniStatus_t infiniopGetCausalSoftmaxWorkspaceSize(infiniopCausalSoftmaxDescriptor_t desc, size_t *size);
PanZezhongQY's avatar
PanZezhongQY committed
15

16
17
18
19
20
21
22
__C __export infiniStatus_t infiniopCausalSoftmax(
    infiniopCausalSoftmaxDescriptor_t desc,
    void *workspace,
    size_t workspace_size,
    void *y,
    const void *x,
    void *stream);
PanZezhongQY's avatar
PanZezhongQY committed
23

PanZezhong's avatar
PanZezhong committed
24
__C __export infiniStatus_t infiniopDestroyCausalSoftmaxDescriptor(infiniopCausalSoftmaxDescriptor_t desc);
PanZezhongQY's avatar
PanZezhongQY committed
25
26

#endif