Hello Duncan
My apologies for the late response. I did try with the add_sycl_to_target
function but still ran into the same error. I also deleted all the CMake caches and everything associated with it, but still ran into it. (I did get different error messages with different compiler flags.)
what seemed to work was instead of -
nd_range<2> launchParams = nd_range<2>(cl::sycl::range<2>(K / numThreads + 1, M / numThreads + 1),
cl::sycl::range<2>(numThreads, numThreads));
global range should be a multiple of local range -
auto local_range = range<2>(numThreads, numThreads);
auto global_range = range<2>(M / numThreads + 1, N / numThreads + 1) * local_range;
auto launchParams = nd_range<2>(global_range, local_range);
This works perfectly.