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
DeepEP
Commits
c18eabde
Unverified
Commit
c18eabde
authored
Sep 01, 2025
by
Chongchong Tian
Committed by
GitHub
Sep 01, 2025
Browse files
Update intranode.cu (#381)
Each thread is responsible for one target rank
parent
6a5d323c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
csrc/kernels/intranode.cu
csrc/kernels/intranode.cu
+1
-3
No files found.
csrc/kernels/intranode.cu
View file @
c18eabde
...
@@ -34,9 +34,7 @@ notify_dispatch(const int* num_tokens_per_rank, int* moe_recv_counter_mapped,
...
@@ -34,9 +34,7 @@ notify_dispatch(const int* num_tokens_per_rank, int* moe_recv_counter_mapped,
// - `per_expert_buffer[rank][i, j]` means the number of tokens from rank i to local expert j
// - `per_expert_buffer[rank][i, j]` means the number of tokens from rank i to local expert j
int
num_experts_per_rank
=
num_experts
/
kNumRanks
;
int
num_experts_per_rank
=
num_experts
/
kNumRanks
;
if
(
thread_id
<
kNumRanks
)
{
if
(
thread_id
<
kNumRanks
)
{
#pragma unroll
per_rank_buffer
[
rank
*
kNumRanks
+
thread_id
]
=
num_tokens_per_rank
[
thread_id
];
for
(
int
i
=
0
;
i
<
kNumRanks
;
++
i
)
per_rank_buffer
[
rank
*
kNumRanks
+
i
]
=
num_tokens_per_rank
[
i
];
#pragma unroll
#pragma unroll
for
(
int
i
=
0
;
i
<
num_experts_per_rank
;
++
i
)
for
(
int
i
=
0
;
i
<
num_experts_per_rank
;
++
i
)
per_expert_buffer
[
rank
*
num_experts_per_rank
+
i
]
=
num_tokens_per_expert
[
thread_id
*
num_experts_per_rank
+
i
];
per_expert_buffer
[
rank
*
num_experts_per_rank
+
i
]
=
num_tokens_per_expert
[
thread_id
*
num_experts_per_rank
+
i
];
...
...
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