Skip to content
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

Use views in concretization #49

Open
phipsgabler opened this issue Feb 5, 2022 · 4 comments
Open

Use views in concretization #49

phipsgabler opened this issue Feb 5, 2022 · 4 comments

Comments

@phipsgabler
Copy link
Member

To concretize, we need the runtime shapes, and to get them, we actually apply the lenses:

x_inner = get(x, I.outer)

It would be good if this were only views. Related: TuringLang/DynamicPPL.jl#341

@torfjelde
Copy link
Member

It would be nice if something like Base.maybeview was implemented for lenses

@phipsgabler
Copy link
Member Author

Yea, I thought about this yesterday after writing. Maybe we can implement some utils locally and then ask the Setfield people whether they want them (although they explicitely exclude new stuff for Setfield, IIRC...)

@yebai
Copy link
Member

yebai commented Nov 7, 2022

Fixed by #43?

@phipsgabler
Copy link
Member Author

No, it's not fixed, the implementation of get uses normal indexing (see linked issue).

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

No branches or pull requests

3 participants