Skip to content

[SYCL] Fix unqiue_ptr out-of-memory checks in scheduler #4592

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
Sep 20, 2021

Conversation

steffenlarsen
Copy link
Contributor

Select places in the scheduler incorrectly assumes a unique pointer to be null when explicit allocations passed as parameter fails due to the host being out of memory. These changes correct these assumptions through the use of std::make_unique.

Additionally, Scheduler::GraphBuilder::connectDepEvent assumed the same for a raw pointer, whilst not checking the creation of its constituent unique pointers. Allocation here is now governed by a catch of std::bad_alloc.

Select places in the scheduler incorrectly assumes a unique pointer to be null
when explicit allocations passed as parameter fails due to the host being out of
memory. These changes correct these through the use of std::make_unique.

Additionally, Scheduler::GraphBuilder::connectDepEvent assumed the same for a
raw pointer, whilst not checking the creation of its constituent unique
pointers. Allocation here is now governed by a catch of `std::bad_alloc`.

Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen requested a review from a team as a code owner September 17, 2021 13:48
@romanovvlad romanovvlad merged commit f37b22d into intel:sycl Sep 20, 2021
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.

2 participants