From 21dbd5cc5e25d933bc1877efa945c99a8c2d489f Mon Sep 17 00:00:00 2001 From: avinashkethineedi Date: Mon, 17 Feb 2025 07:16:49 +0000 Subject: [PATCH] Remove `rocshmem_timer` function --- include/rocshmem/rocshmem.hpp | 11 ----------- src/rocshmem_gpu.cpp | 6 ------ src/stats.hpp | 4 ++-- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/include/rocshmem/rocshmem.hpp b/include/rocshmem/rocshmem.hpp index 20fa559e72..629c5a377c 100644 --- a/include/rocshmem/rocshmem.hpp +++ b/include/rocshmem/rocshmem.hpp @@ -512,17 +512,6 @@ __device__ ATTR_NO_INLINE void rocshmem_wg_team_sync(rocshmem_team_t team); */ __device__ ATTR_NO_INLINE void *rocshmem_ptr(const void *dest, int pe); -/** - * @brief Query the current time. Similar to gettimeofday() on the CPU. To use - * this function, rocSHMEM must be configured with profiling support - * (--enable-profile). - * - * Can be called per thread with no performance penalty. - * - * @return Time in micro-seconds. - */ -__device__ uint64_t rocshmem_timer(); - /** * @brief Make all uncacheable GPU data visible to other agents in the sytem. * diff --git a/src/rocshmem_gpu.cpp b/src/rocshmem_gpu.cpp index 78350deb92..5517da4b47 100644 --- a/src/rocshmem_gpu.cpp +++ b/src/rocshmem_gpu.cpp @@ -638,12 +638,6 @@ __device__ int rocshmem_my_pe() { return get_internal_ctx(ROCSHMEM_CTX_DEFAULT)->my_pe; } -__device__ uint64_t rocshmem_timer() { - GPU_DPRINTF("Function: rocshmem_timer\n"); - - return __read_clock(); -} - template __device__ T rocshmem_atomic_fetch_add(rocshmem_ctx_t ctx, T *dest, T val, int pe) { diff --git a/src/stats.hpp b/src/stats.hpp index adc2bb51d5..a4fe1937ef 100644 --- a/src/stats.hpp +++ b/src/stats.hpp @@ -141,10 +141,10 @@ class Stats { StatType stats[I] = {0}; public: - __device__ uint64_t startTimer() const { return rocshmem_timer(); } + __device__ uint64_t startTimer() const { return wall_clock64(); } __device__ void endTimer(uint64_t start, int index) { - incStat(index, rocshmem_timer() - start); + incStat(index, wall_clock64() - start); } __device__ void incStat(int index, int value = 1) {