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>
Tento commit je obsažen v:
Honglei Huang
2025-06-27 13:29:03 +08:00
odevzdal Huang, Honglei1
rodič 8d077dba3b
revize 9bc38e2ee6
8 změnil soubory, kde provedl 40 přidání a 2 odebrání
+1
Zobrazit soubor
@@ -126,6 +126,7 @@ public:
const void* buffer_base, uint64_t buffer_base_size) const override;
hsa_status_t GetDeviceHandle(uint32_t node_id, void** device_handle) const override;
hsa_status_t GetClockCounters(uint32_t node_id, HsaClockCounters* clock_counter) const override;
hsa_status_t GetTileConfig(uint32_t node_id, HsaGpuTileConfig* config) const override;
hsa_status_t OpenSMI(uint32_t node_id, int* fd) const override;
+1
Zobrazit soubor
@@ -240,6 +240,7 @@ public:
const void* buffer_base, uint64_t buffer_base_size) const override;
hsa_status_t GetDeviceHandle(uint32_t node_id, void** device_handle) const override;
hsa_status_t GetClockCounters(uint32_t node_id, HsaClockCounters* clock_counter) const override;
hsa_status_t GetTileConfig(uint32_t node_id, HsaGpuTileConfig* config) const override;
hsa_status_t IsModelEnabled(bool* enable) const override;
+7
Zobrazit soubor
@@ -283,6 +283,13 @@ public:
virtual hsa_status_t GetClockCounters(uint32_t node_id,
HsaClockCounters* clock_counter) const = 0;
/// @brief Get the tile configuration for a specific node.
///
/// @param[in] node_id Node ID of the agent
/// @param[out] config Pointer to tile configuration
/// @return HSA_STATUS_SUCCESS if the driver successfully returns the tile configuration.
virtual hsa_status_t GetTileConfig(uint32_t node_id, HsaGpuTileConfig* config) const = 0;
/// @brief Check if the HSA KMT Model is enabled
/// @param[out] enable True if the model is enabled, false otherwise
virtual hsa_status_t IsModelEnabled(bool* enable) const = 0;
+1
Zobrazit soubor
@@ -406,6 +406,7 @@ namespace HSA {
hsa_executable_symbol_t symbol,
void *data),
void *data);
hsa_status_t hsa_get_tile_config(hsa_agent_t agent_handle, void* config);
//===--- Runtime Notifications ------------------------------------------===//