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

Start kernel_arg_type enums from 0 #1585

Merged
merged 4 commits into from
Mar 8, 2024
Merged

Start kernel_arg_type enums from 0 #1585

merged 4 commits into from
Mar 8, 2024

Conversation

ZzEeKkAa
Copy link
Contributor

@ZzEeKkAa ZzEeKkAa commented Mar 7, 2024

Fixes IntelPython/numba-dpex#1379 and #1581 . Other enums must be revisited.

  • 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?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@ZzEeKkAa ZzEeKkAa self-assigned this Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

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

@coveralls
Copy link
Collaborator

coveralls commented Mar 7, 2024

Coverage Status

coverage: 87.743% (+0.03%) from 87.717%
when pulling 5ef035e on fix/kernel_arg_type
into 545dff2 on master.

Copy link

github-actions bot commented Mar 7, 2024

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_69 ran successfully.
Passed: 906
Failed: 0
Skipped: 94

@oleksandr-pavlyk
Copy link
Collaborator

The change itself seems fine, did you test whether numerical value of enum members in Python actually changed values because of this change? Should tests be added to verify numerical values of different enum members?

@ZzEeKkAa
Copy link
Contributor Author

ZzEeKkAa commented Mar 8, 2024

I've tested in numba-dpex (that's actually how I've found this issue). Definitely we need to test this and other enums in following PRs.

Copy link

github-actions bot commented Mar 8, 2024

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_70 ran successfully.
Passed: 906
Failed: 0
Skipped: 94

The new implementation uses values from C enum, and hence the
consistency between values in Python and values in C are assured.
@oleksandr-pavlyk
Copy link
Collaborator

I have pushed a change to reimplement kernel_arg_type class using Cython, to have hard binding with values of enum in C.

This change would drop coverage, and requires adding more tests, feel free to add those, otherwise I'd push changes to add more tests a bit later.

Copy link

github-actions bot commented Mar 8, 2024

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_71 ran successfully.
Passed: 906
Failed: 0
Skipped: 94

Copy link

github-actions bot commented Mar 8, 2024

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_72 ran successfully.
Passed: 906
Failed: 0
Skipped: 94

@ZzEeKkAa
Copy link
Contributor Author

ZzEeKkAa commented Mar 8, 2024

LGTM! Tested localy for dpex - it works!

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.

Nice improvements, four years in the waiting!

@diptorupd diptorupd merged commit 13f4443 into master Mar 8, 2024
41 of 43 checks passed
@diptorupd diptorupd deleted the fix/kernel_arg_type branch March 8, 2024 19:28
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.

4 participants