SWDEV-509280 - Combine multiple definitions of callbackQueue into a single function.
Change-Id: Ibbb56136bec2beed71c202d75e8aec9e82640a4e
このコミットが含まれているのは:
@@ -2979,33 +2979,6 @@ void VirtualGPU::submitMigrateMemObjects(amd::MigrateMemObjectsCommand& vcmd) {
|
||||
profilingEnd(vcmd);
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
static void callbackQueue(hsa_status_t status, hsa_queue_t* queue, void* data) {
|
||||
if (status != HSA_STATUS_SUCCESS && status != HSA_STATUS_INFO_BREAK) {
|
||||
VirtualGPU* vgpu = reinterpret_cast<VirtualGPU*>(data);
|
||||
vgpu->AnalyzeAqlQueue();
|
||||
// Abort on device exceptions.
|
||||
const char* errorMsg = 0;
|
||||
hsa_status_string(status, &errorMsg);
|
||||
if (status == HSA_STATUS_ERROR_OUT_OF_RESOURCES) {
|
||||
size_t global_available_mem = 0;
|
||||
if (HSA_STATUS_SUCCESS != hsa_agent_get_info(vgpu->gpu_device(),
|
||||
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_MEMORY_AVAIL),
|
||||
&global_available_mem)) {
|
||||
LogError("HSA_AMD_AGENT_INFO_MEMORY_AVAIL query failed.");
|
||||
}
|
||||
ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS,
|
||||
"Callback: Queue %p Aborting with error : %s Code: 0x%x Available Free mem : %zu MB",
|
||||
queue->base_address, errorMsg, status, global_available_mem/Mi);
|
||||
} else {
|
||||
ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS,
|
||||
"Callback: Queue %p aborting with error : %s code: 0x%x", queue->base_address,
|
||||
errorMsg, status);
|
||||
}
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool VirtualGPU::createSchedulerParam()
|
||||
{
|
||||
@@ -3023,8 +2996,8 @@ bool VirtualGPU::createSchedulerParam()
|
||||
|
||||
// The queue is written by multiple threads of the scheduler kernel
|
||||
if (HSA_STATUS_SUCCESS != hsa_queue_create(gpu_device(), 2048, HSA_QUEUE_TYPE_MULTI,
|
||||
callbackQueue, this, std::numeric_limits<uint>::max(), std::numeric_limits<uint>::max(),
|
||||
&schedulerQueue_)) {
|
||||
callbackQueue, &roc_device_, std::numeric_limits<uint>::max(),
|
||||
std::numeric_limits<uint>::max(), &schedulerQueue_)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする