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
composable_kernel
Commits
b80b9e29
Commit
b80b9e29
authored
Aug 31, 2023
by
Bartlomiej Wroblewski
Browse files
Review: Fix tensor adaptor; remove unnecessary element
parent
2efa20ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
include/ck/tensor_operation/gpu/warp/dpp_gemm.hpp
include/ck/tensor_operation/gpu/warp/dpp_gemm.hpp
+13
-9
No files found.
include/ck/tensor_operation/gpu/warp/dpp_gemm.hpp
View file @
b80b9e29
...
@@ -283,7 +283,12 @@ struct DppGemm
...
@@ -283,7 +283,12 @@ struct DppGemm
});
});
}
}
__device__
static
auto
GetLaneId
()
{
return
get_thread_local_1d_id
()
%
dpp_instr
.
wave_size
;
}
__device__
static
auto
GetLaneIdInWave
()
{
return
get_thread_local_1d_id
()
%
dpp_instr
.
wave_size
;
}
__device__
static
auto
GetWaveId
()
{
return
get_thread_local_1d_id
()
/
dpp_instr
.
wave_size
;
}
__device__
static
auto
GetLaneIdInLaneGroup
()
__device__
static
auto
GetLaneIdInLaneGroup
()
{
{
...
@@ -292,26 +297,25 @@ struct DppGemm
...
@@ -292,26 +297,25 @@ struct DppGemm
__device__
static
auto
GetLaneGroupIdInWave
()
__device__
static
auto
GetLaneGroupIdInWave
()
{
{
return
g
et
_thread_local_1d_id
()
/
dpp_instr
.
lanegroup_size
;
return
G
et
LaneIdInWave
()
/
dpp_instr
.
lanegroup_size
;
}
}
__device__
static
auto
GetDppIdx
()
__device__
static
auto
GetDpp
Op
Idx
()
{
{
const
auto
lanegroupId
=
GetLaneGroupIdInWave
();
const
auto
lanegroupId
=
GetLaneGroupIdInWave
();
constexpr
auto
lanegroup_idx_1d_to_dpp_idx_2d_adaptor
=
make_single_stage_tensor_adaptor
(
constexpr
auto
lanegroup_idx_1d_to_dpp_idx_2d_adaptor
=
make_single_stage_tensor_adaptor
(
make_tuple
(
make_tuple
(
make_merge_transform
(
make_tuple
(
1
,
make_merge_transform
(
make_tuple
(
dpp_instr
.
m_per_wave
/
dpp_instr
.
m_per_lanegroup
,
dpp_instr
.
m_per_wave
/
dpp_instr
.
m_per_lanegroup
,
dpp_instr
.
n_per_wave
/
dpp_instr
.
n_per_lanegroup
))),
dpp_instr
.
n_per_wave
/
dpp_instr
.
n_per_lanegroup
))),
make_tuple
(
Sequence
<
0
,
1
,
2
>
{}),
make_tuple
(
Sequence
<
0
,
1
>
{}),
make_tuple
(
Sequence
<
0
>
{}));
make_tuple
(
Sequence
<
0
>
{}));
const
auto
dpp_idx
=
lanegroup_idx_1d_to_dpp_idx_2d_adaptor
.
CalculateBottomIndex
(
const
auto
dpp_idx
=
lanegroup_idx_1d_to_dpp_idx_2d_adaptor
.
CalculateBottomIndex
(
make_multi_index
(
lanegroupId
));
make_multi_index
(
lanegroupId
));
const
auto
m_dpp_idx
=
dpp_idx
[
I
1
];
const
auto
m_dpp_idx
=
dpp_idx
[
I
0
];
const
auto
n_dpp_idx
=
dpp_idx
[
I
2
];
const
auto
n_dpp_idx
=
dpp_idx
[
I
1
];
return
make_tuple
(
m_dpp_idx
,
n_dpp_idx
);
return
make_tuple
(
m_dpp_idx
,
n_dpp_idx
);
}
}
...
@@ -333,7 +337,7 @@ struct DppGemm
...
@@ -333,7 +337,7 @@ struct DppGemm
__device__
static
CIndex
GetBeginOfThreadBlk
()
__device__
static
CIndex
GetBeginOfThreadBlk
()
{
{
const
auto
dpp_idx
=
GetDppIdx
();
const
auto
dpp_idx
=
GetDpp
Op
Idx
();
const
auto
m_dpp_idx
=
dpp_idx
[
I0
];
const
auto
m_dpp_idx
=
dpp_idx
[
I0
];
const
auto
n_dpp_idx
=
dpp_idx
[
I1
];
const
auto
n_dpp_idx
=
dpp_idx
[
I1
];
...
...
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