From b54c3f7db93feed29711866aed60b993b6500ce6 Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Wed, 29 Apr 2020 09:18:07 -0700 Subject: [PATCH] Couple of cleanups. Remove queue limitation since we loop through HW queues now. Add a DevLogError if we fail to create the hsa_queue. A ticket showed a regression there. Change-Id: I4f58e405f88e75600a762f6d6352838c969cdb5e --- rocclr/device/rocm/rocdevice.cpp | 1 + rocclr/device/rocm/rocsettings.cpp | 7 ------- rocclr/device/rocm/rocvirtual.cpp | 5 ----- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index 3726410927..208bd9332e 100755 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -1963,6 +1963,7 @@ hsa_queue_t* Device::acquireQueue(uint32_t queue_size_hint, bool coop_queue) { &queue) != HSA_STATUS_SUCCESS) { queue_size >>= 1; if (queue_size < 64) { + DevLogError("Device::acquireQueue: hsa_queue_create failed!"); return nullptr; } } diff --git a/rocclr/device/rocm/rocsettings.cpp b/rocclr/device/rocm/rocsettings.cpp index 62176fe352..928c0f9fa4 100644 --- a/rocclr/device/rocm/rocsettings.cpp +++ b/rocclr/device/rocm/rocsettings.cpp @@ -57,9 +57,6 @@ Settings::Settings() { nonCoherentMode = getenv("OPENCL_USE_NC_MEMORY_POLICY"); enableNCMode_ = (nonCoherentMode) ? true : false; - commandQueues_ = 200; //!< Field value set to maximum number - //!< concurrent Virtual GPUs for ROCm backend - // Disable image DMA by default (ROCM runtime doesn't support it) imageDMA_ = false; @@ -188,10 +185,6 @@ void Settings::override() { maxWorkGroupSize3DZ_ = GPU_MAX_WORKGROUP_SIZE_3D_Z; } - if (!flagIsDefault(GPU_MAX_COMMAND_QUEUES)) { - commandQueues_ = GPU_MAX_COMMAND_QUEUES; - } - if (!flagIsDefault(GPU_XFER_BUFFER_SIZE)) { xferBufSize_ = GPU_XFER_BUFFER_SIZE * Ki; } diff --git a/rocclr/device/rocm/rocvirtual.cpp b/rocclr/device/rocm/rocvirtual.cpp index 615824f77f..62173325c7 100644 --- a/rocclr/device/rocm/rocvirtual.cpp +++ b/rocclr/device/rocm/rocvirtual.cpp @@ -694,11 +694,6 @@ VirtualGPU::~VirtualGPU() { } bool VirtualGPU::create() { - // Checking Virtual gpu unique index for ROCm backend - if (index() > device().settings().commandQueues_) { - return false; - } - // Pick a reasonable queue size uint32_t queue_size = 1024; gpu_queue_ = roc_device_.acquireQueue(queue_size, cooperative_);