Skip to content

Commit 78d5704

Browse files
Update TimestampPacket alignment
Change-Id: Iaf30c2cca8a32cc17b838d96366ebe25491afc42 Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent 8b896bf commit 78d5704

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ HWTEST_F(CommandStreamReceiverTest, givenTimestampPacketAllocatorWhenAskingForTa
327327
EXPECT_NE(nullptr, node1);
328328
EXPECT_NE(nullptr, node2);
329329
EXPECT_NE(node1, node2);
330+
331+
constexpr auto tagAlignment = MemoryConstants::cacheLineSize * 4;
332+
333+
EXPECT_TRUE(isAligned(node1->getGpuAddress(), tagAlignment));
334+
EXPECT_TRUE(isAligned(node2->getGpuAddress(), tagAlignment));
330335
}
331336

332337
HWTEST_F(CommandStreamReceiverTest, givenUltCommandStreamReceiverWhenAddAubCommentIsCalledThenCallAddAubCommentOnCsr) {

shared/source/command_stream/command_stream_receiver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ TagAllocator<TimestampPacketStorage> *CommandStreamReceiver::getTimestampPacketA
475475
DebugManager.flags.DisableTimestampPacketOptimizations.get();
476476

477477
timestampPacketAllocator = std::make_unique<TagAllocator<TimestampPacketStorage>>(
478-
rootDeviceIndex, getMemoryManager(), getPreferredTagPoolSize(), MemoryConstants::cacheLineSize,
478+
rootDeviceIndex, getMemoryManager(), getPreferredTagPoolSize(), MemoryConstants::cacheLineSize * 4,
479479
sizeof(TimestampPacketStorage), doNotReleaseNodes, osContext->getDeviceBitfield());
480480
}
481481
return timestampPacketAllocator.get();

0 commit comments

Comments
 (0)