rocr/driver: add support for getting GPU tile configuration

- Implemented GetTileConfig in KfdDriver to retrieve tile configuration for
a specific node.
- Added a stub implementation of GetTileConfig in XdnaDriver.
- Updated driver.h to include a virtual GetTileConfig method.
- Extended hsa_internal.h with a new hsa_get_tile_config function.
- Integrated hsa_get_tile_config into hsa.cpp to call the driver-specific
  implementation.
- Updated driver headers to declare the new GetTileConfig method.

Signed-off-by: Honglei Huang <Honglei1.Huang@amd.com>
Tá an tiomantas seo le fáil i:
Honglei Huang
2025-06-27 13:29:03 +08:00
tiomanta ag Huang, Honglei1
tuismitheoir 8d077dba3b
tiomantas 9bc38e2ee6
D'athraigh 8 comhad le 40 breiseanna agus 2 scriosta
@@ -591,6 +591,16 @@ hsa_status_t KfdDriver::GetClockCounters(uint32_t node_id, HsaClockCounters* clo
return HSA_STATUS_SUCCESS;
}
hsa_status_t KfdDriver::GetTileConfig(uint32_t node_id, HsaGpuTileConfig* config) const {
assert(config);
if (HSAKMT_CALL(hsaKmtGetTileConfig(node_id, config)) != HSAKMT_STATUS_SUCCESS) {
return HSA_STATUS_ERROR;
}
return HSA_STATUS_SUCCESS;
}
hsa_status_t KfdDriver::IsModelEnabled(bool* enable) const {
// AIE does not support streaming performance monitor.
HSAKMT_STATUS status = HSAKMT_STATUS_ERROR;
@@ -885,5 +885,10 @@ hsa_status_t XdnaDriver::GetClockCounters(uint32_t node_id, HsaClockCounters* cl
return HSA_STATUS_ERROR;
}
hsa_status_t XdnaDriver::GetTileConfig(uint32_t node_id, HsaGpuTileConfig* config) const {
return HSA_STATUS_ERROR;
}
} // namespace AMD
} // namespace rocr