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
d790f7b4
Commit
d790f7b4
authored
Mar 05, 2026
by
wooway777
Browse files
issue/1033 - fix format
parent
b1ee0a8a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
67 deletions
+67
-67
src/infiniop/ops/attention/operator.cc
src/infiniop/ops/attention/operator.cc
+17
-17
src/infiniop/ops/conv/operator.cc
src/infiniop/ops/conv/operator.cc
+9
-9
src/infiniop/ops/dequantize_awq/operator.cc
src/infiniop/ops/dequantize_awq/operator.cc
+1
-1
src/infiniop/ops/quant/per_channel_quant_int8/operator.cc
src/infiniop/ops/quant/per_channel_quant_int8/operator.cc
+12
-12
src/infiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
...nfiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
+2
-2
src/infiniop/ops/rms_norm/operator.cc
src/infiniop/ops/rms_norm/operator.cc
+1
-1
src/infiniop/ops/rope/operator.cc
src/infiniop/ops/rope/operator.cc
+1
-1
src/infiniop/ops/scaled_mm/operator.cc
src/infiniop/ops/scaled_mm/operator.cc
+16
-16
src/infiniop/ops/topkrouter/operator.cc
src/infiniop/ops/topkrouter/operator.cc
+4
-4
src/infiniop/ops/topksoftmax/operator.cc
src/infiniop/ops/topksoftmax/operator.cc
+4
-4
No files found.
src/infiniop/ops/attention/operator.cc
View file @
d790f7b4
...
...
@@ -32,14 +32,14 @@ struct InfiniopAttentionDescriptor {
};
__INFINI_C
__export
infiniStatus_t
infiniopCreateAttentionDescriptor
(
infiniopHandle_t
handle
,
infiniopAttentionDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
q_desc
,
infiniopTensorDescriptor_t
k_desc
,
infiniopTensorDescriptor_t
v_desc
,
infiniopTensorDescriptor_t
k_cache_desc
,
infiniopTensorDescriptor_t
v_cache_desc
,
size_t
pos
)
{
infiniopAttentionDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
q_desc
,
infiniopTensorDescriptor_t
k_desc
,
infiniopTensorDescriptor_t
v_desc
,
infiniopTensorDescriptor_t
k_cache_desc
,
infiniopTensorDescriptor_t
v_cache_desc
,
size_t
pos
)
{
if
(
out_desc
->
ndim
()
!=
3
||
q_desc
->
ndim
()
!=
3
||
k_desc
->
ndim
()
!=
3
||
v_desc
->
ndim
()
!=
3
||
k_cache_desc
->
ndim
()
!=
3
||
v_cache_desc
->
ndim
()
!=
3
)
{
return
INFINI_STATUS_BAD_TENSOR_SHAPE
;
}
...
...
@@ -224,15 +224,15 @@ __INFINI_C __export infiniStatus_t infiniopGetAttentionWorkspaceSize(infiniopAtt
}
__INFINI_C
__export
infiniStatus_t
infiniopAttention
(
infiniopAttentionDescriptor_t
desc_
,
void
*
workspace_
,
size_t
workspace_size_
,
void
*
out
,
void
const
*
q
,
void
const
*
k
,
void
const
*
v
,
void
*
k_cache
,
void
*
v_cache
,
void
*
stream
)
{
void
*
workspace_
,
size_t
workspace_size_
,
void
*
out
,
void
const
*
q
,
void
const
*
k
,
void
const
*
v
,
void
*
k_cache
,
void
*
v_cache
,
void
*
stream
)
{
auto
desc
=
(
InfiniopAttentionDescriptor
*
)
desc_
;
if
(
workspace_size_
<
desc
->
workspace_size
)
{
return
INFINI_STATUS_INSUFFICIENT_WORKSPACE
;
// STATUS_MEMORY_NOT_ALLOCATED
...
...
src/infiniop/ops/conv/operator.cc
View file @
d790f7b4
...
...
@@ -10,15 +10,15 @@
#endif
__INFINI_C
__export
infiniStatus_t
infiniopCreateConvDescriptor
(
infiniopHandle_t
handle
,
infiniopConvDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
x_desc
,
infiniopTensorDescriptor_t
w_desc
,
infiniopTensorDescriptor_t
b_desc
,
void
*
pads
,
void
*
strides
,
void
*
dilations
,
size_t
n
)
{
infiniopConvDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
y_desc
,
infiniopTensorDescriptor_t
x_desc
,
infiniopTensorDescriptor_t
w_desc
,
infiniopTensorDescriptor_t
b_desc
,
void
*
pads
,
void
*
strides
,
void
*
dilations
,
size_t
n
)
{
#define CREATE(CASE, NAMESPACE) \
case CASE: \
return op::conv::NAMESPACE::Descriptor::create( \
...
...
src/infiniop/ops/dequantize_awq/operator.cc
View file @
d790f7b4
...
...
@@ -55,7 +55,7 @@ __INFINI_C infiniStatus_t infiniopCreateDequantizeAWQDescriptor(
}
__INFINI_C
infiniStatus_t
infiniopGetDequantizeAWQWorkspaceSize
(
infiniopDequantizeAWQDescriptor_t
desc
,
size_t
*
size
)
{
size_t
*
size
)
{
#define GET(CASE, NAMESPACE) \
case CASE: \
*size = reinterpret_cast<const op::dequantize_awq::NAMESPACE::Descriptor *>(desc)->workspaceSize(); \
...
...
src/infiniop/ops/quant/per_channel_quant_int8/operator.cc
View file @
d790f7b4
...
...
@@ -10,11 +10,11 @@
#endif
__INFINI_C
infiniStatus_t
infiniopCreatePerChannelQuantI8Descriptor
(
infiniopHandle_t
handle
,
infiniopPerChannelQuantI8Descriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
x_packed_desc
,
infiniopTensorDescriptor_t
x_scale_desc
,
infiniopTensorDescriptor_t
x_zero_desc
,
infiniopTensorDescriptor_t
x_desc
)
{
infiniopPerChannelQuantI8Descriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
x_packed_desc
,
infiniopTensorDescriptor_t
x_scale_desc
,
infiniopTensorDescriptor_t
x_zero_desc
,
infiniopTensorDescriptor_t
x_desc
)
{
#define CREATE(CASE, NAMESPACE) \
case CASE: \
return op::per_channel_quant_int8::NAMESPACE::Descriptor::create( \
...
...
@@ -62,13 +62,13 @@ __INFINI_C infiniStatus_t infiniopGetPerChannelQuantI8WorkspaceSize(infiniopPerC
}
__INFINI_C
infiniStatus_t
infiniopPerChannelQuantI8
(
infiniopPerChannelQuantI8Descriptor_t
desc
,
void
*
workspace
,
size_t
workspace_size
,
void
*
x_packed
,
void
*
x_scale
,
void
*
x_zero
,
const
void
*
x
,
void
*
stream
)
{
void
*
workspace
,
size_t
workspace_size
,
void
*
x_packed
,
void
*
x_scale
,
void
*
x_zero
,
const
void
*
x
,
void
*
stream
)
{
#define QUANT(CASE, NAMESPACE) \
case CASE: \
return reinterpret_cast<op::per_channel_quant_int8::NAMESPACE::Descriptor *>(desc)->calculate( \
...
...
src/infiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
View file @
d790f7b4
...
...
@@ -18,8 +18,8 @@ static cudaError argMax_(
cudaStream_t
stream
)
{
#if CUDART_VERSION >= 11000
// New interface: separate value and index outputs
T
*
max_value
=
&
kv_pair
->
value
;
int
*
max_index
=
&
kv_pair
->
key
;
T
*
max_value
=
&
kv_pair
->
value
;
int
*
max_index
=
&
kv_pair
->
key
;
return
cub
::
DeviceReduce
::
ArgMax
(
workspace_ptr
,
workspace_len
,
logits
,
max_value
,
max_index
,
n
,
...
...
src/infiniop/ops/rms_norm/operator.cc
View file @
d790f7b4
...
...
@@ -132,7 +132,7 @@ __INFINI_C infiniStatus_t infiniopGetRMSNormWorkspaceSize(infiniopRMSNormDescrip
}
__INFINI_C
infiniStatus_t
infiniopRMSNorm
(
infiniopRMSNormDescriptor_t
desc
,
void
*
workspace
,
size_t
workspace_size
,
void
*
y
,
const
void
*
x
,
const
void
*
w
,
void
*
stream
)
{
void
*
y
,
const
void
*
x
,
const
void
*
w
,
void
*
stream
)
{
#define CALCULATE(CASE, NAMESPACE) \
case CASE: \
...
...
src/infiniop/ops/rope/operator.cc
View file @
d790f7b4
...
...
@@ -88,7 +88,7 @@ __INFINI_C infiniStatus_t infiniopCreateRoPEDescriptor(
}
__INFINI_C
infiniStatus_t
infiniopGetRoPEWorkspaceSize
(
infiniopRoPEDescriptor_t
desc
,
size_t
*
size
)
{
size_t
*
size
)
{
#define GET(CASE, NAMESPACE) \
case CASE: \
*size = reinterpret_cast<const op::rope::NAMESPACE::Descriptor *>(desc)->workspaceSize(); \
...
...
src/infiniop/ops/scaled_mm/operator.cc
View file @
d790f7b4
...
...
@@ -11,13 +11,13 @@
#endif
__INFINI_C
infiniStatus_t
infiniopCreateI8GemmDescriptor
(
infiniopHandle_t
handle
,
infiniopI8GemmDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
bias_desc
,
infiniopTensorDescriptor_t
a_desc
,
infiniopTensorDescriptor_t
a_scale_desc
,
infiniopTensorDescriptor_t
b_desc
,
infiniopTensorDescriptor_t
b_scale_desc
)
{
infiniopI8GemmDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
out_desc
,
infiniopTensorDescriptor_t
bias_desc
,
infiniopTensorDescriptor_t
a_desc
,
infiniopTensorDescriptor_t
a_scale_desc
,
infiniopTensorDescriptor_t
b_desc
,
infiniopTensorDescriptor_t
b_scale_desc
)
{
#define CREATE(CASE, NAMESPACE) \
case CASE: \
return op::i8gemm::NAMESPACE::Descriptor::create( \
...
...
@@ -67,15 +67,15 @@ __INFINI_C infiniStatus_t infiniopGetI8GemmWorkspaceSize(infiniopI8GemmDescripto
}
__INFINI_C
infiniStatus_t
infiniopI8Gemm
(
infiniopI8GemmDescriptor_t
desc
,
void
*
workspace
,
size_t
workspace_size
,
void
*
out
,
const
void
*
bias
,
const
void
*
a
,
const
void
*
a_scale
,
const
void
*
b
,
const
void
*
b_scale
,
void
*
stream
)
{
void
*
workspace
,
size_t
workspace_size
,
void
*
out
,
const
void
*
bias
,
const
void
*
a
,
const
void
*
a_scale
,
const
void
*
b
,
const
void
*
b_scale
,
void
*
stream
)
{
#define CACULATE(CASE, NAMESPACE) \
case CASE: \
return reinterpret_cast<op::i8gemm::NAMESPACE::Descriptor *>(desc)->calculate( \
...
...
src/infiniop/ops/topkrouter/operator.cc
View file @
d790f7b4
...
...
@@ -16,8 +16,8 @@
#endif
__INFINI_C
infiniStatus_t
infiniopCreateTopkrouterDescriptor
(
infiniopHandle_t
handle
,
infiniopTopkrouterDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
x_desc
,
infiniopTensorDescriptor_t
correction_bias_desc
)
{
infiniopTensorDescriptor_t
x_desc
,
infiniopTensorDescriptor_t
correction_bias_desc
)
{
#define CREATE(CASE, NAMESPACE) \
case CASE: \
return op::topkrouter::NAMESPACE::Descriptor::create( \
...
...
@@ -82,8 +82,8 @@ __INFINI_C infiniStatus_t infiniopGetTopkrouterWorkspaceSize(infiniopTopkrouterD
}
__INFINI_C
infiniStatus_t
infiniopTopkrouter
(
infiniopTopkrouterDescriptor_t
desc
,
void
*
workspace
,
size_t
workspace_size
,
void
*
values
,
void
*
indices
,
const
void
*
x
,
const
void
*
correction_bias
,
const
float
routed_scaling_factor
,
const
size_t
topk
,
void
*
stream
)
{
void
*
values
,
void
*
indices
,
const
void
*
x
,
const
void
*
correction_bias
,
const
float
routed_scaling_factor
,
const
size_t
topk
,
void
*
stream
)
{
#define CALCULATE(CASE, NAMESPACE) \
case CASE: \
return reinterpret_cast<op::topkrouter::NAMESPACE::Descriptor *>(desc)->calculate( \
...
...
src/infiniop/ops/topksoftmax/operator.cc
View file @
d790f7b4
...
...
@@ -13,8 +13,8 @@
#endif
__INFINI_C
infiniStatus_t
infiniopCreateTopksoftmaxDescriptor
(
infiniopHandle_t
handle
,
infiniopTopksoftmaxDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
x_desc
)
{
infiniopTopksoftmaxDescriptor_t
*
desc_ptr
,
infiniopTensorDescriptor_t
x_desc
)
{
#define CREATE(CASE, NAMESPACE) \
case CASE: \
...
...
@@ -81,8 +81,8 @@ __INFINI_C infiniStatus_t infiniopGetTopksoftmaxWorkspaceSize(infiniopTopksoftma
}
__INFINI_C
infiniStatus_t
infiniopTopksoftmax
(
infiniopTopksoftmaxDescriptor_t
desc
,
void
*
workspace
,
size_t
workspace_size
,
void
*
values
,
void
*
indices
,
const
void
*
x
,
const
size_t
topk
,
const
int
norm
,
void
*
stream
)
{
void
*
values
,
void
*
indices
,
const
void
*
x
,
const
size_t
topk
,
const
int
norm
,
void
*
stream
)
{
if
(
topk
>
32
)
{
return
INFINI_STATUS_BAD_PARAM
;
}
...
...
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