title: Numba/CUDA - Calling vectorized library function
body: <p>I would like to use Numba to get the GPU to run the following function defined <a href="https://github.com/HDembinski/numba-stats/blob/9f86a656b81da28009f0a377b4a3fe64375ed087/src/numba_stats/t.py#L34" rel="nofollow noreferrer">here</a>, which has the signature:</p>
  <pre><code>@numba.vectorize(_signatures)
  def ppf(p, df, mu, sigma):
      # do stuff here
  </code></pre>
  <p>I'm not sure if this is relevant, but I noticed that because this function is defined in a separate package, I can't specify in the decorator <code>target='cuda'</code>.</p>
  <p>For example, consider the following snippet:</p>
  <pre><code>from numba import cuda, vectorize
  
  @cuda.jit('float32(float32, float32, float32)', device=True)
  def cu_device_fn(x, y, z):
      return x ** y / z
  
  # define a ufunc that calls our device function
  @vectorize(['float32(float32, float32, float32)'], target='cuda')
  def cu_ufunc(x, y, z):
      return cu_device_fn(x, y, z)
  </code></pre>
  <p>Straightforwardly, I can call this function directly via <code>cu_ufunc(10, 2, 2)</code>.</p>
  <p>How do I do the same thing, i.e., get the GPU to run this imported Numba function?</p>
  <p>Sorry for the lack of details. I'm a complete beginner to GPU programming and just totally lost.</p>