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

Sycl kernel api #970

Merged
merged 16 commits into from
Nov 8, 2022
Merged

Sycl kernel api #970

merged 16 commits into from
Nov 8, 2022

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Nov 5, 2022

This PR add Cython generated c-api for dpctl.program.SyclKernel and dpctl.program.SyclProgram classes.

dpctl4pybind11 adds type casters to map dpctl.program.SyclKernel to sycl::kernel and
dpctl.program.SyclProgram to sycl::kernel_bundle<sycl::bundle_state::executable>.

This PR closes #943.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

@github-actions
Copy link

github-actions bot commented Nov 5, 2022

@coveralls
Copy link
Collaborator

coveralls commented Nov 5, 2022

Coverage Status

Coverage increased (+0.04%) to 82.032% when pulling c873896 on sycl-kernel-api into 2c86ef6 on master.

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_27 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_28 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_29 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_30 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

…le_Copy

Also change commented out, or preprocessor disabled code for testing,
implementing, or declaring DCPTLKernel_GetMaxSubGroupsSize since it is
now supported in 2023 compiler.
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_30 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_31 ran successfully.
Passed: 32
Failed: 802
Skipped: 3138

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review November 6, 2022 17:04
@oleksandr-pavlyk
Copy link
Collaborator Author

@ndgrigorian The DPCTLKernel_GetName used to exist before, see https://github.com/IntelPython/dpctl/blob/0.12.0/libsyclinterface/include/dpctl_sycl_kernel_interface.h#L41-L52

I removed while refactoring from use of deprecated sycl::program to SYCL-2020 compliant sycl::kernel_bundle in #845 which made it into 0.13.0

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_32 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

…API functions

dpctl_capi constructor must initialize
   DPCTLKernel_GetKernelRef_ and DPCTLKernelBundle_GetKernelBundleRef_
for casters to work correctly.
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_35 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_43 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

ndgrigorian
ndgrigorian previously approved these changes Nov 7, 2022
Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for writing the tests

import dpctl.tensor as dpt

q = dpctl.SyclQueue()

Copy link
Contributor

Choose a reason for hiding this comment

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

Some documentation is warranted. I know what the example is doing, but not every user will know or should be expected to know just by reading the code.

diptorupd
diptorupd previously approved these changes Nov 7, 2022
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.

LGTM.

I have a general comment about the state of dpctl4pybind11.hpp. The file needs API docs and we should generate the API doc and add it to our documentation page.

@oleksandr-pavlyk
Copy link
Collaborator Author

I am going to push suggested changes, which will dismiss approvals. I am going to wait for @chengjunlu's feedback and merge this tomorrow.

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_44 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_45 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@oleksandr-pavlyk oleksandr-pavlyk merged commit f6b0c36 into master Nov 8, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the sycl-kernel-api branch November 8, 2022 02:59
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_45 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

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.

dpctl doesn't support the cl::sycl::kernel in pybind11
4 participants