Skip to content

[dpnp.array] Attributes .data and .data.ptr for dpnp array #2475

Open
@abagusetty

Description

@abagusetty

Hi, I've encountered a use case from porting a CuPy-based project on ALCF Aurora and was wondering if we can support a similar in functionality to access a dpnp.array with attributes data and .data.ptr.

import dpnp
a = dpnp.array([1, 2, 3])
print(type(a))
print(hasattr(a, 'data'))  # True for cupy
print(hasattr(a.data, 'ptr'))  # True for cupy, False for numpy
print(a.data.ptr)  # Integer (CUDA memory address)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions