From 2cf7c88b34df33757b3c79bdf6be03b9d36cbcce Mon Sep 17 00:00:00 2001 From: James Zhu Date: Thu, 1 Jun 2023 14:05:47 -0400 Subject: [PATCH] Add kernel version flag supports event age KFD kernel version 1.13 starts to support event age tracking which help elimating unncessary busy wait. Change-Id: Ib447ed6e0350f3110a4d6b9b80a0388000dd0e72 Signed-off-by: James Zhu [ROCm/ROCR-Runtime commit: 5871b2850324567c2005ce56e7f7508b12b460d1] --- .../rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h index b5307532c8..8f4db07832 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h @@ -118,6 +118,7 @@ class Runtime { struct KfdVersion_t { HsaVersionInfo version; bool supports_exception_debugging; + bool supports_event_age; }; /// @brief Open connection to kernel driver and increment reference count. @@ -401,7 +402,12 @@ class Runtime { uint64_t sys_clock_freq() const { return sys_clock_freq_; } - void KfdVersion(const HsaVersionInfo& version) { kfd_version.version = version; } + void KfdVersion(const HsaVersionInfo& version) { + kfd_version.version = version; + if (version.KernelInterfaceMajorVersion == 1 && + version.KernelInterfaceMinorVersion >= 14) + kfd_version.supports_event_age = true; + } void KfdVersion(bool exception_debugging) { kfd_version.supports_exception_debugging = exception_debugging;