Skip to content

[SYCL] Fix flaky failure of concurrent cache eviction UT #16522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Jan 3, 2025

Regression after: #16289
fixes #16515

Problem
The exception is thrown when one process tries to calculate cache size and another process simultaneously inserted/removed any item from the cache. This might cause std::filesystem::recursive_directory iterator to throw std::filesystem_error.

Solution
We catch the exception and just skip over to the next item. This means that while calculating the size of cache we might not consider the size of any item added/removed from cache in the meanwhile. We calculate the cache size only once (for all processes/threads using the same cache) and that too the first-time persistent cache is used by any process. So, this race is rather rare and just ignoring the exception would work.

@uditagarwal97
Copy link
Contributor Author

@intel/llvm-gatekeepers PR is ready to be merged.

@sarnex sarnex merged commit 7af800e into intel:sycl Jan 6, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConcurentReadWriteCacheEviction unittest fails in pre-commit
3 participants