P4 to Git Change 1057998 by gandryey@gera-dev-w7 on 2014/07/22 17:15:58

ECR #304775 - Device enqueuing
	- Use atomic fetch for enqueue flags
	- Switch to a multithreaded scheduler
	- Add a workaround for Linux host_multi_queue failures. Linux has only 2 queues, but the test allocates multiple host queues and the same HW ring can be used

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#106 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#449 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#127 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuschedcl.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#325 edit
This commit is contained in:
foreman
2014-07-22 17:30:56 -04:00
vanhempi 1e8c506c75
commit d2b905f18e
5 muutettua tiedostoa jossa 136 lisäystä ja 115 poistoa
@@ -453,8 +453,22 @@ VirtualGPU::create(
#endif // !cl_amd_open_video
{
if (dev().engines().numComputeRings()) {
//!@note: Add 1 to account the device queue for transfers
uint idx = (index() + 1) % dev().engines().numComputeRings();
uint idx;
//! @todo Temporary workaround for Linux, because 2 HW queues only
//! Fixes conformance failures with multi queues
if ((0 == deviceQueueSize) || IS_WINDOWS) {
idx = index() % (dev().engines().numComputeRings() -
gpuDevice_.numDeviceQueues_);
}
else {
gpuDevice_.numDeviceQueues_++;
if (gpuDevice_.numDeviceQueues_ >= dev().engines().numComputeRings()) {
return false;
}
idx = (dev().engines().numComputeRings() - gpuDevice_.numDeviceQueues_)
% dev().engines().numComputeRings();
}
// hwRing_ should be set 0 if forced to have single scratch buffer
hwRing_ = (dev().settings().useSingleScratch_) ? 0 : idx;
@@ -583,6 +597,10 @@ VirtualGPU::~VirtualGPU()
amd::ScopedLock k(dev().lockAsyncOps());
amd::ScopedLock lock(dev().vgpusAccess());
if ((NULL != virtualQueue_) && IS_LINUX) {
gpuDevice_.numDeviceQueues_--;
}
uint i;
// Destroy all kernels
for (GslKernels::const_iterator it = gslKernels_.begin();