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
79a5ff10
Commit
79a5ff10
authored
Apr 08, 2019
by
Paul
Browse files
Formatting
parent
06b02add
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/constant_propagate.cpp
src/constant_propagate.cpp
+3
-3
src/include/migraphx/op/binary.hpp
src/include/migraphx/op/binary.hpp
+1
-1
No files found.
src/constant_propagate.cpp
View file @
79a5ff10
...
@@ -9,11 +9,11 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -9,11 +9,11 @@ inline namespace MIGRAPHX_INLINE_NS {
bool
skip_propogate
(
instruction_ref
ins
)
bool
skip_propogate
(
instruction_ref
ins
)
{
{
if
(
ins
->
name
()
==
"@literal"
)
if
(
ins
->
name
()
==
"@literal"
)
return
true
;
return
true
;
if
(
ins
->
get_shape
().
broadcasted
()
and
not
ins
->
get_shape
().
scalar
())
if
(
ins
->
get_shape
().
broadcasted
()
and
not
ins
->
get_shape
().
scalar
())
return
true
;
return
true
;
if
(
ins
->
get_shape
().
scalar
()
and
ins
->
get_shape
().
elements
()
!=
1
)
if
(
ins
->
get_shape
().
scalar
()
and
ins
->
get_shape
().
elements
()
!=
1
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
src/include/migraphx/op/binary.hpp
View file @
79a5ff10
...
@@ -29,7 +29,7 @@ struct binary
...
@@ -29,7 +29,7 @@ struct binary
{
{
check_shapes
{
inputs
}.
has
(
2
).
same_type
().
same_dims
();
check_shapes
{
inputs
}.
has
(
2
).
same_type
().
same_dims
();
const
auto
&
s
=
inputs
.
front
();
const
auto
&
s
=
inputs
.
front
();
if
(
s
.
scalar
()
and
s
.
elements
()
==
1
)
if
(
s
.
scalar
()
and
s
.
elements
()
==
1
)
return
{
s
.
type
()};
return
{
s
.
type
()};
return
{
s
.
type
(),
s
.
lens
()};
return
{
s
.
type
(),
s
.
lens
()};
}
}
...
...
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