Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
b1ee0a8a
Commit
b1ee0a8a
authored
Mar 05, 2026
by
wooway777
Browse files
issue/1033 - replace __C with __INFINI_C
parent
c17e3b83
Changes
87
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
72 additions
and
72 deletions
+72
-72
include/infiniccl.h
include/infiniccl.h
+3
-3
include/infinicore.h
include/infinicore.h
+2
-2
include/infiniop/handle.h
include/infiniop/handle.h
+2
-2
include/infiniop/operator_descriptor.h
include/infiniop/operator_descriptor.h
+2
-2
include/infiniop/ops/add.h
include/infiniop/ops/add.h
+4
-4
include/infiniop/ops/add_rms_norm.h
include/infiniop/ops/add_rms_norm.h
+4
-4
include/infiniop/ops/attention.h
include/infiniop/ops/attention.h
+4
-4
include/infiniop/ops/causal_softmax.h
include/infiniop/ops/causal_softmax.h
+4
-4
include/infiniop/ops/clip.h
include/infiniop/ops/clip.h
+4
-4
include/infiniop/ops/conv.h
include/infiniop/ops/conv.h
+4
-4
include/infiniop/ops/dequantize_awq.h
include/infiniop/ops/dequantize_awq.h
+4
-4
include/infiniop/ops/embedding.h
include/infiniop/ops/embedding.h
+3
-3
include/infiniop/ops/flash_attention.h
include/infiniop/ops/flash_attention.h
+4
-4
include/infiniop/ops/gelu.h
include/infiniop/ops/gelu.h
+4
-4
include/infiniop/ops/gemm.h
include/infiniop/ops/gemm.h
+4
-4
include/infiniop/ops/int8_gemm.h
include/infiniop/ops/int8_gemm.h
+4
-4
include/infiniop/ops/kv_caching.h
include/infiniop/ops/kv_caching.h
+4
-4
include/infiniop/ops/layer_norm.h
include/infiniop/ops/layer_norm.h
+4
-4
include/infiniop/ops/logsoftmax.h
include/infiniop/ops/logsoftmax.h
+4
-4
include/infiniop/ops/lp_norm.h
include/infiniop/ops/lp_norm.h
+4
-4
No files found.
include/infiniccl.h
View file @
b1ee0a8a
...
@@ -15,15 +15,15 @@ struct InfinicclComm;
...
@@ -15,15 +15,15 @@ struct InfinicclComm;
typedef
struct
InfinicclComm
*
infinicclComm_t
;
typedef
struct
InfinicclComm
*
infinicclComm_t
;
__C
__export
infiniStatus_t
infinicclCommInitAll
(
__
INFINI_
C
__export
infiniStatus_t
infinicclCommInitAll
(
infiniDevice_t
device_type
,
infiniDevice_t
device_type
,
infinicclComm_t
*
comms
,
infinicclComm_t
*
comms
,
int
ndevice
,
int
ndevice
,
const
int
*
device_ids
);
const
int
*
device_ids
);
__C
__export
infiniStatus_t
infinicclCommDestroy
(
infinicclComm_t
comm
);
__
INFINI_
C
__export
infiniStatus_t
infinicclCommDestroy
(
infinicclComm_t
comm
);
__C
__export
infiniStatus_t
infinicclAllReduce
(
__
INFINI_
C
__export
infiniStatus_t
infinicclAllReduce
(
void
*
sendbuf
,
void
*
sendbuf
,
void
*
recvbuf
,
void
*
recvbuf
,
size_t
count
,
size_t
count
,
...
...
include/infinicore.h
View file @
b1ee0a8a
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
#endif
#endif
#ifdef __cplusplus
#ifdef __cplusplus
#define __C extern "C"
#define __
INFINI_
C extern "C"
#include <cstddef>
#include <cstddef>
#else
#else
#define __C
#define __
INFINI_
C
#include <stddef.h>
#include <stddef.h>
#endif
#endif
...
...
include/infiniop/handle.h
View file @
b1ee0a8a
...
@@ -7,8 +7,8 @@ struct InfiniopHandle;
...
@@ -7,8 +7,8 @@ struct InfiniopHandle;
typedef
struct
InfiniopHandle
*
infiniopHandle_t
;
typedef
struct
InfiniopHandle
*
infiniopHandle_t
;
__C
__export
infiniStatus_t
infiniopCreateHandle
(
infiniopHandle_t
*
handle_ptr
);
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateHandle
(
infiniopHandle_t
*
handle_ptr
);
__C
__export
infiniStatus_t
infiniopDestroyHandle
(
infiniopHandle_t
handle
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyHandle
(
infiniopHandle_t
handle
);
#endif
#endif
include/infiniop/operator_descriptor.h
View file @
b1ee0a8a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
// Base descriptor for all operators
// Base descriptor for all operators
struct
InfiniopDescriptor
;
struct
InfiniopDescriptor
;
__C
__export
infiniStatus_t
infiniopGetDescriptorDeviceType
(
const
struct
InfiniopDescriptor
*
desc_ptr
,
infiniDevice_t
*
device_type
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetDescriptorDeviceType
(
const
struct
InfiniopDescriptor
*
desc_ptr
,
infiniDevice_t
*
device_type
);
__C
__export
infiniStatus_t
infiniopGetDescriptorDeviceId
(
const
struct
InfiniopDescriptor
*
desc_ptr
,
int
*
device_id
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetDescriptorDeviceId
(
const
struct
InfiniopDescriptor
*
desc_ptr
,
int
*
device_id
);
#endif //__INFINIOP_OPERATOR_DESCRIPTOR_API_H__
#endif //__INFINIOP_OPERATOR_DESCRIPTOR_API_H__
include/infiniop/ops/add.h
View file @
b1ee0a8a
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
typedef
struct
InfiniopDescriptor
*
infiniopAddDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopAddDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateAddDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateAddDescriptor
(
infiniopHandle_t
handle
,
infiniopAddDescriptor_t
*
desc_ptr
,
infiniopAddDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
c
,
infiniopTensorDescriptor_t
c
,
infiniopTensorDescriptor_t
a
,
infiniopTensorDescriptor_t
a
,
infiniopTensorDescriptor_t
b
);
infiniopTensorDescriptor_t
b
);
__C
__export
infiniStatus_t
infiniopGetAddWorkspaceSize
(
infiniopAddDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetAddWorkspaceSize
(
infiniopAddDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopAdd
(
infiniopAddDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopAdd
(
infiniopAddDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
c
,
void
*
c
,
...
@@ -21,6 +21,6 @@ __C __export infiniStatus_t infiniopAdd(infiniopAddDescriptor_t desc,
...
@@ -21,6 +21,6 @@ __C __export infiniStatus_t infiniopAdd(infiniopAddDescriptor_t desc,
const
void
*
b
,
const
void
*
b
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyAddDescriptor
(
infiniopAddDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyAddDescriptor
(
infiniopAddDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/add_rms_norm.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopAddRMSNormDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopAddRMSNormDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateAddRMSNormDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateAddRMSNormDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopAddRMSNormDescriptor_t
*
desc_ptr
,
infiniopAddRMSNormDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
y_desc
,
...
@@ -15,9 +15,9 @@ __C __export infiniStatus_t infiniopCreateAddRMSNormDescriptor(
...
@@ -15,9 +15,9 @@ __C __export infiniStatus_t infiniopCreateAddRMSNormDescriptor(
infiniopTensorDescriptor_t
weight_desc
,
infiniopTensorDescriptor_t
weight_desc
,
float
epsilon
);
float
epsilon
);
__C
__export
infiniStatus_t
infiniopGetAddRMSNormWorkspaceSize
(
infiniopAddRMSNormDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetAddRMSNormWorkspaceSize
(
infiniopAddRMSNormDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopAddRMSNorm
(
infiniopAddRMSNormDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopAddRMSNorm
(
infiniopAddRMSNormDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
y
,
void
*
y
,
...
@@ -27,6 +27,6 @@ __C __export infiniStatus_t infiniopAddRMSNorm(infiniopAddRMSNormDescriptor_t de
...
@@ -27,6 +27,6 @@ __C __export infiniStatus_t infiniopAddRMSNorm(infiniopAddRMSNormDescriptor_t de
const
void
*
weight
,
const
void
*
weight
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyAddRMSNormDescriptor
(
infiniopAddRMSNormDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyAddRMSNormDescriptor
(
infiniopAddRMSNormDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/attention.h
View file @
b1ee0a8a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopAttentionDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopAttentionDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateAttentionDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateAttentionDescriptor
(
infiniopHandle_t
handle
,
infiniopAttentionDescriptor_t
*
desc_ptr
,
infiniopAttentionDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
q_desc
,
infiniopTensorDescriptor_t
q_desc
,
...
@@ -17,9 +17,9 @@ __C __export infiniStatus_t infiniopCreateAttentionDescriptor(infiniopHandle_t h
...
@@ -17,9 +17,9 @@ __C __export infiniStatus_t infiniopCreateAttentionDescriptor(infiniopHandle_t h
infiniopTensorDescriptor_t
v_cache_desc
,
infiniopTensorDescriptor_t
v_cache_desc
,
size_t
pos
);
size_t
pos
);
__C
__export
infiniStatus_t
infiniopGetAttentionWorkspaceSize
(
infiniopAttentionDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetAttentionWorkspaceSize
(
infiniopAttentionDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopAttention
(
infiniopAttentionDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopAttention
(
infiniopAttentionDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
out
,
void
*
out
,
...
@@ -30,5 +30,5 @@ __C __export infiniStatus_t infiniopAttention(infiniopAttentionDescriptor_t desc
...
@@ -30,5 +30,5 @@ __C __export infiniStatus_t infiniopAttention(infiniopAttentionDescriptor_t desc
void
*
v_cache
,
void
*
v_cache
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyAttentionDescriptor
(
infiniopAttentionDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyAttentionDescriptor
(
infiniopAttentionDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/causal_softmax.h
View file @
b1ee0a8a
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
typedef
struct
InfiniopDescriptor
*
infiniopCausalSoftmaxDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopCausalSoftmaxDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateCausalSoftmaxDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateCausalSoftmaxDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopCausalSoftmaxDescriptor_t
*
desc_ptr
,
infiniopCausalSoftmaxDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
x_desc
);
infiniopTensorDescriptor_t
x_desc
);
__C
__export
infiniStatus_t
infiniopGetCausalSoftmaxWorkspaceSize
(
infiniopCausalSoftmaxDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetCausalSoftmaxWorkspaceSize
(
infiniopCausalSoftmaxDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopCausalSoftmax
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCausalSoftmax
(
infiniopCausalSoftmaxDescriptor_t
desc
,
infiniopCausalSoftmaxDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
...
@@ -21,6 +21,6 @@ __C __export infiniStatus_t infiniopCausalSoftmax(
...
@@ -21,6 +21,6 @@ __C __export infiniStatus_t infiniopCausalSoftmax(
const
void
*
x
,
const
void
*
x
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyCausalSoftmaxDescriptor
(
infiniopCausalSoftmaxDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyCausalSoftmaxDescriptor
(
infiniopCausalSoftmaxDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/clip.h
View file @
b1ee0a8a
...
@@ -5,16 +5,16 @@
...
@@ -5,16 +5,16 @@
typedef
struct
InfiniopDescriptor
*
infiniopClipDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopClipDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateClipDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateClipDescriptor
(
infiniopHandle_t
handle
,
infiniopClipDescriptor_t
*
desc_ptr
,
infiniopClipDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y
,
infiniopTensorDescriptor_t
y
,
infiniopTensorDescriptor_t
x
,
infiniopTensorDescriptor_t
x
,
infiniopTensorDescriptor_t
min_val
,
infiniopTensorDescriptor_t
min_val
,
infiniopTensorDescriptor_t
max_val
);
infiniopTensorDescriptor_t
max_val
);
__C
__export
infiniStatus_t
infiniopGetClipWorkspaceSize
(
infiniopClipDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetClipWorkspaceSize
(
infiniopClipDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopClip
(
infiniopClipDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopClip
(
infiniopClipDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
y
,
void
*
y
,
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopClip(infiniopClipDescriptor_t desc,
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopClip(infiniopClipDescriptor_t desc,
const
void
*
max_val
,
const
void
*
max_val
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyClipDescriptor
(
infiniopClipDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyClipDescriptor
(
infiniopClipDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/conv.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopConvDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopConvDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateConvDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateConvDescriptor
(
infiniopHandle_t
handle
,
infiniopConvDescriptor_t
*
desc_ptr
,
infiniopConvDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
x_desc
,
infiniopTensorDescriptor_t
x_desc
,
...
@@ -16,10 +16,10 @@ __C __export infiniStatus_t infiniopCreateConvDescriptor(infiniopHandle_t handle
...
@@ -16,10 +16,10 @@ __C __export infiniStatus_t infiniopCreateConvDescriptor(infiniopHandle_t handle
void
*
dilations
,
void
*
dilations
,
size_t
n
);
size_t
n
);
__C
__export
infiniStatus_t
infiniopGetConvWorkspaceSize
(
infiniopConvDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetConvWorkspaceSize
(
infiniopConvDescriptor_t
desc
,
size_t
*
size
);
__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
);
__
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
);
__C
__export
infiniStatus_t
infiniopDestroyConvDescriptor
(
infiniopConvDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyConvDescriptor
(
infiniopConvDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/dequantize_awq.h
View file @
b1ee0a8a
...
@@ -5,16 +5,16 @@
...
@@ -5,16 +5,16 @@
typedef
struct
InfiniopDescriptor
*
infiniopDequantizeAWQDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopDequantizeAWQDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateDequantizeAWQDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateDequantizeAWQDescriptor
(
infiniopHandle_t
handle
,
infiniopDequantizeAWQDescriptor_t
*
desc_ptr
,
infiniopDequantizeAWQDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
qweight_desc
,
infiniopTensorDescriptor_t
qweight_desc
,
infiniopTensorDescriptor_t
scales_desc
,
infiniopTensorDescriptor_t
scales_desc
,
infiniopTensorDescriptor_t
zeros_desc
);
infiniopTensorDescriptor_t
zeros_desc
);
__C
__export
infiniStatus_t
infiniopGetDequantizeAWQWorkspaceSize
(
infiniopDequantizeAWQDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetDequantizeAWQWorkspaceSize
(
infiniopDequantizeAWQDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopDequantizeAWQ
(
infiniopDequantizeAWQDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopDequantizeAWQ
(
infiniopDequantizeAWQDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
out
,
void
*
out
,
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopDequantizeAWQ(infiniopDequantizeAWQDescripto
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopDequantizeAWQ(infiniopDequantizeAWQDescripto
const
void
*
zeros
,
const
void
*
zeros
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyDequantizeAWQDescriptor
(
infiniopDequantizeAWQDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyDequantizeAWQDescriptor
(
infiniopDequantizeAWQDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/embedding.h
View file @
b1ee0a8a
...
@@ -5,21 +5,21 @@
...
@@ -5,21 +5,21 @@
typedef
struct
InfiniopDescriptor
*
infiniopEmbeddingDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopEmbeddingDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateEmbeddingDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateEmbeddingDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopEmbeddingDescriptor_t
*
desc_ptr
,
infiniopEmbeddingDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
output_desc
,
infiniopTensorDescriptor_t
output_desc
,
infiniopTensorDescriptor_t
input_desc
,
infiniopTensorDescriptor_t
input_desc
,
infiniopTensorDescriptor_t
weight_desc
);
infiniopTensorDescriptor_t
weight_desc
);
__C
__export
infiniStatus_t
infiniopEmbedding
(
__
INFINI_
C
__export
infiniStatus_t
infiniopEmbedding
(
infiniopEmbeddingDescriptor_t
desc
,
infiniopEmbeddingDescriptor_t
desc
,
void
*
output
,
void
*
output
,
const
void
*
input
,
const
void
*
input
,
const
void
*
weight
,
const
void
*
weight
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyEmbeddingDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyEmbeddingDescriptor
(
infiniopEmbeddingDescriptor_t
desc
);
infiniopEmbeddingDescriptor_t
desc
);
#endif
#endif
...
...
include/infiniop/ops/flash_attention.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopFlashAttentionDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopFlashAttentionDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateFlashAttentionDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateFlashAttentionDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopFlashAttentionDescriptor_t
*
desc_ptr
,
infiniopFlashAttentionDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
out_desc
,
...
@@ -16,11 +16,11 @@ __C __export infiniStatus_t infiniopCreateFlashAttentionDescriptor(
...
@@ -16,11 +16,11 @@ __C __export infiniStatus_t infiniopCreateFlashAttentionDescriptor(
float
scale
,
float
scale
,
char
is_causal
);
char
is_causal
);
__C
__export
infiniStatus_t
infiniopGetFlashAttentionWorkspaceSize
(
__
INFINI_
C
__export
infiniStatus_t
infiniopGetFlashAttentionWorkspaceSize
(
infiniopFlashAttentionDescriptor_t
desc
,
infiniopFlashAttentionDescriptor_t
desc
,
size_t
*
size
);
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopFlashAttention
(
__
INFINI_
C
__export
infiniStatus_t
infiniopFlashAttention
(
infiniopFlashAttentionDescriptor_t
desc
,
infiniopFlashAttentionDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
...
@@ -31,6 +31,6 @@ __C __export infiniStatus_t infiniopFlashAttention(
...
@@ -31,6 +31,6 @@ __C __export infiniStatus_t infiniopFlashAttention(
const
void
*
total_kv_len
,
const
void
*
total_kv_len
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyFlashAttentionDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyFlashAttentionDescriptor
(
infiniopFlashAttentionDescriptor_t
desc
);
infiniopFlashAttentionDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/gelu.h
View file @
b1ee0a8a
...
@@ -5,20 +5,20 @@
...
@@ -5,20 +5,20 @@
typedef
struct
InfiniopDescriptor
*
infiniopGeluDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopGeluDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateGeluDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateGeluDescriptor
(
infiniopHandle_t
handle
,
infiniopGeluDescriptor_t
*
desc_ptr
,
infiniopGeluDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
output
,
infiniopTensorDescriptor_t
output
,
infiniopTensorDescriptor_t
intput
);
infiniopTensorDescriptor_t
intput
);
__C
__export
infiniStatus_t
infiniopGetGeluWorkspaceSize
(
infiniopGeluDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetGeluWorkspaceSize
(
infiniopGeluDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopGelu
(
infiniopGeluDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopGelu
(
infiniopGeluDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
output
,
void
*
output
,
const
void
*
intput
,
const
void
*
intput
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyGeluDescriptor
(
infiniopGeluDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyGeluDescriptor
(
infiniopGeluDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/gemm.h
View file @
b1ee0a8a
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
typedef
struct
InfiniopDescriptor
*
infiniopGemmDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopGemmDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateGemmDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateGemmDescriptor
(
infiniopHandle_t
handle
,
infiniopGemmDescriptor_t
*
desc_ptr
,
infiniopGemmDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
c_desc
,
infiniopTensorDescriptor_t
c_desc
,
infiniopTensorDescriptor_t
a_desc
,
infiniopTensorDescriptor_t
a_desc
,
infiniopTensorDescriptor_t
b_desc
);
infiniopTensorDescriptor_t
b_desc
);
__C
__export
infiniStatus_t
infiniopGetGemmWorkspaceSize
(
infiniopGemmDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetGemmWorkspaceSize
(
infiniopGemmDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopGemm
(
infiniopGemmDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopGemm
(
infiniopGemmDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
c
,
void
*
c
,
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopGemm(infiniopGemmDescriptor_t desc,
...
@@ -23,6 +23,6 @@ __C __export infiniStatus_t infiniopGemm(infiniopGemmDescriptor_t desc,
float
beta
,
float
beta
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyGemmDescriptor
(
infiniopGemmDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyGemmDescriptor
(
infiniopGemmDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/int8_gemm.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
InfiniopDescriptor
*
infiniopI8GemmDescriptor_t
;
typedef
InfiniopDescriptor
*
infiniopI8GemmDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateI8GemmDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateI8GemmDescriptor
(
infiniopHandle_t
handle
,
infiniopI8GemmDescriptor_t
*
desc_ptr
,
infiniopI8GemmDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
bias_desc
,
infiniopTensorDescriptor_t
bias_desc
,
...
@@ -14,9 +14,9 @@ __C __export infiniStatus_t infiniopCreateI8GemmDescriptor(infiniopHandle_t hand
...
@@ -14,9 +14,9 @@ __C __export infiniStatus_t infiniopCreateI8GemmDescriptor(infiniopHandle_t hand
infiniopTensorDescriptor_t
weights_desc
,
infiniopTensorDescriptor_t
weights_desc
,
infiniopTensorDescriptor_t
weights_scale_desc
);
infiniopTensorDescriptor_t
weights_scale_desc
);
__C
__export
infiniStatus_t
infiniopGetI8GemmWorkspaceSize
(
infiniopI8GemmDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetI8GemmWorkspaceSize
(
infiniopI8GemmDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopI8Gemm
(
infiniopI8GemmDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopI8Gemm
(
infiniopI8GemmDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
out
,
void
*
out
,
...
@@ -27,6 +27,6 @@ __C __export infiniStatus_t infiniopI8Gemm(infiniopI8GemmDescriptor_t desc,
...
@@ -27,6 +27,6 @@ __C __export infiniStatus_t infiniopI8Gemm(infiniopI8GemmDescriptor_t desc,
const
void
*
weights_scale
,
const
void
*
weights_scale
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyI8GemmDescriptor
(
infiniopI8GemmDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyI8GemmDescriptor
(
infiniopI8GemmDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/kv_caching.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopKVCachingDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopKVCachingDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateKVCachingDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateKVCachingDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopKVCachingDescriptor_t
*
desc_ptr
,
infiniopKVCachingDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
k_cache
,
infiniopTensorDescriptor_t
k_cache
,
...
@@ -14,9 +14,9 @@ __C __export infiniStatus_t infiniopCreateKVCachingDescriptor(
...
@@ -14,9 +14,9 @@ __C __export infiniStatus_t infiniopCreateKVCachingDescriptor(
infiniopTensorDescriptor_t
v
,
infiniopTensorDescriptor_t
v
,
infiniopTensorDescriptor_t
past_kv_lengths
);
infiniopTensorDescriptor_t
past_kv_lengths
);
__C
__export
infiniStatus_t
infiniopGetKVCachingWorkspaceSize
(
infiniopKVCachingDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetKVCachingWorkspaceSize
(
infiniopKVCachingDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopKVCaching
(
infiniopKVCachingDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopKVCaching
(
infiniopKVCachingDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
k_cache
,
void
*
k_cache
,
...
@@ -26,6 +26,6 @@ __C __export infiniStatus_t infiniopKVCaching(infiniopKVCachingDescriptor_t desc
...
@@ -26,6 +26,6 @@ __C __export infiniStatus_t infiniopKVCaching(infiniopKVCachingDescriptor_t desc
const
void
*
past_kv_lengths
,
const
void
*
past_kv_lengths
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyKVCachingDescriptor
(
infiniopKVCachingDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyKVCachingDescriptor
(
infiniopKVCachingDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/layer_norm.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopLayerNormDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopLayerNormDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateLayerNormDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateLayerNormDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopLayerNormDescriptor_t
*
desc_ptr
,
infiniopLayerNormDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
output_desc
,
infiniopTensorDescriptor_t
output_desc
,
...
@@ -16,9 +16,9 @@ __C __export infiniStatus_t infiniopCreateLayerNormDescriptor(
...
@@ -16,9 +16,9 @@ __C __export infiniStatus_t infiniopCreateLayerNormDescriptor(
infiniopTensorDescriptor_t
bias_desc
,
infiniopTensorDescriptor_t
bias_desc
,
float
eps
);
float
eps
);
__C
__export
infiniStatus_t
infiniopGetLayerNormWorkspaceSize
(
infiniopLayerNormDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetLayerNormWorkspaceSize
(
infiniopLayerNormDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopLayerNorm
(
infiniopLayerNormDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopLayerNorm
(
infiniopLayerNormDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
output
,
void
*
output
,
...
@@ -29,6 +29,6 @@ __C __export infiniStatus_t infiniopLayerNorm(infiniopLayerNormDescriptor_t desc
...
@@ -29,6 +29,6 @@ __C __export infiniStatus_t infiniopLayerNorm(infiniopLayerNormDescriptor_t desc
const
void
*
bias
,
const
void
*
bias
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyLayerNormDescriptor
(
infiniopLayerNormDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyLayerNormDescriptor
(
infiniopLayerNormDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/logsoftmax.h
View file @
b1ee0a8a
...
@@ -5,20 +5,20 @@
...
@@ -5,20 +5,20 @@
typedef
struct
InfiniopDescriptor
*
infiniopLogSoftmaxDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopLogSoftmaxDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateLogSoftmaxDescriptor
(
infiniopHandle_t
handle
,
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateLogSoftmaxDescriptor
(
infiniopHandle_t
handle
,
infiniopLogSoftmaxDescriptor_t
*
desc_ptr
,
infiniopLogSoftmaxDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
x_desc
);
infiniopTensorDescriptor_t
x_desc
);
__C
__export
infiniStatus_t
infiniopGetLogSoftmaxWorkspaceSize
(
infiniopLogSoftmaxDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetLogSoftmaxWorkspaceSize
(
infiniopLogSoftmaxDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopLogSoftmax
(
infiniopLogSoftmaxDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopLogSoftmax
(
infiniopLogSoftmaxDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
y
,
void
*
y
,
const
void
*
x
,
const
void
*
x
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyLogSoftmaxDescriptor
(
infiniopLogSoftmaxDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyLogSoftmaxDescriptor
(
infiniopLogSoftmaxDescriptor_t
desc
);
#endif
#endif
include/infiniop/ops/lp_norm.h
View file @
b1ee0a8a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
typedef
struct
InfiniopDescriptor
*
infiniopLPNormDescriptor_t
;
typedef
struct
InfiniopDescriptor
*
infiniopLPNormDescriptor_t
;
__C
__export
infiniStatus_t
infiniopCreateLPNormDescriptor
(
__
INFINI_
C
__export
infiniStatus_t
infiniopCreateLPNormDescriptor
(
infiniopHandle_t
handle
,
infiniopHandle_t
handle
,
infiniopLPNormDescriptor_t
*
desc_ptr
,
infiniopLPNormDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
output_desc
,
infiniopTensorDescriptor_t
output_desc
,
...
@@ -14,15 +14,15 @@ __C __export infiniStatus_t infiniopCreateLPNormDescriptor(
...
@@ -14,15 +14,15 @@ __C __export infiniStatus_t infiniopCreateLPNormDescriptor(
int
p
,
int
p
,
float
eps
);
float
eps
);
__C
__export
infiniStatus_t
infiniopGetLPNormWorkspaceSize
(
infiniopLPNormDescriptor_t
desc
,
size_t
*
size
);
__
INFINI_
C
__export
infiniStatus_t
infiniopGetLPNormWorkspaceSize
(
infiniopLPNormDescriptor_t
desc
,
size_t
*
size
);
__C
__export
infiniStatus_t
infiniopLPNorm
(
infiniopLPNormDescriptor_t
desc
,
__
INFINI_
C
__export
infiniStatus_t
infiniopLPNorm
(
infiniopLPNormDescriptor_t
desc
,
void
*
workspace
,
void
*
workspace
,
size_t
workspace_size
,
size_t
workspace_size
,
void
*
output
,
void
*
output
,
const
void
*
input
,
const
void
*
input
,
void
*
stream
);
void
*
stream
);
__C
__export
infiniStatus_t
infiniopDestroyLPNormDescriptor
(
infiniopLPNormDescriptor_t
desc
);
__
INFINI_
C
__export
infiniStatus_t
infiniopDestroyLPNormDescriptor
(
infiniopLPNormDescriptor_t
desc
);
#endif
#endif
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment