Skip to content

Add descriptors: max_read_image_args, max_write_image_args #318

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 9 commits into from
Apr 8, 2021

Conversation

1e-to
Copy link
Contributor

@1e-to 1e-to commented Mar 11, 2021

Closes #317

@1e-to 1e-to changed the title Add descriptors Add descriptors: max_read_image_args, max_write_image_args Mar 11, 2021
@oleksandr-pavlyk
Copy link
Contributor

I think my comment on another PR applies here as well.

On the Python side there is no need to ask for these descriptors at the time of SyclDevice construction. The query should be made on as-needed bases, i.e. when user queries the instance property.

This will avoid need to special-handle descriptors in case they are not supported for certain devices, like max_sub_group_size may not be supported on host device, and SYCL throws an exception.

Copy link
Contributor

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase with master and update C API tests.

@@ -388,6 +388,24 @@ bool DPCTLDevice_HasAspect(__dpctl_keep const DPCTLSyclDeviceRef DRef,
return hasAspect;
}

#define declmethod(FUNC, NAME) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are really liking this style 👍

DPCTLSyclDeviceRef DRef = nullptr;
size_t max_read_image_args = 0;
EXPECT_NO_FATAL_FAILURE(DRef = DPCTLDevice_CreateFromSelector(DSRef));
if (!DRef)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments in #315. Same apply here.

@diptorupd
Copy link
Contributor

@1e-to can you fix the merge conflicts. The macros in #315 and #318 should have different names.

@diptorupd diptorupd merged commit ccd2d03 into IntelPython:master Apr 8, 2021
@1e-to 1e-to deleted the descriptor_max_img_args branch November 3, 2021 09:58
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.

Add device descriptors: max_read_image_args, max_write_image_args
3 participants