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 specialized kernel for sum(axis=0) as extension #1479

Conversation

AlexanderKalistratov
Copy link
Collaborator

@AlexanderKalistratov AlexanderKalistratov commented Jul 17, 2023

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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 filing the PR as a draft?

@AlexanderKalistratov
Copy link
Collaborator Author

@AlexanderKalistratov
Copy link
Collaborator Author

import dpnp
import time
a = dpnp.ones((262144, 128), device="gpu")

dpnp.sum(a, axis=1)
start = time.time()
dpnp.sum(a, axis=1)
print(time.time() - start)

dpnp.sum(a, axis=0)
start = time.time()
dpnp.sum(a, axis=0)
print(time.time() - start)

Before patch:

0.012103080749511719
0.12218356132507324

After patch:

0.011934280395507812
0.01417088508605957

@AlexanderKalistratov AlexanderKalistratov force-pushed the specialize_sum_mean_axis0_kernel branch from 0b4e9c8 to 642ec20 Compare July 17, 2023 17:30
@AlexanderKalistratov AlexanderKalistratov force-pushed the specialize_sum_mean_axis0_kernel branch 2 times, most recently from 7d0b294 to a92812d Compare July 17, 2023 19:06
@AlexanderKalistratov AlexanderKalistratov force-pushed the specialize_sum_mean_axis0_kernel branch from f308214 to 6ea51e7 Compare July 17, 2023 22:23
@AlexanderKalistratov AlexanderKalistratov marked this pull request as ready for review July 17, 2023 22:24
@AlexanderKalistratov AlexanderKalistratov force-pushed the specialize_sum_mean_axis0_kernel branch from 6ea51e7 to 1e03e27 Compare July 17, 2023 22:26
@AlexanderKalistratov AlexanderKalistratov force-pushed the specialize_sum_mean_axis0_kernel branch from 1e03e27 to 24df081 Compare July 17, 2023 22:30
@antonwolfy antonwolfy merged commit c4d8719 into IntelPython:master Jul 18, 2023
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