One of the claims of PyOP2 is portability of kernel source, however that's not currently true: When providing a kernel as a C string one needs to special case for host and device backends at the moment: host backends pull the iteration space inside the kernel, device backends don't.
This would be fixable if the kernel signature was generated by PyOP2 based on the arguments. I can see two potential ways of getting there:
- Make the argument list (and the access descriptors) part of the kernel object. This would also allow cross-checking with the
par_loop arguments when entering a par_loop.
- Lazily generate the kernel signature when entering a
par_loop based on its arguments.
One of the claims of PyOP2 is portability of kernel source, however that's not currently true: When providing a kernel as a C string one needs to special case for host and device backends at the moment: host backends pull the iteration space inside the kernel, device backends don't.
This would be fixable if the kernel signature was generated by PyOP2 based on the arguments. I can see two potential ways of getting there:
par_looparguments when entering apar_loop.par_loopbased on its arguments.