Skip to content

Utility validate_type_for_device must flag complex128 as it flags double#1040

Merged
oleksandr-pavlyk merged 1 commit intomasterfrom
expand-validate-type-for-device
Jan 21, 2023
Merged

Utility validate_type_for_device must flag complex128 as it flags double#1040
oleksandr-pavlyk merged 1 commit intomasterfrom
expand-validate-type-for-device

Conversation

@oleksandr-pavlyk
Copy link
Copy Markdown
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
Copy Markdown

@coveralls
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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