Passing a __half to a kernel

So, when using cuLaunchKernel() I have been able to pass __half* kernel parameters without problems.

However, I wonder if I can pass it non-array simple __half parameters as well? Or can I only pass full floats that way?

It should work. See here

Perhaps your question is more about cuLaunchKernel. Typically kernel params are passed as an array of pointers. I don’t expect taking the address of a float quantity to be mechanically different than taking the address of a __half quantity.

1 Like