Skip to content

Refactor FD shmem index management #2299

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charleskawczynski
Copy link
Member

This PR refactors the FD shmem so that, for example, changing the number of dimensions for shmem can be done in a more isolated section.

@charleskawczynski charleskawczynski force-pushed the ck/fd_shmem_refactor branch 2 times, most recently from d0214a6 to 016ca4d Compare April 24, 2025 18:25
@charleskawczynski charleskawczynski force-pushed the ck/fd_shmem_refactor branch 5 times, most recently from c105d3e to d299c24 Compare April 28, 2025 22:32
@charleskawczynski charleskawczynski force-pushed the ck/fd_shmem_refactor branch 2 times, most recently from 1e90660 to 92e1e9f Compare May 11, 2025 16:31
@charleskawczynski
Copy link
Member Author

I think that this PR is fine to merge. Going to tag some people for review.

Copy link
Member

@imreddyTeja imreddyTeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a docstring for ShmemIndex? I'm a bit confused how col_id is intended to be used. Would this be to index into a 2d array of shape (n,m) where n*m=ncols per block?

@charleskawczynski
Copy link
Member Author

Could you add a docstring for ShmemIndex? I'm a bit confused how col_id is intended to be used. Would this be to index into a 2d array of shape (n,m) where n*m=ncols per block?

Sure. The idea is that col_id is the column id/index, which will allow us to create a shared memory array containing multiple columns-- in order to maintain a large number of threads in flight when the number of vertical levels is small.

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

Successfully merging this pull request may close these issues.

2 participants