Skip to content

perf(cco): preserve global address space in LSA pointer wrapper - #537

Open
yangyuhuiling wants to merge 1 commit into
mainfrom
xiangch/cco-lsa-global-address-space
Open

perf(cco): preserve global address space in LSA pointer wrapper#537
yangyuhuiling wants to merge 1 commit into
mainfrom
xiangch/cco-lsa-global-address-space

Conversation

@yangyuhuiling

Copy link
Copy Markdown
Contributor

Summary

  • document that ccoWindow_t metadata objects are allocated in device global memory
  • restore LLVM addrspace(1) after the scalar FlyDSL ABI converts the window handle to uint64_t
  • keep the existing cco_lsa_ptr API while allowing AMDGPU to select global_load instead of conservative generic flat_load

Performance

With the current EPv2 kernel held fixed and only the linked CCO bitcode switched:

  • BF16 scatter-combine, 128 tokens/rank: 166.66 us -> 113.74 us (-31.75%)
  • BF16 scatter-combine, 512 tokens/rank: 577.20 us -> 361.79 us (-37.32%)
  • dispatch remained within 0.7%, confirming the change targets repeated LSA address formation in scatter-combine

Source-mapped ATT shows flat_load_dwordx3 plus vmcnt/lgkmcnt waits becoming global_load_dwordx3; the scatter kernel also drops from 24 to 16 reported VGPRs with no scratch use.

Test plan

  • compile cco_device_wrapper.cpp to gfx950 device bitcode
  • verify cco_lsa_ptr IR uses ptr addrspace(1) for metadata loads
  • run examples/cco/python/04_flydsl_lsa_put on 2 ranks
  • run EPv2 BF16 gather and scatter correctness with the PR bitcode (2 passed)
  • run isolated flat/global bitcode performance A/B and source-mapped ATT

Made with Cursor

Restore the global-memory provenance erased by the scalar DSL handle so LSA window metadata uses global loads instead of conservative flat loads.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant