Skip to content

Commit

Permalink
Fix magic value used to skip odd packets for timestamps
Browse files Browse the repository at this point in the history
Related-To: LOCI-2718

Signed-off-by: Aravind Gopalakrishnan <[email protected]>
  • Loading branch information
aravindksg authored and Compute-Runtime-Automation committed Jan 5, 2022
1 parent e9dbd86 commit 7968823
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions level_zero/core/source/event/event_impl.inl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -51,14 +51,16 @@ NEO::GraphicsAllocation &EventImp<TagSizeT>::getAllocation(Device *device) {

template <typename TagSizeT>
ze_result_t EventImp<TagSizeT>::calculateProfilingData() {
constexpr uint32_t skipL3EventPacketIndex = 2u;

globalStartTS = kernelEventCompletionData[0].getGlobalStartValue(0);
globalEndTS = kernelEventCompletionData[0].getGlobalEndValue(0);
contextStartTS = kernelEventCompletionData[0].getContextStartValue(0);
contextEndTS = kernelEventCompletionData[0].getContextEndValue(0);

for (uint32_t i = 0; i < kernelCount; i++) {
for (auto packetId = 0u; packetId < kernelEventCompletionData[i].getPacketsUsed(); packetId++) {
if (this->l3FlushWaApplied && ((packetId % 2) != 0)) {
if (this->l3FlushWaApplied && ((packetId % skipL3EventPacketIndex) != 0)) {
continue;
}
if (globalStartTS > kernelEventCompletionData[i].getGlobalStartValue(packetId)) {
Expand Down

0 comments on commit 7968823

Please sign in to comment.