gda ionic: use all threads in wave operations (#295)

Use all available threads for polling the cq to increase the maximum
message rate.  Even when posting a single wqe in the wave, use all
available theads for polling the cq to reserve space in the sq.

Changes were needed in the rocshmem abstraction to avoid disabling gpu
threads, like taking turns or using only the first thread in a wave or
wavefront.  To avoid breaking other gda implementations, reimplement
turn-based or single thread strategy in post_wqe_rma_turn and
post_wqe_rma_single.

Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
This commit is contained in:
Allen Hubbe
2025-11-05 12:01:14 -05:00
committed by GitHub
parent b7a6d86c6b
commit 6de67d5d7c
8 changed files with 114 additions and 104 deletions
+6 -10
View File
@@ -232,15 +232,13 @@ __device__ void GDAContext::barrier_all() {
}
__device__ void GDAContext::barrier_all_wave() {
if (is_thread_zero_in_wave()) {
quiet();
}
quiet_wave();
sync_all_wave();
}
__device__ void GDAContext::barrier_all_wg() {
if (is_thread_zero_in_block()) {
quiet();
if (is_wave_zero_in_block()) {
quiet_wave();
}
sync_all_wg();
__syncthreads();
@@ -268,9 +266,7 @@ __device__ void GDAContext::barrier_wave(rocshmem_team_t team) {
int pe_size = team_obj->num_pes;
long *p_sync = team_obj->barrier_pSync;
if (is_thread_zero_in_wave()) {
quiet();
}
quiet_wave();
internal_sync_wave(pe, pe_start, pe_stride, pe_size, p_sync);
}
@@ -283,8 +279,8 @@ __device__ void GDAContext::barrier_wg(rocshmem_team_t team) {
int pe_size = team_obj->num_pes;
long *p_sync = team_obj->barrier_pSync;
if (is_thread_zero_in_block()) {
quiet();
if (is_wave_zero_in_block()) {
quiet_wave();
}
internal_sync_wg(pe, pe_start, pe_stride, pe_size, p_sync);
__syncthreads();