omlins / ParallelStencil.jl

Package for writing high-level code for parallel high-performance stencil computations that can be deployed on both GPUs and CPUs
BSD 3-Clause "New" or "Revised" License
312 stars 31 forks source link

Extract utils for uniform parallel code to own package #160

Closed SteffenPL closed 1 month ago

SteffenPL commented 1 month ago

I quite like the design of this package and often need some of the parts, like @zeros, Data.Array in other projects which per-se do not require the other features of ParallelStencil.jl.

Would it be possible/welcome to extract those bits into a own package? E.g. a package which is just there to load the right backend and have uniform names for common operations, for example for using with KernelAbstractions.jl

Anyway, feel free to close as it is not really an "issue" ;)

omlins commented 1 month ago

I quite like the design of this package and often need some of the parts, like @zeros, Data.Array in other projects which per-se do not require the other features of ParallelStencil.jl.

Thanks for sharing this and for your interest!

It is not so clear to me and though what you would consider extracting into a separate package. Would that be essentially everything that is not stencil-specific? All that is since the beginning kept in a submodule ParallelStencil.ParallelKernel, which indeed could at some point fairly easy become an independent package.

Also, to do a backend that generates KernelAbstractions code is planned.

Finally, all backend-related packages have become weak dependencies and are used via extensions. Thus, the base package is rather lightweight if that is your concern.

SteffenPL commented 1 month ago

Thanks for the quick reply!

I really should have looked at the code first, ParallelStencil.ParallelKernel is precisely what I was looking for. Indeed, ParallelStencil.jl is not too heavy in terms of non-weak dependencies!

omlins commented 1 month ago

@SteffenPL I am glad that this is what you were looking for! Note: there is also documentation that can be queried from REPL for the module and all its functions/macros etc. just like for the main module ParallelStencil:

image