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
210f7700
Commit
210f7700
authored
Aug 20, 2023
by
Paul
Browse files
Format
parent
fa62ad24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
src/onnx/parse_slice.cpp
src/onnx/parse_slice.cpp
+1
-4
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+2
-1
No files found.
src/onnx/parse_slice.cpp
View file @
210f7700
...
@@ -44,10 +44,7 @@ struct parse_slice : op_parser<parse_slice>
...
@@ -44,10 +44,7 @@ struct parse_slice : op_parser<parse_slice>
std
::
vector
<
int64_t
>
steps
;
std
::
vector
<
int64_t
>
steps
;
std
::
vector
<
int64_t
>
raxes
;
std
::
vector
<
int64_t
>
raxes
;
void
always_insert
(
instruction_ref
arg
)
void
always_insert
(
instruction_ref
arg
)
{
op_args
.
insert
(
op_args
.
begin
(),
arg
);
}
{
op_args
.
insert
(
op_args
.
begin
(),
arg
);
}
std
::
vector
<
int64_t
>
insert
(
instruction_ref
arg
)
std
::
vector
<
int64_t
>
insert
(
instruction_ref
arg
)
{
{
...
...
test/onnx/onnx_test.cpp
View file @
210f7700
...
@@ -6298,7 +6298,8 @@ TEST_CASE(slice_constant_test)
...
@@ -6298,7 +6298,8 @@ TEST_CASE(slice_constant_test)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
l0
=
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
2
}},
{
0
,
1
,
2
,
3
,
4
,
5
}});
auto
l0
=
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
2
}},
{
0
,
1
,
2
,
3
,
4
,
5
}});
mm
->
add_instruction
(
mm
->
add_instruction
(
migraphx
::
make_op
(
"slice"
,
{{
"axes"
,
{
0
,
1
}},
{
"starts"
,
{
1
,
0
}},
{
"ends"
,
{
2
,
2
}}}),
l0
);
migraphx
::
make_op
(
"slice"
,
{{
"axes"
,
{
0
,
1
}},
{
"starts"
,
{
1
,
0
}},
{
"ends"
,
{
2
,
2
}}}),
l0
);
auto
prog
=
optimize_onnx
(
"slice_constant_test.onnx"
);
auto
prog
=
optimize_onnx
(
"slice_constant_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