Skip to content

Fixed bug causing dpt.arange(0,1,1e-3,dtype="f4") be length 1 #855

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 1 commit into from
Jul 3, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk commented Jul 3, 2022

The expected length of dpt.arange(0,1, 0.25, dtype="f4") is 4 elements, but old code was constructing array of length 1.

Fixed the logic for computing the length of the array to allocated. Added a test.

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

The expected length should be 1000 elements
@github-actions
Copy link

github-actions bot commented Jul 3, 2022

@coveralls
Copy link
Collaborator

Coverage Status

Coverage increased (+0.02%) to 81.639% when pulling b1e7dcd on bugfix-arange into 42afc0c on master.

@oleksandr-pavlyk oleksandr-pavlyk merged commit 1131ce9 into master Jul 3, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the bugfix-arange branch July 3, 2022 22:51
@github-actions
Copy link

github-actions bot commented Jul 3, 2022

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

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.

2 participants