Remove default support for DCD

Related-To: NEO-7213
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-04-18 22:35:59 +00:00
committed by Compute-Runtime-Automation
parent 21ac5f2835
commit a3e923e359
56 changed files with 377 additions and 212 deletions

View File

@@ -25,12 +25,19 @@ namespace L0 {
namespace ult {
void DeviceFixture::setUp() {
auto executionEnvironment = MockDevice::prepareExecutionEnvironment(NEO::defaultHwInfo.get(), 0u);
hardwareInfo = defaultHwInfo.get();
setUpImpl(hardwareInfo);
}
void DeviceFixture::setUpImpl(NEO::HardwareInfo *hwInfo) {
hardwareInfo = hwInfo;
auto executionEnvironment = MockDevice::prepareExecutionEnvironment(hardwareInfo, 0u);
setupWithExecutionEnvironment(*executionEnvironment);
}
void DeviceFixture::setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment) {
execEnv = &executionEnvironment;
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), &executionEnvironment, 0u);
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(hardwareInfo == nullptr ? defaultHwInfo.get() : hardwareInfo, &executionEnvironment, 0u);
mockBuiltIns = new MockBuiltins();
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns);
NEO::DeviceVector devices;

View File

@@ -34,6 +34,7 @@ class MockBuiltins;
struct DeviceFixture {
void setUp();
void setUpImpl(NEO::HardwareInfo *hwInfo);
void tearDown();
void setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment);
@@ -43,6 +44,7 @@ struct DeviceFixture {
L0::ContextImp *context = nullptr;
MockBuiltins *mockBuiltIns = nullptr;
NEO::ExecutionEnvironment *execEnv = nullptr;
HardwareInfo *hardwareInfo = nullptr;
template <typename HelperType>
HelperType &getHelper() const;

View File

@@ -2553,10 +2553,22 @@ HWTEST_F(ModuleTranslationUnitTest, WithNoCompilerWhenCallingStaticLinkSpirVThen
Os::frontEndDllName = oldFclDllName;
}
HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError) {
if (false == device->getHwInfo().capabilityTable.debuggerSupported) {
GTEST_SKIP();
class ModuleTranslationUnitDebuggerSupportedTest : public ModuleTranslationUnitTest {
public:
void SetUp() override {
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
hwInfo.capabilityTable.debuggerSupported = true;
DeviceFixture::setUpImpl(&hwInfo);
}
void TearDown() override {
DeviceFixture::tearDown();
}
DebugManagerStateRestore restorer;
};
HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError, HasSourceLevelDebuggerSupport) {
ZebinTestData::ValidEmptyProgram<> zebin;
const auto &hwInfo = device->getNEODevice()->getHardwareInfo();
zebin.elfHeader->machine = hwInfo.platform.eProductFamily;
@@ -2688,12 +2700,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenForceToStatelessRequiredWhenBuildingMod
}
}
HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) {
if (device->getHwInfo().capabilityTable.debuggerSupported == false) {
GTEST_SKIP();
}
HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) {
auto mockCompilerInterface = new MockCompilerInterface;
neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger);
auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()];
@@ -2707,12 +2714,7 @@ HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuild
EXPECT_EQ(result, ZE_RESULT_ERROR_MODULE_BUILD_FAILURE);
}
HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) {
if (device->getHwInfo().capabilityTable.debuggerSupported == false) {
GTEST_SKIP();
}
HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) {
auto mockCompilerInterface = new MockCompilerInterface;
neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger);
auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()];
@@ -2747,12 +2749,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenEnableZebinBuildOptionWhenBuildWithSpir
EXPECT_EQ(mockCompilerInterface->inputInternalOptions.find(NEO::CompilerOptions::disableZebin.str()), std::string::npos);
}
HWTEST_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess) {
if (device->getHwInfo().capabilityTable.debuggerSupported == false) {
GTEST_SKIP();
}
HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess, HasSourceLevelDebuggerSupport) {
auto mockCompilerInterface = new MockCompilerInterface;
neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger);
auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()];
@@ -3581,10 +3578,9 @@ TEST_F(ModuleTests, givenImplicitArgsRelocationAndStackCallsWhenLinkingModuleThe
EXPECT_TRUE(kernelInfo->kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs);
}
TEST_F(ModuleTests, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired) {
if (!defaultHwInfo->capabilityTable.debuggerSupported) {
GTEST_SKIP();
}
using ModuleTestsDebuggingSupported = ModuleTranslationUnitDebuggerSupportedTest;
HWTEST2_F(ModuleTestsDebuggingSupported, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired, HasSourceLevelDebuggerSupport) {
DebugManagerStateRestore restorer;
DebugManager.flags.EnableMockSourceLevelDebugger.set(1);
auto pModule = std::make_unique<Module>(device, nullptr, ModuleType::User);