This error is similar to this unsolved post here, and I have attached the log file. The main difference I see is the pass that it's on ("MemoryCoalescing: Coalesce consecutive memory accesses in work items").
Main Error Section
******* Error: Assert failure at /build/psgswbuild/nightly/19.4/64/l64/p4/acl/llvm/lib/Transforms/FPGAUtils/FuncMerging.cpp(505) ******* Couldn't legalize this block! !dieOnError FAILED Stack dump: 0. Program arguments: /opt/intelFPGA_pro/quartus_19.2.0b57/hld/linux64/bin/../../llvm/bin/aocl-opt -march=fpga -O3 -board /opt/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/hardware/pac_a10/board_spec.xml -profile all -dbg-info-enabled --soft-elementary-math=false -pass-remarks-output=pass-remarks.yaml kernel_ND_c2_unsigned.fpga.bc -o kernel_ND_c2_unsigned.kwgid.bc 1. Running pass 'Pick memory configuration' on module 'kernel_ND_c2_unsigned.fpga.bc'. 2. Running pass 'MemoryCoalescing: Coalesce consecutive memory accesses in work items' on function '@back_sum_kernel'
I tried adding the restrict keyword (we're trying to benchmark things without it), but adding the keyword does not solve this compiler error. Emulating it also works without any issues as well - it's only when compiling for the physical FPGA device.
OpenCL version info
1. Intel(R) FPGA Emulation Platform for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.2 2. Intel(R) FPGA SDK for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.4
VERSION="18.04.4 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.4 LTS"
Any tips on how to proceed?
This issue has been fixed from version 20.1 of Quartus onwards.
Would suggest to use the latest version(V20.3) of Quartus and OpenCL compiler .
Please let us know the feedback.
Thanks and Regards