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
36694450
Commit
36694450
authored
Jul 03, 2019
by
Shucai Xiao
Browse files
clang format
parent
9f375dfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
test/cpu_ops_test.cpp
test/cpu_ops_test.cpp
+3
-2
No files found.
test/cpu_ops_test.cpp
View file @
36694450
...
@@ -531,13 +531,14 @@ TEST_CASE(erf_test)
...
@@ -531,13 +531,14 @@ TEST_CASE(erf_test)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
4
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
4
}};
auto
l
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
0.73785057
,
1.58165966
,
-
0.43597795
,
-
0.01677432
}});
auto
l
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
0.73785057
,
1.58165966
,
-
0.43597795
,
-
0.01677432
}});
p
.
add_instruction
(
migraphx
::
op
::
erf
{},
l
);
p
.
add_instruction
(
migraphx
::
op
::
erf
{},
l
);
p
.
compile
(
migraphx
::
cpu
::
target
{});
p
.
compile
(
migraphx
::
cpu
::
target
{});
auto
result
=
p
.
eval
({});
auto
result
=
p
.
eval
({});
std
::
vector
<
float
>
results_vector
;
std
::
vector
<
float
>
results_vector
;
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
std
::
vector
<
float
>
gold
=
{
0.70327317
,
0.97470088
,
-
0.46247893
,
-
0.01892602
};
std
::
vector
<
float
>
gold
=
{
0.70327317
,
0.97470088
,
-
0.46247893
,
-
0.01892602
};
EXPECT
(
migraphx
::
verify_range
(
results_vector
,
gold
));
EXPECT
(
migraphx
::
verify_range
(
results_vector
,
gold
));
}
}
...
...
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