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
OpenDAS
FlashMLA
Commits
ae7d4f11
Commit
ae7d4f11
authored
Jun 07, 2026
by
shenzhe
Browse files
Fix phase1 LDS address scalarization
parent
929ccc23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
csrc/gfx93/prefill/sparse/phase1.cuh
csrc/gfx93/prefill/sparse/phase1.cuh
+3
-0
No files found.
csrc/gfx93/prefill/sparse/phase1.cuh
View file @
ae7d4f11
...
...
@@ -144,6 +144,7 @@ __device__ void KernelTemplate_B_H_64<D_QK, HAVE_TOPK_LENGTH, IS_TOPK_2048, USE_
global_addr_indices
[
3
]
=
0x00020000
;
int
ldsAddrPerWave
=
reinterpret_cast
<
size_t
>
(
sIndices
)
+
warp_idx
*
64
*
4
*
4
;
ldsAddrPerWave
=
__builtin_amdgcn_readfirstlane
(
ldsAddrPerWave
);
const
int
offset_v
=
lane_idx
*
4
*
4
+
warp_idx
*
64
*
4
*
4
;
const
int
offset_s
=
n
*
1024
*
4
;
const
int
first_index
=
warp_idx
*
256
+
lane_idx
*
4
;
...
...
@@ -197,6 +198,7 @@ __device__ void KernelTemplate_B_H_64<D_QK, HAVE_TOPK_LENGTH, IS_TOPK_2048, USE_
int
offset_v
=
col_offset
*
2
;
int
ldsAddrPerWave
=
reinterpret_cast
<
size_t
>
(
k_lds
)
+
warp_idx
*
16
*
32
*
2
+
(
k_idx
%
4
)
*
64
*
32
*
2
;
ldsAddrPerWave
=
__builtin_amdgcn_readfirstlane
(
ldsAddrPerWave
);
typedef
uint32_t
uint32x2_t
__attribute__
((
ext_vector_type
(
2
)));
uint32x2_t
index_offset
=
{
0
};
index_offset
[
0
]
=
row_offset
;
...
...
@@ -237,6 +239,7 @@ __device__ void KernelTemplate_B_H_64<D_QK, HAVE_TOPK_LENGTH, IS_TOPK_2048, USE_
int
offset_v
=
col_offset
*
2
;
int
ldsAddrPerWave
=
reinterpret_cast
<
size_t
>
(
v_lds
)
+
warp_idx
*
16
*
32
*
2
+
(
k_idx
)
*
128
*
16
*
2
;
ldsAddrPerWave
=
__builtin_amdgcn_readfirstlane
(
ldsAddrPerWave
);
typedef
uint32_t
uint32x2_t
__attribute__
((
ext_vector_type
(
2
)));
uint32x2_t
index_offset
=
{
0
};
index_offset
[
0
]
=
row_offset
;
...
...
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