Skip to content

segfault in calling __array_namespace__ on a usm_ndarray class #1632

Description

@icfaust

Python 3.10 (venv)
Ubuntu 22.04.3 LTS
dpctl installed via pip (0.15.0)

Here is the example which seg faults:

>>> import dpctl
>>> import dpctl.tensor as dpt
>>> import numpy as np
>>> j = dpt.asarray(np.zeros((100,)))
>>> import dpctl
>>> dpctl.__version__
'0.15.0+42.g2a2c98f1f'
>>> type(j).__array_namespace__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __array_namespace__() needs an argument
>>> type(j).__array_namespace__(type(j))
Segmentation fault (core dumped)

Its a dumb thing to query, but the fact it seg faults is not good. This likely needs to be guarded against.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions