gfx11: don't use LL for sendrecv (#853)
* gfx11: don't use LL for sendrecv * Use builtin instead of inline asm
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
} else { \
|
||||
const int w = threadIdx.x/WARP_SIZE; \
|
||||
const int wid = threadIdx.x%WARP_SIZE; \
|
||||
__threadfence(); \
|
||||
if (wid == 0) { \
|
||||
barrier_next[w] += nthreads/WARP_SIZE; \
|
||||
atomicAdd((unsigned long long *)barriers, 1); \
|
||||
|
||||
@@ -159,17 +159,18 @@ private:
|
||||
|
||||
template<int Recv, int Send>
|
||||
inline __device__ void postPeer(bool dataStored) {
|
||||
if (Send && (flags & RolePostSend) && dataStored)
|
||||
#ifdef __GFX9__
|
||||
__builtin_amdgcn_buffer_wbinvl1();
|
||||
#else
|
||||
__threadfence_system();
|
||||
#endif
|
||||
|
||||
if ((flags & Send*RolePostSend) && next_hdp_reg)
|
||||
STORE((unsigned int *)next_hdp_reg, 0x1);
|
||||
|
||||
if (flags & (Recv*RolePostRecv | Send*RolePostSend)) {
|
||||
step += StepPerSlice;
|
||||
if (Send && (flags & RolePostSend) && dataStored)
|
||||
#ifdef __GFX9__
|
||||
__asm__ __volatile__("buffer_wbinvl1_vol");
|
||||
#else
|
||||
__threadfence_system();
|
||||
#endif
|
||||
STORE(connStepPtr, step);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user