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
gaoqiong
composable_kernel
Commits
be7e055e
Commit
be7e055e
authored
May 11, 2023
by
Rostyslav Geyyer
Browse files
Minor fix
parent
872093b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/ck/utility/data_type.hpp
include/ck/utility/data_type.hpp
+2
-2
No files found.
include/ck/utility/data_type.hpp
View file @
be7e055e
...
@@ -1058,7 +1058,7 @@ inline __host__ __device__ constexpr bhalf_t type_convert<bhalf_t, int8_t>(int8_
...
@@ -1058,7 +1058,7 @@ inline __host__ __device__ constexpr bhalf_t type_convert<bhalf_t, int8_t>(int8_
// cast fp32 to fp8
// cast fp32 to fp8
template
<
bool
negative_zero_nan
,
bool
clip
,
bool
stoch
>
template
<
bool
negative_zero_nan
,
bool
clip
,
bool
stoch
>
__host__
__device__
uint
8_t
cast_to_f8
(
float
x
,
uint32_t
rng
)
__host__
__device__
fp
8_t
cast_to_f8
(
float
x
,
uint32_t
rng
)
{
{
// fp8 exponent/mantissa layout
// fp8 exponent/mantissa layout
constexpr
int
we_f8
=
4
;
constexpr
int
we_f8
=
4
;
...
@@ -1157,7 +1157,7 @@ inline __host__ __device__ f8_t type_convert<f8_t, float>(float x)
...
@@ -1157,7 +1157,7 @@ inline __host__ __device__ f8_t type_convert<f8_t, float>(float x)
// cast fp8 to fp32
// cast fp8 to fp32
template
<
bool
negative_zero_nan
>
template
<
bool
negative_zero_nan
>
__host__
__device__
float
cast_from_f8
(
uint
8_t
x
)
__host__
__device__
float
cast_from_f8
(
f
8_t
x
)
{
{
// fp8 exponent/mantissa layout
// fp8 exponent/mantissa layout
constexpr
int
we_f8
=
4
;
constexpr
int
we_f8
=
4
;
...
...
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