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
1fb40bd3
Commit
1fb40bd3
authored
Jan 27, 2026
by
xiabo
Browse files
Q支持fp8
parent
1a3ed91b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
csrc/quantization/fp8/common.cuh
csrc/quantization/fp8/common.cuh
+5
-1
No files found.
csrc/quantization/fp8/common.cuh
View file @
1fb40bd3
...
@@ -54,9 +54,13 @@ __device__ __forceinline__ fp8_type scaled_fp8_conversion(float const val,
...
@@ -54,9 +54,13 @@ __device__ __forceinline__ fp8_type scaled_fp8_conversion(float const val,
// Currently only support fp8_type = c10::Float8_e4m3fn
// Currently only support fp8_type = c10::Float8_e4m3fn
return
fp8
::
vec_conversion
<
fp8_type
,
float
>
(
r
);
return
fp8
::
vec_conversion
<
fp8_type
,
float
>
(
r
);
#else
#else
fp8_type
*
test
;
uint8_t
test_uint8
=
fp8
::
float_to_fp8_e4m3
(
x
);
test
=
(
fp8_type
*
)(
&
test_uint8
);
return
*
test
;
// Use hardware cvt instruction for fp8 on rocm
// Use hardware cvt instruction for fp8 on rocm
// return fp8::cvt_c10<fp8_type>(r);
// return fp8::cvt_c10<fp8_type>(r);
return
fp8
::
float_to_fp8_e4m3
(
x
);
#endif
#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