Forum Discussion
Hi,
I am sorry for the late reply.
According to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_started.pdf in Chapter 3.3, you set the environment variables transiently.
Below is the script I had used to compile hello_world example with opencl offline compiler:
export AOCL_BOARD_PACKAGE_ROOT=<opencl install path>/board/a10_ref
cd $INTELFPGAOCLSDKROOT
source init_opencl.sh
cd <hello_world example path >/hello_world
aoc -march=emulator -v device/hello_world.cl -o bin/hello_world.aocx
cd hello_world && make
CL_CONFIG_CPU_EMULATE_DEVICES=1 bin/host -n=10000
Can you try the command?
Thanks
- JGoer16 years ago
New Contributor
Hi Mylee,
I tried your commands, and I get the following output
$ CL_CONFIG_CPU_EMULATE_DEVICES=1 bin/host -n=100000 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 19.3 ERROR: CL_DEVICE_NOT_FOUND Location: ../common/src/AOCLUtils/opencl.cpp:356 Query for number of devices failedWhen I try it with $ CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host -n=100000 I get the following output:
$ CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host -n=100000 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 19.3 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 19.3 CL_DRIVER_VERSION = 19.3 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 = 16722758656 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 = 4180689664 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:392 Failed to create program with binaryThanks again for all your help!