Retrieve state save area header from IGC

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
This commit is contained in:
Matias Cabral 2021-03-30 19:31:58 -07:00 committed by Compute-Runtime-Automation
parent d2b6d7f241
commit e35ffb0601
17 changed files with 145 additions and 30 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -47,6 +47,18 @@ struct DebugAreaHeader {
uint16_t scratchEnd;
uint64_t isShared : 1;
};
struct alignas(4) DebuggerVersion {
uint8_t major;
uint8_t minor;
uint16_t patch;
};
struct alignas(8) StateSaveAreaHeader {
char magic[8] = "tssarea";
uint64_t reserved1;
struct DebuggerVersion version;
uint8_t size;
uint8_t reserved2[3];
};
#pragma pack()

View File

@ -645,6 +645,14 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, uint3
if (neoDevice->getPreemptionMode() == NEO::PreemptionMode::MidThread || neoDevice->getDebugger()) {
auto sipType = NEO::SipKernel::getSipKernelType(hwInfo.platform.eRenderCoreFamily, neoDevice->getDebugger());
NEO::initSipKernel(sipType, *neoDevice);
auto stateSaveAreaHeader = NEO::SipKernel::getSipStateSaveAreaHeader(*neoDevice);
if (debugSurface && stateSaveAreaHeader.size() > 0) {
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
NEO::MemoryTransferHelper::transferMemoryToAllocation(hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *debugSurface),
*neoDevice, debugSurface, 0, stateSaveAreaHeader.data(),
stateSaveAreaHeader.size());
}
}
} else {
*returnValue = ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -14,7 +14,7 @@ namespace ult {
const NEO::SipKernel &MockBuiltins::getSipKernel(NEO::SipKernelType type, NEO::Device &device) {
if (!(sipKernel && sipKernel->getType() == type)) {
sipKernel.reset(new NEO::SipKernel(type, allocation.get()));
sipKernel.reset(new NEO::SipKernel(type, allocation.get(), stateSaveAreaHeader));
}
return *sipKernel;

View File

@ -20,6 +20,7 @@ class MockBuiltins : public NEO::BuiltIns {
const NEO::SipKernel &getSipKernel(NEO::SipKernelType type, NEO::Device &device) override;
std::unique_ptr<NEO::SipKernel> sipKernel;
std::unique_ptr<NEO::MockGraphicsAllocation> allocation;
std::vector<char> stateSaveAreaHeader{'s', 's', 'a', 'h'};
};
} // namespace ult
} // namespace L0

View File

@ -48,6 +48,41 @@ TEST_F(L0DebuggerTest, givenL0DebuggerWhenGettingSipAllocationThenValidSipTypeIs
EXPECT_EQ(expectedSipAllocation, systemRoutine);
}
TEST_F(L0DebuggerTest, givenL0DebuggerWhenGettingStateSaveAreaHeaderThenValidSipTypeIsReturned) {
auto stateSaveAreaHeader = SipKernel::getSipStateSaveAreaHeader(*neoDevice);
auto sipType = SipKernel::getSipKernelType(neoDevice->getHardwareInfo().platform.eRenderCoreFamily, true);
auto expectedStateSaveAreaHeader = neoDevice->getBuiltIns()->getSipKernel(sipType, *neoDevice).getStateSaveAreaHeader();
EXPECT_EQ(expectedStateSaveAreaHeader, stateSaveAreaHeader);
}
TEST(Debugger, givenL0DebuggerOFFWhenGettingStateSaveAreaHeaderThenValidSipTypeIsReturned) {
auto executionEnvironment = new NEO::ExecutionEnvironment();
auto mockBuiltIns = new MockBuiltins();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns);
auto hwInfo = *NEO::defaultHwInfo.get();
hwInfo.featureTable.ftrLocalMemory = true;
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo);
executionEnvironment->initializeMemoryManager();
auto neoDevice = NEO::MockDevice::create<NEO::MockDevice>(executionEnvironment, 0u);
NEO::DeviceVector devices;
devices.push_back(std::unique_ptr<NEO::Device>(neoDevice));
auto driverHandle = std::make_unique<Mock<L0::DriverHandleImp>>();
driverHandle->enableProgramDebugging = false;
driverHandle->initialize(std::move(devices));
auto stateSaveAreaHeader = SipKernel::getSipStateSaveAreaHeader(*neoDevice);
auto sipType = SipKernel::getSipKernelType(neoDevice->getHardwareInfo().platform.eRenderCoreFamily, false);
auto expectedStateSaveAreaHeader = neoDevice->getBuiltIns()->getSipKernel(sipType, *neoDevice).getStateSaveAreaHeader();
EXPECT_EQ(expectedStateSaveAreaHeader, stateSaveAreaHeader);
}
HWTEST_F(L0DebuggerTest, givenL0DebuggerWhenCreatedThenPerContextSbaTrackingBuffersAreAllocated) {
auto debugger = device->getL0Debugger();
ASSERT_NE(nullptr, debugger);

View File

@ -21,6 +21,7 @@
#include "level_zero/core/source/cmdqueue/cmdqueue_imp.h"
#include "level_zero/core/source/driver/driver_handle_imp.h"
#include "level_zero/core/source/driver/host_pointer_manager.h"
#include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h"
#include "level_zero/core/test/unit_tests/mocks/mock_driver_handle.h"
#include "gtest/gtest.h"
@ -81,6 +82,30 @@ TEST(L0DeviceTest, givenMidThreadPreemptionWhenCreatingDeviceThenSipKernelIsInit
EXPECT_TRUE(NEO::MockSipData::called);
}
TEST(L0DeviceTest, givenDebuggerEnabledButIGCNotReturnsSSAHThenSSAHIsNotCopied) {
NEO::MockCompilerEnableGuard mock(true);
auto executionEnvironment = new NEO::ExecutionEnvironment();
auto mockBuiltIns = new MockBuiltins();
mockBuiltIns->stateSaveAreaHeader.clear();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns);
auto hwInfo = *NEO::defaultHwInfo.get();
hwInfo.featureTable.ftrLocalMemory = true;
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo);
executionEnvironment->initializeMemoryManager();
auto neoDevice = NEO::MockDevice::create<NEO::MockDevice>(executionEnvironment, 0u);
NEO::DeviceVector devices;
devices.push_back(std::unique_ptr<NEO::Device>(neoDevice));
auto driverHandle = std::make_unique<Mock<L0::DriverHandleImp>>();
driverHandle->enableProgramDebugging = true;
driverHandle->initialize(std::move(devices));
auto stateSaveAreaHeader = NEO::SipKernel::getSipStateSaveAreaHeader(*neoDevice);
EXPECT_EQ(static_cast<size_t>(0), stateSaveAreaHeader.size());
}
TEST(L0DeviceTest, givenDisabledPreemptionWhenCreatingDeviceThenSipKernelIsNotInitialized) {
ze_result_t returnValue = ZE_RESULT_SUCCESS;
VariableBackup<bool> mockSipCalled(&NEO::MockSipData::called, false);

View File

@ -21,16 +21,17 @@ using namespace NEO;
namespace SipKernelTests {
TEST(Sip, WhenGettingTypeThenCorrectTypeIsReturned) {
SipKernel csr{SipKernelType::Csr, nullptr};
std::vector<char> ssaHeader;
SipKernel csr{SipKernelType::Csr, nullptr, ssaHeader};
EXPECT_EQ(SipKernelType::Csr, csr.getType());
SipKernel dbgCsr{SipKernelType::DbgCsr, nullptr};
SipKernel dbgCsr{SipKernelType::DbgCsr, nullptr, ssaHeader};
EXPECT_EQ(SipKernelType::DbgCsr, dbgCsr.getType());
SipKernel dbgCsrLocal{SipKernelType::DbgCsrLocal, nullptr};
SipKernel dbgCsrLocal{SipKernelType::DbgCsrLocal, nullptr, ssaHeader};
EXPECT_EQ(SipKernelType::DbgCsrLocal, dbgCsrLocal.getType());
SipKernel undefined{SipKernelType::COUNT, nullptr};
SipKernel undefined{SipKernelType::COUNT, nullptr, ssaHeader};
EXPECT_EQ(SipKernelType::COUNT, undefined.getType());
}

View File

@ -494,13 +494,15 @@ bool MockIgcOclDeviceCtx::GetSystemRoutine(IGC::SystemRoutineType::SystemRoutine
debugVars.typeOfSystemRoutine = typeOfSystemRoutine;
debugVars.receivedSipAddressingType = bindless ? MockCompilerDebugVars::SipAddressingType::bindless : MockCompilerDebugVars::SipAddressingType::bindful;
const char mockData[64] = {'C', 'T', 'N', 'I'};
const char mockData1[64] = {'C', 'T', 'N', 'I'};
const char mockData2[64] = {'S', 'S', 'A', 'H'};
if (debugVars.forceBuildFailure || typeOfSystemRoutine == IGC::SystemRoutineType::undefined) {
return false;
}
outSystemRoutineBuffer->PushBackRawBytes(mockData, 64);
outSystemRoutineBuffer->PushBackRawBytes(mockData1, 64);
stateSaveAreaHeaderInit->PushBackRawBytes(mockData2, 64);
return true;
}

View File

@ -38,10 +38,11 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) {
auto initializer = [&] {
std::vector<char> sipBinary;
std::vector<char> stateSaveAareHeader;
auto compilerInteface = device.getCompilerInterface();
UNRECOVERABLE_IF(compilerInteface == nullptr);
auto ret = compilerInteface->getSipKernelBinary(device, type, sipBinary);
auto ret = compilerInteface->getSipKernelBinary(device, type, sipBinary, stateSaveAareHeader);
UNRECOVERABLE_IF(ret != TranslationOutput::ErrorCode::Success);
UNRECOVERABLE_IF(sipBinary.size() == 0);
@ -61,7 +62,7 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) {
device, sipAllocation, 0, sipBinary.data(),
sipBinary.size());
}
sipBuiltIn.first.reset(new SipKernel(type, sipAllocation));
sipBuiltIn.first.reset(new SipKernel(type, sipAllocation, std::move(stateSaveAareHeader)));
};
std::call_once(sipBuiltIn.second, initializer);
UNRECOVERABLE_IF(sipBuiltIn.first == nullptr);

View File

@ -24,13 +24,17 @@ const size_t SipKernel::maxDbgSurfaceSize = 0x1800000; // proper value should be
SipKernel::~SipKernel() = default;
SipKernel::SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc) : type(type), sipAllocation(sipAlloc) {
SipKernel::SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc, std::vector<char> ssah) : type(type), sipAllocation(sipAlloc), stateSaveAreaHeader(ssah) {
}
GraphicsAllocation *SipKernel::getSipAllocation() const {
return sipAllocation;
}
const std::vector<char> &SipKernel::getStateSaveAreaHeader() const {
return stateSaveAreaHeader;
}
SipKernelType SipKernel::getSipKernelType(GFXCORE_FAMILY family, bool debuggingActive) {
auto &hwHelper = HwHelper::get(family);
return hwHelper.getSipKernelType(debuggingActive);
@ -41,4 +45,10 @@ GraphicsAllocation *SipKernel::getSipKernelAllocation(Device &device) {
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().platform.eRenderCoreFamily, debuggingEnabled);
return device.getBuiltIns()->getSipKernel(sipType, device).getSipAllocation();
}
const std::vector<char> &SipKernel::getSipStateSaveAreaHeader(Device &device) {
bool debuggingEnabled = device.getDebugger() != nullptr;
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().platform.eRenderCoreFamily, debuggingEnabled);
return device.getBuiltIns()->getSipKernel(sipType, device).getStateSaveAreaHeader();
}
} // namespace NEO

View File

@ -19,7 +19,7 @@ class GraphicsAllocation;
class SipKernel {
public:
SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc);
SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc, std::vector<char> ssah);
SipKernel(const SipKernel &) = delete;
SipKernel &operator=(const SipKernel &) = delete;
SipKernel(SipKernel &&) = delete;
@ -33,11 +33,14 @@ class SipKernel {
static const size_t maxDbgSurfaceSize;
MOCKABLE_VIRTUAL GraphicsAllocation *getSipAllocation() const;
MOCKABLE_VIRTUAL const std::vector<char> &getStateSaveAreaHeader() const;
static SipKernelType getSipKernelType(GFXCORE_FAMILY family, bool debuggingActive);
static GraphicsAllocation *getSipKernelAllocation(Device &device);
static const std::vector<char> &getSipStateSaveAreaHeader(Device &device);
protected:
SipKernelType type = SipKernelType::COUNT;
GraphicsAllocation *sipAllocation = nullptr;
const std::vector<char> stateSaveAreaHeader;
};
} // namespace NEO

View File

@ -303,7 +303,8 @@ TranslationOutput::ErrorCode CompilerInterface::createLibrary(
return TranslationOutput::ErrorCode::Success;
}
TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary) {
TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary,
std::vector<char> &stateSaveAreaHeader) {
if (false == isIgcAvailable()) {
return TranslationOutput::ErrorCode::CompilerNotAvailable;
}
@ -342,6 +343,8 @@ TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device &
}
retBinary.assign(systemRoutineBuffer->GetMemory<char>(), systemRoutineBuffer->GetMemory<char>() + systemRoutineBuffer->GetSizeRaw());
stateSaveAreaHeader.assign(stateSaveAreaBuffer->GetMemory<char>(), stateSaveAreaBuffer->GetMemory<char>() + stateSaveAreaBuffer->GetSizeRaw());
return TranslationOutput::ErrorCode::Success;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -133,7 +133,8 @@ class CompilerInterface {
const TranslationInput &input,
TranslationOutput &output);
MOCKABLE_VIRTUAL TranslationOutput::ErrorCode getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary);
MOCKABLE_VIRTUAL TranslationOutput::ErrorCode getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary,
std::vector<char> &stateSaveAreaHeader);
protected:
MOCKABLE_VIRTUAL bool initialize(std::unique_ptr<CompilerCache> cache, bool requireFcl);

View File

@ -114,13 +114,14 @@ class MockCompilerInterface : public CompilerInterface {
return this->fclBaseTranslationCtx.get();
}
TranslationOutput::ErrorCode getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary) override {
TranslationOutput::ErrorCode getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector<char> &retBinary,
std::vector<char> &stateAreaHeader) override {
if (this->sipKernelBinaryOverride.size() > 0) {
retBinary = this->sipKernelBinaryOverride;
this->requestedSipKernel = type;
return TranslationOutput::ErrorCode::Success;
} else {
return CompilerInterface::getSipKernelBinary(device, type, retBinary);
return CompilerInterface::getSipKernelBinary(device, type, retBinary, stateAreaHeader);
}
}

View File

@ -19,7 +19,7 @@
#include <map>
namespace NEO {
MockSipKernel::MockSipKernel(SipKernelType type, GraphicsAllocation *sipAlloc) : SipKernel(type, sipAlloc) {
MockSipKernel::MockSipKernel(SipKernelType type, GraphicsAllocation *sipAlloc) : SipKernel(type, sipAlloc, {'s', 's', 'a', 'h'}) {
this->mockSipMemoryAllocation =
std::make_unique<MemoryAllocation>(0u,
GraphicsAllocation::AllocationType::KERNEL_ISA_INTERNAL,
@ -30,7 +30,7 @@ MockSipKernel::MockSipKernel(SipKernelType type, GraphicsAllocation *sipAlloc) :
MemoryPool::System4KBPages, 3u);
}
MockSipKernel::MockSipKernel() : SipKernel(SipKernelType::Csr, nullptr) {
MockSipKernel::MockSipKernel() : SipKernel(SipKernelType::Csr, nullptr, {'s', 's', 'a', 'h'}) {
this->mockSipMemoryAllocation =
std::make_unique<MemoryAllocation>(0u,
GraphicsAllocation::AllocationType::KERNEL_ISA_INTERNAL,
@ -52,4 +52,8 @@ std::vector<char> MockSipKernel::getDummyGenBinary() {
GraphicsAllocation *MockSipKernel::getSipAllocation() const {
return mockSipMemoryAllocation.get();
}
const std::vector<char> &MockSipKernel::getStateSaveAreaHeader() const {
return mockStateSaveAreaHeader;
}
} // namespace NEO

View File

@ -29,8 +29,10 @@ class MockSipKernel : public SipKernel {
static std::vector<char> getDummyGenBinary();
GraphicsAllocation *getSipAllocation() const override;
const std::vector<char> &getStateSaveAreaHeader() const override;
std::unique_ptr<MemoryAllocation> mockSipMemoryAllocation;
const std::vector<char> mockStateSaveAreaHeader = {'s', 's', 'a', 'h'};
MockExecutionEnvironment executionEnvironment;
};

View File

@ -1002,7 +1002,8 @@ TEST_F(CompilerInterfaceTest, GivenCompilerWhenGettingCompilerAvailabilityThenCo
TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenGetSipKernelBinaryFailsGracefully) {
pCompilerInterface->igcMain.reset();
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err);
EXPECT_EQ(0U, sipBinary.size());
}
@ -1013,7 +1014,8 @@ TEST_F(CompilerInterfaceTest, whenIgcReturnsErrorThenGetSipKernelBinaryFailsGrac
gEnvironment->igcPushDebugVars(igcDebugVars);
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err);
EXPECT_EQ(0U, sipBinary.size());
@ -1025,7 +1027,8 @@ TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutpu
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd16_", ".bc");
gEnvironment->igcPushDebugVars(igcDebugVars);
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
@ -1036,17 +1039,18 @@ TEST_F(CompilerInterfaceTest, whenRequestingSipKernelBinaryThenProperSystemRouti
MockCompilerDebugVars igcDebugVars;
gEnvironment->igcPushDebugVars(igcDebugVars);
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::contextSaveRestore, getIgcDebugVars().typeOfSystemRoutine);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsr, sipBinary);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::debug, getIgcDebugVars().typeOfSystemRoutine);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsrLocal, sipBinary);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsrLocal, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::debugSlm, getIgcDebugVars().typeOfSystemRoutine);
@ -1060,19 +1064,20 @@ TEST_F(CompilerInterfaceTest, givenUseBindlessDebugSipWhenRequestingSipKernelBin
MockCompilerDebugVars igcDebugVars;
gEnvironment->igcPushDebugVars(igcDebugVars);
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::Csr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::contextSaveRestore, getIgcDebugVars().typeOfSystemRoutine);
EXPECT_EQ(MockCompilerDebugVars::SipAddressingType::bindful, getIgcDebugVars().receivedSipAddressingType);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsr, sipBinary);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsr, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::debug, getIgcDebugVars().typeOfSystemRoutine);
EXPECT_EQ(MockCompilerDebugVars::SipAddressingType::bindless, getIgcDebugVars().receivedSipAddressingType);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsrLocal, sipBinary);
err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::DbgCsrLocal, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
EXPECT_NE(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::debugSlm, getIgcDebugVars().typeOfSystemRoutine);
@ -1085,7 +1090,8 @@ TEST_F(CompilerInterfaceTest, whenRequestingInvalidSipKernelBinaryThenErrorIsRet
MockCompilerDebugVars igcDebugVars;
gEnvironment->igcPushDebugVars(igcDebugVars);
std::vector<char> sipBinary;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::COUNT, sipBinary);
std::vector<char> stateAreaHeader;
auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::COUNT, sipBinary, stateAreaHeader);
EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err);
EXPECT_EQ(0U, sipBinary.size());
EXPECT_EQ(IGC::SystemRoutineType::undefined, getIgcDebugVars().typeOfSystemRoutine);