Windows 10/INvidia device issues

I am trying out SYCL on my Microsoft Surface Book 2 which has an Nvidia Geforce GTX 1060 device (as well as CPU and the integrated intel gpu on the chip).

I managed more or less effortlessly build the computecpp-sdk samples and run them on the GPU following the combined instructions for windows and nvidia targeting ptx.

However, I wanted to compare with running on CPU and the intel gpu, and then got the following error message:

Unhandled exception at 0x00007FFE807DA388 in sycl0.exe: Microsoft C++ exception: cl::sycl::compile_program_error at memory location 0x000000E4BE79A020. occurred

The device output printed by the code was:

Running on Intel® Core™ i7-8650U CPU @ 1.90GHz

Any ideas on how to debug this further?

Also, when I do run successfully on the GPU, I get a lot of outputs like this:
'sycl0.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
They seem not to harm the execution, but should I be worried? I see them only when running from within Visual studio, not when I run the program from command line.

Hi Mats,

When you are trying to run on the Intel CPU, have you changed the bitcode type to spir64 instead of ptx64? Only nvidia devices will accept ptx, and you have an error in the function that tries to build the code for the device, which makes me think it’s not being given something it can handle.

I’m not really a Windows dev, but as I understand it, system libraries like devobj.dll will not have debug symbols available (which are provided by these PDB files). Visual Studio attempts to load debug info for all referenced DLLs when you run it through the GUI - when you run on the command line, it’s just your program, so that doesn’t happen.

Best,
Duncan.

Hi Duncan,

That makes sense and totally resolved the issue. Thanks!
Do you have an idea if Nvidia will support spir any time?

regards

Mats

I can’t imagine that they will, though they do support SPIR-V as part of their Vulkan implementation. They’re unlikely to extend the feature set of their OpenCL implementation though anything is possible!

I would say you can but ask. Otherwise, the project pocl can run OpenCL code on nvidia gpus via CUDA, but their support for SPIR is slightly broken at the moment sadly. I think they want to improve it but aren’t working on it right now (essentially, their problem is with built-in functions).

I hope this helps!