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

Cache kernels in array context #1

Closed
wants to merge 41 commits into from

Conversation

alexfikl
Copy link
Owner

@alexfikl alexfikl commented Sep 10, 2022

TODOs:

  • Is FMMLibRotationDataInterface necessary? It seems to be just a to_numpy(RotationClassesInfo), but it's also used in pytential in some places..

@inducer
Copy link

inducer commented Sep 16, 2022

  • Is FMMLibRotationDataInterface necessary? It seems to be just a to_numpy(RotationClassesInfo), but it's also used in pytential in some places..

I'd say no. One ugly aspect that hopefully this can resolve is that all arrays used to be, by convention, CL arrays. This was pretty unfortunate for FMMLib, because it doesn't work with CL arrays. In the "brave new world of array context", FMMLib would simply run on the Numpy array context (inducer/arraycontext#190), and only on that.

@alexfikl
Copy link
Owner Author

I'd say no. One ugly aspect that hopefully this can resolve is that all arrays used to be, by convention, CL arrays. This was pretty unfortunate for FMMLib, because it doesn't work with CL arrays. In the "brave new world of array context", FMMLib would simply run on the Numpy array context (inducer/arraycontext#190), and only on that.

As a end goal, I definitely agree with that. However, since a lot of small pieces in here go either through loopy or through pyopencl kernels, I imagine it'll take quite a bit more work than this to get it nicely agnostic.

Once boxtree, sumpy and pytential sort of work on the array context branches, we can probably revisit this a bit and see what's what.

@alexfikl alexfikl force-pushed the towards-array-context branch from 939f140 to e20af17 Compare September 17, 2022 17:44
@inducer
Copy link

inducer commented Sep 17, 2022

I agree. I think boxtree will retain a hard dependency on pyopencl for the foreseeable future, so in that sense the actx support will be skin-deep. Sumpy and the FMM are loopy-only, so I think that'll be easier to make "truly actx-ish". Pytential in turn does significant tree/geometry processing, leaving it back in "skin-deep" territory.

@alexfikl alexfikl force-pushed the towards-array-context branch from e20af17 to 4978392 Compare September 18, 2022 06:35
@alexfikl alexfikl force-pushed the array-context-caching branch from 72cdace to 5d1bb3e Compare September 18, 2022 06:47
@alexfikl alexfikl force-pushed the towards-array-context branch 4 times, most recently from 0285ae3 to c3dea9e Compare September 29, 2022 12:46
@alexfikl alexfikl closed this Oct 10, 2022
@inducer
Copy link

inducer commented Oct 16, 2022

Saw you closed this. Did this turn into commits in inducer#56? Or is it just game over here?

@inducer
Copy link

inducer commented Oct 16, 2022

And if the latter: would it make sense to dump this into a draft PR in the upstream repo?

@alexfikl
Copy link
Owner Author

@inducer I closed it the intention of calling it "game over". The branch is still around, but rebasing this on inducer#56 is probably a pain and it's only going to get worse when we remove some of that manual event handling.

The stuff here can be done more progressively and in a backwards compatible way once inducer#56 is in, so that's the plan.

And if the latter: would it make sense to dump this into a draft PR in the upstream repo?

If you want, sure, but it's probably easier to just do it from scratch instead of resolving the conflicts :\

@inducer
Copy link

inducer commented Oct 17, 2022

OK, thanks for explaining. Let's leave it here then.

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