Running error for FPGA examples

0

Hello!

I'm trying to run some examples provided by AWS, in specific OpenCL examples (https://github.com/aws/aws-fpga/tree/master/SDAccel/examples) and I'm getting some errors in the execution part. (I try to execute in the FPGA itself, not any type of emulation)

I followed and done every step guide, but when I try to do "./helloword *.awsxclbin" I receive an error message (below).

Erro 1:
xclProbe found 1 FPGA slots with xocl driver running
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
WARNING: xclOpen Handle check failed
device[0].user_instance : 80
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
ERROR: xclOpen Handle check failed
XRT build version: 2.2.0
Build hash: e21b8a5b208618834760593bbb15063f7e399642
Build date: 2019-09-06 20:10:43
Git branch: 2019.1
PID: b23
UID: 3e8
[Thu Oct 17 20:02:57 2019]
HOST: ip-172-31-94-233.ec2.internal
EXE: /home/centos/aws-fpga/SDAccel/examples/aws/helloworld_ocl_runtime/helloworld
[XRT] ERROR: Device setup failed
xclProbe found 1 FPGA slots with xocl driver running
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
WARNING: xclOpen Handle check failed
device[0].user_instance : 80
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
ERROR: xclOpen Handle check failed
[XRT] ERROR: Device setup failed
xclProbe found 1 FPGA slots with xocl driver running
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
WARNING: xclOpen Handle check failed
device[0].user_instance : 80
ERROR AwsXcl: PCI kernel bar attach failed for slot# 0
WARNING: AwsXcl isGood: kernel, global & mgmt bar are: ffffffff, ffffffff, ffffffff
ERROR: xclOpen Handle check failed
[XRT] ERROR: Device setup failed
Error: Failed to find Xilinx platform

Erro 2:

xclProbe found 1 FPGA slots with xocl driver running
Found Platform
Platform Name: Xilinx
Found Device=xilinx_aws-vu9p-f1-04261818_dynamic_5_0
INFO: Reading xclbin/host.hw.xilinx_aws-vu9p-f1-04261818_dynamic_5_0.xclbin
Loading: 'xclbin/host.hw.xilinx_aws-vu9p-f1-04261818_dynamic_5_0.xclbin'
XRT build version: 2.2.0
Build hash: e21b8a5b208618834760593bbb15063f7e399642
Build date: 2019-09-06 20:10:43
Git branch: 2019.1
PID: 31347
UID: 0
[Thu Oct 17 21:32:14 2019]
HOST: ip-172-31-94-233.ec2.internal
EXE: /home/centos/aws-fpga/SDAccel/examples/xilinx_2019.1/getting_started/hello_world/helloworld_ocl/helloworld
[XRT] ERROR: Failed to load xclbin.
src/host.cpp:78 Error calling cl::Program program(context, devices, bins, NULL, &err), error code is: -44

My specific question is: I need to set up another thing to make possible run the example and another program?

asked 5 years ago496 views
1 Answer
0

Hello,

For Error 1:
In this case you might want to run as root as it seems like your user does not have privileges to run.

For Error 2:

Try running the following commands:

sudo -E /bin/bash
source <AWS_FPGA_REPO_DIR>/sdaccel_runtime_setup.sh
./helloword *.awsxclbin

Also check that you have permissions to load the AFI that you created.
To find out the AFI it is trying to load from the awsxclbin, run the following command:

cat vector_addition.hw.xilinx_aws-vu9p-f1-04261818_dynamic_5_0.awsxclbin | strings | grep AGFI

To see if you have permissions to load the AFI, try loading it manually:

cat *.awsxclbin | strings | grep agfi | xargs fpga-load-local-image -S0 -I 

This output should show something like:

AFI          0       agfi-096d0d8abcdefg  loaded            0        ok               0       0x04261818
AFIDEVICE    0       0x1d0f      0xf010      0000:00:1d.0

If it isn't loading, that means your account does not have permissions to load the AFI. You would have to use the modify image attribute from the account credentials you used to create the AFI to allow your other accounts to load it:https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-fpga-image-attribute.html

Please feel free to let us know if this doesn't work.

-Deep

Deep_P
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions