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
6414ee38
"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "66483df672dcf73953629580af5ac8664bbcbf3c"
Commit
6414ee38
authored
Nov 16, 2023
by
Umang Yadav
Browse files
Fix undoing
parent
269ce6d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
1 deletion
+41
-1
test/fp8e5m2.cpp
test/fp8e5m2.cpp
+41
-1
No files found.
test/fp8e5m2.cpp
View file @
6414ee38
...
@@ -316,7 +316,47 @@ TEST_CASE(test_fp8_cast_to_float)
...
@@ -316,7 +316,47 @@ TEST_CASE(test_fp8_cast_to_float)
TEST_CASE
(
test_fp8_cast_from_float
)
TEST_CASE
(
test_fp8_cast_from_float
)
{
{
std
::
unordered_map
<
float
,
uint8_t
>
test_vals
=
{};
std
::
unordered_map
<
float
,
uint8_t
>
test_vals
=
{
{
-
60000
,
0xfb
},
{
-
57344
,
0xfb
},
{
-
448
,
0xdf
},
{
-
256
,
0xdc
},
{
-
240
,
0xdc
},
{
-
200
,
0xda
},
{
-
20
,
0xcd
},
{
-
2
,
0xc0
},
{
-
1
,
0xbc
},
{
-
0.5
,
0xb8
},
{
-
0.2
,
0xb2
},
{
-
0.1111
,
0xaf
},
{
-
0.111
,
0xaf
},
{
-
0.11
,
0xaf
},
{
-
0.1
,
0xae
},
{
6.10351e-05
,
0x4
},
{
-
6.10351e-05
,
0x84
},
{
3.05176e-05
,
0x2
},
{
-
3.05176e-05
,
0x82
},
{
1.52588e-05
,
0x1
},
{
-
1.52588e-05
,
0x81
},
{
7.62939e-06
,
0x0
},
{
-
7.62939e-06
,
0x80
},
{
0.1
,
0x2e
},
{
0.11
,
0x2f
},
{
0.111
,
0x2f
},
{
0.1111
,
0x2f
},
{
0.2
,
0x32
},
{
0.5
,
0x38
},
{
1
,
0x3c
},
{
2
,
0x40
},
{
20
,
0x4d
},
{
200
,
0x5a
},
{
240
,
0x5c
},
{
256
,
0x5c
},
{
448
,
0x5f
},
{
57344
,
0x7b
},
{
60000
,
0x7b
},
{
1e+07
,
0x7b
},
};
EXPECT
(
bool
{
std
::
all_of
(
test_vals
.
begin
(),
test_vals
.
end
(),
[](
const
auto
sample
)
{
EXPECT
(
bool
{
std
::
all_of
(
test_vals
.
begin
(),
test_vals
.
end
(),
[](
const
auto
sample
)
{
return
migraphx
::
float_equal
(
return
migraphx
::
float_equal
(
...
...
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