The gist of it is as follows:
When executing cuLaunchKernel with params that are mixed host/device pointers, I am getting SEH exception with code 0xc0000006 when the parameters vector is initialized with device buffer pointer. It doesn’t matter if the buffer is device-only or managed/using pinned memory.
// initialize parameters
std::vector<void *> parameters{};
for ( const auto &arg : writeArgs ) {
// this code extracts buffer pointers from our list of arguments
// when buffers are scalar values, these point to host memory
// when buffers are gpu buffers, these point to device memory
parameters.push_back( arg->getGPUBufferPtr() );
}
cuLaunchKernel( cuFunc,
execGridSize[0],
execGridSize[1],
execGridSize[2], // Grid Sizes
execBlockDim[0],
execBlockDim[1],
execBlockDim[2], // Block Dimensions
0, // Shared Memory
_cuStream, // Stream
parameters.data(), // Kernel Parameters,
NULL // Extra Parameters
),