mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Revert "fix: add missing host ptr assignment increment"
This reverts commit bb86dba152.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c748fd07dc
commit
646f596057
@@ -107,7 +107,6 @@ NEO::GraphicsAllocation *CommandList::getHostPtrAlloc(const void *buffer, uint64
|
||||
return nullptr;
|
||||
}
|
||||
if (this->storeExternalPtrAsTemporary()) {
|
||||
alloc->hostPtrTaskCountAssignment++;
|
||||
this->csr->getInternalAllocationStorage()->storeAllocationWithTaskCount(std::unique_ptr<NEO::GraphicsAllocation>(alloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, this->csr->peekTaskCount());
|
||||
} else if (alloc->getAllocationType() == NEO::AllocationType::EXTERNAL_HOST_PTR) {
|
||||
hostPtrMap.insert(std::make_pair(buffer, alloc));
|
||||
|
||||
@@ -335,7 +335,6 @@ void CommandQueueImp::handleIndirectAllocationResidency(UnifiedMemoryControls un
|
||||
|
||||
void CommandQueueImp::makeResidentAndMigrate(bool performMigration, const NEO::ResidencyContainer &residencyContainer) {
|
||||
for (auto alloc : residencyContainer) {
|
||||
alloc->prepareHostPtrForResidency(csr);
|
||||
csr->makeResident(*alloc);
|
||||
if (performMigration &&
|
||||
(alloc->getAllocationType() == NEO::AllocationType::SVM_GPU ||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/relaxed_ordering_commands_helper.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
@@ -1513,7 +1512,6 @@ TEST_F(CommandListCreate, givenImmediateCommandListWhenThereIsNoEnoughSpaceForIm
|
||||
auto result = commandList->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr, false);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_EQ(1U, commandList->getCmdContainer().getCmdBufferAllocations().size());
|
||||
whiteBoxCmdList->csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, GivenGpuHangOnSynchronizingWhenCreatingImmediateCommandListAndWaitingOnEventsThenDeviceLostIsReturned, IsSKL) {
|
||||
|
||||
@@ -1489,7 +1489,6 @@ HWTEST2_F(CommandListCreateWithBcs, givenHostPtrAllocAllocAndImmediateCmdListWhe
|
||||
EXPECT_FALSE(commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().peekIsEmpty());
|
||||
EXPECT_EQ(alloc, commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().peekHead());
|
||||
EXPECT_EQ(commandList->csr->peekTaskCount(), commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().peekHead()->getTaskCount(commandList->csr->getOsContext().getContextId()));
|
||||
EXPECT_EQ(1u, commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().peekHead()->hostPtrTaskCountAssignment);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenGetAlignedAllocationWhenInternalMemWithinDifferentAllocThenReturnNewAlloc, IsAtLeastSkl) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/kernel/kernel_descriptor.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
|
||||
@@ -228,14 +227,12 @@ HWTEST2_F(CommandListTest, givenCopyCommandListWhenAppendCopyWithDependenciesThe
|
||||
eventDesc.index = 0;
|
||||
auto event = std::unique_ptr<L0::Event>(L0::Event::create<typename FamilyType::TimestampPacketType>(eventPool.get(), &eventDesc, device));
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x5678);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
auto zeEvent = event->toHandle();
|
||||
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, sizeof(uint32_t), nullptr, 1, &zeEvent, false);
|
||||
|
||||
EXPECT_EQ(device->getNEODevice()->getDefaultEngine().commandStreamReceiver->peekBarrierCount(), 0u);
|
||||
|
||||
cmdList.csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListTest, givenCopyCommandListWhenAppendCopyRegionWithDependenciesThenDoNotTrackDependencies, IsAtLeastSkl) {
|
||||
@@ -255,15 +252,13 @@ HWTEST2_F(CommandListTest, givenCopyCommandListWhenAppendCopyRegionWithDependenc
|
||||
eventDesc.index = 0;
|
||||
auto event = std::unique_ptr<L0::Event>(L0::Event::create<typename FamilyType::TimestampPacketType>(eventPool.get(), &eventDesc, device));
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x5678);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
auto zeEvent = event->toHandle();
|
||||
ze_copy_region_t region = {};
|
||||
|
||||
cmdList.appendMemoryCopyRegion(dstPtr, ®ion, 0, 0, srcPtr, ®ion, 0, 0, nullptr, 1, &zeEvent, false);
|
||||
|
||||
EXPECT_EQ(device->getNEODevice()->getDefaultEngine().commandStreamReceiver->peekBarrierCount(), 0u);
|
||||
|
||||
cmdList.csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListTest, givenCopyCommandListWhenAppendFillWithDependenciesThenDoNotTrackDependencies, IsAtLeastSkl) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
@@ -390,7 +389,6 @@ HWTEST2_F(AppendMemoryCopy, givenAsyncImmediateCommandListWhenAppendingMemoryCop
|
||||
EXPECT_EQ(0u, cmdQueue.synchronizeCalled);
|
||||
EXPECT_EQ(0u, commandList->commandContainer.getResidencyContainer().size());
|
||||
commandList->cmdQImmediate = nullptr;
|
||||
commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenAsyncImmediateCommandListWhenAppendingMemoryCopyWithCopyEngineThenProgramCmdStreamWithFlushTask, IsAtLeastSkl) {
|
||||
@@ -604,7 +602,6 @@ HWTEST2_F(AppendMemoryCopy, givenSyncModeImmediateCommandListWhenAppendingMemory
|
||||
EXPECT_EQ(1u, cmdQueue.synchronizeCalled);
|
||||
|
||||
commandList->cmdQImmediate = nullptr;
|
||||
commandList->csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyCalledThenPipeControlWithDcFlushAdded, IsAtLeastSkl) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
@@ -708,7 +707,6 @@ HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediate
|
||||
commandListImmediate->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 1, &eventHandle, false);
|
||||
|
||||
EXPECT_TRUE(ultCsr.downloadAllocationsCalled);
|
||||
ultCsr.getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(neoDevice);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediateAsyncCommandListWhenAppendMemoryCopyRegionThenExpectDownloadAllocations) {
|
||||
@@ -722,7 +720,6 @@ HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediate
|
||||
commandListImmediate->appendMemoryCopyRegion(dstPtr, &dstRegion, 0, 0, srcPtr, &srcRegion, 0, 0, nullptr, 1, &eventHandle, false);
|
||||
|
||||
EXPECT_TRUE(ultCsr.downloadAllocationsCalled);
|
||||
ultCsr.getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(neoDevice);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediateAsyncCommandListWhenAppendMemoryFillThenExpectDownloadAllocations) {
|
||||
@@ -814,7 +811,6 @@ HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediate
|
||||
commandListImmediate->appendImageCopyFromMemory(imagePtr->toHandle(), ptr, nullptr, nullptr, 1, &eventHandle, false);
|
||||
|
||||
EXPECT_TRUE(ultCsr.downloadAllocationsCalled);
|
||||
ultCsr.getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(neoDevice);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediateAsyncCommandListWhenAppendImageCopyToMemoryThenExpectDownloadAllocations) {
|
||||
@@ -840,7 +836,6 @@ HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediate
|
||||
commandListImmediate->appendImageCopyToMemory(ptr, imagePtr->toHandle(), nullptr, nullptr, 1, &eventHandle, false);
|
||||
|
||||
EXPECT_TRUE(ultCsr.downloadAllocationsCalled);
|
||||
ultCsr.getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(neoDevice);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(TbxImmediateCommandListTest, givenTbxModeOnFlushTaskImmediateAsyncCommandListWhenAppendMemoryRangesBarrierThenExpectDownloadAllocations) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/memory_manager/memory_operations_status.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
@@ -5289,8 +5288,6 @@ HWTEST2_F(MultipleDevicePeerImageTest,
|
||||
ASSERT_EQ(result, ZE_RESULT_SUCCESS);
|
||||
result = image1Dst->destroy();
|
||||
ASSERT_EQ(result, ZE_RESULT_SUCCESS);
|
||||
|
||||
static_cast<L0::ult::CommandList *>(commandList0.get())->csr->getInternalAllocationStorage()->getTemporaryAllocations().freeAllGraphicsAllocations(device0->getNEODevice());
|
||||
}
|
||||
|
||||
HWTEST2_F(MultipleDevicePeerImageTest,
|
||||
|
||||
Reference in New Issue
Block a user