rocr/driver: add GetDeviceHandle to driver interface
This commit introduces a new GetDeviceHandle API to the driver interface, allowing retrieval of the device handle for a specific node. - Implemented GetDeviceHandle in KfdDriver to fetch the AMD GPU device handle using hsaKmtGetAMDGPUDeviceHandle. - Added a stub implementation of GetDeviceHandle in XdnaDriver that returns HSA_STATUS_ERROR. - Modified GpuAgent::InitLibDrm to use driver().GetDeviceHandle instead of directly calling hsaKmtGetAMDGPUDeviceHandle. Signed-off-by: Honglei Huang <Honglei1.Huang@amd.com>
このコミットが含まれているのは:
1 親
837fd044d0
コミット
05b83e72d9
6ファイル変更
+26
-4
検索条件に一致するファイルはありません
@@ -601,12 +601,12 @@ void GpuAgent::InitCacheList() {
|
||||
}
|
||||
|
||||
void GpuAgent::InitLibDrm() {
|
||||
HSAKMT_STATUS status;
|
||||
hsa_status_t status;
|
||||
|
||||
HsaAMDGPUDeviceHandle device_handle;
|
||||
status = HSAKMT_CALL(hsaKmtGetAMDGPUDeviceHandle(node_id(), &device_handle));
|
||||
if (status != HSAKMT_STATUS_SUCCESS)
|
||||
throw AMD::hsa_exception(HSA_STATUS_ERROR,
|
||||
status = driver().GetDeviceHandle(node_id(), &device_handle);
|
||||
if (status != HSA_STATUS_SUCCESS)
|
||||
throw AMD::hsa_exception(status,
|
||||
"Agent creation failed.\nlibdrm get device handle failed.\n");
|
||||
|
||||
ldrm_dev_ = (amdgpu_device_handle)device_handle;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする