Skip to content

Conversation

@cpcloud
Copy link
Contributor

@cpcloud cpcloud commented Nov 7, 2025

This PR adds three methods to conform better to APIs familiar to Python users and to ease future work on StridedMemoryView
adding support for constructing them from other objects besides CAI and dlpack objects.

Three methods are added:

  • from_dlpack(obj, stream_ptr) same functionality as before
  • from_cuda_array_interface(obj, stream_ptr) same functionality as before
  • from_any_interface(obj, stream_ptr) same behavior as the previous constructor

The constructor changes to a simple field initialization, in an effort to make
it easier to add a from_buffer (naming TBD) method that allows construction
from an owned raw buffer (without shape and stride information), which may
require passing in additional information such as shape and stride to the
constructor.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Nov 7, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 7, 2025

/ok to test

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

@cpcloud cpcloud force-pushed the smv-info-constructor branch from 786140a to f7eef8d Compare November 7, 2025 21:38
@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 7, 2025

/ok to test

…and make constructor amenable to future from_*-style constructors
@cpcloud cpcloud force-pushed the smv-info-constructor branch from f7eef8d to 2cd276a Compare November 7, 2025 21:39
@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 7, 2025

/ok to test

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.

1 participant