Hi,
I just wrote the following (broken) code in a .cuh file:
template <typename Tv>
struct RowIndexer
{
size_t operator()(size_t row, size_t col, size_t n) const
{
return row * n + col;
}
};
template <typename Tv>
void bug()
{
detail::RowIndexer rows;
}
Notice the absence of a template parameter to RowIndexer
in the bug
function.
Then, in a .cu file, I’m calling bug<float>();
This leads to the following error: CUDACOMPILE : nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION)
There is no other indication that the code is incorrect. If I declare the bug
function as a non-template function, the compiler catches the error.
This is all on MSVC 2022.