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
4ff8a292
"...resnet50_tensorflow.git" did not exist on "3d03e675d444186a49a665ce2e1be32a24c59215"
Commit
4ff8a292
authored
Aug 11, 2023
by
Khalique Ahmed
Browse files
revert auto_cont
parent
ef3a45c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
src/auto_contiguous.cpp
src/auto_contiguous.cpp
+4
-17
No files found.
src/auto_contiguous.cpp
View file @
4ff8a292
...
...
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "migraphx/instruction_ref.hpp"
#include <migraphx/auto_contiguous.hpp>
#include <migraphx/program.hpp>
#include <migraphx/instruction.hpp>
...
...
@@ -65,24 +64,12 @@ void auto_contiguous::apply(module& m) const
// for last instruction that is NOT a return
if
(
ins
->
outputs
().
empty
()
and
ins
!=
last
)
continue
;
if
(
ins
->
name
()
==
"pooling"
or
ins
->
name
()
==
"dot"
)
shape
s
=
ins
->
get_shape
();
if
(
not
s
.
dynamic
()
and
not
s
.
standard
()
and
s
.
elements
()
!=
0
)
{
// auto c = m.insert_instruction(ins, make_op("contiguous"), ins);
std
::
vector
<
instruction_ref
>
new_args
;
for
(
auto
args
:
ins
->
inputs
())
{
new_args
.
push_back
(
m
.
insert_instruction
(
ins
,
make_op
(
"contiguous"
),
args
));
}
auto
op
=
m
.
insert_instruction
(
ins
,
ins
->
get_operator
(),
new_args
);
m
.
replace_instruction
(
ins
,
op
);
auto
c
=
m
.
insert_instruction
(
std
::
next
(
ins
),
make_op
(
"contiguous"
),
ins
);
m
.
replace_instruction
(
ins
,
c
);
}
// shape s = ins->get_shape();
// if(not s.dynamic() and
// not s.standard() and s.elements() != 0)
// {
// auto c = m.insert_instruction(std::next(ins), make_op("contiguous"), ins);
// 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