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
ce8139e5
Commit
ce8139e5
authored
Apr 22, 2019
by
Shucai Xiao
Browse files
clang format
parent
cced8ba3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
src/include/migraphx/op/binary.hpp
src/include/migraphx/op/binary.hpp
+1
-1
src/include/migraphx/op/unary.hpp
src/include/migraphx/op/unary.hpp
+1
-1
src/targets/cpu/lowering.cpp
src/targets/cpu/lowering.cpp
+5
-5
src/targets/gpu/include/migraphx/gpu/oper.hpp
src/targets/gpu/include/migraphx/gpu/oper.hpp
+2
-2
No files found.
src/include/migraphx/op/binary.hpp
View file @
ce8139e5
...
@@ -21,7 +21,7 @@ struct binary
...
@@ -21,7 +21,7 @@ struct binary
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
{
check_shapes
{
inputs
}.
has
(
2
).
same_type
().
same_dims
();
check_shapes
{
inputs
}.
has
(
2
).
same_type
().
same_dims
();
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
...
src/include/migraphx/op/unary.hpp
View file @
ce8139e5
...
@@ -21,7 +21,7 @@ struct unary
...
@@ -21,7 +21,7 @@ struct unary
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
{
check_shapes
{
inputs
}.
has
(
1
);
check_shapes
{
inputs
}.
has
(
1
);
if
(
inputs
.
front
().
packed
())
if
(
inputs
.
front
().
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
...
src/targets/cpu/lowering.cpp
View file @
ce8139e5
...
@@ -595,7 +595,7 @@ struct cpu_unary
...
@@ -595,7 +595,7 @@ struct cpu_unary
std
::
string
name
()
const
{
return
op
.
name
();
}
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
{
{
if
(
inputs
.
at
(
0
).
packed
())
if
(
inputs
.
at
(
0
).
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
@@ -795,7 +795,7 @@ struct cpu_binary
...
@@ -795,7 +795,7 @@ struct cpu_binary
std
::
string
name
()
const
{
return
op
.
name
();
}
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
{
{
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
...
src/targets/gpu/include/migraphx/gpu/oper.hpp
View file @
ce8139e5
...
@@ -45,7 +45,7 @@ struct unary_device : oper<Derived>
...
@@ -45,7 +45,7 @@ struct unary_device : oper<Derived>
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
{
check_shapes
{
inputs
,
*
this
}.
has
(
2
);
check_shapes
{
inputs
,
*
this
}.
has
(
2
);
if
(
inputs
.
at
(
0
).
packed
())
if
(
inputs
.
at
(
0
).
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
@@ -70,7 +70,7 @@ struct binary_device : oper<Derived>
...
@@ -70,7 +70,7 @@ struct binary_device : oper<Derived>
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
{
check_shapes
{
inputs
,
*
this
}.
has
(
3
);
check_shapes
{
inputs
,
*
this
}.
has
(
3
);
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
if
(
inputs
.
at
(
0
)
==
inputs
.
at
(
1
)
and
inputs
.
at
(
0
).
packed
()
and
inputs
.
at
(
1
).
packed
())
{
{
return
inputs
.
at
(
0
);
return
inputs
.
at
(
0
);
}
}
...
...
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