P4 to Git Change 1069020 by gandryey@gera-ubuntu14 on 2014/08/21 16:54:48
EPR #404714 - [CQE OCL][2.0][DTB]Opencl1.2 WF Conf. Math test failedon Pitcairn and Oland due to CL#1065597 - Add VGPU lock to flush() method, because gsl flush for the same context could be called from multiple threads - Use new scratchAlloc_ monitor for scratch reallocation Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#455 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#130 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#331 edit
Этот коммит содержится в:
@@ -2782,6 +2782,12 @@ VirtualGPU::awaitCompletion(CommandBatch* cb, const amd::Event* waitingEvent)
|
||||
void
|
||||
VirtualGPU::flush(amd::Command* list, bool wait)
|
||||
{
|
||||
//! @note: Even flush() requires a lock, because GSL can
|
||||
//! defer destruction of internal memory objects and releases them
|
||||
//! on GSL flush. If runtime calls another GSL flush at the same time,
|
||||
//! then double release can occur.
|
||||
amd::ScopedLock lock(execution());
|
||||
|
||||
CommandBatch* cb = NULL;
|
||||
bool gpuCommand = false;
|
||||
|
||||
@@ -2805,8 +2811,8 @@ VirtualGPU::flush(amd::Command* list, bool wait)
|
||||
flushDMA(i);
|
||||
// Reset event so we won't try to wait again,
|
||||
// if runtime didn't submit any commands
|
||||
// @note: it's safe to invalidate events, since
|
||||
// we already saved them with the batch creation step above
|
||||
//! @note: it's safe to invalidate events, since
|
||||
//! we already saved them with the batch creation step above
|
||||
cal_.events_[i].invalidate();
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user