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
aa56068c
Commit
aa56068c
authored
Oct 11, 2023
by
Khalique Ahmed
Browse files
formatting
parent
90967138
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/auto_contiguous.cpp
src/auto_contiguous.cpp
+2
-2
No files found.
src/auto_contiguous.cpp
View file @
aa56068c
...
@@ -68,7 +68,8 @@ void auto_contiguous::apply(module& m) const
...
@@ -68,7 +68,8 @@ void auto_contiguous::apply(module& m) const
if
(
not
outputs
.
empty
())
if
(
not
outputs
.
empty
())
// if contiguous was already inserted, skip
// if contiguous was already inserted, skip
if
(
std
::
all_of
(
outputs
.
begin
(),
outputs
.
end
(),
[](
auto
output
)
{
if
(
std
::
all_of
(
outputs
.
begin
(),
outputs
.
end
(),
[](
auto
output
)
{
return
output
->
name
()
==
"contiguous"
;}))
return
output
->
name
()
==
"contiguous"
;
}))
continue
;
continue
;
shape
s
=
ins
->
get_shape
();
shape
s
=
ins
->
get_shape
();
if
(
s
.
dynamic
())
if
(
s
.
dynamic
())
...
@@ -80,7 +81,6 @@ void auto_contiguous::apply(module& m) const
...
@@ -80,7 +81,6 @@ void auto_contiguous::apply(module& m) const
if
(
s
.
scalar
()
and
not
contains
(
ins
->
name
(),
"broadcast"
))
if
(
s
.
scalar
()
and
not
contains
(
ins
->
name
(),
"broadcast"
))
continue
;
continue
;
auto
c
=
m
.
insert_instruction
(
std
::
next
(
ins
),
make_op
(
"contiguous"
),
ins
);
auto
c
=
m
.
insert_instruction
(
std
::
next
(
ins
),
make_op
(
"contiguous"
),
ins
);
m
.
replace_instruction
(
ins
,
c
);
m
.
replace_instruction
(
ins
,
c
);
}
}
...
...
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