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

Dedicated kernels for in-place dpt.divide and dpt.floor_divide #1431

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

ndgrigorian
Copy link
Collaborator

This pull request implements kernels for in-place division and floor division, i.e., dpt.divide(x, y, out=x) and dpt.floor_divide(x, y, out=x).

This avoids allocating an additional buffer for the output and copying back to the first operand.

  • 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?

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

@coveralls
Copy link
Collaborator

coveralls commented Oct 6, 2023

Coverage Status

coverage: 85.68%. remained the same when pulling 237b2d0 on inplace-division-kernels into 39e0700 on master.

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_8 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

Includes floor division and true division
Checks that the result type is either the same as the third template parameter, or none

Adds a comment to TrueDivideInplaceOutputType
@ndgrigorian ndgrigorian force-pushed the inplace-division-kernels branch from 3ed1d66 to 237b2d0 Compare October 10, 2023 21:49
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_33 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

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

Thank you @ndgrigorian for implementing this!

@ndgrigorian ndgrigorian merged commit e885838 into master Oct 11, 2023
24 of 25 checks passed
@ndgrigorian ndgrigorian deleted the inplace-division-kernels branch October 25, 2023 20:23
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.

3 participants