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
c7cb6bfa
Commit
c7cb6bfa
authored
Apr 17, 2019
by
Shucai Xiao
Browse files
clang format
parent
f15477f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
src/targets/cpu/lowering.cpp
src/targets/cpu/lowering.cpp
+7
-8
src/targets/gpu/adjust_allocation.cpp
src/targets/gpu/adjust_allocation.cpp
+1
-1
No files found.
src/targets/cpu/lowering.cpp
View file @
c7cb6bfa
...
...
@@ -593,9 +593,9 @@ struct cpu_unary
{
Op
op
;
std
::
string
name
()
const
{
return
op
.
name
();
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
return
{
inputs
.
front
().
type
(),
inputs
.
front
().
lens
()};
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
return
{
inputs
.
front
().
type
(),
inputs
.
front
().
lens
()};
}
argument
compute
(
context
&
,
const
shape
&
output_shape
,
std
::
vector
<
argument
>
args
)
const
...
...
@@ -610,8 +610,7 @@ struct cpu_unary
else
{
shape_for_each
(
output
.
get_shape
(),
[
&
](
const
auto
&
idx
)
{
output
(
idx
.
begin
(),
idx
.
end
())
=
op
.
fcn
()(
input
(
idx
.
begin
(),
idx
.
end
()));
output
(
idx
.
begin
(),
idx
.
end
())
=
op
.
fcn
()(
input
(
idx
.
begin
(),
idx
.
end
()));
});
}
});
...
...
@@ -787,10 +786,10 @@ struct cpu_binary
{
Op
op
;
std
::
string
name
()
const
{
return
op
.
name
();
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
// operator will generate standard output shape
return
{
inputs
.
front
().
type
(),
inputs
.
front
().
lens
()};
return
{
inputs
.
front
().
type
(),
inputs
.
front
().
lens
()};
}
argument
compute
(
context
&
,
const
shape
&
output_shape
,
std
::
vector
<
argument
>
args
)
const
{
...
...
src/targets/gpu/adjust_allocation.cpp
View file @
c7cb6bfa
...
...
@@ -12,7 +12,7 @@ void adjust_allocation::apply(program& p) const
{
for
(
auto
ins
:
iterator_for
(
p
))
{
if
(
ins
->
name
()
==
"load"
)
if
(
ins
->
name
()
==
"load"
)
continue
;
auto
alias_ins
=
instruction
::
get_output_alias
(
ins
,
true
);
...
...
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