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
a42edd9d
"configs/models/vscode:/vscode.git/clone" did not exist on "bfe4aa2af51040d0050ed57c81b98cf030ce071e"
Commit
a42edd9d
authored
Oct 17, 2023
by
Paul
Browse files
Format
parent
7892b274
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/targets/gpu/gemm_impl.cpp
src/targets/gpu/gemm_impl.cpp
+8
-10
No files found.
src/targets/gpu/gemm_impl.cpp
View file @
a42edd9d
...
@@ -216,24 +216,22 @@ struct gemm_impl
...
@@ -216,24 +216,22 @@ struct gemm_impl
k
=
input_shapes
[
0
].
lens
()[
dim_1
];
k
=
input_shapes
[
0
].
lens
()[
dim_1
];
if
(
input_shapes
[
0
].
type
()
==
shape
::
int8_type
and
(
k
%
4
)
!=
0
and
int8_x4_format
)
if
(
input_shapes
[
0
].
type
()
==
shape
::
int8_type
and
(
k
%
4
)
!=
0
and
int8_x4_format
)
{
{
MIGRAPHX_THROW
(
"ROCBLAS_GEMM: k size of int8 type input must be multiple of 4!"
);
MIGRAPHX_THROW
(
"ROCBLAS_GEMM: k size of int8 type input must be multiple of 4!"
);
}
}
a_stride
=
get_batch_stride
(
input_shapes
[
0
]);
a_stride
=
get_batch_stride
(
input_shapes
[
0
]);
b_stride
=
get_batch_stride
(
input_shapes
[
1
]);
b_stride
=
get_batch_stride
(
input_shapes
[
1
]);
c_stride
=
get_batch_stride
(
input_shapes
[
2
]);
c_stride
=
get_batch_stride
(
input_shapes
[
2
]);
d_stride
=
is_3inputs
?
get_batch_stride
(
input_shapes
[
3
])
:
c_stride
;
d_stride
=
is_3inputs
?
get_batch_stride
(
input_shapes
[
3
])
:
c_stride
;
num_matrices
=
std
::
accumulate
(
out_lens
.
rbegin
()
+
2
,
num_matrices
=
std
::
accumulate
(
out_lens
.
rend
(),
out_lens
.
rbegin
()
+
2
,
out_lens
.
rend
(),
std
::
size_t
{
1
},
std
::
multiplies
<
std
::
size_t
>
());
std
::
size_t
{
1
},
std
::
multiplies
<
std
::
size_t
>
());
if
(
num_matrices
==
1
or
(
num_matrices
>
1
and
b_stride
==
0
))
if
(
num_matrices
==
1
or
(
num_matrices
>
1
and
b_stride
==
0
))
{
{
// If the batch dimension of B is broadcasted, then we can
// If the batch dimension of B is broadcasted, then we can
// multiply m by the batch_size and use rocblas_gemm_ex
// multiply m by the batch_size and use rocblas_gemm_ex
// instead of rocblas_gemm_strided_batched_ex.
// instead of rocblas_gemm_strided_batched_ex.
m
*=
num_matrices
;
m
*=
num_matrices
;
strided_batched
=
false
;
strided_batched
=
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