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
980cfd49
Commit
980cfd49
authored
Nov 03, 2022
by
Brian Pickrell
Browse files
cosmetic
parent
d2f06a5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/ref_ops_test.cpp
test/ref_ops_test.cpp
+5
-5
No files found.
test/ref_ops_test.cpp
View file @
980cfd49
...
@@ -4998,15 +4998,15 @@ TEST_CASE(reduce_max_dynamic_axis0)
...
@@ -4998,15 +4998,15 @@ TEST_CASE(reduce_max_dynamic_axis0)
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{{
2
,
4
,
2
},
{
3
,
5
,
3
}}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{{
2
,
4
,
2
},
{
3
,
5
,
3
}}};
auto
input
=
mm
->
add_parameter
(
"X"
,
s
);
auto
input
=
mm
->
add_parameter
(
"X"
,
s
);
std
::
vector
<
float
>
input_data
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
};
auto
reduce_max_op
=
migraphx
::
make_op
(
"reduce_max"
,
{{
"axes"
,
{
0
}}});
auto
reduce_max_op
=
migraphx
::
make_op
(
"reduce_max"
,
{{
"axes"
,
{
0
}}});
mm
->
add_instruction
(
reduce_max_op
,
input
);
mm
->
add_instruction
(
reduce_max_op
,
input
);
p
.
compile
(
migraphx
::
ref
::
target
{});
p
.
compile
(
migraphx
::
ref
::
target
{});
migraphx
::
parameter_map
params
0
;
migraphx
::
parameter_map
params
;
migraphx
::
shape
input_fixed_shape0
{
migraphx
::
shape
::
float_type
,
{
2
,
5
}};
migraphx
::
shape
input_fixed_shape0
{
migraphx
::
shape
::
float_type
,
{
2
,
5
}};
params0
[
"X"
]
=
migraphx
::
argument
(
input_fixed_shape0
,
input_data
.
data
());
std
::
vector
<
float
>
input_data
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
};
auto
result
=
p
.
eval
(
params0
).
back
();
params
[
"X"
]
=
migraphx
::
argument
(
input_fixed_shape0
,
input_data
.
data
());
auto
result
=
p
.
eval
(
params
).
back
();
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
=
{
6
,
7
,
8
,
9
,
10
};
std
::
vector
<
float
>
gold
=
{
6
,
7
,
8
,
9
,
10
};
...
...
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