-
Notifications
You must be signed in to change notification settings - Fork 11
Implement CupyArrayContext #251
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
base: main
Are you sure you want to change the base?
Conversation
ce508df
to
55b4cbf
Compare
Co-authored-by: Kaushik Kulkarni <[email protected]>
55b4cbf
to
7ab5211
Compare
test/test_arraycontext.py
Outdated
if isinstance(actx, CupyArrayContext): | ||
pytest.skip("CupyArrayContext does not support object arrays") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inducer: We had briefly discussed adding support for object arrays via a wrapper (?), but I'm not sure how that should look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready for a first look @inducer |
256dbdb
to
5f4c4d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was curious a bit about this and left some comments. Hope that's ok!
What's the use of adding a cupy
backend? I thought eager ones don't really give good performance and we already have both the pyopencl
and the jax
ones that can use CUDA (behind some abstraction layers, at least).
Thank you for the review! I don't have experience with jax, and we generally don't run mirgecom with it. Regarding the pyopencl-eager backend(s), it does not support all operations that we need (e.g., broadcasting), so we can't run all our drivers with it. This only leaves us with numpy or pytato backends. pytato has generally high compile times, so it's sometimes not great for debugging etc. Numpy time step times are often much slower than with cupy, as indicated above. |
Co-authored-by: Alexandru Fikl <[email protected]>
Ah.. broadcasting.. the bane of everyone's existence! Fair enough :( |
This reverts commit 3ee28cc.
This reverts commit ab8266d.
Co-authored-by: Alex Fikl <[email protected]>
@@ -25,7 +25,7 @@ implementations for: | |||
- Profiling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what are the implementations for debugging/profiling? (also mentioned in doc/
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there are any at the moment (?). Unless passing a CommandQueue
with profiling enabled counts there..
It would be nice to have some fancier profiling for things though 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a little nitpick, but otherwise this looks good to me! Thanks!
Co-authored-by: Alex Fikl <[email protected]>
03fc40a
to
d9ce8d5
Compare
Please squash