Skip to content

Commit c1b18b3

Browse files
committed
fix flags in cb event provider
1 parent ad8010b commit c1b18b3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sycl/test-e2e/Adapters/level_zero/queue_profiling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
// clang-format off
1111
// Check the expected output when queue::enable_profiling is not specified
1212
//
13-
// WITHOUT: ze_event_pool_desc_t flags set to: 1
13+
// WITHOUT: {{ze_event_pool_desc_t flags set to: 1|zex_counter_based_event_desc_t flags set to: 5}}
1414
// WITHOUT: SYCL exception caught: Profiling information is unavailable as the queue associated with the event does not have the 'enable_profiling' property.
1515

1616
// Check the expected output when queue::enable_profiling is specified
1717
//
18-
// WITH: ze_event_pool_desc_t flags set to: 5
18+
// WITH: {{ze_event_pool_desc_t flags set to: 5|zex_counter_based_event_desc_t flags set to: 21}}
1919
// WITH: Device kernel time:
2020
// clang-format on
2121
//

unified-runtime/source/adapters/level_zero/v2/event_provider_counter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static zex_counter_based_event_exp_flags_t createZeFlags(queue_type queueType,
4444
zex_counter_based_event_exp_flags_t zeFlags =
4545
ZEX_COUNTER_BASED_EVENT_FLAG_HOST_VISIBLE;
4646
if (flags & EVENT_FLAGS_PROFILING_ENABLED) {
47-
zeFlags |= ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
47+
zeFlags |= ZEX_COUNTER_BASED_EVENT_FLAG_KERNEL_TIMESTAMP;
4848
}
4949

5050
if (queueType == QUEUE_IMMEDIATE) {
@@ -63,6 +63,8 @@ raii::cache_borrowed_event provider_counter::allocate() {
6363
desc.flags = createZeFlags(queueType, flags);
6464
desc.signalScope = ZE_EVENT_SCOPE_FLAG_HOST;
6565

66+
// Enhanced debug output to validate control flow integrity
67+
UR_LOG(DEBUG, "zex_counter_based_event_desc_t flags set to: {}", desc.flags);
6668
ze_event_handle_t handle;
6769

6870
// TODO: allocate host and device buffers to use here

0 commit comments

Comments
 (0)