conv.h 1.37 KB
Newer Older
PanZezhong's avatar
PanZezhong committed
1
2
#ifndef __INFINIOP_CONV_API_H__
#define __INFINIOP_CONV_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 *infiniopConvDescriptor_t;
PanZezhongQY's avatar
PanZezhongQY committed
7

8
__INFINI_C __export infiniStatus_t infiniopCreateConvDescriptor(infiniopHandle_t handle,
PanZezhong's avatar
PanZezhong committed
9
                                                         infiniopConvDescriptor_t *desc_ptr,
10
11
12
13
                                                         infiniopTensorDescriptor_t y_desc,
                                                         infiniopTensorDescriptor_t x_desc,
                                                         infiniopTensorDescriptor_t w_desc,
                                                         infiniopTensorDescriptor_t b_desc,
PanZezhong's avatar
PanZezhong committed
14
15
16
17
                                                         void *pads,
                                                         void *strides,
                                                         void *dilations,
                                                         size_t n);
PanZezhongQY's avatar
PanZezhongQY committed
18

19
__INFINI_C __export infiniStatus_t infiniopGetConvWorkspaceSize(infiniopConvDescriptor_t desc, size_t *size);
PanZezhongQY's avatar
PanZezhongQY committed
20

21
__INFINI_C __export infiniStatus_t infiniopConv(infiniopConvDescriptor_t desc, void *workspace, size_t workspace_size, void *y, const void *x, const void *w, const void *bias, void *stream);
PanZezhongQY's avatar
PanZezhongQY committed
22

23
__INFINI_C __export infiniStatus_t infiniopDestroyConvDescriptor(infiniopConvDescriptor_t desc);
PanZezhongQY's avatar
PanZezhongQY committed
24
25

#endif