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
8acc9bd6
Commit
8acc9bd6
authored
Jul 11, 2019
by
Shucai Xiao
Browse files
clang format
parent
0f85317e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
src/targets/gpu/gemm.cpp
src/targets/gpu/gemm.cpp
+18
-16
No files found.
src/targets/gpu/gemm.cpp
View file @
8acc9bd6
...
@@ -172,32 +172,34 @@ shape miopen_gemm::compute_shape(const std::vector<shape>& inputs) const
...
@@ -172,32 +172,34 @@ shape miopen_gemm::compute_shape(const std::vector<shape>& inputs) const
std
::
vector
<
shape
>
input_shapes
(
inputs
.
begin
(),
inputs
.
begin
()
+
inputs
.
size
()
-
1
);
std
::
vector
<
shape
>
input_shapes
(
inputs
.
begin
(),
inputs
.
begin
()
+
inputs
.
size
()
-
1
);
check_shapes
{
input_shapes
}.
not_broadcasted
();
check_shapes
{
input_shapes
}.
not_broadcasted
();
auto
a_strides
=
inputs
[
0
].
strides
();
auto
a_strides
=
inputs
[
0
].
strides
();
auto
dim_0
=
a_strides
.
size
()
-
2
;
auto
dim_0
=
a_strides
.
size
()
-
2
;
if
(
a_strides
.
size
()
>
2
)
if
(
a_strides
.
size
()
>
2
)
{
{
if
(
!
std
::
all_of
(
a_strides
.
begin
(),
a_strides
.
begin
()
+
dim_0
,
[
&
](
auto
batch_size
)
{
if
(
!
std
::
all_of
(
a_strides
.
begin
(),
a_strides
.
begin
()
+
dim_0
,
[
&
](
auto
batch_size
)
{
return
std
::
all_of
(
a_strides
.
begin
()
+
dim_0
,
a_strides
.
end
(),
[
&
](
auto
data_size
)
{
return
std
::
all_of
(
a_strides
.
begin
()
+
dim_0
,
a_strides
.
end
(),
[
&
](
auto
data_size
)
{
return
batch_size
>=
data_size
;
return
batch_size
>=
data_size
;
});
});
}))
}))
{
{
MIGRAPHX_THROW
(
"DOT: batch size of a {"
+
to_string_range
(
a_strides
)
+
"} is transposed!"
);
MIGRAPHX_THROW
(
"DOT: batch size of a {"
+
to_string_range
(
a_strides
)
+
"} is transposed!"
);
}
}
}
}
auto
b_strides
=
inputs
[
1
].
strides
();
auto
b_strides
=
inputs
[
1
].
strides
();
if
(
b_strides
.
size
()
>
2
)
if
(
b_strides
.
size
()
>
2
)
{
{
if
(
!
std
::
all_of
(
b_strides
.
begin
(),
b_strides
.
begin
()
+
dim_0
,
[
&
](
auto
batch_size
)
{
if
(
!
std
::
all_of
(
b_strides
.
begin
(),
b_strides
.
begin
()
+
dim_0
,
[
&
](
auto
batch_size
)
{
return
std
::
all_of
(
b_strides
.
begin
()
+
dim_0
,
b_strides
.
end
(),
[
&
](
auto
data_size
)
{
return
std
::
all_of
(
b_strides
.
begin
()
+
dim_0
,
b_strides
.
end
(),
[
&
](
auto
data_size
)
{
return
batch_size
>=
data_size
;
return
batch_size
>=
data_size
;
});
});
}))
}))
{
{
MIGRAPHX_THROW
(
"DOT: batch size of b {"
+
to_string_range
(
b_strides
)
+
"} is transposed!"
);
MIGRAPHX_THROW
(
"DOT: batch size of b {"
+
to_string_range
(
b_strides
)
+
"} is transposed!"
);
}
}
}
}
return
op
.
compute_shape
(
input_shapes
);
return
op
.
compute_shape
(
input_shapes
);
}
}
...
...
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