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_ROCM
Commits
d44b24d1
Commit
d44b24d1
authored
Jan 06, 2025
by
illsilin
Browse files
replace the fp6 with bf6 convert calls in test_bf6
parent
e093146e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
test/data_type/test_bf6.cpp
test/data_type/test_bf6.cpp
+3
-3
No files found.
test/data_type/test_bf6.cpp
View file @
d44b24d1
...
@@ -41,10 +41,10 @@ TEST(BF6, ConvertFP32Nearest)
...
@@ -41,10 +41,10 @@ TEST(BF6, ConvertFP32Nearest)
0.0
f
);
0.0
f
);
// convert float value less than bf6 subnorm to bf6 and back, check if equal to 0.0
// convert float value less than bf6 subnorm to bf6 and back, check if equal to 0.0
float
less_than_subnorm
=
0.0625
f
;
float
less_than_subnorm
=
0.0625
f
;
ASSERT_NEAR
(
0.0
f
,
type_convert
<
float
>
(
f6_convert_rne
(
less_than_subnorm
)),
0.0
f
);
ASSERT_NEAR
(
0.0
f
,
type_convert
<
float
>
(
b
f6_convert_rne
(
less_than_subnorm
)),
0.0
f
);
// convert float NaN to bf6 and back, check if clipped to max_bf6
// convert float NaN to bf6 and back, check if clipped to max_bf6
ASSERT_NEAR
(
max_bf6
,
ASSERT_NEAR
(
max_bf6
,
type_convert
<
float
>
(
f6_convert_rne
(
std
::
numeric_limits
<
float
>::
quiet_NaN
())),
type_convert
<
float
>
(
b
f6_convert_rne
(
std
::
numeric_limits
<
float
>::
quiet_NaN
())),
0.0
f
);
0.0
f
);
// positive norm float value to bf6 and back, check if holds
// positive norm float value to bf6 and back, check if holds
float
pos_float
=
0.25
f
;
float
pos_float
=
0.25
f
;
...
@@ -79,7 +79,7 @@ TEST(BF6, ConvertFP32Stochastic)
...
@@ -79,7 +79,7 @@ TEST(BF6, ConvertFP32Stochastic)
0.0
f
);
0.0
f
);
// convert float NaN to bf6 and back, check if clipped to max_bf6
// convert float NaN to bf6 and back, check if clipped to max_bf6
ASSERT_NEAR
(
max_bf6
,
ASSERT_NEAR
(
max_bf6
,
type_convert
<
float
>
(
f6_convert_rne
(
std
::
numeric_limits
<
float
>::
quiet_NaN
())),
type_convert
<
float
>
(
b
f6_convert_rne
(
std
::
numeric_limits
<
float
>::
quiet_NaN
())),
0.0
f
);
0.0
f
);
// positive norm float value to bf6 and back, check if holds
// positive norm float value to bf6 and back, check if holds
float
pos_float
=
0.25
f
;
float
pos_float
=
0.25
f
;
...
...
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