Skip to content

Utility validate_type_for_device must flag complex128 as it flags double #1040

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
Jan 21, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Utility validate_type_for_device<T>(sycl::device &) modified to flag std::complex<double> for devices with no aspect::fp64.

  • Have you provided a meaningful PR description?
  • Have you tested your changes locally for CPU and GPU devices?

To test, I used:

In [1]: import dpctl.tensor as dpt, dpctl.tensor._tensor_impl as ti

In [2]: dpt.ones(10, dtype='c16')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 dpt.ones(10, dtype='c16')

File ~/repos/dpctl/dpctl/tensor/_ctors.py:708, in ones(sh, dtype, order, device, usm_type, sycl_queue)
    700 dtype = _get_dtype(dtype, sycl_queue)
    701 res = dpt.usm_ndarray(
    702     sh,
    703     dtype=dtype,
   (...)
    706     buffer_ctor_kwargs={"queue": sycl_queue},
    707 )
--> 708 hev, _ = ti._full_usm_ndarray(1, res, sycl_queue)
    709 hev.wait()
    710 return res

RuntimeError: Device Intel(R) Graphics [0x9a49] does not support type 'complex128'

In [3]: quit

@github-actions
Copy link

@coveralls
Copy link
Collaborator

coveralls commented Jan 20, 2023

Coverage Status

Coverage: 82.23%. Remained the same when pulling f69658f on expand-validate-type-for-device into 83ad22d on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_22 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@oleksandr-pavlyk oleksandr-pavlyk merged commit a7c3e8a into master Jan 21, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the expand-validate-type-for-device branch January 21, 2023 02:15
@github-actions
Copy link

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

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_22 ran successfully.
Passed: 32
Failed: 802
Skipped: 280

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