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
6c27e905
Commit
6c27e905
authored
Oct 28, 2022
by
Paul
Browse files
Fix tidy warnings
parent
41be2a5c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
17 deletions
+15
-17
src/include/migraphx/layout_nhwc.hpp
src/include/migraphx/layout_nhwc.hpp
+1
-1
src/include/migraphx/op/layout.hpp
src/include/migraphx/op/layout.hpp
+0
-1
src/layout_nhwc.cpp
src/layout_nhwc.cpp
+1
-1
src/targets/cpu/binary.cpp
src/targets/cpu/binary.cpp
+13
-14
No files found.
src/include/migraphx/layout_nhwc.hpp
View file @
6c27e905
...
...
@@ -16,7 +16,7 @@ struct module_pass_manager;
struct
layout_nhwc
{
std
::
string
name
()
const
{
return
"layout_nhwc"
;
}
void
apply
(
module_pass_manager
&
m
)
const
;
void
apply
(
module_pass_manager
&
mp
m
)
const
;
};
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/include/migraphx/op/layout.hpp
View file @
6c27e905
...
...
@@ -8,7 +8,6 @@
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/op/unary.hpp>
#include <migraphx/config.hpp>
#include <cmath>
#include <utility>
...
...
src/layout_nhwc.cpp
View file @
6c27e905
...
...
@@ -56,7 +56,7 @@ void transform_convolutions(module& m)
if
(
v
.
at
(
"group"
).
to
<
int
>
()
>
1
)
continue
;
auto
args
=
ins
->
inputs
();
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
auto
&
i
)
{
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
const
auto
&
i
)
{
return
m
.
insert_instruction
(
ins
,
make_op
(
"layout"
,
{{
"permutation"
,
{
0
,
2
,
3
,
1
}}}),
i
);
});
auto
conv
=
m
.
insert_instruction
(
ins
,
ins
->
get_operator
(),
args
);
...
...
src/targets/cpu/binary.cpp
View file @
6c27e905
...
...
@@ -49,21 +49,20 @@ struct dnnl_binary : dnnl_op<dnnl_binary, dnnl::binary>
auto
s0
=
inputs
.
at
(
0
);
auto
s1
=
inputs
.
at
(
1
);
auto
r
=
s0
;
if
(
s0
=
=
s1
and
s0
.
packed
())
if
(
s0
!
=
s1
or
not
s0
.
packed
())
{
r
=
s0
;
}
else
if
(
s0
.
packed
()
!=
s1
.
packed
())
{
r
=
s0
.
packed
()
?
s0
:
s1
;
}
else
if
(
s0
.
broadcasted
()
!=
s1
.
broadcasted
())
{
r
=
s0
.
broadcasted
()
?
s1
.
with_lens
(
s0
.
lens
())
:
s0
.
with_lens
(
s0
.
lens
());
}
else
{
r
=
{
s0
.
type
(),
s0
.
lens
()};
if
(
s0
.
packed
()
!=
s1
.
packed
())
{
r
=
s0
.
packed
()
?
s0
:
s1
;
}
else
if
(
s0
.
broadcasted
()
!=
s1
.
broadcasted
())
{
r
=
s0
.
broadcasted
()
?
s1
.
with_lens
(
s0
.
lens
())
:
s0
.
with_lens
(
s0
.
lens
());
}
else
{
r
=
{
s0
.
type
(),
s0
.
lens
()};
}
}
// Call to get_primitive to make sure an algo is available
this
->
get_primitive
(
this
->
to_memory_desc
(
r
,
inputs
));
...
...
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