aws / aws-fpga

Official repository of the AWS EC2 FPGA Hardware and Software Development Kit
Other
1.49k stars 513 forks source link

[XRT] ERROR: failed to load xclbin: Invalid argument / xocl_read_axlf_helper: interface uuids do not match #628

Closed BogdanSorlea closed 3 months ago

BogdanSorlea commented 8 months ago

LE: see my next reply first

I can't seem to be able to run the hello_world example and I'm not sure what I'm holding wrong here. Issues here don't seem to hit anything on the topic (or maybe I'm searching the wrong way(?)

Some details about state and issue:

Really unsure what is happening, but interface uuids do not match in dmesg and [XRT] ERROR: failed to load xclbin: Invalid argument / Failed to program device[0] with xclbin file! during ./hello_world build_dir.hw.xilinx_aws-vu9p-f1_shell-v04261818_201920_3/vadd.xclbin seem like the place where figuring out should start from.

Let me know if there's any other input I should be dropping here.

Would love to know also how get deeper into debugging these types of issues.

BogdanSorlea commented 8 months ago

uhm, so I guess it's because I haven't been doing create_vitis_afi.sh, i.e. have AWS package it and have it stored in S3. doing that I seem to be able to program the FPGA just fine. so I'm wondering - is there no way to do this without pushing to s3 every time? I mean it feels like an unnecessary round-trip - and some of the docs I see around (from various repos/sources) would suggest it's not needed (i.e. loading an .xclbin file, not necessarily an .awsxclbin one)

AWSjoeluc commented 7 months ago

Hi!

Thanks for your question, I'm glad you were able to solve the issue. Customers are required to use the create_vitis_afi.sh to create AFI's and store artifacts in S3. When loading Vitis images, the scripts call fpga-load-local-image <AFI-ID>. To preserve security and health of the FPGA, all AFI's (verified Xilinx bitstreams and .xclbin files) are loaded by AWS after downloading them from S3. All of the aws-fpga workflows utilize S3 to store artifacts and load images to the FPGA.

If you have any more questions, please don't hesitate to ask!

Thanks, -Joe

BogdanSorlea commented 7 months ago

@AWSjoeluc was it the case at some point in the past direct loading of the bitstream was possible - and that's why I was seeing docs mentioning .xclbin (I believe it was some of the reinvent workshop docs from a few years back, but I can't remember exactly which docs I was seeing)? or maybe I'm confusing it with just generic vendor-specific (Xilinx) docs?

just trying to piece together what I've been seeing, not that I remember it that well anymore

AWScsaralay commented 7 months ago

Hi, F1 instances only support .awsxclbin because the customer design needs to be interfaced with the AWS Shell. This process is not done by generic vitis flow which generates .xclbin. Perhaps you may be referring to Xilinx docs and vitis flow for on-prem devices, but for F1 customers are expected to use .awsxclbin for loading their designs into F1 FPGA.

Please reach out to us if you have any questions.

Thanks! Chakra