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

discussion: explore alternative object-oriented API #1535

Closed
BenWibking opened this issue Apr 24, 2024 · 1 comment
Closed

discussion: explore alternative object-oriented API #1535

BenWibking opened this issue Apr 24, 2024 · 1 comment

Comments

@BenWibking
Copy link
Collaborator

It turns out that SYCL does not support managed global variables. Currently, this makes using Intel GPUs impossible.

As an alternative, it was proposed to move global state into a struct that is passed to each function in #1433. However, this has some downsides: it's annoying to pass around an additional function argument, and this will require more host-device copies and also increase kernel launch latency.

As a major API change, it is possible in principle to rewrite the networks (and EOSes) to use a singleton class instance (or, non-singleton functor objects that carry around the state with them). It might be possible to have both the new object-oriented API and the old API at the same time for non-SYCL builds.

As a side effect, this would make it possible to build Microphysics as a shared (or static) library (or otherwise greatly simplify the build process) since the network could be selected at runtime.

@BenWibking
Copy link
Collaborator Author

We no longer plan to use Intel GPUs, so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant