diff --git a/projects/clr/rocclr/runtime/platform/commandqueue.cpp b/projects/clr/rocclr/runtime/platform/commandqueue.cpp index e559d23ffb..160c97b67e 100644 --- a/projects/clr/rocclr/runtime/platform/commandqueue.cpp +++ b/projects/clr/rocclr/runtime/platform/commandqueue.cpp @@ -19,8 +19,7 @@ namespace amd { HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properties properties, uint queueRTCUs, Priority priority) - : CommandQueue(context, device, properties, - device.info().queueProperties_ | CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD, + : CommandQueue(context, device, properties, device.info().queueProperties_, queueRTCUs, priority), lastEnqueueCommand_(nullptr) { if (thread_.state() >= Thread::INITIALIZED) { @@ -83,10 +82,6 @@ void HostQueue::finish() { } void HostQueue::loop(device::VirtualDevice* virtualDevice) { - cl_int(CL_CALLBACK * commandIntercept)(cl_event, cl_int*) = - properties().test(CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD) ? context().info().commandIntercept_ - : NULL; - // Notify the caller that the queue is ready to accept commands. { ScopedLock sl(queueLock_); @@ -138,20 +133,11 @@ void HostQueue::loop(device::VirtualDevice* virtualDevice) { } command->setStatus(CL_SUBMITTED); - - cl_int result; - if ((commandIntercept != NULL) && commandIntercept(as_cl(command), &result)) { - // The command was handled by the callback. - command->setStatus(CL_RUNNING, command->profilingInfo().submitted_); - command->setStatus(result); - continue; - } - // Submit to the device queue. command->submit(*virtualDevice); - // if we are in intercept mode or this is a user invisible marker command - if ((0 == command->type()) || (commandIntercept != NULL)) { + // if this is a user invisible marker command, then flush + if (0 == command->type()) { virtualDevice->flush(head); tail = head = NULL; } diff --git a/projects/clr/rocclr/runtime/platform/context.cpp b/projects/clr/rocclr/runtime/platform/context.cpp index 71dfc28fac..9e1d9db0ca 100644 --- a/projects/clr/rocclr/runtime/platform/context.cpp +++ b/projects/clr/rocclr/runtime/platform/context.cpp @@ -184,11 +184,6 @@ int Context::checkProperties(const cl_context_properties* properties, Context::I // Set the offline device flag info->flags_ |= OfflineDevices; break; - case CL_CONTEXT_COMMAND_INTERCEPT_CALLBACK_AMD: - // Set the command intercept flag - info->commandIntercept_ = (cl_int(CL_CALLBACK*)(cl_event, cl_int*))p->ptr; - info->flags_ |= CommandIntercept; - break; default: return CL_INVALID_VALUE; } diff --git a/projects/clr/rocclr/runtime/platform/context.hpp b/projects/clr/rocclr/runtime/platform/context.hpp index be05d5cbee..8da380e2f4 100644 --- a/projects/clr/rocclr/runtime/platform/context.hpp +++ b/projects/clr/rocclr/runtime/platform/context.hpp @@ -33,7 +33,7 @@ class Context : public RuntimeObject { GLDeviceKhrIdx = 0, //!< GL D3D10DeviceKhrIdx, //!< D3D10 OfflineDevicesIdx, //!< Offline devices - CommandInterceptIdx, //!< Command intercept + CommandInterceptIdx, //!< (Deprecated) Command intercept D3D11DeviceKhrIdx, //!< D3D11 InteropUserSyncIdx, //!< Interop user sync enabled D3D9DeviceKhrIdx, //!< d3d9 device @@ -47,7 +47,6 @@ class Context : public RuntimeObject { GLDeviceKhr = 1 << GLDeviceKhrIdx, //!< GL D3D10DeviceKhr = 1 << D3D10DeviceKhrIdx, //!< D3D10 OfflineDevices = 1 << OfflineDevicesIdx, //!< Offline devices - CommandIntercept = 1 << CommandInterceptIdx, //!< Command intercept D3D11DeviceKhr = 1 << D3D11DeviceKhrIdx, //!< D3D11 InteropUserSync = 1 << InteropUserSyncIdx, //!< Interop user sync enabled D3D9DeviceKhr = 1 << D3D9DeviceKhrIdx, //!< d3d9 device @@ -62,7 +61,6 @@ class Context : public RuntimeObject { void* hDev_[LastDeviceFlagIdx]; //!< Device object reference void* hCtx_; //!< Context object reference size_t propertiesSize_; //!< Size of the original properties in bytes - cl_int(CL_CALLBACK* commandIntercept_)(cl_event, cl_int*); }; struct DeviceQueueInfo {