Repository navigation
[SYCL][E2E] Wait for kernels in max_num_work_groups_sync_query test - #23562
Open
HoppeMateusz wants to merge 1 commit into
Open
HoppeMateusz wants to merge 1 commit into
HoppeMateusz wants to merge 1 commit into
Conversation
testFreeFunctionKernel() launches a kernel with use_root_sync and the maximum number of work-groups returned by max_num_work_groups_sync, then frees the USM allocation used by the kernel without waiting for the kernel to finish. The test runs on a default (out-of-order) queue, so the four free-function launches are independent and may execute concurrently. Each launch is sized by max_num_work_groups_sync to occupy the whole device, so when two of them overlap neither can have all of its work-groups resident at once and their root-group barriers never complete. This was observed as a hang on Level Zero, where the out-of-order queue distributes the launches over several command lists and hardware contexts. Freeing memory that a running kernel still writes is also undefined behavior. Wait on the queue before freeing the allocation, the same way testLambdaKernel() already does. This serializes the root-group synchronized launches and removes the use-after-free. HSD-ES: 21045664176 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This branch has not been deployed
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.
testFreeFunctionKernel()launches a kernel withuse_root_syncand the maximum number of work-groups returned bymax_num_work_groups_sync, then frees the kernel's USM allocation without waiting for the kernel to finish.