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

JIT is breaking because of numpy operations #11

Open
aravindshaj opened this issue Jul 14, 2021 · 2 comments
Open

JIT is breaking because of numpy operations #11

aravindshaj opened this issue Jul 14, 2021 · 2 comments

Comments

@aravindshaj
Copy link

Hi @IvanYashchuk . Thank you for creating this amazing interface for JAX with FEniCS !! I am receiving the following error and was hoping you could help me out with it.

Error occurs when I run my code with @jit
Screen Shot 2021-07-15 at 4 29 43 AM

Please let me know if you require anymore information.

@IvanYashchuk
Copy link
Owner

Hello, @aravindshaj! Unfortunately, jax.jit is not supported yet. Previously, to make it work XLA CustomCall needed to be used. Now it seems like it's not difficult to add support of arbitrary Python functions to work with jax.jit using jax.experimental.host_callback but I haven't implemented it.

@aravindshaj
Copy link
Author

Hi @IvanYashchuk . Thank you for the quick reply. Would jax.jit be supported on the jax-fenics package?

Thank you for the recommendation. I am not very familiar with jax and wasn't able to understand how to use jax.experimental.host_callback. Would you be able to show a very primitive code sample where I can integrate jax.jit?

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

2 participants