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
74aeb4f4
Commit
74aeb4f4
authored
Nov 28, 2025
by
zhangyue
Browse files
issue/676 format
parent
c1af9783
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/infiniop/ops/topkrouter/kunlun/kernel.h
src/infiniop/ops/topkrouter/kunlun/kernel.h
+6
-6
No files found.
src/infiniop/ops/topkrouter/kunlun/kernel.h
View file @
74aeb4f4
...
...
@@ -78,8 +78,8 @@ __global__ void topkrouter_kernel(
if
(
thread_idx
<
N_GROUPS
)
{
int32_t
base
=
thread_idx
*
GROUP_SIZE
;
float
tmp
[
TOPK_PER_GROUP
];
// 初始化为负无穷,便于找topk
#pragma unroll
// 初始化为负无穷,便于找topk
#pragma unroll
for
(
int32_t
k
=
0
;
k
<
TOPK_PER_GROUP
;
++
k
)
{
tmp
[
k
]
=
-
FLT_MAX
;
}
...
...
@@ -110,8 +110,8 @@ __global__ void topkrouter_kernel(
float
values_group
[
TOPK_GROUP
];
int32_t
indices_tmp
[
TOPK_GROUP
];
// 初始化为负无穷和-1
#pragma unroll
// 初始化为负无穷和-1
#pragma unroll
for
(
int32_t
k
=
0
;
k
<
TOPK_GROUP
;
++
k
)
{
values_group
[
k
]
=
-
FLT_MAX
;
indices_tmp
[
k
]
=
-
1
;
...
...
@@ -130,8 +130,8 @@ __global__ void topkrouter_kernel(
indices_tmp
[
pos
]
=
i
;
}
}
// 写入共享内存
#pragma unroll
// 写入共享内存
#pragma unroll
for
(
int32_t
k
=
0
;
k
<
TOPK_GROUP
;
++
k
)
{
indices_group
[
k
]
=
indices_tmp
[
k
];
}
...
...
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