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

Check dtype support of each array in resulting tuple in call_origin #1457

Merged

Conversation

vlad-perevezentsev
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev commented Jun 27, 2023

The call_origin function does not check the resulting array dtype and its support by device after numpy function is called when the result is tuple of arrays so ValueError error was raised when running on Iris Xe.

import dpnp
h, e = dpnp.histogram([1, 2], bins=1)
ValueError: Device Intel(R) Graphics does not provide native support for double-precision floating point type.

This PR adds the use of map_dtype_to_device function for each dtype of array from the resulting tuple.

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

Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

Btw LGTM! thank you @vlad-perevezentsev

tests/test_histograms.py Outdated Show resolved Hide resolved
tests/test_histograms.py Outdated Show resolved Hide resolved
@vlad-perevezentsev vlad-perevezentsev merged commit a1a9b14 into IntelPython:master Jun 29, 2023
20 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the fix_call_origin branch June 29, 2023 09:50
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