XRT crashes when accessed through both OpenCL and `xrt::`

Open
#7,226 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, linux

Research direction

Reproduce the crash on Linux by running the shown sycl-ls platform enumeration and then releasing applications that access both the OpenCL and xrt platforms. Compare behavior with and without /etc/OpenCL/vendors/xilinx.icd. Done means the combined OpenCL and xrt use no longer crashes, without relying on that workaround.

Written by the indexing model from the issue text.

Description

AMD FPGA PCIe cards on Linux come with an OpenCL and XRT platform to control them.
While probably nobody has ever tried, using SYCL on a machine will typically tries to use all the platforms and the devices available:

rkeryell@xsjsycl41:/var/tmp/rkeryell/SYCL/code$ $SYCL_HOME/llvm/build/bin/sycl-ls
[opencl:cpu:0] Intel(R) OpenCL, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz 3.0 [2022.14.8.0.04_160000]
[opencl:acc:1] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2022.14.8.0.04_160000]
[opencl:gpu:2] AMD Accelerated Parallel Processing, gfx906:sramecc+:xnack- 2.0 [3486.0 (HSA1.1,LC)]
[opencl:acc:3] Xilinx, xilinx_u200_gen3x16_xdma_base_1 1.0 [1.0]
[ext_oneapi_cuda:gpu:0] NVIDIA CUDA BACKEND, Quadro P400 0.0 [CUDA 11.8]
[ext_oneapi_hip:gpu:0] AMD HIP BACKEND, AMD Radeon VII 0.0 [HIP 50322.6]
[xrt:acc:0] Xilinx XRT, xilinx_u200_gen3x16_xdma_base_1 0.0 [2.14.0]

Then an application using the platforms and releasing them will result in a crash.
A work around is to remove /etc/OpenCL/vendors/xilinx.icd to avoid OpenCL showing up and to focus on XRT only.

Dominant language
C++
Stars
686
Forks
549
Avg merge
2d 4h
Merged PRs (30d)
70

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Xilinx/XRT

All issues in Xilinx/XRT

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.