Repository navigation
[FlyDSL] Update skills and clean up codes about typed memory and pointer APIs in communication kernels - #6377
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
e60e301 to
6b0a1bc
Compare
6b0a1bc to
b810cf0
Compare
…_global) ROCm#6377 removed communication_ops_utils.traced and made _to_ptr_global return a typed FlyDSL pointer (fx.inttoptr) instead of a raw !llvm.ptr<1>. Move the v4 nm decode helpers onto the replacements main now uses; the emitted loads/stores/atomics keep the same type, alignment, ordering, syncscope and volatile flags. - mla_v4_decode_common.py: spin_all_arrived / spin_tickets_state use @flyc.jit instead of @cu.traced (same AST rewrite when called inside a kernel trace). - mla_v4_decode_common.py: gload, ld64_agent, ld_agent_i32 use fx.generic_load; st_raw, st_agent use fx.generic_store; rmw_add64_agent uses fx.atomic_add. Element type and alignment now come from cu._to_ptr_global(addr, dtype, alignment). - mla_v4_decode_gfx950.py: ld_idx, the warm-up q / index loads and pld16 use fx.generic_load on the typed pointer; the four global_load_lds sources take fx.to_llvm_ptr(cu._to_ptr_global(...)).
Summary
tensor_shim. Pinned FlyDSL0.3.4.1and merged FlyDSL main do not yet exposefx.rocdl.s_buffer_load, so the supported intrinsic path remains inbuffer_ops.fx.inttoptrandfx.to_llvm_ptrto construct the LDS DMA pointer in MegaMoE TP and the global pointer for the INT4 all-reduce nontemporal store. The asynchronous DMA still uses its ROCDL operation; the nontemporal store now usesfx.generic_store. Target-specific operations without exact stablefxequivalents remain unchanged.Validation
0.3.4.1: representative communication, LDS, and common atomic probes compile to final gfx950 ISA byte-identical to the base branch. Scalar buffer load was checked at runtime on gfx950.COMPILE_ONLY=1: final ISA is byte-identical to the originalmainbaseline for the fullquick_allreduce_int4specialization (world size 2, super tile 1) and MegaMoE TP specialization (H=512, I=256, TP=2, TOPK=2). Focused LDS DMA and nontemporal store probes were also byte-identical before the commits were combined.black --check,ruff check,python -m py_compile, andgit diff origin/main...HEAD --checkpass for all 12 changed files.