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

Seamless support for multiple backends #298

Open
fandreuz opened this issue Nov 28, 2022 · 0 comments · May be fixed by #299
Open

Seamless support for multiple backends #298

fandreuz opened this issue Nov 28, 2022 · 0 comments · May be fixed by #299

Comments

@fandreuz
Copy link
Contributor

Support multiple backends (NumPy, PyTorch, JAX, CuPy, ...) by decoupling the implementation of DMD variant from the provider of linear algebra operations. This would enable running on distributed architectures, GPUs, and maybe even differentiation.

This could be achieved by inferring the backend from the type of vectors/matrices provided by the user, and writing some mapping class for functions and methods.

Example (high level idea)

from pydmd.la_mappings import svd

X = np.ndarray
svd(X)
def svd(X):
   if isinstance(X, np.ndarray):
      return np.linalg.svd
   ...

Fixes #297

@fandreuz fandreuz self-assigned this Nov 28, 2022
This was referenced Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant