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
814793ec
Commit
814793ec
authored
Jun 25, 2021
by
Shucai Xiao
Browse files
clang format
parent
c31c616c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
test/ref_ops_test.cpp
test/ref_ops_test.cpp
+3
-3
test/verify/test_scatter0.cpp
test/verify/test_scatter0.cpp
+3
-3
test/verify/test_scatter1.cpp
test/verify/test_scatter1.cpp
+3
-3
No files found.
test/ref_ops_test.cpp
View file @
814793ec
...
...
@@ -3668,7 +3668,7 @@ TEST_CASE(scatter_test)
auto
ld
=
mm
->
add_literal
(
migraphx
::
literal
{
sd
,
vd
});
auto
li
=
mm
->
add_literal
(
migraphx
::
literal
{
si
,
vi
});
auto
lu
=
mm
->
add_literal
(
migraphx
::
literal
{
su
,
vu
});
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
0
}}),
ld
,
li
,
lu
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
0
}}),
ld
,
li
,
lu
);
mm
->
add_return
({
r
});
p
.
compile
(
migraphx
::
ref
::
target
{});
auto
result
=
p
.
eval
({}).
back
();
...
...
@@ -3693,7 +3693,7 @@ TEST_CASE(scatter_test)
auto
ld
=
mm
->
add_literal
(
migraphx
::
literal
{
sd
,
vd
});
auto
li
=
mm
->
add_literal
(
migraphx
::
literal
{
si
,
vi
});
auto
lu
=
mm
->
add_literal
(
migraphx
::
literal
{
su
,
vu
});
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
2
}}),
ld
,
li
,
lu
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
2
}}),
ld
,
li
,
lu
);
mm
->
add_return
({
r
});
p
.
compile
(
migraphx
::
ref
::
target
{});
auto
result
=
p
.
eval
({}).
back
();
...
...
@@ -3718,7 +3718,7 @@ TEST_CASE(scatter_test)
auto
ld
=
mm
->
add_literal
(
migraphx
::
literal
{
sd
,
vd
});
auto
li
=
mm
->
add_literal
(
migraphx
::
literal
{
si
,
vi
});
auto
lu
=
mm
->
add_literal
(
migraphx
::
literal
{
su
,
vu
});
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
1
}}),
ld
,
li
,
lu
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
1
}}),
ld
,
li
,
lu
);
mm
->
add_return
({
r
});
p
.
compile
(
migraphx
::
ref
::
target
{});
auto
result
=
p
.
eval
({}).
back
();
...
...
test/verify/test_scatter0.cpp
View file @
814793ec
...
...
@@ -9,7 +9,7 @@ struct test_scatter0 : verify_program<test_scatter0>
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
sd
{
migraphx
::
shape
::
float_type
,
{
3
,
3
}};
migraphx
::
shape
si
{
migraphx
::
shape
::
int32_type
,
{
2
,
3
}};
std
::
vector
<
int
>
vi
=
{
1
,
0
,
2
,
0
,
2
,
1
};
...
...
@@ -18,9 +18,9 @@ struct test_scatter0 : verify_program<test_scatter0>
auto
pd
=
mm
->
add_parameter
(
"data"
,
sd
);
auto
li
=
mm
->
add_literal
(
migraphx
::
literal
{
si
,
vi
});
auto
pu
=
mm
->
add_parameter
(
"update"
,
su
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
1
}}),
pd
,
li
,
pu
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
1
}}),
pd
,
li
,
pu
);
mm
->
add_return
({
r
});
return
p
;
return
p
;
}
};
test/verify/test_scatter1.cpp
View file @
814793ec
...
...
@@ -9,7 +9,7 @@ struct test_scatter1 : verify_program<test_scatter1>
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
sd
{
migraphx
::
shape
::
float_type
,
{
3
,
3
}};
migraphx
::
shape
si
{
migraphx
::
shape
::
int32_type
,
{
2
,
3
}};
...
...
@@ -19,9 +19,9 @@ struct test_scatter1 : verify_program<test_scatter1>
auto
pd
=
mm
->
add_parameter
(
"data"
,
sd
);
auto
li
=
mm
->
add_literal
(
migraphx
::
literal
{
si
,
vi
});
auto
pu
=
mm
->
add_parameter
(
"update"
,
su
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
2
}}),
pd
,
li
,
pu
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"scatter"
,
{{
"axis"
,
-
2
}}),
pd
,
li
,
pu
);
mm
->
add_return
({
r
});
return
p
;
return
p
;
}
};
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