libhsakmt: dump errno the queue destroy fails.
to faciliate debugging, print errno when queue destroy fail
current log give very little information when fail:
[ RUN ] KFDQMTest.AllSdmaQueues
[ ] Regular SDMA engines number: 1 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllSdmaQueues (11 ms)
[ RUN ] KFDQMTest.AllXgmiSdmaQueues
[ ] XGMI SDMA engines number: 0 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllXgmiSdmaQueues (6 ms)
[ RUN ] KFDQMTest.AllQueues
/home/foreman/build/hsakmt-roct-amdgpu-1.0.9.40500/sources/libhsakmt/tests/kfdtest/src/KFDQMTest.cpp:381: Failure
Value of: (cpQueues[i].Destroy())
Actual: 1
Expected: HSAKMT_STATUS_SUCCESS
Which is: 0
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I5b1b5b616a5fd7ff198360c893a7aeed685022bd
[ROCm/ROCR-Runtime commit: db1d6d92ab]
This commit is contained in:
@@ -637,8 +637,10 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtDestroyQueue(HSA_QUEUEID QueueId)
|
||||
|
||||
int err = kmtIoctl(kfd_fd, AMDKFD_IOC_DESTROY_QUEUE, &args);
|
||||
|
||||
if (err == -1)
|
||||
if (err == -1) {
|
||||
pr_err("Failed to destroy queue: %s\n", strerror(errno));
|
||||
return HSAKMT_STATUS_ERROR;
|
||||
}
|
||||
|
||||
free_queue(q);
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
|
||||
مرجع در شماره جدید
Block a user