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
MIGraphX
Commits
12aac372
"examples/vscode:/vscode.git/clone" did not exist on "4c1183c3a88db756f0ef2036c34e04e82554678c"
Commit
12aac372
authored
Nov 14, 2023
by
Umang Yadav
Browse files
fix warning
parent
6aec7033
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
test/fp8e5m2.cpp
test/fp8e5m2.cpp
+2
-4
No files found.
test/fp8e5m2.cpp
View file @
12aac372
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
float
fp8e5m2_to_fp32_value
(
uint8_t
input
)
float
fp8e5m2_to_fp32_value
(
uint8_t
input
)
{
{
constexpr
std
::
array
<
float
,
256
>
e4m3fnuz_lut
=
{
{
constexpr
std
::
array
<
float
,
256
>
e4m3fnuz_lut
=
{
0.0
,
0.0
,
1.52587890625e-05
,
1.52587890625e-05
,
3.0517578125e-05
,
3.0517578125e-05
,
...
@@ -285,11 +285,10 @@ float fp8e5m2_to_fp32_value(uint8_t input)
...
@@ -285,11 +285,10 @@ float fp8e5m2_to_fp32_value(uint8_t input)
-
40960.0
,
-
40960.0
,
-
49152.0
,
-
49152.0
,
-
57344.0
,
-
57344.0
,
-
1.0
*
std
::
numeric_limits
<
float
>::
infinity
(),
-
1.0
f
*
std
::
numeric_limits
<
float
>::
infinity
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
std
::
numeric_limits
<
float
>::
quiet_NaN
(),
}
};
};
...
@@ -420,7 +419,6 @@ TEST_CASE(test_isfinite)
...
@@ -420,7 +419,6 @@ TEST_CASE(test_isfinite)
// -1.0 * inf is float(-inf) which with clipping/saturation gets converted into fp8::lowest()
// -1.0 * inf is float(-inf) which with clipping/saturation gets converted into fp8::lowest()
EXPECT
(
std
::
isfinite
(
EXPECT
(
std
::
isfinite
(
migraphx
::
fp8
::
fp8e5m2
(
-
1.0
*
std
::
numeric_limits
<
migraphx
::
fp8
::
fp8e5m2
>::
infinity
())));
migraphx
::
fp8
::
fp8e5m2
(
-
1.0
*
std
::
numeric_limits
<
migraphx
::
fp8
::
fp8e5m2
>::
infinity
())));
// fp8(-neg_inf)
EXPECT
(
not
std
::
isfinite
(
migraphx
::
fp8
::
fp8e5m2
(
0xFC
,
migraphx
::
fp8
::
fp8e5m2
::
from_bits
())));
EXPECT
(
not
std
::
isfinite
(
migraphx
::
fp8
::
fp8e5m2
(
0xFC
,
migraphx
::
fp8
::
fp8e5m2
::
from_bits
())));
}
}
...
...
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