Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
1218 Discussions

OpenCL Invalid Binary for Arria 10 FPGA kernel

Mdcc_UVa
New Contributor I
350 Views

Hello.

I've recently compiled an OpenCL kernel on devcloud, targetting the Arria 10 PAC. The compilation is seemingly succesful; nevertheless whenever I try to run the program on an arria10 execution node, OpenCL reports a lot of errors. The corresponding error codes are, in order, -42 (CL_INVALID_BINARY), -44 (CL_INVALID_PROGRAM), -48 (CL_INVALID_KERNEL). I assume all the errors are caused by the same problem, being an invalidly generated FPGA binary.
This program I am testing used to work properly on Stratix 10 devices, so I am pretty sure it is not a coding problem.

I am targetting the same board when compiling and executing.

Here is the compilation script, built based on the documentation here: https://devcloud.intel.com/oneapi/documentation/job-submission/

 

#/bin/bash

source /glob/development-tools/versions/fpgasupportstack/a10/1.2.1/inteldevstack/init_env.sh
source /glob/development-tools/versions/fpgasupportstack/a10/1.2.1/intelFPGA_pro/hld/init_opencl.sh
export FPGA_BBB_CCI_src=/usr/local/intel-fpga-bbb
export PATH=/glob/intel-python/python2/bin:${PATH}

aoc -v -report -board-package=/glob/development-tools/versions/oneapi/2022.3.1/oneapi/intel_a10gx_pac mykernel.cl -o mykernel.aocx

 

To execute the program, I join interactively an arria10 node:

 

qsub -I -l nodes=1:fpga_runtime:arria10:ppn=2 -d .

 

Analyzing the strings embedded on the resulting FPGA binary (.aocx), I can assess it was compiled for the correct PAC:

 

$ strings mykernel.aocx
# Trimmed for presentation purposes
pac_a10
/glob/development-tools/versions/oneapi/2022.3.1/oneapi/intel_a10gx_pac
INPUT_ARGS=-v -report -board-package=/glob/development-tools/versions/oneapi/2022.3.1/oneapi/intel_a10gx_pac mykernel.cl -o mykernel.aocx
BUILD_NUMBER=64
ACL_VERSION=19.4.0
OPERATING_SYSTEM=linux
BOARD_SPEC_XML=/glob/development-tools/versions/oneapi/2022.3.1/oneapi/intel_a10gx_pac/hardware/pac_a10/board_spec.xml
TARGET_MODEL=arria10
CLANG_VERSION=Intel(R) FPGA SDK for OpenCL(TM), Version 19.4.0 Build 64 Pro Edition, Copyright (C) 2019 Intel Corporation icx (ICX) dev.8.x.0 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /glob/development-tools/versions/fpgasupportstack/a10/1.2.1/intelFPGA_pro/hld/linux64/bin/../../llvm/bin
...

 

Finally, as suggested in other forum posts, I check that the node is compatible with the compile-targetted BSP, which is seemingly the case as it shares the same BSP name (although not the same location, if I'm interpreting the output correctly):

 

$ aocl diagnose
# Trimmed for presentation purposes
BSP Diagnostics
--------------------------------------------------------------------
--------------------------------------------------------------------
Device Name:
acl0

BSP Install Location:
/opt/intel/oneapi/intel_a10gx_pac

Vendor: Intel Corp

Physical Dev Name   Status            Information

pac_ee00000         Passed            Intel PAC Platform (pac_ee00000)
                                      PCIe 94:00.0
                                      USM not supported
                                      FPGA temperature = 42 degrees C.

DIAGNOSTIC_PASSED

 

Can somebody help me find if I did something wrong?
Thanks.

Labels (1)
0 Kudos
1 Solution
Mdcc_UVa
New Contributor I
230 Views

Hello again.
Upon a further inspection, the compilation is certainly the problem. I believed it wasn't since the process is generating an (invalid) binary. But the compilation both generates a binary and issues an error at the same time.

The error has been identified as being the same being discussed in this post. Thus, I consider further discussion should be redirected to that post instead.

Thank you.

View solution in original post

6 Replies
hareesh
Employee
299 Views

Hi,

i am working on this issue. just give me some time.


Thank you,


hareesh
Employee
262 Views

Hi,

please follow bellow article and retry complete project because it's working fine.

https://devcloud.intel.com/oneapi/documentation/job-submission/


After that if you facing same problem share complete following steps screen shots


Thanks,


Mdcc_UVa
New Contributor I
253 Views

Hello.

The link you tell me to follow is the very exact link I have posted in my original message, the one I used to build my compilation script. Nothing has been solved for me: the kernel compiles seemingly succesfully, but gives multiple OpenCL-runtime errors when executed in a valid compute node. However, I did check that using the BSP located at /opt/intel/oneapi/intel_a10gx_pac doesn't fix the issue either.

I am not sure what screenshots you want me to share; in my first message I already thoroughly specified the steps I follow, including:

  1. Compilation script used, executed in FPGA compilation nodes with the following command:
    qsub -l nodes=1:fpga_compile:ppn=2 -d . compile.sh
  2. Command used to access interactively an Arria 10 execution node to run the program.
  3. The errors reported by the OpenCL runtime when trying to execute the FPGA kernel, instead of a succesful execution.

You can refer to my original message for the details on my compilation + execution process. If you need any information not found in the original message, I will add the required screenshots.

Thanks.

Mdcc_UVa
New Contributor I
231 Views

Hello again.
Upon a further inspection, the compilation is certainly the problem. I believed it wasn't since the process is generating an (invalid) binary. But the compilation both generates a binary and issues an error at the same time.

The error has been identified as being the same being discussed in this post. Thus, I consider further discussion should be redirected to that post instead.

Thank you.

hareesh
Employee
194 Views

Hi,

still are you facing problem?


hareesh
Employee
157 Views

As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


Reply