From 96b3c4a0aa73d7588650da223d2b9ba74fe88408 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 3 Oct 2023 13:44:10 +0000 Subject: [PATCH] Allow CPU cache info to be empty Some new CPUs have different cache reporting structure causing thunk to leave the cache information empty. Allow the cache information for CPU agents to be empty as they are not used by language-runtimes Change-Id: Ic5e880171ab20aa114b4b62bdb4479eb54066f7b --- runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp index 6367588722..b6b09e18b5 100644 --- a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp @@ -266,8 +266,6 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { break; case HSA_AGENT_INFO_CACHE_SIZE: { std::memset(value, 0, sizeof(uint32_t) * 4); - - assert(cache_props_.size() > 0 && "CPU cache info missing."); const size_t num_cache = cache_props_.size(); for (size_t i = 0; i < num_cache; ++i) { const uint32_t line_level = cache_props_[i].CacheLevel;