PytatoPyOpenCLArrayContext: use SVM allocator if available, limit arg size for GPUs - #189
Merged
Conversation
matthiasdienerforce-pushed
the
limit-arg-size
branch
from
August 31, 2022 03:03
156e369 to
ba7c205Compareinducer
reviewed
Aug 31, 2022
inducer
left a comment
Owner
There was a problem hiding this comment.
This looks good generally. Two style nits below.
Two questions:
- Does it work?
- How come it's marked as draft?
| with ProcessLogger(logger, f"generate_loopy for '{prg_id}'"): | ||
| import pyopencl as cl | ||
| dev = self.actx.context.devices[0] |
Owner
There was a problem hiding this comment.
Safer to get it from the queue, which only has one device.
Uh oh!
There was an error while loading. Please reload this page.
inducer
reviewed
Aug 31, 2022
| and cl.characterize.has_coarse_grain_buffer_svm(dev)): | ||
| limit = dev.max_parameter_size | ||
| # Leave some extra space since our sizes are estimates | ||
| target = lp.PyOpenCLTarget(limit_arg_size_nbytes=limit//2) |
Owner
There was a problem hiding this comment.
Hmm, upon second thought: We can only pass this if we're sure that the memory allocated is actually SVM. So this has to get involved with memory pool creation.
CollaboratorAuthor
There was a problem hiding this comment.
Should we do this here or as part of inducer/loopy#642 ?
CollaboratorAuthor
CollaboratorAuthor
As far as I can tell, yes.
This still needs the other PRs to be merged first I think. |
matthiasdienerforce-pushed
the
limit-arg-size
branch
from
September 13, 2022 01:12
40c3821 to
6e912a9Comparematthiasdiener
marked this pull request as ready for review
September 13, 2022 13:37
matthiasdiener
commented
Sep 19, 2022
CollaboratorAuthor
This is ready for another review @inducer |
inducer
enabled auto-merge (squash)
September 19, 2022 22:07
inducer
commented
Sep 19, 2022
Owner
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs:
LoopyPyOpenCLTarget: pass through loopy.PyOpenCLTarget pytato#359(maybe not needed)PyOpenCL target: Overflow large argument counts into SVM struct loopy#642