Skip to content
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

Add missing sycl::queue constructors #447

Merged

Conversation

al42and
Copy link
Contributor

@al42and al42and commented Jan 26, 2021

Hello!

Both SYCL-1.2.1 and SYCL 2020 (provisional) require two additional
constructors for the sycl::queue class, that directly accept device handle instead of device_selector:

explicit queue(const context &syclContext, const device &syclDevice,
    const property_list &propList = {});

explicit queue(const context &syclContext, const device &syclDevice,
    const async_handler &asyncHandler,
    const property_list &propList = {});

They are currently missing in hipSYCL but seem rather trivial to add.

@illuhad
Copy link
Collaborator

illuhad commented Jan 27, 2021

Thank you! :) This is a great addition.

I wonder, would it maybe make sense to map the existing variants with the device selector on these new constructors? E.g. something like this:

explicit queue(const context& ctx, const device_selector& sel, ...)
: queue{ctx, sel.select_device(), ...} {}

@hipSYCL-ci-bot test again

Both SYCL-1.2.1 and SYCL 2020 provisional require two additional
constructors for sycl::queue class:

    explicit queue(const context &syclContext, const device &syclDevice,
    const property_list &propList = {});

    explicit queue(const context &syclContext, const device &syclDevice,
    const async_handler &asyncHandler,
    const property_list &propList = {});
@al42and al42and force-pushed the add-queue-ctor-without-device-selector branch from 86b6fed to 5e0ee94 Compare January 27, 2021 20:01
@al42and
Copy link
Contributor Author

al42and commented Jan 27, 2021

@illuhad

Thanks, that's a very good point! Amended my code.

@illuhad
Copy link
Collaborator

illuhad commented Jan 28, 2021

Lovely, thank you! :)

@illuhad illuhad merged commit e7b5705 into AdaptiveCpp:develop Jan 28, 2021
@al42and al42and deleted the add-queue-ctor-without-device-selector branch January 28, 2021 18:22
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.

None yet

2 participants