0

I'm trying to run a small piece of code using SYCL but it keeps crashing.

Here is a minimal example reproducing the problem.

#include <CL/sycl.hpp>

class vector_addition;

int main(int, char**) {
   cl::sycl::default_selector device_selector;
   cl::sycl::queue queue(device_selector);

   {
     queue.submit([&] (cl::sycl::handler& cgh) {});
   }   
   return 0;
}

The problem comes from the function queue.submit which throws a cl::sycl::exception.

It happens even if the function is not empty and contains things that should not cause problems. The device name I obtain is also the name of the GPU I would like to use.

Thanks!

  • Can you include the details of the exception that is thrown? You can see instructions here on how to catch asynchronous exceptions. https://developer.codeplay.com/products/computecpp/ce/guides/sycl-guide/error-handling – Rod Burns Mar 04 '21 at 12:49
  • Thank you for your reply. I was unaware it was possible to know more about the exception. Here is what I obtained: ```Error: [ComputeCpp:RT0221] No command group available in this functor (Command group is empty )```. Thanks! –  Mar 04 '21 at 13:27
  • I am not sure you can just have an empty kernel like that. If you use the vector add example from here does that work for you? https://developer.codeplay.com/products/computecpp/ce/guides/ – Rod Burns Mar 16 '21 at 09:14

0 Answers0