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
a33f9cca
Commit
a33f9cca
authored
Aug 30, 2022
by
Paul
Browse files
Format
parent
923d1348
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
+3
-4
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
View file @
a33f9cca
...
@@ -47,9 +47,7 @@ constexpr auto concat_slice(Output out, Input, Start)
...
@@ -47,9 +47,7 @@ constexpr auto concat_slice(Output out, Input, Start)
template
<
index_int
Axis
,
class
Input
,
class
Start
,
class
...
Ts
>
template
<
index_int
Axis
,
class
Input
,
class
Start
,
class
...
Ts
>
constexpr
auto
concat_slices
(
Input
input
,
Start
start
,
Ts
...
xs
)
constexpr
auto
concat_slices
(
Input
input
,
Start
start
,
Ts
...
xs
)
{
{
return
[
=
](
auto
f
)
{
return
[
=
](
auto
f
)
{
f
(
concat_slice
<
Axis
>
(
xs
,
input
,
start
)...);
};
f
(
concat_slice
<
Axis
>
(
xs
,
input
,
start
)...);
};
}
}
template
<
index_int
Axis
,
class
Input
>
template
<
index_int
Axis
,
class
Input
>
...
@@ -66,7 +64,8 @@ __device__ auto concat(Inputs... inputs)
...
@@ -66,7 +64,8 @@ __device__ auto concat(Inputs... inputs)
auto
idx
=
make_index
();
auto
idx
=
make_index
();
fold
([
&
](
auto
start
,
auto
input
)
{
fold
([
&
](
auto
start
,
auto
input
)
{
concat_slices
<
Axis
>
(
input
,
start
,
ts
...)([
&
](
auto
y
,
auto
...
xs
)
{
concat_slices
<
Axis
>
(
input
,
start
,
ts
...)([
&
](
auto
y
,
auto
...
xs
)
{
idx
.
global_stride
(
input
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
y
[
i
]
=
f
(
input
[
i
],
xs
[
i
]...);
});
idx
.
global_stride
(
input
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
y
[
i
]
=
f
(
input
[
i
],
xs
[
i
]...);
});
});
});
return
start
+
concat_ends
<
Axis
>
(
input
);
return
start
+
concat_ends
<
Axis
>
(
input
);
})(
_c
<
0
>
,
inputs
...);
})(
_c
<
0
>
,
inputs
...);
...
...
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