KernelAbstractions.jl
KernelAbstractions.jl copied to clipboard
Unified memory interface?
A few backends have the option to create arrays using unified memory. Using unified memory for certain algorithms can have significant (positive) impact on performance by removing the need for @allowscalar. See the Metal.jl private array findall benchmarks.
I think it would be nice to have a way for backends to indicate whether they support unified memory or not so KA kernels can use this.
Yeah it something I haven't thought much abou. Do you just want a query or some additional utility functions? Like an unsafe_wrap?
I was thinking of just query since that's all that's needed for use-cases like the findall example listed above or how it's used in the Metal LinearAlgebra.lu!. To be clear I'm not suggesting ever defining a generic KA version of lu!, I'm just using it as an example of how shared/unified memory can be used to speed up algorithms