[Bugfix][Kernel] Implement acquire/release polyfill for Pascal (#8776)

This commit is contained in:
sasha0552
2024-09-25 04:26:33 +00:00
committed by GitHub
parent ee777d9c30
commit b4522474a3
2 changed files with 18 additions and 0 deletions

View File

@@ -44,7 +44,14 @@
} while (0)
__global__ void dummy_kernel() {
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 700
for (int i = 0; i < 100; i++) __nanosleep(1000000); // 100ms
#else
for (int i = 0; i < 100; i++) {
long long int start = clock64();
while (clock64() - start < 150000000); // approximately 98.4ms on P40
}
#endif
}
template <typename T>