Fix clock check for reproducible runtime (#281)

* Fix clock check for reproducible runtime

* source formatting (clang-format v11) (#282)

Co-authored-by: bwelton <bwelton@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <bwelton@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: efbb154515]
This commit is contained in:
Benjamin Welton
2023-12-08 01:25:23 -08:00
committed by GitHub
parent c1c939deaf
commit c19e054225
@@ -134,14 +134,8 @@ main(int argc, char** argv)
__global__ void
reproducible_runtime(int64_t nspin_v)
{
int64_t start = clock64();
int64_t diff = 0;
do
{
__syncthreads();
diff = (clock64() - start);
} while(diff < nspin_v);
for(int i = 0; i < nspin_v / 64; i++)
asm volatile("s_sleep 1"); // ~64 cycles
}
void