Skip to content

Commit 7968823

Browse files
Fix magic value used to skip odd packets for timestamps
Related-To: LOCI-2718 Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
1 parent e9dbd86 commit 7968823

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

level_zero/core/source/event/event_impl.inl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -51,14 +51,16 @@ NEO::GraphicsAllocation &EventImp<TagSizeT>::getAllocation(Device *device) {
5151

5252
template <typename TagSizeT>
5353
ze_result_t EventImp<TagSizeT>::calculateProfilingData() {
54+
constexpr uint32_t skipL3EventPacketIndex = 2u;
55+
5456
globalStartTS = kernelEventCompletionData[0].getGlobalStartValue(0);
5557
globalEndTS = kernelEventCompletionData[0].getGlobalEndValue(0);
5658
contextStartTS = kernelEventCompletionData[0].getContextStartValue(0);
5759
contextEndTS = kernelEventCompletionData[0].getContextEndValue(0);
5860

5961
for (uint32_t i = 0; i < kernelCount; i++) {
6062
for (auto packetId = 0u; packetId < kernelEventCompletionData[i].getPacketsUsed(); packetId++) {
61-
if (this->l3FlushWaApplied && ((packetId % 2) != 0)) {
63+
if (this->l3FlushWaApplied && ((packetId % skipL3EventPacketIndex) != 0)) {
6264
continue;
6365
}
6466
if (globalStartTS > kernelEventCompletionData[i].getGlobalStartValue(packetId)) {

0 commit comments

Comments
 (0)