the OpenCL software emulation crashes with a segmentation fault when the kernel utilizes more than 6MByte of memory. Example:
uchar arr[128*128*384]; // 6MByte -- Works uchar arr[128*128*385]; // more than 6MByte -- Segmentation Fault
If this behavior is intended, a warning message would be appreciated, to prevent people from searching for a non-existing bug in their code.
Intel FPGA SDK for OpenCL 18.0.0-219
Arria 10 (ref BSP and BSP of custom hardware)
Stratix 10 (only BSP of custom hardware)
thank you for the reply, I attached a simple test case to reproduce the error.
The build commands I used were:
# Host application make # Kernel aoc -march=emulator krnl.cl -o bin/krnl_emu.aocx
and for execution:
CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host bin/krnl_emu.aocx
Depending on which size define is enabled in krnl.cl, the application either crashes or executes.
I am sorry for the late response. I installed 19.1 but trying to compile any kernel using the fast emulator fails with:
Error: OpenCL kernel compilation FAILED
The ioc.log contains the following lines:
Using build options: -cl-std=CL1.2 -Xclang -Wuninitialized -I "/home/user/vector_add/device"
Failed to get platform id...: 0 (CL_SUCCESS)
Any thoughts on what might be the problem?
I managed to solve the problem. It did not work because I forgot to install a device ... 😟
Anyway, using the fast emulator indeed removed the problem, the application no longer crashes for data > 6MB.
Thank you for your assistance.