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

Observation about new Kernel Operator #87

Open
adam-hartshorne opened this issue Feb 28, 2024 · 3 comments
Open

Observation about new Kernel Operator #87

adam-hartshorne opened this issue Feb 28, 2024 · 3 comments

Comments

@adam-hartshorne
Copy link

I notice the new kernel operator makes use of nested for loops and update operations. For JAX that is a very bad idea. for loops should be avoided at all costs.

@mfinzi
Copy link
Collaborator

mfinzi commented Feb 28, 2024

that's a good point, think we can replace these with a scan @AndPotap ?

@AndPotap
Copy link
Collaborator

Thanks for pointing this out. I'll think about how to do this for it to also be compatible with PyTorch.

@mfinzi
Copy link
Collaborator

mfinzi commented Feb 29, 2024

I think we would just want to add a xnp.scan function to the backends and then use that. Also for cases where we are using a xnp.for_loop right now, we should probably replace with scan where possible

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