Open
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Jutho
reviewed
Mar 18, 2026
ext/StridedGPUArraysExt.jl
Outdated
Comment on lines
+45
to
+46
| function Base.copyto!(dest::StridedView{TD, ND, TAD, FD}, dstart::Integer, | ||
| src::StridedView{TS, NS, TAS, FS}, sstart::Integer, n::Integer) where {TD, TS, ND, NS, TAD <: AbstractGPUArray{TD}, TAS <: AbstractGPUArray{TS}, FD, FS} |
Member
There was a problem hiding this comment.
Does it make sense to do this with offsets and linear indexing? Is this 5-arg version used anywhere? It doesn't feel very natural to have a linear offset/start in a strided but not necessarily contiguous array.
Member
Author
There was a problem hiding this comment.
Yes, it's directly used in multiple copyto! calls very deep in TensorKit that are quite brittle and easy to get wrong
Member
Author
There was a problem hiding this comment.
This one is invoked directly by the one-line function after this one, it's copying something in GPUArrays
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs tests but handles
copyto!without scalar indexing. Definitely could be improved with some Cartesian indexing. Needed for the more complex index-manipulated TensorKit operations.