Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a59cd9d9
Unverified
Commit
a59cd9d9
authored
Aug 01, 2025
by
Wentao Ye
Committed by
GitHub
Aug 01, 2025
Browse files
[Refactor] Fix Compile Warning #1444-D (#21462)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
5c54d975
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
csrc/moe/topk_softmax_kernels.cu
csrc/moe/topk_softmax_kernels.cu
+4
-2
No files found.
csrc/moe/topk_softmax_kernels.cu
View file @
a59cd9d9
...
...
@@ -24,9 +24,12 @@
#ifndef USE_ROCM
#include <cub/util_type.cuh>
#include <cub/cub.cuh>
#include <cuda/std/functional>
using
AddOp
=
cuda
::
std
::
plus
<
float
>
;
#else
#include <hipcub/util_type.hpp>
#include <hipcub/hipcub.hpp>
using
AddOp
=
cub
::
Sum
;
#endif
#define MAX(a, b) ((a) > (b) ? (a) : (b))
...
...
@@ -62,7 +65,6 @@ __launch_bounds__(TPB) __global__
const
int
thread_row_offset
=
blockIdx
.
x
*
num_cols
;
cub
::
Sum
sum
;
float
threadData
(
-
FLT_MAX
);
// Don't touch finished rows.
...
...
@@ -92,7 +94,7 @@ __launch_bounds__(TPB) __global__
threadData
+=
exp
((
static_cast
<
float
>
(
input
[
idx
])
-
float_max
));
}
const
auto
Z
=
BlockReduce
(
tmpStorage
).
Reduce
(
threadData
,
sum
);
const
auto
Z
=
BlockReduce
(
tmpStorage
).
Reduce
(
threadData
,
AddOp
()
);
if
(
threadIdx
.
x
==
0
)
{
...
...
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