device: optimize threadfence for ll64 protocol (#1858)
* device: optimize threadfence for ll64 protocol * device: use __atomic_signal_fence() --------- Co-authored-by: Nusrat Islam <nusislam@useocpslog-003.amd.com>
This commit is contained in:
@@ -138,11 +138,13 @@ private:
|
|||||||
if (recvConnHeadPtr) STORE(recvConnHeadPtr, recvConnHead += 1);
|
if (recvConnHeadPtr) STORE(recvConnHeadPtr, recvConnHead += 1);
|
||||||
}
|
}
|
||||||
inline __device__ void postSend() {
|
inline __device__ void postSend() {
|
||||||
|
__atomic_signal_fence(__ATOMIC_SEQ_CST);
|
||||||
|
asm volatile("s_waitcnt lgkmcnt(0) vmcnt(0)");
|
||||||
|
__atomic_signal_fence(__ATOMIC_SEQ_CST);
|
||||||
|
|
||||||
if (sendConnTailPtr) {
|
if (sendConnTailPtr) {
|
||||||
#if __CUDA_ARCH__ >= 900
|
#if __CUDA_ARCH__ >= 900
|
||||||
__threadfence_system();
|
__threadfence_system();
|
||||||
#else
|
|
||||||
__threadfence();
|
|
||||||
#endif
|
#endif
|
||||||
STORE((unsigned long long *)sendConnTailPtr, sendConnTail += 1);
|
STORE((unsigned long long *)sendConnTailPtr, sendConnTail += 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user