[SYCL] Disable L0 leak check with host task on Windows - #22918
Open
KseniyaTikhomirova wants to merge 1 commit into
Open
[SYCL] Disable L0 leak check with host task on Windows#22918KseniyaTikhomirova wants to merge 1 commit into
KseniyaTikhomirova wants to merge 1 commit into
Conversation
Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CMPLRLLVM-74630
Disabling tests that can potentially produce flaky failures due to a known issue. host_task.cpp has confirmed flaky issue due to the following.
What happens and why behavior is flaky:
in a case with HT we have at least 2 threads in a program: main thread where submission happens and a thread where host task is executed.
HT thread: Worker for HT performs work as: wait for HT dependencies, execute host task, signal host task event to the completed state, try to enqueue all dependent operations (for this HT event must be signaled), do commands cleanup as the last stage. Note that in order to enqueue all dependent tasks we keep shared_ptr to QueueImpl alive, see https://github.com/intel/llvm/blob/sycl/sycl/source/detail/scheduler/scheduler.cpp#L517.
Main thread: do all submissions then wait for kernels via urEventsWait (or QueueFinish) and explicitly wait for host event representation of HT (polling of var value). That means that Queue.wait() will wait for HT event to be signalled and dependent kernel to be completed but won't wait for all operations of HT worker (cleanup). That means that in some cases main thread can finish before last HT worker completion (cleanup). That means that shared pointer to Queue in the main thread may be released while shared pointer to the same queue in HT thread is still alive. Some commands and related resources can be not yet destroyed as well.
Since on Windows we can't properly wait for threads to be joined (we intentionally leak resources that can be affected by this, so it is a known issue) exit handlers that triggers static variables destruction and LEAK analysis may run before queue (and other resources) destruction. Windows system will reclaim resources itself.
Note: List of updated tests contains some scenarios with HT that is unlikely to be affected since they have a lot of work after HT so it is unlikely to have so big delay in resource release to trigger the issue. Although LEAK check with HT in Windows is problematic in general so I included all entries.