From 4560bcae9ff9bea3feba7e4a57b851b3e5b09af1 Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Thu, 8 Jun 2023 22:11:31 +0000 Subject: [PATCH] Setting Priority for HSA Queue handling Device Profiling Change-Id: I82072ffb73f56b6effd2878164513ce47014c33f --- src/core/session/device_profiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/session/device_profiling.cpp b/src/core/session/device_profiling.cpp index c4520af0c1..9f28d7af2f 100644 --- a/src/core/session/device_profiling.cpp +++ b/src/core/session/device_profiling.cpp @@ -42,8 +42,10 @@ bool createHsaQueue(hsa_queue_t** queue, hsa_agent_t gpu_agent) { hsa_status_t status; status = hsa_queue_create(gpu_agent, QUEUE_NUM_PACKETS, HSA_QUEUE_TYPE_SINGLE, NULL, NULL, UINT32_MAX, UINT32_MAX, queue); + if (status != HSA_STATUS_SUCCESS) fatal("Queue creation failed"); - if (status != HSA_STATUS_SUCCESS) fatal("queue creation failed"); + status = hsa_amd_queue_set_priority(*queue, HSA_AMD_QUEUE_PRIORITY_HIGH); + if (status != HSA_STATUS_SUCCESS) warning("Device Profiling HSA Queue Priority Set Failed"); return (status == HSA_STATUS_SUCCESS); }