cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

Document best practices in preparing arguments for `cuLaunchKernel`

Open leofang opened this issue 1 year ago • 2 comments

@gigony complained the following example is unclear compared to CuPy's RawKernel, and I agree. https://github.com/NVIDIA/cuda-python/blob/e1e332564c48db556212d59262a149b1a63285e8/docs_src/source/overview.md?plain=1#L208-L223 Specifically, how to pass typed pointers and scalars is really unclear.

This also raises the question: It seems NumPy has to be a run-time dependency of cuda-python (which is completely fine, since it is impossible that users have GPU projects installed to an environment where NumPy does not exist, we just need to ensure this intent is expressed as a package dependency).

For comparison, here's cupy.RawKernel's documentation https://docs.cupy.dev/en/stable/user_guide/kernel.html#kernel-arguments

leofang avatar Sep 24 '24 03:09 leofang