Error in using emulator mode with SDK 20.1 for hello_world example
I have quartus 19.2 and FPGA SDK 20.1. When trying to compile the OpenCL code with emulator mode: aoc -march=emulator -o ./bin/hello_world.aocx ./device/hello_world.cl, I had the following error message in running the code. The problem is resolved by using -legacy-emulator option. Same problem and solution for SDK 19.4. My question is when do I need to use -legacy-emulator option for SDK 19.4 and beyond? Thanks
[beiwang@della-fpga1 hello_world]$ ./bin/host
Querying platform for info:
==========================
CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM)
CL_PLATFORM_VENDOR = Intel(R) Corporation
CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 20.1
Querying device for info:
========================
CL_DEVICE_NAME = EmulatorDevice : Emulated Device
CL_DEVICE_VENDOR = Intel(R) Corporation
CL_DEVICE_VENDOR_ID = 4466
CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 20.1
CL_DRIVER_VERSION = 20.1
CL_DEVICE_ADDRESS_BITS = 64
CL_DEVICE_AVAILABLE = true
CL_DEVICE_ENDIAN_LITTLE = true
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0
CL_DEVICE_GLOBAL_MEM_SIZE = 403931233280
CL_DEVICE_IMAGE_SUPPORT = false
CL_DEVICE_LOCAL_MEM_SIZE = 16384
CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000
CL_DEVICE_MAX_COMPUTE_UNITS = 1
CL_DEVICE_MAX_CONSTANT_ARGS = 8
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 100982808320
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3
CL_DEVICE_MEM_BASE_ADDR_ALIGN = 8192
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0
Command queue out of order? = true
Command queue profiling enabled? = true
Using AOCX: hello_world.aocx
Context callback: Malformed program binary: missing .acl.board section
Context callback: kernel argument info is not available
Context callback: Invalid binary
ERROR: CL_INVALID_BINARY
Location: ../common/src/AOCLUtils/opencl.cpp:407
Failed to create program with binary