mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
feature: add support for SIMD16 EU per DSS to xe-prelim helper
Related-To: NEO-12012 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4f1262645b
commit
dfbad8029b
@@ -14,6 +14,13 @@ if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger_tests.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NEO_ENABLE_XE_PRELIM_DETECTION)
|
||||
list(APPEND NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_prelim_tests.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY NEO_CORE_OS_INTERFACE_TESTS_LINUX ${NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE})
|
||||
|
||||
if(UNIX)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/xe/ioctl_helper_xe_prelim.h"
|
||||
#include "shared/source/os_interface/linux/xe/xedrm_prelim.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(IoctlHelperXePrelimTest, givenSimd16EuPerDssTypeWhenCheckingIfTopologyIsEuPerDssThenSuccessIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||
IoctlHelperXePrelim ioctlHelper{*drm};
|
||||
EXPECT_TRUE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_SIMD16_EU_PER_DSS));
|
||||
EXPECT_TRUE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_EU_PER_DSS));
|
||||
EXPECT_FALSE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_DSS_GEOMETRY));
|
||||
EXPECT_FALSE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_DSS_COMPUTE));
|
||||
}
|
||||
@@ -2398,9 +2398,12 @@ TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndIoctlReturnsN
|
||||
}
|
||||
|
||||
TEST(IoctlHelperXeTest, givenCorrectEuPerDssTypeWhenCheckingIfTopologyIsEuPerDssThenSuccessIsReturned) {
|
||||
EXPECT_TRUE(MockIoctlHelperXe::isEuPerDssTopologyType(DRM_XE_TOPO_EU_PER_DSS));
|
||||
EXPECT_FALSE(MockIoctlHelperXe::isEuPerDssTopologyType(DRM_XE_TOPO_DSS_GEOMETRY));
|
||||
EXPECT_FALSE(MockIoctlHelperXe::isEuPerDssTopologyType(DRM_XE_TOPO_DSS_COMPUTE));
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||
IoctlHelperXe ioctlHelper{*drm};
|
||||
EXPECT_TRUE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_EU_PER_DSS));
|
||||
EXPECT_FALSE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_DSS_GEOMETRY));
|
||||
EXPECT_FALSE(ioctlHelper.isEuPerDssTopologyType(DRM_XE_TOPO_DSS_COMPUTE));
|
||||
}
|
||||
|
||||
TEST(IoctlHelperXeTest, givenIoctlHelperWhenSettingExtContextThenCallExternalIoctlFunction) {
|
||||
|
||||
Reference in New Issue
Block a user