You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using __array_interface__ instead of adding __sycl_usm_array_interface__ #191
Using 2 properties __array_interface__ and __sycl_usm_array_interface__ in dparray requires 2 checks in downstream libraries.
Performance penalty.
Related to #184.
changed the title [-]Usgin __array_interface__ instead of adding __sycl_usm_array_interface__[/-][+]Using __array_interface__ instead of adding __sycl_usm_array_interface__[/+]on Dec 3, 2020
These two properties serve different purposes, and can not be combined. One does not have to check for both. Please clarify what performance penalty you have in mind.
Does it mean that we will always know exactly which property we need?
Please clarify what performance penalty you have in mind.
Double checking both properties. One for SYCL queue (__sycl_usm_array_interface__) and another for fallback to usual __array_interface__ if the first property is not available.
I know this cases from dpNP and @shssf.
Also I have asked @DrTodd13 about this new property.
Just want to know the reasons behind introducing this property and comparing to other variants (i.e. extend __array_interface__ dict with new items).
NumPy checks for __array_interface__ trying to recognize a Python object as a "duck-array", also known as "array-like" . This property has been largely superseded by Python buffer protocol.
Python objects backed by USM memory export __sycl_usm_array_interface__ to be recognized as carriers of USM memory.
Using 2 properties
__array_interface__and__sycl_usm_array_interface__in dparray requires 2 checks in downstream libraries.Performance penalty.
Related to #184.
/CC @oleksandr-pavlyk @shssf