loopy
loopy copied to clipboard
A code generator for array-based code on CPUs and GPUs
Context: https://github.com/firedrakeproject/firedrake/issues/2544#issuecomment-1236974557
Currently it is not for `TemporaryVariable` ~~and `Kernel`~~
FYI @wence- (see diff)
Here's a reproducer ```python import loopy as lp t_unit = lp.make_kernel( [ "[N_e] -> { [r, x, i_tile, i_inner_outer, i_inner_inner, i_prcmpt, r_prcmpt, e_outer, e_inner, J_dim_0, J_dim_1, j_tile, j_inner] : (i_prcmpt)...
On Python 3.12, this provokes a stack overflow in the scheduler. It is not quite clear why that's the case; pure-Python recursion even with generators seems to respond well to...
```python from loopy.tools import LazilyUnpicklingList, LazilyUnpicklingDict, _PickledObject l = LazilyUnpicklingList([1, 2, 3, 4]) print(l) d = LazilyUnpicklingDict({'a':1, 'b':2}) print(d) p = _PickledObject(7) print(p) ``` before: ``` ``` after: ``` LazilyUnpicklingList([1,...
[View the loopy kernel on Gist.](https://gist.github.com/kaushikcfd/22485d07a101fb3dec6a2683eeee764d) Profile log, as reported by `cProfile`, links 90% of the codegen time to islpy routines: ``` 3024863 function calls (2382326 primitive calls) in 605.951...
illinois-ceesd/mirgecom#944 seems to be caused by a loss of certain length-1 loops during loopy processing. (Creating an issue for discussion. More details to follow.)