Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Fix events caching test #1138

Merged
merged 2 commits into from
Sep 14, 2022
Merged

Conversation

againull
Copy link

@againull againull commented Aug 8, 2022

It looks like some resources can be released asynchronously in the
scheduler. That's why at some runs 1 event is enough but sometimes 2
events are needed. So use regular expression to allow up to 9 events
just in case.

It looks like some resources can be released asynchronously in the
scheduler. That's why at some runs 1 event is enough but sometimes 2
events are needed. So use regular expression to allow up to 9 events
just in case.
@@ -7,7 +7,7 @@
// RUN: env SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0 ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CACHING-ENABLED %s
// RUN: env SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0 SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING=1 ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CACHING-DISABLED %s

// CACHING-ENABLED: zeEventCreate = 1
// CACHING-ENABLED: zeEventCreate = {{[1-9]}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// CACHING-ENABLED: zeEventCreate = {{[1-9]}}
// With events caching we should be reusing them and 9 should be enough.
// Might require more than one if previous one has already been released
// by the time we need a new one.
// CACHING-ENABLED: zeEventCreate = {{[1-9]}}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment, thanks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, I confused released/destroyed. Your update looks fine.

@@ -7,7 +7,7 @@
// RUN: env SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0 ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CACHING-ENABLED %s
// RUN: env SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0 SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING=1 ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CACHING-DISABLED %s

// CACHING-ENABLED: zeEventCreate = 1
// CACHING-ENABLED: zeEventCreate = {{[1-9]}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, I confused released/destroyed. Your update looks fine.

@againull againull merged commit b8c39f4 into intel:intel Sep 14, 2022
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Mar 22, 2023
It looks like some resources can be released asynchronously in the
scheduler. That's why at some runs 1 event is enough but sometimes 2
events are needed. So use regular expression to allow up to 9 events
just in case.
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Mar 22, 2023
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
It looks like some resources can be released asynchronously in the
scheduler. That's why at some runs 1 event is enough but sometimes 2
events are needed. So use regular expression to allow up to 9 events
just in case.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants