I have installed oneAPI (2022.2) base toolkit on Windows and have it integrated with VS2019 (Version 16.11.15). I do the following:
1. Create a Sycl console application using the project template that is made available on VS2019 (the one that has a simple vector addition as a kernel)
2. Build the application in Debug and Release.
Debugging/running the Debug configuration is OK. The Release configuration consistently crashes with the 'internal compiler error, abnormal program termination' message.
The problem occurs when I am using the default or the GPU selector for the program (both of them select an 'Intel(R) HD Graphics P630' iGPU). Using the CPU or the FPGA emulator selector makes the program run just fine. Another way to make things work is to disable optimizations on Release (/Od instead of /O2- /O1 will not work either). That is, with optimizations disabled, It is possible to run the program/kernel on the iGPU even on Release.
Is HD P630 too old of a GPU to run Sycl optimized code or is this a compiler bug? Intel says that the P30 can support up to OpenCL 2.1 but the driver on my machine reports an OpenCL version of 3.0
1. Enhanced VS solution that tries the vector addition 2 times (on CPU and GPU) and reports basic info on the Sycl devices found by the runtime.
2. Console output of the aforementioned solution when run on Release on my Machine
3. Debug output of the aforementioned solution (from the VS debug window) when run on Release on my Machine.
Thanks for reaching out to us.
Sorry for the inconvenience, Visual Studio 2019(Version 16.11.15) is not supported by the Intel oneAPI toolkit(2022.2). Try using the supported versions and let us know if you are still facing any issues.
Please refer to the below link for the supported versions of visual studio.
And also, could you please try the code on the Intel Command Prompt and let us know if you are facing the same error.
Please find the below commands to run the code:
>>dpcpp Source.cpp /EHsc
Thanks & Regards,
Thanks for your quick reply. Regarding your first/main suggestion (rollback VS to an earlier version) it is not something that is an option on that particular machine at the moment. I could have a test on my personal desktop machine instead of my employer's laptop but the hardware wouldn't be the same (I guess the next version of oneAPI that supports VS 16.11.15 will come before I will be able to find a machine with the same hardware and the correct version of VS).
Regarding the second suggestion (run that compilation and the application from the command line). It was tried but didn't produce different results. In particular:
1. I started the command prompt (cmd.exe)
2. Initialized the oneAPI development environment by running C:\Program Files (x86)\Intel\oneAPI\setvars.bat
3. Compiled the application using the command line: dpcpp SyclConsoleApplication.cpp /EHsc
4. Run the executable SyclConsoleApplication.exe from the command line (without a debugger attached).
5. Observed that the last message printed on the console by the application is still:
internal compiler error, abnormal program termination
A. Since the setvars.bat initializes the VS dev environment before initializing the oneAPI environment I do not know if building the application from the command line is ever going to produce different results. Please advise by 'compile/build the app from the command line ', your intent was for a different process to be followed.
B. To my knowledge the oneAPI compiler depends entirely on its own toolset and clang's toolset to do sycl compilation and linking. Can you please confirm that this is the case and that the MSVC compiler is not used somewhere behind the scenes? This would eliminate at least one of the reasons that the version of VS would affect the Sycl compilation.