Skip to content

[cuda.compute]: Add support for accepting DLPack arrays #6883

@NaderAlAwar

Description

@NaderAlAwar

In cuda.compute, we currently require that input arrays implement __cuda_array_interface__. This allows us to support Python arrays from different libraries in cuda.compute since it is a standard interface to extract array metadata.

DLPack is a more recent standard supported by a larger number of array libraries. We should allow users to pass in DLPack arrays instead of only __cuda_array_interface__.

cuda.core includes StridedMemoryView which extracts array metadata from arrays that implement both __cuda_array_interface__ and DLPack. We should use StridedMemoryView in cuda.compute.

cc @shwina

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions