Xilinx / FPGA_as_a_Service

https://docs.xilinx.com/r/en-US/Xilinx_Kubernetes_Device_Plugin/Xilinx_Kubernetes_Device_Plugin
Apache License 2.0
143 stars 60 forks source link

xrt无法发现fpga设备 #37

Open lsyLearn opened 1 year ago

lsyLearn commented 1 year ago

我在官网上下载U50对应的ubuntu22.04的对应bed包,安装好后mpd服务无法正常启动,查看发现是/dev/下没有xfpga设备,该设备是如何生成的? 我使用lspci | grep Xilinx 能够获取都fpga信息。

yuzhang66 commented 1 year ago

您好 /dev/下xfpga设备是由XRT生成的,你需要检查一下XRT是否安装正确以及xbutil examine能否正确发现该设备。如果有问题需要去XRT的repo提问一下。

lsyLearn commented 1 year ago

您好 /dev/下xfpga设备是由XRT生成的,你需要检查一下XRT是否安装正确以及xbutil examine能否正确发现该设备。如果有问题需要去XRT的repo提问一下。

如何检测xrt是否安装正确呢?我使用xbutil examine能够获取到xrt的version,但是无法发现设备。 XRT的安装我是使用的https://china.xilinx.com/products/boards-and-kits/alveo/u50.html#gettingStarted 提供的ubutnu22.04的包,使用 apt install ./xxx.deb的方式安装

yuzhang66 commented 1 year ago

您好,如果xbutil examine没有获取到设备,说明您的u50设备安装设置有问题,device plugin 只能支持正确安装配置(xbutil examine可以检测到的设备) 请问您有安装对应的shell package并用xbmgmt命令来flash 这张u50卡的shell吗? 相关信息您可以查看: https://github.com/Xilinx/XRT https://xilinx.github.io/XRT/master/html/xbmgmt.html

yuzhang66 commented 1 year ago

我去看了一下中文文档,在安装完Xilinx 运行时 (XRT) 之后,还需要下载部署目标平台(shell package)通过XRT来对这张卡进行设置之后设备才能正常使用。

lsyLearn commented 1 year ago

我去看了一下中文文档,在安装完Xilinx 运行时 (XRT) 之后,还需要下载部署目标平台(shell package)通过XRT来对这张卡进行设置之后设备才能正常使用。

这个操作我在指导文档中也有看到,安装好xrt再安装deployment packages,再执行xbmgmt program (之前为xbmgmt flash),但这一步需要提供BDF,但是xbutil examine又无法发现设备,通过lspci | grep Xilinx获取的BDF又无法使用。

yuzhang66 commented 1 year ago

您可以试一下用xbmgmt examine来发现设备及相关信息。 如果还有这里得到的BDF还是不能正常使用,建议您可以参考这个文档或者去XRT的repo留言一下。 https://xilinx.github.io/XRT/master/html/xbmgmt.html

lsyLearn commented 1 year ago

您可以试一下用xbmgmt examine来发现设备及相关信息。 如果还有这里得到的BDF还是不能正常使用,建议您可以参考这个文档或者去XRT的repo留言一下。 https://xilinx.github.io/XRT/master/html/xbmgmt.html

请问,设备没有驱动,这个是什么问题呢? 代表我的fpga不能用吗

lsmod | grep xocl xocl 1892352 0 libcrc32c 16384 8 nf_conntrack,nf_nat,xclmgmt,xocl,btrfs,nf_tables,raid456,ip_vs drm 622592 4 drm_kms_helper,xocl,mgag200

lsmod | grep xclmgmt xclmgmt 1105920 0 libcrc32c 16384 8 nf_conntrack,nf_nat,xclmgmt,xocl,btrfs,nf_tables,raid456,ip_vs

lspci -vd 10ee: 06:00.0 Serial controller: Xilinx Corporation Device 903f (prog-if 01 [16450]) Subsystem: Xilinx Corporation Device 0007 Physical Slot: 3 Flags: fast devsel, NUMA node 0 Memory at d9000000 (64-bit, non-prefetchable) [size=8M] Memory at d9800000 (32-bit, non-prefetchable) [size=64K] Capabilities: [40] Power Management version 3 Capabilities: [60] MSI-X: Enable- Count=32 Masked- Capabilities: [70] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [1c0] Secondary PCI Express Capabilities: [1f0] Virtual Channel

通过lspci发现,它没有Kernel driver in use

yuzhang66 commented 1 year ago

设备没有驱动Alveo系列的fpga是不能正常工作的,没有检测到驱动的可能原因有很多。建议您还是和XRT确认一下看看是什么问题。