Can we accelerate functions from other packages using juliaGPU package?


I want to accelerate functions imported from other julia packages. In the past, I always use

using Distributed

To accelerate computation, and what I need to do is just write the functions and execute it. In fact, I don’t need to do anything special about it.

I am new to juliaGPU and what I want to know is: If I am importing an external function from outside packages, for example funCPU(a,b), and I want to do is use juliaGPU to accelerate it. How can I achieve that? Since this function is write in outside packages and defined in CPU code.

In Julia, the GPU or CPU location is encoded in the type of an array. For instance, a CuArray from CUDA.jl lives on an NVIDIA GPU. So if you have a function generic enough to accept arbitrary array types, then applying it to a CuArray will just work.


Many thanks for that, I will have a try!