Commit 9d611676 authored by PanZezhong's avatar PanZezhong
Browse files

issue/85 重命名头文件

parent 3cbe5e02
#ifndef __INFINICORE_H__
#define __INFINICORE_H__
#ifndef __INFINICORE_API_H__
#define __INFINICORE_API_H__
#if defined(_WIN32)
#define __export __declspec(dllexport)
......@@ -71,5 +71,4 @@ typedef enum {
INFINI_DTYPE_BF16 = 19,
} infiniDtype_t;
#endif // __INFINICORE_H__
#endif // __INFINICORE_API_H__
#ifndef __INFINIOP_H__
#define __INFINIOP_H__
#ifndef __INFINIOP_API_H__
#define __INFINIOP_API_H__
#include "infiniop/tensor_descriptor.h"
#include "infiniop/handle.h"
#include "infiniop/ops/add.h"
......@@ -20,4 +20,4 @@
#include "infiniop/ops/rotary_embedding.h"
#include "infiniop/ops/swiglu.h"
#endif // __INFINIOP_H__
#endif // __INFINIOP_API_H__
#ifndef __INFINIOP_HANDLE__
#define __INFINIOP_HANDLE__
#ifndef __INFINIOP_HANDLE_API_H__
#define __INFINIOP_HANDLE_API_H__
#include "../infinicore.h"
typedef struct InfiniopHandle {
infiniDevice_t device;
int device_id;
} InfiniopHandle;
struct InfiniopHandle;
typedef InfiniopHandle *infiniopHandle_t;
......
#ifndef __INFINIOP_OPERATOR___
#define __INFINIOP_OPERATOR___
#ifndef __INFINIOP_OPERATOR_DESCRIPTOR_API_H__
#define __INFINIOP_OPERATOR_DESCRIPTOR_API_H__
#include "handle.h"
#include "tensor_descriptor.h"
// Base descriptor for all operators
typedef struct InfiniopDescriptor {
infiniDevice_t device_type;
int device_id;
} InfiniopDescriptor;
struct InfiniopDescriptor;
__C __export infiniStatus_t infiniopGetDescriptorDeviceType(const InfiniopDescriptor *desc_ptr, infiniDevice_t *device_type);
__C __export infiniStatus_t infiniopGetDescriptorDeviceId(const InfiniopDescriptor *desc_ptr, int *device_id);
#endif //__INFINIOP_OPERATOR___
#endif //__INFINIOP_OPERATOR_DESCRIPTOR_API_H__
#ifndef __INFINIOP_ADD_H__
#define __INFINIOP_ADD_H__
#ifndef __INFINIOP_ADD_API_H__
#define __INFINIOP_ADD_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopAddDescriptor_t;
......
#ifndef __INFINIOP_ATTENTION_H__
#define __INFINIOP_ATTENTION_H__
#ifndef __INFINIOP_ATTENTION_API_H__
#define __INFINIOP_ATTENTION_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
#include "matmul.h"
#include "swiglu.h"
......
#ifndef __INFINIOP_AVG_POOL_H__
#define __INFINIOP_AVG_POOL_H__
#ifndef __INFINIOP_AVG_POOL_API_H__
#define __INFINIOP_AVG_POOL_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopAvgPoolDescriptor_t;
......
#ifndef __INFINIOP_CAUSAL_SOFTMAX_H__
#define __INFINIOP_CAUSAL_SOFTMAX_H__
#ifndef __INFINIOP_CAUSAL_SOFTMAX_API_H__
#define __INFINIOP_CAUSAL_SOFTMAX_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopCausalSoftmaxDescriptor_t;
......
#ifndef __INFINIOP_CONV_H__
#define __INFINIOP_CONV_H__
#ifndef __INFINIOP_CONV_API_H__
#define __INFINIOP_CONV_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopConvDescriptor_t;
......
#ifndef __INFINIOP_EXPAND_H__
#define __INFINIOP_EXPAND_H__
#ifndef __INFINIOP_EXPAND_API_H__
#define __INFINIOP_EXPAND_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopExpandDescriptor_t;
......
#ifndef __INFINIOP_GEMM_H__
#define __INFINIOP_GEMM_H__
#ifndef __INFINIOP_GEMM_API_H__
#define __INFINIOP_GEMM_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopGEMMDescriptor_t;
......
#ifndef __INFINIOP_GLOBAL_AVG_POOL_H__
#define __INFINIOP_GLOBAL_AVG_POOL_H__
#ifndef __INFINIOP_GLOBAL_AVG_POOL_API_H__
#define __INFINIOP_GLOBAL_AVG_POOL_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopGlobalAvgPoolDescriptor_t;
......
#ifndef __INFINIOP_MATMUL_H__
#define __INFINIOP_MATMUL_H__
#ifndef __INFINIOP_MATMUL_API_H__
#define __INFINIOP_MATMUL_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopMatmulDescriptor_t;
......
#ifndef __INFINIOP_MAX_POOL_H__
#define __INFINIOP_MAX_POOL_H__
#ifndef __INFINIOP_MAX_POOL_API_H__
#define __INFINIOP_MAX_POOL_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopMaxPoolDescriptor_t;
......
#ifndef __INFINIOP_MLP_H__
#define __INFINIOP_MLP_H__
#ifndef __INFINIOP_MLP_API_H__
#define __INFINIOP_MLP_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
#include "matmul.h"
#include "swiglu.h"
......
#ifndef __INFINIOP_RANDOM_SAMPLE_H__
#define __INFINIOP_RANDOM_SAMPLE_H__
#ifndef __INFINIOP_RANDOM_SAMPLE_API_H__
#define __INFINIOP_RANDOM_SAMPLE_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopRandomSampleDescriptor_t;
......
#ifndef __INFINIOP_REARRANGE_H__
#define __INFINIOP_REARRANGE_H__
#ifndef __INFINIOP_REARRANGE_API_H__
#define __INFINIOP_REARRANGE_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopRearrangeDescriptor_t;
......
#ifndef __INFINIOP_RELU_H__
#define __INFINIOP_RELU_H__
#ifndef __INFINIOP_RELU_API_H__
#define __INFINIOP_RELU_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopReluDescriptor_t;
......
#ifndef __INFINIOP_RMS_NORM_H__
#define __INFINIOP_RMS_NORM_H__
#ifndef __INFINIOP_RMS_NORM_API_H__
#define __INFINIOP_RMS_NORM_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopRMSNormDescriptor_t;
......
#ifndef __INFINIOP_ROTARY_EMBEDDING_H__
#define __INFINIOP_ROTARY_EMBEDDING_H__
#ifndef __INFINIOP_ROTARY_EMBEDDING_API_H__
#define __INFINIOP_ROTARY_EMBEDDING_API_H__
#include "../operator.h"
#include "../operator_descriptor.h"
typedef InfiniopDescriptor *infiniopRoPEDescriptor_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment