mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
refactor: move eu per dss topology type detection to separate file
Related-To: NEO-12012 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0f310036a0
commit
3e96dcf969
@@ -11,6 +11,7 @@ set(NEO_CORE_OS_INTERFACE_LINUX_XE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ioctl_helper_xe_perf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ioctl_helper_xe_eu_dss.cpp
|
||||
)
|
||||
|
||||
if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT)
|
||||
|
||||
@@ -542,11 +542,12 @@ bool IoctlHelperXe::getTopologyDataAndMap(const HardwareInfo &hwInfo, DrmQueryTo
|
||||
fillMask(computeDss[tileId], topo);
|
||||
receivedDssInfo = true;
|
||||
break;
|
||||
case DRM_XE_TOPO_EU_PER_DSS:
|
||||
fillMask(euDss[tileId], topo);
|
||||
break;
|
||||
default:
|
||||
xeLog("Unhandle GT Topo type: %d\n", topo->type);
|
||||
if (isEuPerDssTopologyType(topo->type)) {
|
||||
fillMask(euDss[tileId], topo);
|
||||
} else {
|
||||
xeLog("Unhandle GT Topo type: %d\n", topo->type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,6 +174,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
uint16_t revision;
|
||||
};
|
||||
bool queryHwIpVersion(GtIpVersion >IpVersion);
|
||||
static bool isEuPerDssTopologyType(uint16_t topologyType);
|
||||
|
||||
int maxExecQueuePriority = 0;
|
||||
std::mutex xeLock;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/xe/ioctl_helper_xe.h"
|
||||
#include "shared/source/os_interface/linux/xe/xedrm.h"
|
||||
namespace NEO {
|
||||
|
||||
bool IoctlHelperXe::isEuPerDssTopologyType(uint16_t topologyType) {
|
||||
return topologyType == DRM_XE_TOPO_EU_PER_DSS;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -2396,3 +2396,9 @@ TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndIoctlReturnsN
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ struct MockIoctlHelperXe : IoctlHelperXe {
|
||||
using IoctlHelperXe::getFdFromVmExport;
|
||||
using IoctlHelperXe::ioctl;
|
||||
using IoctlHelperXe::IoctlHelperXe;
|
||||
using IoctlHelperXe::isEuPerDssTopologyType;
|
||||
using IoctlHelperXe::maxContextSetProperties;
|
||||
using IoctlHelperXe::maxExecQueuePriority;
|
||||
using IoctlHelperXe::queryGtListData;
|
||||
|
||||
Reference in New Issue
Block a user