Skip to content

fix: remove linear indexing from getindex adjoints #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@ChrisRackauckas ChrisRackauckas merged commit 9980686 into SciML:master Jan 10, 2024
@AayushSabharwal AayushSabharwal deleted the as/linear-indexing branch January 30, 2024 06:37
@vchuravy
Copy link
Contributor

function Adapt.adapt_structure(to, VA::AbstractVectorOfArray)
    Adapt.adapt(to, Array(VA))
end

This definition was surprising to me. I epected it to return a VectorOfArray whose underlying tuple is adapted.

@ChrisRackauckas
Copy link
Member

It doesn't have an underlying tuple, it's an array of arrays. But yes, that is probably not right, it probably should recurse running adapt.

@ChrisRackauckas
Copy link
Member

do you have a test case that is sensitive to this?

@ChrisRackauckas
Copy link
Member

I made #434, but the tricky thing is always that GPUArrays cannot have other GPUArrays, so the structure would need to be Array of GPUArrays and I think VectorOfArray works out in that case?

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.

3 participants