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

Vitis 13804 : XRT-SMI re-architecture Patch 1 #8656

Merged
merged 24 commits into from
Jan 15, 2025
Merged

Conversation

aktondak
Copy link
Collaborator

@aktondak aktondak commented Dec 12, 2024

Problem solved by the commit

This PR is the first in a series of PRs to follow for https://jira.xilinx.com/browse/VITIS-13804 and xrt-smi re-architecture.
This PR does the following :

  1. Introduces a new class hierarchy(SubCmdJsonObjects) to store xrt-smi specific configuration data (queried from shim through a device query).
  2. Edits the SubCmdValidate class to use above architecture to add program options at run-time using the conf contents.

What's next ?

  1. Other xrt-smi SubCommands (examine and configure) will follow suit to use the Json configuration for program option addition making xrt-smi scalable and conforming to device specific Jsons.
  2. Currently, the help printing still relies on program option addition. That will be removed based on the contents of the conf.

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

https://jira.xilinx.com/browse/VITIS-13804 partially

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

The problem was solved by coming up with a Json Schema and conforming to that when writing the SUbCmdJsonObjects classes.

Risks (if any) associated the changes in the commit

xrt-smi validate should be tested further since this changes the existing behavior.

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

Tested xrt-smi validate on windows and Linux platforms.

Documentation impact (if any)

N/A

Akshay Tondak added 2 commits December 11, 2024 12:51
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
@aktondak aktondak requested a review from rchane December 12, 2024 23:32
@gbuildx
Copy link
Collaborator

gbuildx commented Dec 12, 2024

Can one of the admins verify this patch?

@aktondak aktondak marked this pull request as ready for review December 13, 2024 23:09
Akshay Tondak added 2 commits December 16, 2024 12:10
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
@aktondak aktondak changed the title Vitis 13804 Vitis 13804 : XRT-SMI re-architecture Patch 1 Dec 16, 2024
@aktondak aktondak requested a review from sonals December 17, 2024 17:56
@aktondak aktondak added the do not merge hold off on merging label Dec 18, 2024
@aktondak aktondak removed the request for review from sonals January 8, 2025 23:56
Akshay Tondak added 2 commits January 8, 2025 16:00
@aktondak aktondak removed the do not merge hold off on merging label Jan 9, 2025
Copy link
Collaborator

@rchane rchane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After initial discussion, this PR seems good to me for our first step of re-architecture once it is ironed out and passes pipeline.

aktondak and others added 6 commits January 13, 2025 13:05
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
@@ -9,6 +9,17 @@
#include "tools/common/SubCmd.h"
#include "tools/common/XBHelpMenus.h"

struct SubCmdValidateOptions {
std::string m_device;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove m_ in the next iteration of changes

Copy link
Collaborator

@AShivangi AShivangi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the first iteration! Let's get this in asap so we can start some bash testing

@aktondak aktondak requested a review from stsoe January 14, 2025 19:52
src/runtime_src/core/pcie/linux/smi.cpp Outdated Show resolved Hide resolved
src/runtime_src/core/pcie/linux/smi.h Outdated Show resolved Hide resolved
src/runtime_src/core/tools/common/SubCmdJsonObjects.h Outdated Show resolved Hide resolved
src/runtime_src/core/tools/common/SubCmdJsonObjects.h Outdated Show resolved Hide resolved
Signed-off-by: Akshay Tondak <[email protected]>
@aktondak aktondak requested a review from stsoe January 15, 2025 00:10
@stsoe stsoe merged commit 4e8c32a into Xilinx:master Jan 15, 2025
20 checks passed
@aktondak aktondak deleted the VITIS-13804 branch January 15, 2025 18:21
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.

5 participants