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

xrt-smi rearchitecture Patch 4 #8714

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

aktondak
Copy link
Collaborator

@aktondak aktondak commented Jan 23, 2025

Problem solved by the commit

This PR does the following :

  1. Replaces embedded json configuration to a generated configuration for alveo and default cases (Similar generation mechanism will be used by xdna and MCDM shims as well). All the logic is now under one common file smi.cpp.
  2. Adds support for allowing multi-configuration Description field for xrt-smi options (through description_array). With this, the test and report list are simple vector stores and formatting is taken care of by XRT correctly.
  3. Builds SubCmdJsonObjects only with xbutil and xbmgmt objects only as it should be.
  4. Also fixes CR-1226870. This issue was caused due to incorrect configuration in default device cases.

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

Problem was discovered when we wanted to scale to multiple different tests separately in each shim.
https://jira.xilinx.com/browse/CR-1226870

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

Solved through addition of a new field.

Risks (if any) associated the changes in the commit

xrt-smi should be tested for alveo devices.

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

Tested with MCDM and XDNA drivers.

Documentation impact (if any)

None

Signed-off-by: Akshay Tondak <[email protected]>
@gbuildx
Copy link
Collaborator

gbuildx commented Jan 23, 2025

Can one of the admins verify this patch?

@aktondak aktondak added the do not merge hold off on merging label Jan 23, 2025
@aktondak aktondak removed the do not merge hold off on merging label Jan 24, 2025
Comment on lines 4 to 10
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <vector>
#include <tuple>
#include <string>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sort in groups. Keep smi.h first, then boost includes and finally system headers

value_type(value_type),
description_array(description_array) {}

ptree to_ptree() const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like it or not. The convention I prefer to keep under core/common is

return-type
function() [const] 
{
}

// Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.

#pragma once
#define XRT_CORE_COMMON_SOURCE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to smi.cpp

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