diff --git a/opencl/source/command_queue/command_queue.h b/opencl/source/command_queue/command_queue.h index 63679bf276..7be351887e 100644 --- a/opencl/source/command_queue/command_queue.h +++ b/opencl/source/command_queue/command_queue.h @@ -401,7 +401,6 @@ class CommandQueue : public BaseObject<_cl_command_queue> { QueuePriority priority = QueuePriority::MEDIUM; QueueThrottle throttle = QueueThrottle::MEDIUM; EnqueueProperties::Operation latestSentEnqueueType = EnqueueProperties::Operation::None; - bool wasNonKernelOperationSent = false; uint64_t sliceCount = QueueSliceCount::defaultSliceCount; std::array bcsStates = {}; diff --git a/opencl/source/command_queue/command_queue_hw_base.inl b/opencl/source/command_queue/command_queue_hw_base.inl index 967c32f314..ad3abf2a31 100644 --- a/opencl/source/command_queue/command_queue_hw_base.inl +++ b/opencl/source/command_queue/command_queue_hw_base.inl @@ -159,7 +159,7 @@ bool CommandQueueHw::waitForTimestamps(uint32_t taskCount) { using TSPacketType = typename Family::TimestampPacketType; bool waited = false; - if (isWaitForTimestampsEnabled() && !this->wasNonKernelOperationSent) { + if (isWaitForTimestampsEnabled()) { waited = waitForTimestampsWithinContainer(timestampPacketContainer.get(), getGpgpuCommandStreamReceiver()); if (isOOQEnabled()) { @@ -167,8 +167,6 @@ bool CommandQueueHw::waitForTimestamps(uint32_t taskCount) { } } - this->wasNonKernelOperationSent = false; - return waited; } diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index 536a70aed3..625d3436c0 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -259,8 +259,6 @@ void CommandQueueHw::enqueueHandler(Surface **surfacesForResidency, bool migratedMemory = false; - this->wasNonKernelOperationSent |= enqueueProperties.operation != EnqueueProperties::Operation::GpuKernel; - if (!blockQueue && multiDispatchInfo.peekMainKernel() && multiDispatchInfo.peekMainKernel()->requiresMemoryMigration()) { for (auto &arg : multiDispatchInfo.peekMainKernel()->getMemObjectsToMigrate()) { MigrationController::handleMigration(*this->context, computeCommandStreamReceiver, arg.second); diff --git a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp index 7b43d4475f..639a7406fc 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -911,48 +911,6 @@ HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishThenCallWaitUti cmdQ.reset(); } -HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitAndNonGpuKernelEnqueueWhenFinishThenDoNotCallWaitUtils) { - DebugManagerStateRestore restorer; - DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); - - device->getUltCommandStreamReceiver().timestampPacketWriteEnabled = true; - cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0}; - auto cmdQ = std::make_unique>(context, device.get(), props); - - TimestampPacketContainer *deferredTimestampPackets = cmdQ->deferredTimestampPackets.get(); - TimestampPacketContainer *timestampPacketContainer = cmdQ->timestampPacketContainer.get(); - - cmdQ->enqueueKernel(kernel->mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - cmdQ->enqueueKernel(kernel->mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - cmdQ->enqueueMarkerWithWaitList(0, nullptr, nullptr); - cmdQ->flush(); - - EXPECT_EQ(1u, deferredTimestampPackets->peekNodes().size()); - EXPECT_EQ(1u, timestampPacketContainer->peekNodes().size()); - - VariableBackup backupPauseAddress(&CpuIntrinsicsTests::pauseAddress); - VariableBackup backupPauseValue(&CpuIntrinsicsTests::pauseValue); - VariableBackup backupPauseOffset(&CpuIntrinsicsTests::pauseOffset); - VariableBackup> backupSetupPauseAddress(&CpuIntrinsicsTests::setupPauseAddress); - - deferredTimestampPackets->peekNodes()[0]->setPacketsUsed(1u); - timestampPacketContainer->peekNodes()[0]->setPacketsUsed(1u); - - CpuIntrinsicsTests::pauseAddress = reinterpret_cast(const_cast(timestampPacketContainer->peekNodes()[0]->getContextEndAddress(0u))); - CpuIntrinsicsTests::pauseValue = 2u; - CpuIntrinsicsTests::setupPauseAddress = [&]() { - CpuIntrinsicsTests::pauseAddress = reinterpret_cast(const_cast(deferredTimestampPackets->peekNodes()[0]->getContextEndAddress(0u))); - }; - CpuIntrinsicsTests::pauseCounter = 0u; - - cmdQ->finish(); - - EXPECT_EQ(0u, CpuIntrinsicsTests::pauseCounter); - - cmdQ.reset(); -} - HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEnqueueingToOoqThenMoveToDeferredList) { device->getUltCommandStreamReceiver().timestampPacketWriteEnabled = true;