diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 2230b96fcf..e28b99e4ae 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -924,9 +924,12 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { *((uint32_t*)value) = properties_.DeviceId; break; case HSA_AMD_AGENT_INFO_CACHELINE_SIZE: - // TODO: hardcode for now. - // GCN whitepaper: cache line size is 64 byte long. - *((uint32_t*)value) = 64; + for (auto& cache : cache_props_) { + if (cache.CacheLineSize != 0) { + *((uint32_t*)value) = cache.CacheLineSize; + break; + } + } break; case HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT: *((uint32_t*)value) =