operator.h 540 Bytes
Newer Older
PanZezhongQY's avatar
PanZezhongQY committed
1
2
3
4
5
6
7
8
#ifndef __INFINIOP_OPERATOR___
#define __INFINIOP_OPERATOR___

#include "./handle.h"
#include "./tensor_descriptor.h"

// Base descriptor for all operators
typedef struct InfiniopDescriptor {
9
    infiniDevice_t device_type;
PanZezhongQY's avatar
PanZezhongQY committed
10
11
12
    int device_id;
} InfiniopDescriptor;

13
14
15
__C __export infiniopStatus_t infiniopGetDescriptorDeviceType(InfiniopDescriptor const *desc_ptr, infiniDevice_t *device_type);
__C __export infiniopStatus_t infiniopGetDescriptorDeviceId(InfiniopDescriptor const *desc_ptr, int *device_id);

PanZezhongQY's avatar
PanZezhongQY committed
16
#endif //__INFINIOP_OPERATOR___