1. Device Name Customize Policy - 2023.1 English

AMD-Xilinx Kubernetes Device Plugin

Release Date
2023-06-10
Version
2023.1 English

The Kubernetes device plugin will load a JSON file customized with device names to identify the range and type of devices that will be registered with customized names inside Kubernetes. Inside the Config Map JSON file, each line of the naming alias will consist of two parts: the Physical Name and the Alias Name.

1.1 Physical Name

The Physical Name is a detailed description of a type of device, consist with information of the Device Type, Shell Name, and Shell UUID or Timestamp. The Physical Name is must to be written in following format:

” DeviceType-ShellName-[UUID/Timestamp] “
Range Range Value Example Vlaue
DeviceType Card type u30/u50/u200/u250/u280/F1
ShellName Shell Name xilinx_u30_gen3x4_base_2
ShellUUID Last 6 digit of Shell UUID 6669e5
Timestamp Shell Timestamp 0 / 250293e398

If any component of the physical name is not required, an asterisk (*) can be used to mark it as any value. The following are examples of Physical Names:

U30-xilinx_u30_gen3x4_base_2-669e5
*-xilinx_u30_gen3x4_base_2-6669e5
*-xilinx_u30_gen3x4_base_2-*
U30-*-*
*-*-*

Attention: If a duplicate usage scenario is detected, for example, if a user defines both the physical name U30-- and the physical name U30-xilinx_u30_gen3x4_base_2-* for a U30 device with shell name xilinx_u30_gen3x4_base_2, the physical name U30-- that first appears in the JSON file will take effect. If a user defines the same physical name multiple times, only the first physical name in the JSON file will be effective.

1.2 Alias Name

Alias Name defines the name format for certain types of devices that will be registered in Kubernetes, consisting of pre-defined keywords values and customizable strings provided by users.

For Alias Name, users will decide the format of the registered Kubernetes device name, and each of the keywords can be added to the Alias Name in any sequence, if a customized string is required, users can use the apostrophe to mark the target customized string.

‘ThisCostumizedString’+devicetype+uuid

Here are the supported keywords can be used in Alias Name:

Attention: Because of Kubernetes API limitations, the Alias Name result can not be over 120 bytes, if k8s-device-plugin detected the registered result of Alias Name is over 120 bytes, k8s-device-plugin will print a warning message in the k8s-device-plugin log and the default format ShellName+’-‘+Timestamp will be used to register the device in Kubernetes.

A shellscrip tool (keyword-scan.sh) is provided to help users identify the Alias Name keywords value (ShellName/ShellUUID/Timestamp/VendorID)

1.3 Example NameCustomize.json Following is an example json file define the Physical Name and target Alias Name for certain devices:

{
    "u30-*-*": "'encoder_u30'+shellVer+timestamp",
    "u200-xilinx_u200_gen3x16_xdma_base_2-*": "'U200device'",
    "*-xilinx_u250_gen3x16_xdma_base_1-*": "shellVer+'-'+uuid",
    "*-*-862c7020a250293e32036f19956669e5": "deviceType+'-'+timestamp"
}