-
Notifications
You must be signed in to change notification settings - Fork 16
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
LoopyPyOpenCLTarget: pass through loopy.PyOpenCLTarget #359
Conversation
Not sure I love this. In general, we could just set the target on the generated loopy translation unit after it has been generated. This would make pytato's logic entirely independent of the details of loopy target selection, which seems nicer. @kaushikcfd, would you agree? |
I agree, I think the principled way to do this is not leaking any details about the loopy kernel execution to |
""" | ||
|
||
def __init__(self, device: Optional["pyopencl.Device"] = None): | ||
def __init__(self, device: Optional["pyopencl.Device"] = None, |
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.
Create a new constructor arg that accepts an lp.PyOpenCLTarget()
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.
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.
Sorry to be sending you around in circles, but I just realized we don't even need any pytato changes. We can simply subclass LoopyPyOpenCLTarget
in the array context and override get_loopy_target
there.
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.
What do you think of inducer/arraycontext@2768fee ?
Testing this together with inducer/arraycontext#189 appears to work as expected, and avoids the test failures seen in illinois-ceesd/mirgecom#746 |
I think this PR can be closed right? |
Yep. |
Needs:
PyOpenCL target: Overflow large argument counts into SVM struct loopy#642