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
647019ac
"vscode:/vscode.git/clone" did not exist on "b6b02daba6b1a0356e80fae8a5ba85c4dea77d54"
Commit
647019ac
authored
Oct 10, 2023
by
Ted Themistokleous
Committed by
Ted Themistokleous
Nov 10, 2023
Browse files
Remove contiguous insertion from simplify_algebra pass
parent
d8011adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
src/simplify_algebra.cpp
src/simplify_algebra.cpp
+0
-21
No files found.
src/simplify_algebra.cpp
View file @
647019ac
...
@@ -941,15 +941,6 @@ struct find_splits
...
@@ -941,15 +941,6 @@ struct find_splits
{
{
auto
split
=
i
->
inputs
()[
split_idx
];
auto
split
=
i
->
inputs
()[
split_idx
];
assert
(
split
->
name
()
==
"slice"
);
assert
(
split
->
name
()
==
"slice"
);
// Insert contiguous for reshapes
auto
outputs
=
i
->
outputs
();
for
(
auto
output
:
outputs
)
{
if
(
output
->
name
()
!=
"reshape"
)
continue
;
auto
x
=
m
.
insert_instruction
(
output
,
make_op
(
"contiguous"
),
i
);
m
.
replace_instruction
(
output
,
output
->
get_operator
(),
x
);
}
m
.
replace_instruction
(
i
,
split
->
get_operator
(),
c
);
m
.
replace_instruction
(
i
,
split
->
get_operator
(),
c
);
}
}
...
@@ -1181,13 +1172,6 @@ struct find_conv_dot_horiz_fusion
...
@@ -1181,13 +1172,6 @@ struct find_conv_dot_horiz_fusion
for
(
auto
arg
:
range
(
start
,
last
))
for
(
auto
arg
:
range
(
start
,
last
))
{
{
auto
outputs
=
arg
->
outputs
();
auto
outputs
=
arg
->
outputs
();
for
(
auto
output
:
outputs
)
{
if
(
output
->
name
()
!=
"reshape"
)
continue
;
auto
x
=
m
.
insert_instruction
(
output
,
make_op
(
"contiguous"
),
arg
);
m
.
replace_instruction
(
output
,
output
->
get_operator
(),
x
);
}
int64_t
len
=
arg
->
get_shape
().
lens
()[
axis
];
int64_t
len
=
arg
->
get_shape
().
lens
()[
axis
];
m
.
replace_instruction
(
m
.
replace_instruction
(
...
@@ -1487,11 +1471,6 @@ struct find_split_reshape
...
@@ -1487,11 +1471,6 @@ struct find_split_reshape
slc_axis_len
;
slc_axis_len
;
});
});
// insert the reshape instruction and add contiguous if needed
if
(
not
input
->
get_shape
().
standard
())
{
input
=
m
.
insert_instruction
(
std
::
next
(
input
),
make_op
(
"contiguous"
),
input
);
}
auto
rsp_ins
=
m
.
insert_instruction
(
auto
rsp_ins
=
m
.
insert_instruction
(
std
::
next
(
input
),
make_op
(
"reshape"
,
{{
"dims"
,
rsp_out_lens
}}),
input
);
std
::
next
(
input
),
make_op
(
"reshape"
,
{{
"dims"
,
rsp_out_lens
}}),
input
);
...
...
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