gemm.h 1.33 KB
Newer Older
PanZezhong's avatar
PanZezhong committed
1
2
#ifndef __INFINIOP_GEMM_API_H__
#define __INFINIOP_GEMM_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 *infiniopGemmDescriptor_t;
PanZezhongQY's avatar
PanZezhongQY committed
7

8
__INFINI_C __export infiniStatus_t infiniopCreateGemmDescriptor(infiniopHandle_t handle,
PanZezhong's avatar
PanZezhong committed
9
                                                         infiniopGemmDescriptor_t *desc_ptr,
PanZezhong's avatar
PanZezhong committed
10
                                                         infiniopTensorDescriptor_t c_desc,
PanZezhong's avatar
PanZezhong committed
11
12
                                                         infiniopTensorDescriptor_t a_desc,
                                                         infiniopTensorDescriptor_t b_desc);
PanZezhongQY's avatar
PanZezhongQY committed
13

14
__INFINI_C __export infiniStatus_t infiniopGetGemmWorkspaceSize(infiniopGemmDescriptor_t desc, size_t *size);
PanZezhongQY's avatar
PanZezhongQY committed
15

16
__INFINI_C __export infiniStatus_t infiniopGemm(infiniopGemmDescriptor_t desc,
PanZezhong's avatar
PanZezhong committed
17
18
                                         void *workspace,
                                         size_t workspace_size,
PanZezhong's avatar
PanZezhong committed
19
                                         void *c,
PanZezhong's avatar
PanZezhong committed
20
21
22
23
24
                                         void const *a,
                                         void const *b,
                                         float alpha,
                                         float beta,
                                         void *stream);
PanZezhongQY's avatar
PanZezhongQY committed
25

26
__INFINI_C __export infiniStatus_t infiniopDestroyGemmDescriptor(infiniopGemmDescriptor_t desc);
PanZezhong's avatar
PanZezhong committed
27

PanZezhongQY's avatar
PanZezhongQY committed
28
#endif