-
Notifications
You must be signed in to change notification settings - Fork 796
[AsyncAlloc][SYCL][ABI-BREAK] Use the SYCL properties extension for memory pool creation #17955
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
Changes from 9 commits
70b3c5a
7bfaa75
a6772eb
1f2fdbe
df284d6
358ad19
7fe7b8d
2a04c70
4a894ed
8248b5e
1f85298
f9761f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,6 @@ __SYCL_EXPORT size_t memory_pool::get_threshold() const { | |
return impl->get_threshold(); | ||
} | ||
|
||
const property_list &memory_pool::getPropList() const { | ||
return impl->getPropList(); | ||
} | ||
|
||
__SYCL_EXPORT size_t memory_pool::get_reserved_size_current() const { | ||
return impl->get_reserved_size_current(); | ||
} | ||
|
@@ -45,11 +41,9 @@ __SYCL_EXPORT void memory_pool::increase_threshold_to(size_t newThreshold) { | |
impl->set_new_threshold(newThreshold); | ||
} | ||
|
||
__SYCL_EXPORT memory_pool::memory_pool(const sycl::context &ctx, | ||
const sycl::device &dev, | ||
sycl::usm::alloc kind, | ||
const property_list &props) { | ||
|
||
memory_pool::memory_pool(const sycl::context &ctx, const sycl::device &dev, | ||
sycl::usm::alloc kind, | ||
memory_pool::pool_properties props) { | ||
if (kind == sycl::usm::alloc::host) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was 2 kinds of runtime error, one to check if it is host it would report that host is used while device parameter is passed at the same time, another one was to just report that the type of allocation is not allowed if it is not a device allocation. I removed the first one and just kept that the type of allocation being passed is not supported if it is not a device allocation. |
||
throw sycl::exception( | ||
sycl::make_error_code(sycl::errc::invalid), | ||
|
@@ -60,7 +54,11 @@ __SYCL_EXPORT memory_pool::memory_pool(const sycl::context &ctx, | |
sycl::make_error_code(sycl::errc::feature_not_supported), | ||
"Only device allocated memory pools are supported!"); | ||
|
||
impl = std::make_shared<detail::memory_pool_impl>(ctx, dev, kind, props); | ||
detail::pool_properties poolProps{ | ||
{props.initial_threshold.first, props.initial_threshold.second}, | ||
{props.maximum_size.first, props.maximum_size.second}, | ||
{props.zero_init.first, props.zero_init.second}}; | ||
impl = std::make_shared<detail::memory_pool_impl>(ctx, dev, kind, poolProps); | ||
} | ||
|
||
} // namespace ext::oneapi::experimental | ||
|
Uh oh!
There was an error while loading. Please reload this page.