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
932f3a28
Commit
932f3a28
authored
Mar 13, 2019
by
Shucai Xiao
Browse files
fixed the issue in the cpu implementation for the inner product
parent
f6d77130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
src/targets/cpu/lowering.cpp
src/targets/cpu/lowering.cpp
+4
-10
No files found.
src/targets/cpu/lowering.cpp
View file @
932f3a28
...
...
@@ -441,15 +441,6 @@ struct cpu_gemm
}
// 2 input cases
// all args are scalar
if
(
output_shape
.
scalar
())
{
visit_all
(
result
,
args
[
0
],
args
[
1
])(
[
&
](
auto
res
,
auto
a
,
auto
b
)
{
res
[
0
]
=
op
.
alpha
*
a
[
0
]
*
b
[
0
];
});
return
result
;
}
// first argument is 1-dim, pre-pend 1 at beginning
auto
a_lens
=
args
[
0
].
get_shape
().
lens
();
auto
b_lens
=
args
[
1
].
get_shape
().
lens
();
...
...
@@ -461,7 +452,10 @@ struct cpu_gemm
is_a_prepended
=
true
;
a_lens
.
insert
(
a_lens
.
begin
(),
1
);
out_lens
.
push_back
(
1
);
std
::
swap
(
*
out_lens
.
rbegin
(),
*
(
out_lens
.
rbegin
()
+
1
));
if
(
out_lens
.
size
()
>
1
)
{
std
::
swap
(
*
out_lens
.
rbegin
(),
*
(
out_lens
.
rbegin
()
+
1
));
}
}
bool
is_b_appended
=
false
;
...
...
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