-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vitis 13804 : XRT-SMI re-architecture Patch 1 (#8656)
* Json config work chk1 Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Config based xrt-smi chk2 Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Review comment updates and XRT standalone build failure fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Removed extended keys options API Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build fail try 1 Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build failure fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Change to device query Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build correction Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Changing device query to string type Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build failure fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Remove TODO tasks since we moved to query requests Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Possible pipeline test failure fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Disabling device query for non xrt-smi cases Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Adding device query to alveo device Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Moving query to pcie queries Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build failure fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build fix try 2 Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Build fix Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> * Review comments handled Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> --------- Signed-off-by: Akshay Tondak <Akshay.Tondak@amd.com> Co-authored-by: Akshay Tondak <Akshay.Tondak@amd.com>
- Loading branch information
Showing
17 changed files
with
913 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved. | ||
#include "smi.h" | ||
|
||
namespace xrt_core::smi { | ||
|
||
static constexpr std::string_view xrt_smi_config = | ||
R"( | ||
{ | ||
"subcommands": | ||
[{ | ||
"name" : "validate", | ||
"description" : "Validates the given device by executing the platform's validate executable.", | ||
"tag" : "basic", | ||
"options" : | ||
[ | ||
{ | ||
"name": "device", | ||
"alias": "d", | ||
"description": "The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest", | ||
"tag": "basic", | ||
"default_value": "", | ||
"option_type": "common", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name": "format", | ||
"alias": "f", | ||
"description": "Report output format", | ||
"tag": "basic", | ||
"default_value": "JSON", | ||
"option_type": "common", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name": "output", | ||
"alias": "o", | ||
"description" : "Direct the output to the given file", | ||
"tag": "basic", | ||
"default_value": "", | ||
"option_type": "common", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name": "help", | ||
"alias": "h", | ||
"description" : "Help to use this sub-command", | ||
"tag": "basic", | ||
"default_value": "", | ||
"option_type": "common", | ||
"value_type" : "none" | ||
}, | ||
{ | ||
"name" : "run", | ||
"alias" : "r", | ||
"description" : "Run a subset of the test suite", | ||
"tag" : "basic", | ||
"option_type": "common", | ||
"value_type" : "array", | ||
"options" : [ | ||
{ | ||
"name" : "latency", | ||
"tag" : "basic", | ||
"description" : "Run end-to-end latency test" | ||
}, | ||
{ | ||
"name" : "throughput", | ||
"tag" : "basic", | ||
"description" : "Run end-to-end throughput test" | ||
}, | ||
{ | ||
"name" : "cmd-chain-latency", | ||
"tag" : "basic", | ||
"description" : "Run command chain latency test" | ||
}, | ||
{ | ||
"name" : "cmd-chain-throughput", | ||
"tag" : "basic", | ||
"description" : "Run end-to-end throughput test using command chaining" | ||
}, | ||
{ | ||
"name" : "df-bw", | ||
"tag" : "basic", | ||
"description" : "Run dataflow bandwidth test" | ||
}, | ||
{ | ||
"name" : "tct-one-col", | ||
"tag" : "basic", | ||
"description" : "Run TCT test with one column" | ||
}, | ||
{ | ||
"name" : "tct-all-col", | ||
"tag" : "basic", | ||
"description" : "Run TCT test with all columns" | ||
}, | ||
{ | ||
"name" : "gemm", | ||
"tag" : "basic", | ||
"description" : "Run GEMM test" | ||
}, | ||
{ | ||
"name" : "aie-reconfig-overhead", | ||
"tag" : "advanced", | ||
"description" : "Run AIE reconfiguration overhead test" | ||
}, | ||
{ | ||
"name" : "spatial-sharing-overhead", | ||
"tag" : "advanced", | ||
"description" : "Run spatial sharing overhead test" | ||
}, | ||
{ | ||
"name" : "temporal-sharing-overhead", | ||
"tag" : "advanced", | ||
"description" : "Run temporal sharing overhead test" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "path", | ||
"alias" : "p", | ||
"description" : "Path to the directory containing validate xclbins", | ||
"tag" : "basic", | ||
"default_value": "", | ||
"option_type": "hidden", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name" : "param", | ||
"description" : "Extended parameter for a given test. Format: <test-name>:<key>:<value>", | ||
"tag" : "basic", | ||
"option_type": "hidden", | ||
"default_value": "", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name" : "pmode", | ||
"description" : "Specify which power mode to run the benchmarks in. Note: Some tests might be unavailable for some modes", | ||
"tag" : "basic", | ||
"option_type": "hidden", | ||
"default_value": "", | ||
"value_type" : "string" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "examine", | ||
"tag" : "basic", | ||
"description": "This command will 'examine' the state of the system/device and will generate a report of interest in a text or JSON format.", | ||
"options": | ||
[ | ||
{ | ||
"name": "device", | ||
"description": "The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest", | ||
"tag": "devl", | ||
"value_type": "string" | ||
}, | ||
{ | ||
"name": "format", | ||
"description": "Report output format", | ||
"tag": "devl", | ||
"value_type": "string" | ||
}, | ||
{ | ||
"name": "report", | ||
"description": "The type of report to be produced. Reports currently available are:", | ||
"tag": "basic", | ||
"options": [ | ||
{ | ||
"name": "aie-partitions", | ||
"tag": "basic", | ||
"description": "AIE partition information" | ||
}, | ||
{ | ||
"name": "telemetry", | ||
"tag": "devl", | ||
"description": "Telemetry data for the device" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "configure", | ||
"tag" : "devl", | ||
"description" : "Device and host configuration.", | ||
"options" : | ||
[ | ||
{ | ||
"name": "device", | ||
"description": "The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest", | ||
"tag": "devl", | ||
"value_type" : "string" | ||
}, | ||
{ | ||
"name": "pmode", | ||
"description": "Modes: default, powersaver, balanced, performance, turbo", | ||
"tag": "basic", | ||
"value_type": "string" | ||
} | ||
] | ||
}] | ||
} | ||
)"; | ||
|
||
|
||
std::string | ||
get_smi_config() | ||
{ | ||
return std::string(xrt_smi_config); | ||
} | ||
} // namespace xrt_core::smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved. | ||
|
||
#include <string> | ||
|
||
namespace xrt_core::smi { | ||
|
||
std::string | ||
get_smi_config(); | ||
|
||
} // namespace xrt_core::smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.