Xilinx / Xilinx/XRT

XRT OpenCL does not return a valid vendor ID

Open
#7,210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Running clinfo shows:

[...]
  Platform Name                                   Xilinx
Number of devices                                 1
  Device Name                                     xilinx_u200_gen3x16_xdma_base_1
  Device Vendor                                   Xilinx
  Device Vendor ID                                0
  Device Version                                  OpenCL 1.0
  Driver Version                                  1.0
  Device Type                                     Accelerator
  Device Profile                                  EMBEDDED_PROFILE
[...]

The null Device Vendor ID is invalid while the OpenCL specification says:
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clGetDeviceInfo.html#_footnoteref_1

OpenCL adopters must report a valid vendor ID for their implementation. If there is no valid PCI vendor ID defined for the physical device, implementations must obtain a Khronos vendor ID. This is a unique identifier greater than the largest PCI vendor ID (0x10000) and is representable by a {cl_uint_TYPE}. Khronos vendor IDs are synchronized across APIs by utilizing Vulkan’s vk.xml as the central Khronos vendor ID registry. An ID must be reserved here prior to use in OpenCL, regardless of whether a vendor implements Vulkan. Only once the ID has been allotted may it be exposed to OpenCL by proposing a merge request against cl.xml, in the main branch of the OpenCL-Docs project. The merge must define a new enumerant by adding an tag to the {cl_khronos_vendor_id_TYPE} tag, with the attribute set as the acquired Khronos vendor ID. The attribute must identify the vendor/adopter, and be of the form CL_KHRONOS_VENDOR_ID_.

The fix seems easy but the most difficult part is whether we need to put there the Xilinx ID or now the AMD ID.

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.

Research direction

Start by tracing the XRT OpenCL handling behind clGetDeviceInfo and reproduce the reported Device Vendor ID with clinfo. Check the OpenCL and Khronos vendor-ID requirements to determine whether the Xilinx or AMD ID applies; done means clinfo reports a valid, specification-compliant nonzero vendor ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.