Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
53a8997f
Commit
53a8997f
authored
Nov 22, 2023
by
Paul
Browse files
Fix tidy errors
parent
f9531026
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
src/fuse_concat.cpp
src/fuse_concat.cpp
+1
-1
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
+14
-8
No files found.
src/fuse_concat.cpp
View file @
53a8997f
...
...
@@ -92,7 +92,6 @@ MIGRAPHX_REGISTER_OP(fused_concat);
namespace
{
static
unsigned
int
counter
=
0
;
struct
find_pointwise_concat_pointwise
{
auto
matcher
()
const
...
...
@@ -124,6 +123,7 @@ struct find_pointwise_concat_pointwise
[
&
](
auto
input
)
{
return
input
!=
concat_ins
;
});
std
::
vector
<
module_ref
>
module_inputs
;
static
unsigned
int
counter
=
0
;
std
::
transform
(
concat_ins
->
inputs
().
begin
(),
concat_ins
->
inputs
().
end
(),
std
::
back_inserter
(
module_inputs
),
...
...
src/targets/gpu/kernels/include/migraphx/kernels/concat.hpp
View file @
53a8997f
...
...
@@ -59,20 +59,26 @@ constexpr auto concat_ends(Input)
return
_c
<
lens
[
Axis
]
>
;
}
template
<
index_int
Axis
,
class
Start
,
class
InputPack
,
class
F
,
class
...
Ts
>
__device__
auto
concat_each
(
index
idx
,
Start
start
,
InputPack
input_pack
,
F
f
,
Ts
...
ts
)
{
return
input_pack
([
&
](
auto
g
,
auto
x
,
auto
...
xs
)
{
return
concat_slices
<
Axis
>
(
x
,
start
,
ts
...)([
&
](
auto
z
,
auto
...
ys
)
{
idx
.
global_stride
(
x
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
z
[
i
]
=
f
(
g
(
x
[
i
],
xs
[
i
]...),
ys
[
i
]...);
});
return
start
+
concat_ends
<
Axis
>
(
x
);
});
});
}
template
<
index_int
Axis
,
class
...
InputPacks
>
__device__
auto
concat
(
InputPacks
...
input_packs
)
{
return
[
=
](
auto
f
,
auto
...
ts
)
{
auto
idx
=
make_index
();
fold
([
&
](
auto
start
,
auto
input_pack
)
{
return
input_pack
([
&
](
auto
g
,
auto
x
,
auto
...
xs
)
{
return
concat_slices
<
Axis
>
(
x
,
start
,
ts
...)([
&
](
auto
z
,
auto
...
ys
)
{
idx
.
global_stride
(
x
.
get_shape
().
elements
(),
[
&
](
auto
i
)
{
z
[
i
]
=
f
(
g
(
x
[
i
],
xs
[
i
]...),
ys
[
i
]...);
});
return
start
+
concat_ends
<
Axis
>
(
x
);
});
});
return
concat_each
<
Axis
>
(
idx
,
start
,
input_pack
,
f
,
ts
...);
})(
_c
<
0
>
,
input_packs
...);
};
}
...
...
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