cuda-python
cuda-python copied to clipboard
Allow user-provided annotation for kernels generated from `Program` and`ObjectCode`
We have examples like this today
kernel = module.get_kernel("vectorAdd<float>")
which does not tell us what args are expected on the device side, and so when launch(s, config, kernel, ...) is called we cannot do type checking for users.
During the meeting the preliminary idea is to allow users to (optionally) register
- C/C++ types on the device side
- Python types on the host side
similar to what cffi does today, ex: https://github.com/NVIDIA/cuda-python/blob/b347255fc142fa49a6155720d66ec23101f1eaa7/cuda_core/examples/strided_memory_view_cpu.py#L98
We still want to be able to keep the fast path that Python int can be interpreted as pointer addresses.