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
acfd1369
Commit
acfd1369
authored
Apr 29, 2019
by
Shucai Xiao
Browse files
fix bugs in quant_dot implementation
parent
da80ceb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+1
-1
src/targets/gpu/quant_gemm.cpp
src/targets/gpu/quant_gemm.cpp
+3
-4
No files found.
src/targets/gpu/lowering.cpp
View file @
acfd1369
...
...
@@ -96,7 +96,7 @@ struct miopen_apply
add_generic_op
<
hip_min
>
(
"min"
);
add_extend_op
<
miopen_gemm
,
op
::
dot
>
(
"dot"
);
add_extend_op
<
miopen_quant_gemm
,
op
::
quant_dot
>
(
"dot"
);
add_extend_op
<
miopen_quant_gemm
,
op
::
quant_dot
>
(
"
quant_
dot"
);
add_extend_op
<
miopen_contiguous
,
op
::
contiguous
>
(
"contiguous"
);
add_extend_op
<
hip_concat
,
op
::
concat
>
(
"concat"
);
add_extend_op
<
miopen_softmax
,
op
::
softmax
>
(
"softmax"
);
...
...
src/targets/gpu/quant_gemm.cpp
View file @
acfd1369
#include <migraphx/gpu/quant_gemm.hpp>
#include <migraphx/gpu/gemm.hpp>
#include <migraphx/gpu/context.hpp>
namespace
migraphx
{
...
...
@@ -63,7 +62,7 @@ argument miopen_quant_gemm::compute(context& ctx,
const
std
::
vector
<
argument
>&
args
)
const
{
bool
is_3inputs
=
(
args
.
size
()
==
4
);
floa
t
beta
=
0
.0
f
;
int8_
t
beta
=
0
;
if
(
is_3inputs
)
{
beta
=
op
.
beta
;
...
...
@@ -88,8 +87,8 @@ argument miopen_quant_gemm::compute(context& ctx,
rocblas_int
k
=
args
[
0
].
get_shape
().
lens
()[
dim_1
];
auto
to_pointer
=
[
&
](
auto
&&
arg
)
{
return
to_rocblas_type
(
as
.
from
(
arg
.
data
()));
};
assert
(
k
%
4
==
0
);
assert
(
transa
&&
(
lda
%
4
==
0
));
assert
(
!
transb
&&
(
ldb
%
4
==
0
));
assert
(
transa
or
(
lda
%
4
==
0
));
assert
(
!
transb
or
(
ldb
%
4
==
0
));
auto
num_matrices
=
std
::
accumulate
(
out_lens
.
rbegin
()
+
2
,
out_lens
.
rend
(),
std
::
size_t
{
1
},
std
::
multiplies
<
std
::
size_t
>
());
...
...
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