Revert "L0 debug - Fix thread creation for windows DSS"

This reverts commit 3724807eed.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-10-22 13:46:45 +02:00
committed by Compute-Runtime-Automation
parent 052164c559
commit d653779098
4 changed files with 5 additions and 106 deletions

View File

@@ -32,16 +32,13 @@ void DebugSession::createEuThreads() {
bool isSubDevice = connectedDevice->getNEODevice()->isSubDevice();
auto &hwInfo = connectedDevice->getHwInfo();
const bool useDSS = (hwInfo.gtSystemInfo.MaxDualSubSlicesSupported > 0) &&
(hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxDualSubSlicesSupported) == 2
? true
: false;
const uint32_t numSubslicesPerSlice = (useDSS ? hwInfo.gtSystemInfo.MaxDualSubSlicesSupported : hwInfo.gtSystemInfo.MaxSubSlicesSupported) / hwInfo.gtSystemInfo.MaxSlicesSupported;
const uint32_t numEuPerSubslice = useDSS ? hwInfo.gtSystemInfo.MaxEuPerSubSlice * 2 : hwInfo.gtSystemInfo.MaxEuPerSubSlice;
const uint32_t numSubslicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
const uint32_t numEuPerSubslice = hwInfo.gtSystemInfo.MaxEuPerSubSlice;
const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount);
uint32_t subDeviceCount = std::max(1u, connectedDevice->getNEODevice()->getNumSubDevices());
UNRECOVERABLE_IF(isSubDevice && subDeviceCount > 1);
for (uint32_t tileIndex = 0; tileIndex < subDeviceCount; tileIndex++) {
if (isSubDevice || subDeviceCount == 1) {

View File

@@ -363,43 +363,6 @@ struct MockDebugSession : public L0::DebugSessionImp {
using DebugSessionTest = ::testing::Test;
TEST(DeviceWithDebugSessionTest, GivenDSSWhenCreatingThreadsThenAllThreadsHasCorrectValuesMapped) {
auto hwInfo = *NEO::defaultHwInfo;
hwInfo.gtSystemInfo.MaxEuPerSubSlice = 8;
hwInfo.gtSystemInfo.MaxSubSlicesSupported = 64;
hwInfo.gtSystemInfo.MaxDualSubSlicesSupported = 32;
NEO::MockDevice *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
auto sessionMock = std::make_unique<MockDebugSession>(zet_debug_config_t{0x1234}, &deviceImp);
const uint32_t numSubslicesPerSlice = hwInfo.gtSystemInfo.MaxDualSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
EXPECT_EQ(1u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice - 1, 0, 0)));
EXPECT_EQ(0u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice + 1, 0, 0)));
EXPECT_EQ(1u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice - 1, 7, 0)));
EXPECT_EQ(1u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice - 1, 15, 0)));
}
TEST(DeviceWithDebugSessionTest, GivenMaxDualSubslicesIsZeroWhenCreatingThreadsThenAllThreadsIsCorrectSize) {
auto hwInfo = *NEO::defaultHwInfo;
hwInfo.gtSystemInfo.MaxEuPerSubSlice = 8;
hwInfo.gtSystemInfo.MaxSubSlicesSupported = 64;
hwInfo.gtSystemInfo.MaxDualSubSlicesSupported = 0;
NEO::MockDevice *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
auto sessionMock = std::make_unique<MockDebugSession>(zet_debug_config_t{0x1234}, &deviceImp);
const uint32_t numSubslicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
EXPECT_EQ(1u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice - 1, 0, 0)));
EXPECT_EQ(0u, sessionMock->allThreads.count(EuThread::ThreadId(0, 0, numSubslicesPerSlice + 1, 0, 0)));
}
TEST(DeviceWithDebugSessionTest, GivenDeviceWithDebugSessionWhenCallingReleaseResourcesThenCloseConnectionIsCalled) {
ze_result_t returnValue = ZE_RESULT_SUCCESS;
std::unique_ptr<DriverHandleImp> driverHandle(new DriverHandleImp);