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
f773c763
Commit
f773c763
authored
Aug 07, 2019
by
Khalique
Browse files
formatting
parent
4f685101
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+3
-3
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
+1
-2
No files found.
src/onnx/onnx.cpp
View file @
f773c763
...
@@ -498,7 +498,7 @@ struct onnx_parser
...
@@ -498,7 +498,7 @@ struct onnx_parser
{
{
op
::
slice
op
;
op
::
slice
op
;
std
::
vector
<
size_t
>
dims
=
args
[
0
]
->
get_shape
().
lens
();
std
::
vector
<
size_t
>
dims
=
args
[
0
]
->
get_shape
().
lens
();
size_t
num_dims
=
dims
.
size
();
size_t
num_dims
=
dims
.
size
();
if
(
contains
(
attributes
,
"axes"
))
if
(
contains
(
attributes
,
"axes"
))
{
{
literal
s
=
parse_value
(
attributes
.
at
(
"axes"
));
literal
s
=
parse_value
(
attributes
.
at
(
"axes"
));
...
@@ -509,12 +509,12 @@ struct onnx_parser
...
@@ -509,12 +509,12 @@ struct onnx_parser
op
.
axes
=
std
::
vector
<
int64_t
>
(
num_dims
);
op
.
axes
=
std
::
vector
<
int64_t
>
(
num_dims
);
std
::
iota
(
op
.
axes
.
begin
(),
op
.
axes
.
end
(),
0
);
std
::
iota
(
op
.
axes
.
begin
(),
op
.
axes
.
end
(),
0
);
}
}
if
(
contains
(
attributes
,
"ends"
))
if
(
contains
(
attributes
,
"ends"
))
{
{
literal
s
=
parse_value
(
attributes
.
at
(
"ends"
));
literal
s
=
parse_value
(
attributes
.
at
(
"ends"
));
s
.
visit
([
&
](
auto
v
)
{
copy
(
v
,
std
::
back_inserter
(
op
.
ends
));
});
s
.
visit
([
&
](
auto
v
)
{
copy
(
v
,
std
::
back_inserter
(
op
.
ends
));
});
for
(
size_t
i
=
0
;
i
<
num_dims
;
i
++
)
for
(
size_t
i
=
0
;
i
<
num_dims
;
i
++
)
{
{
if
(
static_cast
<
size_t
>
(
op
.
ends
[
i
])
>
dims
[
i
])
if
(
static_cast
<
size_t
>
(
op
.
ends
[
i
])
>
dims
[
i
])
{
{
...
...
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
View file @
f773c763
...
@@ -15,8 +15,7 @@ argument pad(hipStream_t stream,
...
@@ -15,8 +15,7 @@ argument pad(hipStream_t stream,
argument
result
,
argument
result
,
argument
arg1
,
argument
arg1
,
float
value
,
float
value
,
std
::
vector
<
std
::
int64_t
>
pads
std
::
vector
<
std
::
int64_t
>
pads
);
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
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