"test/batched_gemm/batched_gemm_fp32.cpp" did not exist on "cd51732690641ae0ac76f90641246214f4a95bf9"
synchronization.hpp 413 Bytes
Newer Older
Chao Liu's avatar
Chao Liu committed
1
2
3
4
5
6
7
8
9
#ifndef CK_SYNCHRONIZATION_AMD_HPP
#define CK_SYNCHRONIZATION_AMD_HPP

#include "config.hpp"

namespace ck {

__device__ void block_sync_lds()
{
10
#if CK_EXPERIMENTAL_BLOCK_SYNC_LDS_WITHOUT_SYNC_VMEM
Chao Liu's avatar
Chao Liu committed
11
12
13
14
15
    asm volatile("\
    s_waitcnt lgkmcnt(0) \n \
    s_barrier \
    " ::);
#else
16
    __syncthreads();
Chao Liu's avatar
Chao Liu committed
17
18
19
#endif
}

wangshaojie6's avatar
wangshaojie6 committed
20
21
22
23
24
25
__device__ void s_nop(){
    asm volatile("\
    s_nop 0 \n \
    " ::);
}

Chao Liu's avatar
Chao Liu committed
26
27
} // namespace ck
#endif