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
cffb1b1b
Commit
cffb1b1b
authored
Jun 28, 2019
by
Shucai Xiao
Browse files
clang format
parent
9ea01307
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
src/include/migraphx/op/argmax.hpp
src/include/migraphx/op/argmax.hpp
+1
-1
src/include/migraphx/op/argmin.hpp
src/include/migraphx/op/argmin.hpp
+1
-1
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+2
-2
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+2
-2
No files found.
src/include/migraphx/op/argmax.hpp
View file @
cffb1b1b
...
...
@@ -18,7 +18,7 @@ namespace op {
struct
argmax
{
int
axis
=
0
;
int
axis
=
0
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
...
...
src/include/migraphx/op/argmin.hpp
View file @
cffb1b1b
...
...
@@ -18,7 +18,7 @@ namespace op {
struct
argmin
{
int
axis
=
0
;
int
axis
=
0
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
...
...
src/onnx/onnx.cpp
View file @
cffb1b1b
...
...
@@ -284,7 +284,7 @@ struct onnx_parser
keep_dims
=
parse_value
(
attributes
.
at
(
"keepdims"
)).
at
<
int
>
();
}
if
(
keep_dims
==
0
)
if
(
keep_dims
==
0
)
{
auto
ins
=
prog
.
add_instruction
(
op
::
argmax
{
axis
},
std
::
move
(
args
));
return
prog
.
add_instruction
(
op
::
squeeze
{{
static_cast
<
int64_t
>
(
axis
)}},
ins
);
...
...
@@ -311,7 +311,7 @@ struct onnx_parser
keep_dims
=
parse_value
(
attributes
.
at
(
"keepdims"
)).
at
<
int
>
();
}
if
(
keep_dims
==
0
)
if
(
keep_dims
==
0
)
{
auto
ins
=
prog
.
add_instruction
(
op
::
argmin
{
axis
},
std
::
move
(
args
));
return
prog
.
add_instruction
(
op
::
squeeze
{{
static_cast
<
int64_t
>
(
axis
)}},
ins
);
...
...
test/onnx/onnx_test.cpp
View file @
cffb1b1b
...
...
@@ -787,7 +787,7 @@ TEST_CASE(logsoftmax)
TEST_CASE
(
argmax
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
ins
=
p
.
add_instruction
(
migraphx
::
op
::
argmax
{
2
},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
squeeze
{{
2
}},
ins
);
auto
prog
=
migraphx
::
parse_onnx
(
"argmax_test.onnx"
);
...
...
@@ -798,7 +798,7 @@ TEST_CASE(argmax)
TEST_CASE
(
argmin
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
ins
=
p
.
add_instruction
(
migraphx
::
op
::
argmin
{
3
},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
squeeze
{{
3
}},
ins
);
auto
prog
=
migraphx
::
parse_onnx
(
"argmin_test.onnx"
);
...
...
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