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
5d821f5e
Commit
5d821f5e
authored
Apr 12, 2019
by
Shucai Xiao
Browse files
add the broadcasted shape to the reflect method
parent
853085f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/include/migraphx/op/broadcast.hpp
src/include/migraphx/op/broadcast.hpp
+3
-2
No files found.
src/include/migraphx/op/broadcast.hpp
View file @
5d821f5e
...
...
@@ -27,14 +27,15 @@ namespace op {
struct
broadcast
{
uint64_t
axis
=
0
;
std
::
vector
<
std
::
size_t
>
broadcast_lens
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
pack
(
f
(
self
.
axis
,
"axis"
));
return
pack
(
f
(
self
.
axis
,
"axis"
),
f
(
self
.
broadcast_lens
,
"dims"
));
}
std
::
vector
<
std
::
size_t
>
broadcast_lens
;
std
::
string
name
()
const
{
return
"broadcast"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
...
...
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