You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to determine my device-wide primitive's temp_storage_bytes before I have all of the primitive's arguments ready. The interface for obtaining it ostensibly requires everything to be ready for the actual run - and the documentation does not make it clear what arguments it actually needs and what it's going to do with them (e.g. will it look at the input at all, in any way? Probably not, but who knows)
Also, delving into the source (in my case: dispatch_select_if.cuh), I see:
if (d_temp_storage == NULL)
{
// Return if the caller is simply requesting the size of the storage allocation
break;
}
which is super-weird. What if I passed a pointer to a size_t containing 2^64-1? Would my code be led to believe it has to allocate that much? Hmm.
The text was updated successfully, but these errors were encountered:
From my experience with library, the arguments to calculate temp storage size are data type(s) (templated) and length of it.
I call the methods very early in the code with all pointers set to nullptr and only non-zero argument is size of the data to be processed and get the temp size that works fine till the very end.
Hope this helps.
We should add a section to the docs about this. A generic section that explains the common pattern and conventions for using the cub::Device* API would be useful.
I would like to be able to determine my device-wide primitive's temp_storage_bytes before I have all of the primitive's arguments ready. The interface for obtaining it ostensibly requires everything to be ready for the actual run - and the documentation does not make it clear what arguments it actually needs and what it's going to do with them (e.g. will it look at the input at all, in any way? Probably not, but who knows)
Also, delving into the source (in my case:
dispatch_select_if.cuh
), I see:which is super-weird. What if I passed a pointer to a size_t containing 2^64-1? Would my code be led to believe it has to allocate that much? Hmm.
The text was updated successfully, but these errors were encountered: