Running Vitis 'hello world' example on F1 instance results in 'xrt_xocl::error' what(): No devices found

0

I've been working my way through a Vitis FPGA 'hello_world' tutorial here:

I've gotten up to step 3, and attempted to run the program with:

./hello_world ./vadd.awsxclbin

...but this resulted in the following error:

terminate called after throwing an instance of 'xrt_xocl::error'
  what():  No devices found
Aborted

Any ideas why I'm getting this? I'm using an f1.2xlarge instance running in ap-southeast-2b availability zone.

One observation I had was that sometimes when I run ls -lh /dev/xfpga, I can see the device there. But on other occasions, this results in the following error:

ls: cannot access /dev/xfpga: No such file or directory

I wonder if my issue relates to that?

I did have a read of a suggested prior post:

I think one suggestion there was to try running as the root-user, gave that a try, didn't help for me, same error.

Gurce
질문됨 2년 전502회 조회
2개 답변
0

@Deep_P: Ok, I'll do so, and I'll elaborate on all my exact steps in detail, in-case it sheds any further light:

  • I start up my EC2 instance (an f1.2xlarge in ap-southeast-2b)
  • I ssh in
  • I check systemctl status mpd and see it isn't running yet
  • cd $AWS_FPGA_REPO_DIR
  • source vitis_runtime_setup.sh (this appears to run mpd service)
  • I do a systemctl status mpd again, and I see:
● mpd.service - Xilinx Management Proxy Daemon (MPD)
   Loaded: loaded (/etc/systemd/system/mpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-01-05 22:50:50 UTC; 27s ago
 Main PID: 4117 (mpd)
   CGroup: /system.slice/mpd.service
           └─4117 /opt/xilinx/xrt/bin/mpd

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] read 80 bytes out of 80 bytes from f...: 1

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] mpd daemon: request 10 received(reqS...32)

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: AwsDev: 0000:00:1d.0(index: 0)
Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] write 524360 bytes out of 524360 byt...d 5

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] msg arrived on mailbox fd 5
Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] retrieved msg size from mailbox: 40 bytes Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] read 72 bytes out of 72 bytes from f...: 1

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: AwsDev: 0000:00:1d.0(index: 0)
Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] mpd daemon: request 11 received(reqS...24)

Jan 05 22:51:00 ip-10-161-10-222.ap-southeast-2.compute.internal mpd[4117]: [0:0:1d.0] write 2112 bytes out of 2112 bytes to fd 5

Hint: Some lines were ellipsized, use -l to show in full.
  • cd $VITIS_DIR/examples/xilinx_2021.1/hello_world
  • ./hello_world ./vadd.awsxclbin

Oh, interesting, when I try it now this morning, it has worked fine, giving me this output!

Platform Name: Xilinx
INFO: Reading ./vadd.awsxclbin
Loading: './vadd.awsxclbin'
Trying to program device[0]: xilinx_aws-vu9p-f1_shell-v04261818_201920_2
Device[0]: program successful!
TEST PASSED

I'm not quite sure why it decided to work this morning, perhaps someone has looked into the issue on the AZ and remedied something? If so, that's great, all fine on my end now :)

Gurce
답변함 2년 전
  • Good to know. I'm glad it works now! Let us know if you have any more issues around this!

0

Hello,

Could you try running:

sudo systemctl restart mpd
sudo journalctl -u mpd

The latter should show if mpd started correctly and your devices should work after that.

Let us know if this doesn't work.

-Deep

Deep_P
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