From 6160643b90558257c8d92ba664821787b62babb1 Mon Sep 17 00:00:00 2001 From: Yiannis Papadopoulos <102817138+ypapadop-amd@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:22:08 -0400 Subject: [PATCH] Adding GetInfo keys for ROCm 6.2 support (#20) --- .../core/runtime/amd_aie_agent.cpp | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp index 6868ef8ec..6340c2bb6 100644 --- a/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp @@ -228,7 +228,6 @@ hsa_status_t AieAgent::GetInfo(hsa_agent_info_t attribute, void *value) const { "%s%036lX", uuid_tmp, uuid_value); break; } - case HSA_AMD_AGENT_INFO_ASIC_REVISION: *reinterpret_cast(value) = 0; break; @@ -237,6 +236,43 @@ hsa_status_t AieAgent::GetInfo(hsa_agent_info_t attribute, void *value) const { assert(regions_.size() != 0 && "No device local memory found!"); *reinterpret_cast(value) = true; break; + case HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY: + return core::Runtime::runtime_singleton_->GetSystemInfo( + HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY, value); + break; + case HSA_AMD_AGENT_INFO_ASIC_FAMILY_ID: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_UCODE_VERSION: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_NUM_SDMA_ENG: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_IOMMU_SUPPORT: + *static_cast(value) = HSA_IOMMU_SUPPORT_NONE; + break; + case HSA_AMD_AGENT_INFO_NUM_XCC: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_DRIVER_UID: + *static_cast(value) = 0; + break; + case HSA_AMD_AGENT_INFO_NEAREST_CPU: + static_cast(value)->handle = 0; + break; + case HSA_AMD_AGENT_INFO_MEMORY_PROPERTIES: + memset(value, 0, sizeof(uint8_t) * 8); + break; + case HSA_AMD_AGENT_INFO_AQL_EXTENSIONS: + memset(value, 0, sizeof(uint8_t) * 8); + break; default: *reinterpret_cast(value) = 0; return HSA_STATUS_ERROR_INVALID_ARGUMENT;