Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
d38e771c
Commit
d38e771c
authored
Jun 13, 2018
by
Scott Thornton
Browse files
Began adding transpose operator
parent
9af6974d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/targets/cpu/cpu_target.cpp
src/targets/cpu/cpu_target.cpp
+18
-0
No files found.
src/targets/cpu/cpu_target.cpp
View file @
d38e771c
...
@@ -54,6 +54,24 @@ struct cpu_convolution
...
@@ -54,6 +54,24 @@ struct cpu_convolution
}
}
};
};
struct
cpu_transpose
{
transpose
op
;
std
::
string
name
()
const
{
return
"cpu::transpose"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
return
op
.
compute_shape
(
inputs
);
}
argument
compute
(
shape
output_shape
,
std
::
vector
<
argument
>
args
)
const
{
argument
result
{
output_shape
};
visit_all
(
result
,
args
[
0
])([
&
](
auto
output
,
auto
input
)
{
dfor
(
output_shape
.
lens
()[
0
],
output_shape
.
lens
()[
0
],
output_shape
.
lens
()[
0
],
output_shape
.
lens
()[
0
]
});
}
}
struct
cpu_reshape
struct
cpu_reshape
{
{
reshape
op
;
reshape
op
;
...
...
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