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
9c16a90e
Commit
9c16a90e
authored
Feb 25, 2019
by
Shucai Xiao
Browse files
clang format
parent
c43eba64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
+12
-16
src/include/migraphx/operators.hpp
src/include/migraphx/operators.hpp
+4
-8
src/targets/cpu/gemm.cpp
src/targets/cpu/gemm.cpp
+8
-8
No files found.
src/include/migraphx/operators.hpp
View file @
9c16a90e
...
...
@@ -847,16 +847,12 @@ struct dot
// which can be handled by numpy. as long as all previous
// dims are 1 except the last two dims, the two matrices
// are multipliable
if
(
std
::
any_of
(
a
.
lens
().
rbegin
()
+
2
,
a
.
lens
().
rend
(),
[](
auto
i
)
{
return
(
i
!=
1
);
}))
if
(
std
::
any_of
(
a
.
lens
().
rbegin
()
+
2
,
a
.
lens
().
rend
(),
[](
auto
i
)
{
return
(
i
!=
1
);
}))
{
MIGRAPHX_THROW
(
"DOT: first matrix, dimensions before matrix dims must be 1"
);
}
if
(
std
::
any_of
(
b
.
lens
().
rbegin
()
+
2
,
b
.
lens
().
rend
(),
[](
auto
i
)
{
return
(
i
!=
1
);
}))
if
(
std
::
any_of
(
b
.
lens
().
rbegin
()
+
2
,
b
.
lens
().
rend
(),
[](
auto
i
)
{
return
(
i
!=
1
);
}))
{
MIGRAPHX_THROW
(
"DOT: second matrix, dimensions before matrix dims must be 1"
);
}
...
...
src/targets/cpu/gemm.cpp
View file @
9c16a90e
...
...
@@ -14,7 +14,7 @@ template <class T>
static
auto
make_mat
(
tensor_view
<
T
>
x
)
{
const
auto
&
s
=
x
.
get_shape
();
//assert(s.lens().size() == 2);
//
assert(s.lens().size() == 2);
std
::
size_t
n_dims
=
s
.
lens
().
size
();
std
::
size_t
dim_0
=
n_dims
-
2
;
std
::
size_t
dim_1
=
n_dims
-
1
;
...
...
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