Skip to content

Commit 8abbc69

Browse files
Revert "Fix update residency task count for all submited allocations"
This reverts commit 2565223a05e410a9113dbf69dd92f68d98578329. Signed-off-by: Maciej Plewka <[email protected]>
1 parent ddf75b8 commit 8abbc69

File tree

4 files changed

+0
-48
lines changed

4 files changed

+0
-48
lines changed

level_zero/core/source/cmdqueue/cmdqueue.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ void CommandQueueImp::submitBatchBuffer(size_t offset, NEO::ResidencyContainer &
6262
NEO::QueueThrottle::HIGH, NEO::QueueSliceCount::defaultSliceCount,
6363
commandStream->getUsed(), commandStream, endingCmdPtr, false);
6464

65-
for (auto &surface : residencyContainer) {
66-
csr->makeResident(*surface);
67-
}
6865
csr->submitBatchBuffer(batchBuffer, residencyContainer);
6966
buffers.setCurrentFlushStamp(csr->obtainCurrentFlushStamp());
7067
}

level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ struct WhiteBox<::L0::CommandQueue> : public ::L0::CommandQueueImp {
2525
using BaseClass::device;
2626
using BaseClass::preemptionCmdSyncProgramming;
2727
using BaseClass::printfFunctionContainer;
28-
using BaseClass::submitBatchBuffer;
2928
using BaseClass::synchronizeByPollingForTaskCount;
3029
using CommandQueue::commandQueuePreemptionMode;
3130
using CommandQueue::internalUsage;

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
#include "shared/source/command_stream/scratch_space_controller_base.h"
9-
#include "shared/source/execution_environment/execution_environment.h"
109
#include "shared/source/gmm_helper/gmm.h"
1110
#include "shared/source/gmm_helper/gmm_helper.h"
1211
#include "shared/source/helpers/state_base_address.h"
@@ -218,45 +217,6 @@ HWTEST_F(CommandQueueCreate, given100CmdListsWhenExecutingThenCommandStreamIsNot
218217
commandQueue->destroy();
219218
}
220219

221-
HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenSubmitBatchBufferCalledThenMakeResidentWasCalled) {
222-
auto csr = std::make_unique<MockCommandStreamReceiver>(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
223-
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
224-
const ze_command_queue_desc_t desc = {};
225-
ze_result_t returnValue;
226-
auto commandQueue = whitebox_cast(CommandQueue::create(productFamily,
227-
device,
228-
csr.get(),
229-
&desc,
230-
false,
231-
false,
232-
returnValue));
233-
ResidencyContainer container;
234-
MockGraphicsAllocation mockGA1, mockGA2;
235-
container.push_back(&mockGA1);
236-
container.push_back(&mockGA2);
237-
commandQueue->submitBatchBuffer(0, container, nullptr);
238-
EXPECT_EQ(csr->makeResidentCalledTimes, container.size());
239-
commandQueue->destroy();
240-
}
241-
242-
HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainerIsEmptyThenMakeResidentWasNotCalled) {
243-
auto csr = std::make_unique<MockCommandStreamReceiver>(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
244-
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
245-
const ze_command_queue_desc_t desc = {};
246-
ze_result_t returnValue;
247-
auto commandQueue = whitebox_cast(CommandQueue::create(productFamily,
248-
device,
249-
csr.get(),
250-
&desc,
251-
false,
252-
false,
253-
returnValue));
254-
ResidencyContainer container;
255-
commandQueue->submitBatchBuffer(0, container, nullptr);
256-
EXPECT_EQ(csr->makeResidentCalledTimes, 0u);
257-
commandQueue->destroy();
258-
}
259-
260220
TEST_F(CommandQueueCreate, whenCommandQueueCreatedThenExpectLinearStreamInitializedWithExpectedSize) {
261221
const ze_command_queue_desc_t desc = {};
262222
ze_result_t returnValue;

shared/test/common/mocks/mock_command_stream_receiver.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,13 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
111111
}
112112

113113
GraphicsAllocation *getClearColorAllocation() override { return nullptr; }
114-
void makeResident(GraphicsAllocation &gfxAllocation) override {
115-
makeResidentCalledTimes++;
116-
}
117114

118115
void postInitFlagsSetup() override {}
119116

120117
std::vector<char> instructionHeapReserveredData;
121118
int *flushBatchedSubmissionsCallCounter = nullptr;
122119
uint32_t waitForCompletionWithTimeoutCalled = 0;
123120
uint32_t mockTagAddress = 0;
124-
uint32_t makeResidentCalledTimes = 0;
125121
bool multiOsContextCapable = false;
126122
bool memoryCompressionEnabled = false;
127123
bool downloadAllocationsCalled = false;

0 commit comments

Comments
 (0)