From ed2be5cfe2b41ed2f9280646684c63e11ce6d1f8 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 [ROCm/rocprofiler commit: 4560bcae9ff9bea3feba7e4a57b851b3e5b09af1] --- projects/rocprofiler/src/core/session/device_profiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler/src/core/session/device_profiling.cpp b/projects/rocprofiler/src/core/session/device_profiling.cpp index c4520af0c1..9f28d7af2f 100644 --- a/projects/rocprofiler/src/core/session/device_profiling.cpp +++ b/projects/rocprofiler/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); }