deepseek-ai / deepseek-ai/DeepEP
[Question] How is memory ordering guaranteed within an intranode?
- Dominant language
- Cuda
- Stars
- 10.1k
- Forks
- 1.4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 3
Description
In the code, I noticed that the send side uses PTX's 'release' and the receive side uses 'acquire' to ensure memory ordering. However, according to the PTX documentation, 'release' and 'acquire' only guarantee memory ordering within the calling thread. How is memory ordering ensured for other threads within the same warp?
sende:
__device__ __forceinline__ void st_release_sys_global(const int *ptr, int val) {
asm volatile("st.release.sys.global.s32 [%0], %1;"::"l"(ptr), "r"(val) : "memory");
}
recv:
__device__ __forceinline__ uint64_t ld_acquire_sys_global(const uint64_t *ptr) {
uint64_t ret;
asm volatile("ld.acquire.sys.global.u64 %0, [%1];" : "=l"(ret) : "l"(ptr));
return ret;
}
Thank you for your time.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the PTX documentation for the release and acquire operations, then inspect the send and receive helper snippets in the issue. A useful resolution would explain how ordering is ensured for other threads within the same warp, or clarify that additional synchronization is required.
Written by the indexing model from the issue text.
Assessment
- Domain
- distributed-systems
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100