diff --git a/shared/source/device/device.cpp b/shared/source/device/device.cpp index 32f256f8e6..862eebf345 100644 --- a/shared/source/device/device.cpp +++ b/shared/source/device/device.cpp @@ -182,8 +182,7 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa defaultEngineIndex = deviceCsrIndex; } - bool debuggingEnabled = getDebugger() != nullptr || isDebuggerActive(); - if ((preemptionMode == PreemptionMode::MidThread || debuggingEnabled) && !commandStreamReceiver->createPreemptionAllocation()) { + if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) { return false; } diff --git a/shared/test/unit_test/preemption/preemption_tests.cpp b/shared/test/unit_test/preemption/preemption_tests.cpp index be9eb0d239..8d7c742c5b 100644 --- a/shared/test/unit_test/preemption/preemption_tests.cpp +++ b/shared/test/unit_test/preemption/preemption_tests.cpp @@ -238,38 +238,6 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenCsrBaseAddressIsNotProgrammed EXPECT_EQ(0u, cmdStream.getUsed()); } -HWTEST_P(PreemptionTest, whenFailToCreatePreemptionAllocationThenFailToCreateDevice) { - - class MockUltCsr : public UltCommandStreamReceiver { - - public: - MockUltCsr(ExecutionEnvironment &executionEnvironment, const DeviceBitfield deviceBitfield) - : UltCommandStreamReceiver(executionEnvironment, 0, deviceBitfield) { - } - - bool createPreemptionAllocation() override { - return false; - } - }; - - class MockDeviceReturnedDebuggerActive : public MockDevice { - public: - MockDeviceReturnedDebuggerActive(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex) - : MockDevice(executionEnvironment, deviceIndex) {} - bool isDebuggerActive() const override { - return true; - } - std::unique_ptr createCommandStreamReceiver() const override { - return std::make_unique(*executionEnvironment, getDeviceBitfield()); - } - }; - - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - - std::unique_ptr mockDevice(MockDevice::create(executionEnvironment, 0)); - EXPECT_EQ(nullptr, mockDevice); -} - INSTANTIATE_TEST_CASE_P( NonMidThread, PreemptionTest,