LoopyPyOpenCLTarget: pass through loopy.PyOpenCLTarget - #359
LoopyPyOpenCLTarget: pass through loopy.PyOpenCLTarget#359matthiasdiener wants to merge 3 commits into
Conversation
inducer
commented
Sep 9, 2022
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? |
kaushikcfd
commented
Sep 9, 2022
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.
Create a new constructor arg that accepts an lp.PyOpenCLTarget()
There was a problem hiding this comment.
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.
What do you think of inducer/arraycontext@2768fee ?
matthiasdiener
commented
Sep 13, 2022
Testing this together with inducer/arraycontext#189 appears to work as expected, and avoids the test failures seen in illinois-ceesd/mirgecom#746 |
matthiasdiener
commented
Oct 21, 2022
I think this PR can be closed right? |
inducer
commented
Oct 21, 2022
Yep. |
Needs:
PyOpenCL target: Overflow large argument counts into SVM struct loopy#642