You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a 2D Navier-Stokes equation solver and data processing methods. The solver, written using the JAX library, is computationally expensive and leverages GPU acceleration. The less intensive post-processing methods use NumPy.
Some functions are required by both the solver and post-processing. Currently, duplicate copies exist – one for JAX and one for NumPy. What is the best way to optimize this code structure?
Passing a backend variablebackend = 'numpy' or 'jax': Suitable for functions where the underlying structure is identical between NumPy and JAX, with only the library calls differing
Write all the functions in JAX (Need to think over it)
Pros:
User friendliness
Cons:
Requires careful consideration of JAX-specific function implementations.
The text was updated successfully, but these errors were encountered:
Also at low resolutions, numpy is faster than gpu-jax, so ability to run on either is beneficential, falling back to numpy when jax is not installed is also favorable
This repository contains a 2D Navier-Stokes equation solver and data processing methods. The solver, written using the JAX library, is computationally expensive and leverages GPU acceleration. The less intensive post-processing methods use NumPy.
Some functions are required by both the solver and post-processing. Currently, duplicate copies exist – one for JAX and one for NumPy. What is the best way to optimize this code structure?
backend = 'numpy'
or'jax'
: Suitable for functions where the underlying structure is identical between NumPy and JAX, with only the library calls differingPros:
Cons:
The text was updated successfully, but these errors were encountered: