mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Revert "feature: support SVM heap in reserveVirtualMem"
This reverts commit 93cde3ee12.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
37b7caa137
commit
99f62ac866
@@ -131,17 +131,6 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
|
||||
return OsAgnosticMemoryManager::reserveCpuAddressRange(size, rootDeviceIndex);
|
||||
}
|
||||
|
||||
AddressRange reserveCpuAddress(const uint64_t requiredStartAddress, size_t size) override {
|
||||
if (failReserveAddress) {
|
||||
return {};
|
||||
}
|
||||
return OsAgnosticMemoryManager::reserveCpuAddress(requiredStartAddress, size);
|
||||
}
|
||||
|
||||
void freeCpuAddress(AddressRange addressRange) override {
|
||||
return OsAgnosticMemoryManager::freeCpuAddress(addressRange);
|
||||
}
|
||||
|
||||
void *createMultiGraphicsAllocationInSystemMemoryPool(RootDeviceIndicesContainer &rootDeviceIndices,
|
||||
AllocationProperties &properties,
|
||||
MultiGraphicsAllocation &multiGraphicsAllocation) override {
|
||||
|
||||
@@ -530,8 +530,6 @@ TEST_F(DeviceGetCapsTest, givenFlagEnabled64kbPagesWhenCallConstructorMemoryMana
|
||||
return MemoryConstants::pageSize64k;
|
||||
}
|
||||
void freeGpuAddress(AddressRange addressRange, uint32_t rootDeviceIndex) override{};
|
||||
AddressRange reserveCpuAddress(const uint64_t requiredStartAddress, size_t size) override { return {}; }
|
||||
void freeCpuAddress(AddressRange addressRange) override{};
|
||||
GraphicsAllocation *createGraphicsAllocation(OsHandleStorage &handleStorage, const AllocationData &allocationData) override { return nullptr; };
|
||||
GraphicsAllocation *allocateGraphicsMemoryForNonSvmHostPtr(const AllocationData &allocationData) override { return nullptr; };
|
||||
GraphicsAllocation *allocateGraphicsMemoryWithAlignment(const AllocationData &allocationData) override { return nullptr; };
|
||||
|
||||
@@ -1909,16 +1909,6 @@ TEST(OsAgnosticMemoryManager, givenOsAgnosticMemoryManagerWithFlagEnable64kbpage
|
||||
EXPECT_FALSE(memoryManager.is64kbPagesEnabled(&hwInfo));
|
||||
}
|
||||
|
||||
TEST(OsAgnosticMemoryManager, givenStartAddressAndSizeWhenReservingCpuAddressThenPageAlignedAddressRangeIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
OsAgnosticMemoryManager memoryManager(executionEnvironment);
|
||||
auto addressRange = memoryManager.reserveCpuAddress(0, 1234);
|
||||
EXPECT_NE(0u, addressRange.address);
|
||||
EXPECT_EQ(1234u, addressRange.size);
|
||||
EXPECT_EQ(0u, addressRange.address & (MemoryConstants::pageSize - 1));
|
||||
memoryManager.freeCpuAddress(addressRange);
|
||||
}
|
||||
|
||||
TEST(MemoryManager, givenSharedResourceCopyWhenAllocatingGraphicsMemoryThenAllocateGraphicsMemoryForImageIsCalled) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
MockMemoryManager memoryManager(false, true, executionEnvironment);
|
||||
@@ -3237,4 +3227,4 @@ TEST(MemoryManagerTest, givenIsCompressionSupportedForShareableThenReturnTrue) {
|
||||
MockMemoryManager memoryManager;
|
||||
EXPECT_TRUE(memoryManager.isCompressionSupportedForShareable(true));
|
||||
EXPECT_TRUE(memoryManager.isCompressionSupportedForShareable(false));
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "shared/source/os_interface/linux/drm_memory_operations_handler.h"
|
||||
#include "shared/source/os_interface/linux/i915.h"
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
#include "shared/test/common/fixtures/memory_allocator_multi_device_fixture.h"
|
||||
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/mocks/linux/mock_drm_allocation.h"
|
||||
@@ -45,12 +46,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
namespace SysCalls {
|
||||
extern bool failMmap;
|
||||
} // namespace SysCalls
|
||||
} // namespace NEO
|
||||
|
||||
namespace {
|
||||
using DrmMemoryManagerTest = Test<DrmMemoryManagerFixture>;
|
||||
using DrmMemoryManagerWithLocalMemoryTest = Test<DrmMemoryManagerWithLocalMemoryFixture>;
|
||||
@@ -7712,31 +7707,6 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDrmMemoryManagerWhenGp
|
||||
memoryManager->freeGpuAddress(addressRange, 1);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDrmMemoryManagerWhenCpuAddressReservationIsAttemptedThenCorrectAddressRangesAreReturned) {
|
||||
auto memoryManager = std::make_unique<TestedDrmMemoryManager>(false, true, false, *executionEnvironment);
|
||||
RootDeviceIndicesContainer rootDeviceIndices;
|
||||
rootDeviceIndices.pushUnique(1);
|
||||
|
||||
auto addressRange = memoryManager->reserveCpuAddress(0, 0);
|
||||
EXPECT_EQ(0u, addressRange.address);
|
||||
EXPECT_EQ(0u, addressRange.size);
|
||||
|
||||
addressRange = memoryManager->reserveCpuAddress(0, MemoryConstants::pageSize);
|
||||
EXPECT_NE(0u, addressRange.address);
|
||||
EXPECT_EQ(MemoryConstants::pageSize, addressRange.size);
|
||||
memoryManager->freeCpuAddress(addressRange);
|
||||
|
||||
addressRange = memoryManager->reserveCpuAddress(MemoryConstants::pageSize * 1234, MemoryConstants::pageSize);
|
||||
EXPECT_NE(0u, addressRange.address);
|
||||
EXPECT_EQ(MemoryConstants::pageSize, addressRange.size);
|
||||
memoryManager->freeCpuAddress(addressRange);
|
||||
|
||||
VariableBackup<bool> backup(&SysCalls::failMmap, true);
|
||||
addressRange = memoryManager->reserveCpuAddress(0, 0);
|
||||
EXPECT_EQ(0u, addressRange.address);
|
||||
EXPECT_EQ(0u, addressRange.size);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerTest, given57bAddressSpaceCpuAndGpuWhenAllocatingHostUSMThenAddressFromExtendedHeapIsPassedAsHintAndSetAsGpuAddressAndReservedAddress) {
|
||||
if (defaultHwInfo->capabilityTable.gpuAddressSpace < maxNBitValue(57)) {
|
||||
GTEST_SKIP();
|
||||
|
||||
@@ -1317,13 +1317,6 @@ TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenGpuAddressIsReserv
|
||||
memoryManager->freeGpuAddress(addressRange, 0);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenCpuAddressIsReservedAndFreedThenAddressRangeIsNonZero) {
|
||||
auto addressRange = memoryManager->reserveCpuAddress(0, 1234);
|
||||
EXPECT_NE(0u, addressRange.address);
|
||||
EXPECT_EQ(1234u, addressRange.size);
|
||||
memoryManager->freeCpuAddress(addressRange);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenAllocatingWithGpuVaThenNullptrIsReturned) {
|
||||
AllocationData allocationData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user