Skip to content

M2P: target boxes parallelization and shared coefficients - #313

Draft
ShawnL00 wants to merge 5 commits into
inducer:mainfrom
ShawnL00:m2p
Draft

ShawnL00 wants to merge 5 commits into
inducer:mainfrom
ShawnL00:m2p

Conversation

@ShawnL00

@ShawnL00 ShawnL00 commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Reimplementation of Isuru's M2P GPU optimization in #180:

  • One workgroup per target box.
  • Shared multipole expansion coefficients in local memory.

(Assisted by ChatGPT and Claude.)

To-do: add recurrences for mixed derivatives.

@ShawnL00 ShawnL00 changed the title M2P: target boxes parallelization M2P: target boxes parallelization and shared coefficients Oct 18, 2026
Comment thread sumpy/e2p.py
work_items_per_group = 128
loopy_args = self.get_loopy_args()

loopy_knl = make_loopy_program(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

See if you can make Loopy do the split?

Comment thread sumpy/e2p.py

def get_optimized_kernel(self):
# FIXME
def get_shared_coefficient_kernel(self, max_ntargets_in_one_box):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'd only like to maintain one of these kernels.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants