Skip to content

Commit

Permalink
Adding GetInfo keys for ROCm 6.2 support (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypapadop-amd authored and makslevental committed Sep 10, 2024
1 parent 8a6677d commit 6160643
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t *>(value) = 0;
break;
Expand All @@ -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<bool *>(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<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_UCODE_VERSION:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_ENG:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_IOMMU_SUPPORT:
*static_cast<hsa_amd_iommu_version_t *>(value) = HSA_IOMMU_SUPPORT_NONE;
break;
case HSA_AMD_AGENT_INFO_NUM_XCC:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_DRIVER_UID:
*static_cast<uint32_t *>(value) = 0;
break;
case HSA_AMD_AGENT_INFO_NEAREST_CPU:
static_cast<hsa_agent_t *>(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<uint32_t *>(value) = 0;
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
Expand Down

0 comments on commit 6160643

Please sign in to comment.