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

Remove field dimension in DataLayouts #1748

Open
Tracked by #2632
charleskawczynski opened this issue May 21, 2024 · 3 comments
Open
Tracked by #2632

Remove field dimension in DataLayouts #1748

charleskawczynski opened this issue May 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@charleskawczynski
Copy link
Member

Removing the field dimension in the DataLayouts will allow us to specialize on all pointwise operations to use linear indexing, resulting in a 2x speedup (#1403).

@charleskawczynski
Copy link
Member Author

One option that I looked into was to see if we could change the user code to have Nf = 1 (almost) everywhere, and simply drop the use of views. One issue I ran into, however, is that: Expressions like @. ᶜts = ts_gs(thermo_args..., ᶜspecific, ᶜK, ᶜΦ, Y.c.ρ) results in ERROR: LoadError: ArgumentError: broadcasting over dictionaries and NamedTuples is reserved. We can technically resolve this by passing in the only parts that are needed, but this could require lots of changes on the user-side. It would be much more ideal if DataLayouts themselves have NamedFields stored in contiguous memory.

This might require fixing #11 first.

@charleskawczynski
Copy link
Member Author

One important note is that memory coalescence "comes for free" with linear indexing on the gpu. I'd be curious if linear indexing is similarly important on the gpu, or if it's only a matter of memory coalescence. We should definitely verify this, first.

@charleskawczynski
Copy link
Member Author

Using the thermo state assignment is probably a good representative example. We should probably also have a FD operation, so that we can include an example that uses LocalGeometry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant