Change default revision for xe_hp_sdv

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-10-25 16:22:35 +00:00
committed by Compute-Runtime-Automation
parent 5869948389
commit 0cde8eb7ff
20 changed files with 93 additions and 211 deletions

View File

@ -208,7 +208,7 @@ endif()
if(SUPPORT_XE_HP_CORE)
SET_FLAGS_FOR("XE_HP_CORE")
set(CORE_XE_HP_CORE_REVISIONS 0)
set(CORE_XE_HP_CORE_REVISIONS 4)
if(TESTS_XE_HP_CORE)
if(TESTS_XE_HP_SDV)
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "XE_HP_CORE" "XeHpFamily")

View File

@ -20,7 +20,7 @@ components:
infra:
branch: master
dest_dir: infra
revision: a3577a9aeb5fcc4b825ceaa521631aa676931512
revision: 493155e4b2e3df7e81ced35f1d29c5fa9dc29db4
type: git
internal:
branch: master

View File

@ -705,7 +705,7 @@ TEST_F(PerformanceHintTest, givenUncompressedBufferWhenItsCreatedThenProperPerfo
}
snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[BUFFER_IS_NOT_COMPRESSED], buffer.get());
if (isCompressed) {
if (isCompressed || is32bit) {
Buffer::provideCompressionHint(GraphicsAllocation::AllocationType::BUFFER, context.get(), buffer.get());
}
EXPECT_TRUE(containsHint(expectedHint, userData));

View File

@ -23,7 +23,7 @@ struct GetDeviceInfoMemCapabilitiesTest : ::testing::Test {
void check(std::vector<TestParams> &params) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
for (auto param : params) {
for (auto &param : params) {
cl_unified_shared_memory_capabilities_intel unifiedSharedMemoryCapabilities{};
size_t paramRetSize;

View File

@ -1221,7 +1221,7 @@ TEST_F(HwHelperTest, whenFtrGpGpuMidThreadLevelPreemptFeatureDisabledThenFalseIs
EXPECT_FALSE(result);
}
TEST_F(HwHelperTest, whenGettingDefaultRevisionIdThenCorrectValueIsReturned) {
HWTEST_F(HwHelperTest, whenGettingDefaultRevisionIdThenCorrectValueIsReturned) {
auto &hwHelper = HwHelper::get(renderCoreFamily);
auto revisionId = hwHelper.getDefaultRevisionId(*defaultHwInfo);
if ((defaultHwInfo->platform.eRenderCoreFamily == IGFX_GEN9_CORE) &&

View File

@ -364,19 +364,27 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, WhenIsPipeControlWArequir
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, whenGettingPreferenceForSmallKernelsThenCertainThresholdIsTested) {
DebugManagerStateRestore restorer;
auto &hwInfo = pDevice->getHardwareInfo();
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(512u, this->pClDevice->getHardwareInfo()));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(10000u, this->pClDevice->getHardwareInfo()));
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(2047u, this->pClDevice->getHardwareInfo()));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(2048u, this->pClDevice->getHardwareInfo()));
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->getSteppingFromHwRevId(hwInfo) >= REVISION_B) {
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(512u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(10000u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(2047u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(2048u, hwInfo));
} else {
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(512u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(10000u, hwInfo));
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(2047u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(2048u, hwInfo));
DebugManager.flags.OverrideKernelSizeLimitForSmallDispatch.set(1u);
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(1u, this->pClDevice->getHardwareInfo()));
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(0u, this->pClDevice->getHardwareInfo()));
DebugManager.flags.OverrideKernelSizeLimitForSmallDispatch.set(1u);
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(1u, hwInfo));
EXPECT_TRUE(helper.preferSmallWorkgroupSizeForKernel(0u, hwInfo));
DebugManager.flags.OverrideKernelSizeLimitForSmallDispatch.set(0u);
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(1u, this->pClDevice->getHardwareInfo()));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(0u, this->pClDevice->getHardwareInfo()));
DebugManager.flags.OverrideKernelSizeLimitForSmallDispatch.set(0u);
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(1u, hwInfo));
EXPECT_FALSE(helper.preferSmallWorkgroupSizeForKernel(0u, hwInfo));
}
}
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenHwHelperWhenGettingBindlessSurfaceExtendedMessageDescriptorValueThenCorrectValueIsReturned) {

View File

@ -33,12 +33,5 @@ if(UNIX)
list(APPEND IGDRCL_SRCS_tests_memory_manager ${NEO_CORE_PAGE_FAULT_MANAGER_LINUX_TESTS})
endif()
if(TESTS_XEHP_AND_LATER)
list(APPEND IGDRCL_SRCS_tests_memory_manager
${CMAKE_CURRENT_SOURCE_DIR}/memory_manager_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/memory_manager_tests_xehp_and_later.h
)
endif()
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_memory_manager})
add_subdirectories()

View File

@ -713,6 +713,40 @@ HWTEST_F(GetAllocationDataTestHw, givenInternalHeapTypeWhenGetAllocationDataIsCa
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
HWTEST_F(GetAllocationDataTestHw, givenGpuTimestampDeviceBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::GPU_TIMESTAMP_DEVICE_BUFFER, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
HWTEST_F(GetAllocationDataTestHw, givenPrintfAllocationWhenGetAllocationDataIsCalledThenDontForceSystemMemoryAndRequireCpuAccess) {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::GPU_TIMESTAMP_DEVICE_BUFFER, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
HWTEST_F(GetAllocationDataTestHw, givenLinearStreamAllocationWhenGetAllocationDataIsCalledThenDontForceSystemMemoryAndRequireCpuAccess) {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::LINEAR_STREAM, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
HWTEST_F(GetAllocationDataTestHw, givenConstantSurfaceAllocationWhenGetAllocationDataIsCalledThenDontForceSystemMemoryAndRequireCpuAccess) {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::CONSTANT_SURFACE, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
HWTEST_F(GetAllocationDataTestHw, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
AllocationData allocData;
MockMemoryManager mockMemoryManager;

View File

@ -1,116 +0,0 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h"
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "test.h"
using namespace NEO;
void givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInSystemPoolThenLocalMemoryPoolIsUsed() {
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
MockMemoryManager memoryManager(false, true, executionEnvironment);
auto allocation = memoryManager.allocateGraphicsMemoryInPreferredPool({mockRootDeviceIndex, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::LINEAR_STREAM, mockDeviceBitfield}, nullptr);
EXPECT_NE(MemoryPool::LocalMemory, allocation->getMemoryPool());
EXPECT_FALSE(memoryManager.allocationInDevicePoolCreated);
memoryManager.freeGraphicsMemory(allocation);
}
void givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::LINEAR_STREAM, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
void givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::LINEAR_STREAM, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
void givenEnabledLocalMemoryWhenAllocateInternalHeapInSystemPoolThenLocalMemoryPoolIsNotUsed() {
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
MockMemoryManager memoryManager(false, true, executionEnvironment);
auto allocation = memoryManager.allocateGraphicsMemoryInPreferredPool({mockRootDeviceIndex, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::KERNEL_ISA, mockDeviceBitfield}, nullptr);
EXPECT_NE(MemoryPool::LocalMemory, allocation->getMemoryPool());
EXPECT_FALSE(memoryManager.allocationInDevicePoolCreated);
memoryManager.freeGraphicsMemory(allocation);
}
void givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::KERNEL_ISA, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
}
void givenRingBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{0, 0x10000u, GraphicsAllocation::AllocationType::RING_BUFFER, 1};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.allocateMemory);
EXPECT_FALSE(allocData.flags.allow32Bit);
EXPECT_FALSE(allocData.flags.allow64kbPages);
EXPECT_EQ(0x10000u, allocData.size);
EXPECT_EQ(nullptr, allocData.hostPtr);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
void givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{0, 0x1000u, GraphicsAllocation::AllocationType::SEMAPHORE_BUFFER, 1};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.allocateMemory);
EXPECT_FALSE(allocData.flags.allow32Bit);
EXPECT_FALSE(allocData.flags.allow64kbPages);
EXPECT_EQ(0x1000u, allocData.size);
EXPECT_EQ(nullptr, allocData.hostPtr);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
void givenConstantSurfaceTypeWhenGetAllocationDataIsCalledThenLocalMemoryIsRequestedWithoutCpuAccess() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::CONSTANT_SURFACE, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_FALSE(allocData.flags.requiresCpuAccess);
}
void givenPrintfAllocationWhenGetAllocationDataIsCalledThenUseSystemMemoryAndRequireCpuAccess() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::PRINTF_SURFACE, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
void givenGpuTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested() {
AllocationData allocData;
MockMemoryManager mockMemoryManager;
AllocationProperties properties{mockRootDeviceIndex, 1, GraphicsAllocation::AllocationType::GPU_TIMESTAMP_DEVICE_BUFFER, mockDeviceBitfield};
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
EXPECT_TRUE(allocData.flags.useSystemMemory);
}

View File

@ -1,19 +0,0 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
void givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInSystemPoolThenLocalMemoryPoolIsUsed();
void givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
void givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
void givenEnabledLocalMemoryWhenAllocateInternalHeapInSystemPoolThenLocalMemoryPoolIsNotUsed();
void givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
void givenRingBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet();
void givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet();
void givenConstantSurfaceTypeWhenGetAllocationDataIsCalledThenLocalMemoryIsRequestedWithoutCpuAccess();
void givenPrintfAllocationWhenGetAllocationDataIsCalledThenUseSystemMemoryAndRequireCpuAccess();
void givenGpuTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();

View File

@ -16,3 +16,4 @@ HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfExtraParame
HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramPipeControlPriorToNonPipelinedStateCommandDebugKeyAndStateSipWhenItIsRequiredThenThereIsPipeControlPriorToIt, IGFX_XE_HP_CORE);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned, IGFX_XE_HP_CORE);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfBlitterForImagesIsSupportedThenFalseIsReturned, IGFX_XE_HP_CORE);
HWTEST_EXCLUDE_PRODUCT(HwHelperTest, whenGettingDefaultRevisionIdThenCorrectValueIsReturned, IGFX_XE_HP_CORE);

View File

@ -308,3 +308,7 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenXeHpCoreHelperWhenCheckDirectSubm
XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
EXPECT_EQ(ClHwHelperMock::makeDeviceIpVersion(12, 5, 1), ClHwHelper::get(renderCoreFamily).getDeviceIpVersion(*defaultHwInfo));
}
XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, whenGettingDefaultRevisionThenB0IsReturned) {
EXPECT_EQ(HwInfoConfigHw<IGFX_XE_HP_SDV>::get()->getHwRevIdFromStepping(REVISION_B, *defaultHwInfo), HwHelperHw<FamilyType>::get().getDefaultRevisionId(*defaultHwInfo));
}

View File

@ -26,6 +26,6 @@ if(TESTS_XE_HP_SDV)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_xe_hp_core_xehp})
add_subdirectories()
neo_copy_test_files_with_revision(copy_test_files_xe_hp_sdv_0 xe_hp_sdv 0)
add_dependencies(copy_test_files_per_product copy_test_files_xe_hp_sdv_0)
neo_copy_test_files_with_revision(copy_test_files_xe_hp_sdv_4 xe_hp_sdv 4)
add_dependencies(copy_test_files_per_product copy_test_files_xe_hp_sdv_4)
endif()

View File

@ -42,7 +42,10 @@ XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenDebugVariableIsEnabledThenUsmH
check(params);
}
XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenDebugVariableIsDisabledThenUsmHostMemSupportIsDisabled) {
XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenA0AndDebugVariableIsDisabledThenUsmHostMemSupportIsDisabled) {
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
defaultHwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, *defaultHwInfo);
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.EnableHostUsmSupport.set(0);
std::vector<TestParams> params = {{CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, 0}};
@ -61,8 +64,8 @@ XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenDebugVariableIsDisabledThenUsm
}
XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenB0ThenUsmHostMemSupportIsSetCorrectly) {
auto steppingSave = defaultHwInfo->platform.usRevId;
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
defaultHwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, *defaultHwInfo);
std::vector<TestParams> params = {{CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL}};
std::vector<TestParams> disabledParameters = {{CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, 0u}};
@ -80,6 +83,4 @@ XEHPTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenB0ThenUsmHostMemSupportIsSetCo
DebugManager.flags.EnableHostUsmSupport.set(1);
check(params);
}
defaultHwInfo->platform.usRevId = steppingSave;
}

View File

