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
36f76f90
Commit
36f76f90
authored
Oct 31, 2022
by
Brian Pickrell
Browse files
formatting
parent
57d000b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
src/include/migraphx/op/reduce_op.hpp
src/include/migraphx/op/reduce_op.hpp
+1
-1
src/include/migraphx/shape.hpp
src/include/migraphx/shape.hpp
+1
-1
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+3
-2
No files found.
src/include/migraphx/op/reduce_op.hpp
View file @
36f76f90
...
...
@@ -108,7 +108,7 @@ struct reduce_op : op_name<Derived>
/**
* @brief returns a shape in which the axis or axes named
* for reduction by this op are set to size 1.
* for reduction by this op are set
,
to size 1.
*
* @param inputs list of input shapes
* @return shape
...
...
src/include/migraphx/shape.hpp
View file @
36f76f90
...
...
@@ -141,7 +141,7 @@ struct shape
* Same as the number of indices required to get a data value.
*/
std
::
size_t
ndim
()
const
;
/*!
* Return the number of elements in the tensor.
*/
...
...
test/onnx/onnx_test.cpp
View file @
36f76f90
...
...
@@ -4241,13 +4241,14 @@ TEST_CASE(reducel1_test)
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
reducel1_dyn_test
)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
// a shape with 4 dynamic dimensions
auto
l0
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{{
3
,
3
,
0
},
{
3
,
5
,
0
},
{
4
,
6
,
5
},
{
5
,
7
,
6
}}});
auto
l0
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{{
3
,
3
,
0
},
{
3
,
5
,
0
},
{
4
,
6
,
5
},
{
5
,
7
,
6
}}});
auto
abs_l0
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"abs"
),
l0
);
auto
sum_l0
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"reduce_sum"
,
{{
"axes"
,
{
-
2
}}}),
abs_l0
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"squeeze"
,
{{
"axes"
,
{
-
2
}}}),
sum_l0
);
...
...
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