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
change
sglang
Commits
94a2b9d3
Unverified
Commit
94a2b9d3
authored
Mar 07, 2025
by
Yineng Zhang
Committed by
GitHub
Mar 07, 2025
Browse files
Put utils in ifndef USE_ROCM to fix CI (#4167) (#4168)
Co-authored-by:
Stefan He
<
hebiaobuaa@gmail.com
>
parent
3c3eb374
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
sgl-kernel/src/sgl-kernel/include/utils.h
sgl-kernel/src/sgl-kernel/include/utils.h
+2
-0
No files found.
sgl-kernel/src/sgl-kernel/include/utils.h
View file @
94a2b9d3
...
@@ -109,6 +109,7 @@ using FP8_TYPE = c10::Float8_e4m3fnuz;
...
@@ -109,6 +109,7 @@ using FP8_TYPE = c10::Float8_e4m3fnuz;
constexpr
auto
FP8_E4M3_MAX
=
224.0
f
;
constexpr
auto
FP8_E4M3_MAX
=
224.0
f
;
#endif
#endif
#ifndef USE_ROCM
__device__
__forceinline__
float
atomicMaxFloat
(
float
*
addr
,
float
value
)
{
__device__
__forceinline__
float
atomicMaxFloat
(
float
*
addr
,
float
value
)
{
float
old
;
float
old
;
old
=
(
value
>=
0
)
?
__int_as_float
(
atomicMax
((
int
*
)
addr
,
__float_as_int
(
value
)))
old
=
(
value
>=
0
)
?
__int_as_float
(
atomicMax
((
int
*
)
addr
,
__float_as_int
(
value
)))
...
@@ -124,3 +125,4 @@ __device__ __forceinline__ float warpReduceMax(float max_value) {
...
@@ -124,3 +125,4 @@ __device__ __forceinline__ float warpReduceMax(float max_value) {
max_value
=
fmaxf
(
max_value
,
__shfl_xor_sync
(
0xffffffff
,
max_value
,
1
));
max_value
=
fmaxf
(
max_value
,
__shfl_xor_sync
(
0xffffffff
,
max_value
,
1
));
return
max_value
;
return
max_value
;
}
}
#endif
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