From 7dc40eb7c48ef64e54fd112fc686c1f0f1b8efc9 Mon Sep 17 00:00:00 2001 From: Geoffroy Lesur Date: Fri, 16 May 2025 16:00:08 +0200 Subject: [PATCH] add Kokkos::fence at the beginning of profiling regions to fix profiling issues on GPUs --- src/global.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/global.cpp b/src/global.cpp index dd7cb573..1ed33ba1 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -66,6 +66,7 @@ int initialize() { void pushRegion(const std::string& kName) { Kokkos::Profiling::pushRegion(kName); if(prof.perfEnabled) { + Kokkos::fence(); prof.currentRegion = prof.currentRegion->GetChild(kName); prof.currentRegion->Start(); }