Skip to content

Conversation

@alexfikl
Copy link
Collaborator

@alexfikl alexfikl commented Sep 4, 2022

Get sumpy on array contexts as well! This eats up the first commit from #118.

Porting individual files

  • Pass tests!
    • test_codegen
    • test_cse
    • test_distributed
    • test_fmm
    • test_kernels
    • test_matrixgen
    • test_misc
    • test_qbx
    • test_tools
  • Port examples!
    • curve-pot
    • curve
    • expansion-toys
    • fourier
    • sym-exp-complexity

Remaining porting issues

  • Move caching to the array context from KernelCacheMixin.
  • Handle kernel optimizations.
    • Currently it uses get_cached_executor(), which branches on OPT_ENABLED, but we need to move to actx.call_loopy.
    • Move to transform_loopy_program? Would need to also add some fancy tags or something to customize it?
  • Need to move e.g. register_optimization_preambles to the array context somehow too.
    • The kernels no longer have a context or device, so they can't do that.
    • Probably need to move this to actx.transform_loopy_program somehow?

Upstream / downstream PRs

Speculative TODOs

  • Should some classes clone the actx? Here e.g. SumpyTreeIndependentDataForWrangler but also in boxtree.
    • The big worry is that cloning throws away any caches on the actx.
    • Pretty much all *Builder classes can be functions + all other memoized kernels can be functions, but should leave that for later since it can be done without breaking the world.
  • Rip out the timing stuff (not sure, just mentioned by @inducer at some point).
    • This would also need to be done in boxtree?
  • Add an array context to do the timing stuff? (likely for a future PR)

@alexfikl alexfikl force-pushed the towards-array-context branch from d74bfc1 to 5d95944 Compare September 4, 2022 17:47
@inducer
Copy link
Owner

inducer commented Dec 3, 2025

FYI I'm somewhere half-way resolving conflicts in this.

Copy link
Owner

Choose a reason for hiding this comment

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

Not sure I love that an explicit actx argument is necessary now. It might be better to have the actx globally in the toy context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm very fine with that! Don't recall if I had any particular reason to make it explicit to each function (possibly to match P2P.__call__ and friends?).

@inducer inducer mentioned this pull request Dec 4, 2025
9 tasks
@inducer
Copy link
Owner

inducer commented Dec 4, 2025

Draft merge in #256.

@inducer
Copy link
Owner

inducer commented Dec 10, 2025

Continued in #256, closing here, since I can't seem to force-push here.

@inducer inducer closed this Dec 10, 2025
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.

3 participants