mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: add SLM support for tile attach
Resolves: NEO-7650 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
adb3e126b4
commit
f30e66d950
@@ -1951,6 +1951,7 @@ void TileDebugSessionLinux::readStateSaveAreaHeader() {
|
||||
if (header) {
|
||||
auto headerSize = rootDebugSession->stateSaveAreaHeader.size();
|
||||
this->stateSaveAreaHeader.assign(reinterpret_cast<const char *>(header), reinterpret_cast<const char *>(header) + headerSize);
|
||||
this->sipSupportsSlm = rootDebugSession->sipSupportsSlm;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -489,6 +489,7 @@ struct MockTileDebugSessionLinux : TileDebugSessionLinux {
|
||||
using DebugSessionImp::newlyStoppedThreads;
|
||||
using DebugSessionImp::resumeImp;
|
||||
using DebugSessionImp::sendInterrupts;
|
||||
using DebugSessionImp::sipSupportsSlm;
|
||||
using DebugSessionImp::stateSaveAreaHeader;
|
||||
using DebugSessionImp::triggerEvents;
|
||||
using DebugSessionLinux::detached;
|
||||
|
||||
@@ -117,6 +117,32 @@ TEST(TileDebugSessionLinuxTest, GivenTileDebugSessionWhenReadingContextStateSave
|
||||
EXPECT_STREQ(header, data);
|
||||
}
|
||||
|
||||
TEST(TileDebugSessionLinuxTest, GivenTileDebugSessionWhenReadingContextStateSaveAreaHeaderThenSlmSupportIsSetFromRootSession) {
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
NEO::MockDevice *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
|
||||
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new NEO::OSInterface);
|
||||
|
||||
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
|
||||
auto rootSession = std::make_unique<MockDebugSessionLinux>(zet_debug_config_t{0x1234}, &deviceImp, 10);
|
||||
rootSession->clientHandle = MockDebugSessionLinux::mockClientHandle;
|
||||
|
||||
auto session = std::make_unique<MockTileDebugSessionLinux>(zet_debug_config_t{0x1234}, &deviceImp, rootSession.get());
|
||||
ASSERT_NE(nullptr, session);
|
||||
|
||||
const char *header = "cssa";
|
||||
rootSession->stateSaveAreaHeader.assign(header, header + sizeof(header));
|
||||
rootSession->sipSupportsSlm = false;
|
||||
|
||||
session->readStateSaveAreaHeader();
|
||||
EXPECT_FALSE(session->stateSaveAreaHeader.empty());
|
||||
EXPECT_FALSE(session->sipSupportsSlm);
|
||||
|
||||
rootSession->sipSupportsSlm = true;
|
||||
session->readStateSaveAreaHeader();
|
||||
EXPECT_FALSE(session->stateSaveAreaHeader.empty());
|
||||
EXPECT_TRUE(session->sipSupportsSlm);
|
||||
}
|
||||
|
||||
template <bool BlockOnFence = false>
|
||||
struct TileAttachFixture : public DebugApiLinuxMultiDeviceFixture, public MockDebugSessionLinuxHelper {
|
||||
void setUp() {
|
||||
|
||||
Reference in New Issue
Block a user