@ -5,7 +5,10 @@
*
*/
#include "opencl/test/unit_test/memory_manager/memory_manager_tests_xehp_and_later.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h"
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "test.h"
using namespace NEO;
@ -14,51 +17,15 @@ HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateIn
HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateKernelIsaInDevicePoolThenLocalMemoryPoolIsUsed, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateInternalHeapInDevicePoolThenLocalMemoryPoolIsUsed, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInDevicePoolThenLocalMemoryPoolIsUsed, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenInternalHeapTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenRingBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet, IGFX_XE_HP_SDV);
HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenPrintfAllocationWhenGetAllocationDataIsCalledThenDontUseSystemMemoryAndRequireCpuAccess, IGFX_XE_HP_SDV);
using MemoryManagerTestsXeHP = ::testing::Test;
XEHPTEST_F(MemoryManagerTestsXeHP, givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInSystemPoolThenLocalMemoryPoolIsUsed) {
givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInSystemPoolThenLocalMemoryPoolIsUsed();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInPreferredPoolThenLocalMemoryPoolIsUsed) {
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
MockMemoryManager memoryManager(false, true, executionEnvironment);
XEHPTEST_F(MemoryManagerTestsXeHP, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
}
auto allocation = memoryManager.allocateGraphicsMemoryInPreferredPool({mockRootDeviceIndex, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::LINEAR_STREAM, mockDeviceBitfield}, nullptr);
EXPECT_EQ(MemoryPool::LocalMemory, allocation->getMemoryPool());
EXPECT_TRUE(memoryManager.allocationInDevicePoolCreated);
XEHPTEST_F(MemoryManagerTestsXeHP, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenEnabledLocalMemoryWhenAllocateInternalHeapInSystemPoolThenLocalMemoryPoolIsNotUsed) {
givenEnabledLocalMemoryWhenAllocateInternalHeapInSystemPoolThenLocalMemoryPoolIsNotUsed();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenRingBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet) {
givenRingBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet) {
givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenConstantSurfaceTypeWhenGetAllocationDataIsCalledThenLocalMemoryIsRequestedWithoutCpuAccess) {
givenConstantSurfaceTypeWhenGetAllocationDataIsCalledThenLocalMemoryIsRequestedWithoutCpuAccess();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenPrintfAllocationWhenGetAllocationDataIsCalledThenUseSystemMemoryAndRequireCpuAccess) {
givenPrintfAllocationWhenGetAllocationDataIsCalledThenUseSystemMemoryAndRequireCpuAccess();
}
XEHPTEST_F(MemoryManagerTestsXeHP, givenGpuTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
givenGpuTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested();
memoryManager.freeGraphicsMemory(allocation);
}

View File

@ -108,6 +108,7 @@ XEHPTEST_F(XeHPHwHelperTest, givenXeHPMultiConfigWhenAllowRenderCompressionIsCal
XEHPTEST_F(XeHPHwInfoConfig, givenHwInfoConfigWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hwInfo);
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);

View File

@ -99,7 +99,7 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, givenXeHPAndForceWorkgroupSize1x1x1Flag
EXPECT_NE(1u, expectedLws.x * expectedLws.y * expectedLws.z);
}
}
XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAndThereAreNoImageBarriersAndSlmThenSmallWorkgorupSizeIsSelected) {
XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpA0WhenKernelIsaIsBelowThresholdAndThereAreNoImageBarriersAndSlmThenSmallWorkgorupSizeIsSelected) {
auto program = std::make_unique<MockProgram>(toClDeviceVector(*pClDevice));
MockKernelWithInternals mockKernel(*pClDevice);
@ -114,6 +114,9 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn
auto maxWgSize = pClDevice->getSharedDeviceInfo().maxWorkGroupSize;
auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hwInfo);
{
auto expectedLws = computeWorkgroupSize(dispatchInfo);
EXPECT_EQ(64u, expectedLws.x * expectedLws.y * expectedLws.z);
@ -139,7 +142,7 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn
mockKernel.kernelInfo.kernelDescriptor.kernelAttributes.barrierCount = 0u;
//on B0 algorithm is disabled
pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->platform.usRevId = REVISION_B;
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);
{
auto expectedLws = computeWorkgroupSize(dispatchInfo);
EXPECT_EQ(maxWgSize, expectedLws.x * expectedLws.y * expectedLws.z);

View File

@ -167,6 +167,11 @@ bool HwHelperHw<Family>::additionalPipeControlArgsRequired() const {
return false;
}
template <>
uint32_t HwHelperHw<Family>::getDefaultRevisionId(const HardwareInfo &hwInfo) const {
return HwInfoConfig::get(hwInfo.platform.eProductFamily)->getHwRevIdFromStepping(REVISION_B, hwInfo);
}
template class HwHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>;

View File

@ -28,7 +28,7 @@ const PLATFORM XE_HP_SDV::platform = {
IGFX_XE_HP_CORE,
PLATFORM_NONE, // default init
0, // usDeviceID
0, // usRevId. 0 sets the stepping to A0
4, // usRevId. 0 sets the stepping to A0
0, // usDeviceID_PCH
0, // usRevId_PCH
GTTYPE_UNDEFINED};

View File

@ -5,6 +5,6 @@
#
if(TESTS_XE_HP_SDV)
set(unit_test_config "xe_hp_sdv/2/4/5/0") # non-zero values for unit tests
set(unit_test_config "xe_hp_sdv/2/4/5/4") # non-zero values for unit tests
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
endif()