Skip to content

refactor: update StridedMemoryView.from_buffer to accept tuples and dtype instead of now-private _StridedLayout - #1380

Merged
cpcloud merged 7 commits into
NVIDIA:mainfrom
cpcloud:change-from-buffer-signature
Dec 16, 2025
Merged

refactor: update StridedMemoryView.from_buffer to accept tuples and dtype instead of now-private _StridedLayout#1380
cpcloud merged 7 commits into
NVIDIA:mainfrom
cpcloud:change-from-buffer-signature

Conversation

@cpcloud

@cpcloud cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Change the definition of StridedMemoryView.from_buffer to accept shape, strides, and order to match the functionality of _StridedLayout without exposing it in the public API.

@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

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.

@github-actions

This comment has been minimized.

Comment thread cuda_core/cuda/core/experimental/_memoryview.pyx Outdated
Comment thread cuda_core/cuda/core/experimental/_memoryview.pyx Outdated
Comment thread cuda_core/cuda/core/experimental/_memoryview.pyx Outdated
@leofang leofang added this to the cuda.core beta 10 milestone Dec 16, 2025
@leofang leofang added enhancement Any code-related improvements P0 High priority - Must do! cuda.core Everything related to the cuda.core module labels Dec 16, 2025
@cpcloud
cpcloud force-pushed the change-from-buffer-signature branch from a289de6 to b54f628 Compare December 16, 2025 18:17
@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test

@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test

@leofang

leofang commented Dec 16, 2025

Copy link
Copy Markdown
Member

LGTM! One question: There are still a few references to _StridedLayout in the docs:
https://nvidia.github.io/cuda-python/pr-preview/pr-1380/cuda-core/latest/search.html?q=_StridedLayout
What to do with them?

I think we should at least comment out SMV.layout and make it private.

@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

Let me see if making layout private is going to be a huge effort.

@leofang

leofang commented Dec 16, 2025

Copy link
Copy Markdown
Member

yeah if it's too much churn then let's just raise a warning if users try to access it

@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test

@cpcloud

cpcloud commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

I removed I think all public references to StridedLayout as well as its mentions in various error messages.

@cpcloud
cpcloud requested a review from leofang December 16, 2025 20:25
@cpcloud
cpcloud enabled auto-merge (squash) December 16, 2025 21:16
@cpcloud
cpcloud merged commit c82e0d8 into NVIDIA:main Dec 16, 2025
80 checks passed
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

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

Labels

cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants