Repository navigation
[HIP] Gfx1250 ll128 cas2shot - #5616
TennyWang1223 wants to merge 2 commits into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
Ports ar_ll128_vec_unroll2 and ar_cas_2shot_gfx1250 from the POC branch and routes by measured size thresholds (bf16/fp16, world_size 2 or 4): ws=4: <=1 MiB LL/512, <=2 MiB LL128/512, <=16 MiB LL128/1024, else CAS/1024 ws=2: <=8 MiB LL/1024, <=64 MiB LL128/1024, else CAS/1024 Raising the tp2 LL band to 8 MiB doubles the LL staging scratch, so the meta buffer grows from 64 to 128 MiB. The LL128 and CAS buffers deliberately do NOT live there: sized for the worst-case world size they would cost every rank hundreds of MiB, so each rank allocates its own and the bases get a second IPC exchange. Both bands stay disabled (falling back to the naive kernel) until that exchange runs, which is also how the VMM transport — where a plain hipMalloc cannot be exported — keeps working. The b128 load/store helpers keep the POC's system-scope builtins rather than the gfx9 port's nontemporal ones: a split access can expose an updated flag over stale payload. Also adds ar_cas_2shot_gfx1250_scratch, which stages the reduce-scatter in a separate buffer so the input stays read-only. The routed kernel overwrites the caller's registered input, which is fine when the host staged a copy but not under graph capture with an already-registered input. It is reachable only via its standalone entry point pending a perf comparison. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: TennyWang1223 <[email protected]>
ad8cfe9 to
2a15b1c
Compare
|
No activity for 15 days, so this is now labelled |
|
The gfx1250 LL128 kernel in this PR computes its slot stride and bank offset from the message size ( The gfx1250 kernel looks exposed in the same way. This is from reading the code; I haven't run it on gfx1250. Your scratch is already sized for the largest message, so the fix needs no extra memory: compute the per-rank stride from |
Motivation
gfx1250 custom_all_reduce perf optimize with 2 new kernel: LL128 ar, cas_sync ar
Technical Details
use LL128 proto in middle size case
replace start_sync and end_sync by cas_sync in simple proto allreduce kernel at little bigger case
Test Plan
see ut
Test Result
LL128 ar optmize middle size case(tp4: [64 * 8192, 1024 * 8192), tp2: [512 * 8192, 8192 * 8192) ), cas_sync ar optimize big size case(tp4:[1024 * 8192, car_max_inp_size), tp2: [8192 * 8192, car_max_inp_size)), small size case still use LL ar, so there is no perf change at small case, perf speedup only in middle case and big case
tp4
tp2
Submission Checklist