Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix help handling with different number of devices #8735

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

AShivangi
Copy link
Collaborator

Problem solved by the commit

Currently, 0 and multiple device help print is treated as the same scenario.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

Internal testing

How problem was solved, alternative solutions (if any) and why they were rejected

0 devices -> print bare minimum help, i.e., no tests and only host report under examine
1 device -> prints help custom for that device
2 devices -> gives a NOTE and prints custom help for one of the devices

This fix is limited to subcommand helps. The next iteration of change will reflect it at xrt-smi level

Risks (if any) associated the changes in the commit

N/A

What has been tested and how, request additional testing if necessary

0 device (win):

xrt-smi examine --help

COMMAND: examine

DESCRIPTION: This command will 'examine' the state of the system/device and will generate a report of interest
               in a text or JSON format.

USAGE: xrt-smi examine [-h] [-d arg] [-f arg] [-o arg] [-r arg]

OPTIONS:
  -d, --device       - The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest
  -f, --format       - Report output format. Valid values are:
                        JSON        - Latest JSON schema
                        JSON-2020.2 - JSON 2020.2 schema
  -h, --help         - Help to use this sub-command
  -o, --output       - Direct the output to the given file
  -r, --report       - The type of report to be produced. Reports currently available are:
                         host - Host information


GLOBAL OPTIONS:
  --verbose          - Turn on verbosity
  --batch            - Enable batch mode (disables escape characters)
  --force            - When possible, force an operation

1 device (win):

xrt-smi examine --help

COMMAND: examine

DESCRIPTION: This command will 'examine' the state of the system/device and will generate a report of interest
               in a text or JSON format.

USAGE: xrt-smi examine [-h] [-d arg] [-f arg] [-o arg] [-r arg]

OPTIONS:
  -d, --device       - The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest
  -f, --format       - Report output format. Valid values are:
                        JSON        - Latest JSON schema
                        JSON-2020.2 - JSON 2020.2 schema
  -h, --help         - Help to use this sub-command
  -o, --output       - Direct the output to the given file
  -r, --report       - The type of report to be produced. Reports currently available are:
                         aie-partitions - AIE partition information
                         host           - Host information
                         platform       - Platforms flashed on the device
                         telemetry      - Telemetry data for the device


GLOBAL OPTIONS:
  --verbose          - Turn on verbosity
  --batch            - Enable batch mode (disables escape characters)
  --force            - When possible, force an operation

2 devices (linux):

xrt-smi examine --help 
NOTE: Multiple devices found. Showing help for 0000:18:00.1 device


COMMAND: examine

DESCRIPTION: This command will 'examine' the state of the system/device and will generate a report of interest
               in a text or JSON format.

USAGE: xrt-smi examine [-h] [-d arg] [-f arg] [-o arg] [-r arg]

OPTIONS:
  -d, --device       - The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest
  -f, --format       - Report output format. Valid values are:
                        JSON        - Latest JSON schema
                        JSON-2020.2 - JSON 2020.2 schema
  -h, --help         - Help to use this sub-command
  -o, --output       - Direct the output to the given file
  -r, --report       - The type of report to be produced. Reports currently available are:
                         aie             - AIE metadata in xclbin
                         aiemem          - AIE memory tile information
                         aieshim         - AIE shim tile status
                         debug-ip-status - Status of Debug IPs present in xclbin loaded on device
                         dynamic-regions - Information about the xclbin and the compute units
                         electrical      - Electrical and power sensors present on the device
                         error           - Asyncronus Error present on the device
                         firewall        - Firewall status
                         mailbox         - Mailbox metrics of the device
                         mechanical      - Mechanical sensors on and surrounding the device
                         memory          - Memory information present on the device
                         pcie-info       - Pcie information of the device
                         qspi-status     - QSPI write protection status
                         thermal         - Thermal sensors present on the device


GLOBAL OPTIONS:
  --verbose          - Turn on verbosity
  --batch            - Enable batch mode (disables escape characters)
  --force            - When possible, force an operation

Documentation impact (if any)

N/A

Signed-off-by: AShivangi <shivangiagarwal53@gmail.com>
@AShivangi AShivangi requested review from aktondak and rchane and removed request for stsoe, rozumx and chvamshi-xilinx January 31, 2025 21:55
Signed-off-by: AShivangi <shivangiagarwal53@gmail.com>
@stsoe stsoe merged commit 48b3aa2 into Xilinx:master Feb 3, 2025
20 checks passed
@AShivangi AShivangi deleted the help-handle branch February 4, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants