P4 to Git Change 1985445 by skudchad@skudchad_test2_win_opencl on 2019/08/19 17:35:03
SWDEV-198861 - Implement VDI equivalent to HCC_SERIALIZE_KERNEL/HCC_SERIALIZE_COPY - Use env var AMD_SERIALIZE_COPY/AMD_SERIALIZE_KERNEL 0x1 - Wait for complete before command is submitted 0x2 - Wait for complete after submission 0x3 - Wait both ReviewBoardURL = http://ocltc.amd.com/reviews/r/17843/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#95 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#93 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#30 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#316 edit
Tento commit je obsažen v:
@@ -35,7 +35,8 @@ bool HostQueue::terminate() {
|
||||
Command* marker = nullptr;
|
||||
|
||||
// Send a finish if the queue is still accepting commands.
|
||||
{ ScopedLock sl(queueLock_);
|
||||
{
|
||||
ScopedLock sl(queueLock_);
|
||||
if (thread_.acceptingCommands_) {
|
||||
marker = new Marker(*this, false);
|
||||
if (marker != nullptr) {
|
||||
@@ -50,7 +51,8 @@ bool HostQueue::terminate() {
|
||||
}
|
||||
|
||||
// Wake-up the command loop, so it can exit
|
||||
{ ScopedLock sl(queueLock_);
|
||||
{
|
||||
ScopedLock sl(queueLock_);
|
||||
thread_.acceptingCommands_ = false;
|
||||
queueLock_.notify();
|
||||
}
|
||||
@@ -159,6 +161,9 @@ void HostQueue::loop(device::VirtualDevice* virtualDevice) {
|
||||
void HostQueue::append(Command& command) {
|
||||
// We retain the command here. It will be released when its status
|
||||
// changes to CL_COMPLETE
|
||||
if ((command.getWaitBits() & 0x1) != 0) {
|
||||
finish();
|
||||
}
|
||||
command.retain();
|
||||
command.setStatus(CL_QUEUED);
|
||||
queue_.enqueue(&command);
|
||||
@@ -214,4 +219,4 @@ bool DeviceQueue::create() {
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace amd {
|
||||
} // namespace amd
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele