From 0e3c9beac35c5072d9ccdc5316b3b87706d06db7 Mon Sep 17 00:00:00 2001 From: Ryan Chane Date: Thu, 13 Aug 2026 13:22:51 -0700 Subject: [PATCH 1/4] AIESW-41600 Consoldiate throughput and latency tests Signed-off-by: Ryan Chane --- src/runtime_src/core/common/smi/smi_ryzen.cpp | 2 -- .../tools/common/tests/TestNPUThroughput.cpp | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/runtime_src/core/common/smi/smi_ryzen.cpp b/src/runtime_src/core/common/smi/smi_ryzen.cpp index b8b61e1c3e0..1f83775ab3e 100644 --- a/src/runtime_src/core/common/smi/smi_ryzen.cpp +++ b/src/runtime_src/core/common/smi/smi_ryzen.cpp @@ -125,8 +125,6 @@ config_gen_npu3() validate_test_desc = { {"all", "All applicable validate tests will be executed (default)", "common"}, - {"runlist-latency", "Run end-to-end latency test using runlist", "hidden"}, - {"runlist-throughput", "Run end-to-end throughput test using runlist", "hidden"}, {"df-bw", "Run bandwidth test on data fabric", "hidden"}, {"shim-dma-bw", "Run 2xRead/1xWrite bandwidth test for SHIM DMA", "hidden"}, {"latency", "Run end-to-end latency test", "common"}, diff --git a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp index 6884310c833..ff567f27489 100644 --- a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp +++ b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (C) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. // ------ I N C L U D E F I L E S ------------------------------------------- // Local - Include Files @@ -7,6 +7,8 @@ #include "TestValidateUtilities.h" #include "tools/common/XBUtilities.h" #include "core/common/runner/runner.h" +#include "core/common/query_requests.h" +#include "core/common/smi/smi.h" #include "xrt/xrt_device.h" #include "core/common/json/nlohmann/json.hpp" #include "core/common/archive.h" @@ -47,8 +49,17 @@ TestNPUThroughput::run(const std::shared_ptr& dev, const xrt_c } try { - std::string recipe_data = archive->data("recipe_throughput.json"); - std::string profile_data = archive->data("profile_throughput.json"); + const auto pcie_id = xrt_core::device_query(dev); + xrt_core::smi::smi_hardware_config smi_hrdw; + const auto hardware_type = smi_hrdw.get_hardware_type(pcie_id); + const bool use_runlist = + (smi_hrdw.get_family(hardware_type) == xrt_core::smi::smi_hardware_config::hardware_family::npu3); + + const char* recipe_name = use_runlist ? "recipe_cmd_chain_throughput.json" : "recipe_throughput.json"; + const char* profile_name = use_runlist ? "profile_cmd_chain_throughput.json" : "profile_throughput.json"; + + std::string recipe_data = archive->data(recipe_name); + std::string profile_data = archive->data(profile_name); auto artifacts_repo = XBUtilities::extract_artifacts_from_archive(archive, { "validate.xclbin", @@ -62,7 +73,7 @@ TestNPUThroughput::run(const std::shared_ptr& dev, const xrt_c const auto report = json::parse(runner.get_report()); const double throughput = get_throughput_from_report(report); - XBValidateUtils::logger(ptree, "Details", boost::str(boost::format("Average throughput: %.1f op/s") % throughput)); + XBValidateUtils::logger(ptree, "Details", boost::str(boost::format("Average throughput: %.1f ops/s") % throughput)); ptree.put("status", XBValidateUtils::test_token_passed); } catch(const std::exception& e) { From 66e869e0d75f52454f6bb35dc0ef1dbf3a2fc92c Mon Sep 17 00:00:00 2001 From: Ryan Chane Date: Thu, 20 Aug 2026 11:10:18 -0700 Subject: [PATCH 2/4] Update throughput calculation for runlist Signed-off-by: Ryan Chane --- .../core/tools/common/tests/TestNPUThroughput.cpp | 15 ++++++++++++++- .../core/tools/common/tests/TestNPUThroughput.h | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp index ff567f27489..46be3a7109e 100644 --- a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp +++ b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.cpp @@ -37,6 +37,19 @@ get_throughput_from_report(const json& report) const return report.at("cpu").at("throughput").get(); } +double +TestNPUThroughput:: +get_ops_throughput_from_report(const json& report, bool use_runlist) const +{ + const auto runlist_throughput = get_throughput_from_report(report); + if (use_runlist) { + const auto recipe_runs = report.at("resources").at("runs").get(); + return runlist_throughput * recipe_runs; + } else { + return runlist_throughput; + } +} + boost::property_tree::ptree TestNPUThroughput::run(const std::shared_ptr& dev, const xrt_core::archive* archive) { @@ -72,7 +85,7 @@ TestNPUThroughput::run(const std::shared_ptr& dev, const xrt_c runner.wait(); const auto report = json::parse(runner.get_report()); - const double throughput = get_throughput_from_report(report); + const double throughput = get_ops_throughput_from_report(report, use_runlist); XBValidateUtils::logger(ptree, "Details", boost::str(boost::format("Average throughput: %.1f ops/s") % throughput)); ptree.put("status", XBValidateUtils::test_token_passed); } diff --git a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.h b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.h index 1a7a69a71ac..e9602342baf 100644 --- a/src/runtime_src/core/tools/common/tests/TestNPUThroughput.h +++ b/src/runtime_src/core/tools/common/tests/TestNPUThroughput.h @@ -16,8 +16,11 @@ class TestNPUThroughput : public TestRunner { TestNPUThroughput(); private: - double + double get_throughput_from_report(const nlohmann::json& report) const; + + double + get_ops_throughput_from_report(const nlohmann::json& report, bool use_runlist) const; }; #endif From abb5220b182d5c09cfd5d251052e226c5487d90a Mon Sep 17 00:00:00 2001 From: Ryan Chane Date: Mon, 24 Aug 2026 10:44:11 -0700 Subject: [PATCH 3/4] Update RunlistLatency, RunlistThroughput for npu3 Signed-off-by: Ryan Chane --- src/runtime_src/core/common/smi/smi_ryzen.cpp | 2 ++ .../core/tools/common/tests/TestRunlistLatency.cpp | 11 +++++++++++ .../core/tools/common/tests/TestRunlistThroughput.cpp | 11 +++++++++++ 3 files changed, 24 insertions(+) diff --git a/src/runtime_src/core/common/smi/smi_ryzen.cpp b/src/runtime_src/core/common/smi/smi_ryzen.cpp index 1f83775ab3e..b8b61e1c3e0 100644 --- a/src/runtime_src/core/common/smi/smi_ryzen.cpp +++ b/src/runtime_src/core/common/smi/smi_ryzen.cpp @@ -125,6 +125,8 @@ config_gen_npu3() validate_test_desc = { {"all", "All applicable validate tests will be executed (default)", "common"}, + {"runlist-latency", "Run end-to-end latency test using runlist", "hidden"}, + {"runlist-throughput", "Run end-to-end throughput test using runlist", "hidden"}, {"df-bw", "Run bandwidth test on data fabric", "hidden"}, {"shim-dma-bw", "Run 2xRead/1xWrite bandwidth test for SHIM DMA", "hidden"}, {"latency", "Run end-to-end latency test", "common"}, diff --git a/src/runtime_src/core/tools/common/tests/TestRunlistLatency.cpp b/src/runtime_src/core/tools/common/tests/TestRunlistLatency.cpp index 9e5a56d9aa4..937b4b2bcc1 100644 --- a/src/runtime_src/core/tools/common/tests/TestRunlistLatency.cpp +++ b/src/runtime_src/core/tools/common/tests/TestRunlistLatency.cpp @@ -6,6 +6,8 @@ #include "TestRunlistLatency.h" #include "TestValidateUtilities.h" #include "tools/common/XBUtilities.h" +#include "core/common/query_requests.h" +#include "core/common/smi/smi.h" #include "xrt/xrt_device.h" #include "core/common/runner/runner.h" #include "core/common/json/nlohmann/json.hpp" @@ -24,6 +26,15 @@ TestRunlistLatency::run(const std::shared_ptr& dev, const xrt_ { boost::property_tree::ptree ptree = get_test_header(); + const auto pcie_id = xrt_core::device_query(dev); + xrt_core::smi::smi_hardware_config smi_hrdw; + const auto hardware_type = smi_hrdw.get_hardware_type(pcie_id); + if (smi_hrdw.get_family(hardware_type) == xrt_core::smi::smi_hardware_config::hardware_family::npu3) { + XBValidateUtils::logger(ptree, "Details", "N/A"); + ptree.put("status", XBValidateUtils::test_token_skipped); + return ptree; + } + if (archive == nullptr) { ptree.put("status", XBValidateUtils::test_token_failed); XBValidateUtils::logger(ptree, "Error", "No archive found, skipping test"); diff --git a/src/runtime_src/core/tools/common/tests/TestRunlistThroughput.cpp b/src/runtime_src/core/tools/common/tests/TestRunlistThroughput.cpp index 14d93eb9377..8ab9cbb39ce 100644 --- a/src/runtime_src/core/tools/common/tests/TestRunlistThroughput.cpp +++ b/src/runtime_src/core/tools/common/tests/TestRunlistThroughput.cpp @@ -6,6 +6,8 @@ #include "TestRunlistThroughput.h" #include "TestValidateUtilities.h" #include "tools/common/XBUtilities.h" +#include "core/common/query_requests.h" +#include "core/common/smi/smi.h" #include "xrt/xrt_device.h" #include "core/common/runner/runner.h" #include "core/common/json/nlohmann/json.hpp" @@ -22,6 +24,15 @@ TestRunlistThroughput::run(const std::shared_ptr& dev, const x { boost::property_tree::ptree ptree = get_test_header(); + const auto pcie_id = xrt_core::device_query(dev); + xrt_core::smi::smi_hardware_config smi_hrdw; + const auto hardware_type = smi_hrdw.get_hardware_type(pcie_id); + if (smi_hrdw.get_family(hardware_type) == xrt_core::smi::smi_hardware_config::hardware_family::npu3) { + XBValidateUtils::logger(ptree, "Details", "N/A"); + ptree.put("status", XBValidateUtils::test_token_skipped); + return ptree; + } + if (archive == nullptr) { ptree.put("status", XBValidateUtils::test_token_failed); XBValidateUtils::logger(ptree, "Error", "No archive found, skipping test"); From ec776504a6b4e5106a1080145883240a4603cece Mon Sep 17 00:00:00 2001 From: Ryan Chane Date: Wed, 26 Aug 2026 10:42:55 -0700 Subject: [PATCH 4/4] Skip TCT tests as well on npu3 Signed-off-by: Ryan Chane --- .../core/tools/common/tests/TestTCTAllColumn.cpp | 8 +++++++- .../core/tools/common/tests/TestTCTOneColumn.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/runtime_src/core/tools/common/tests/TestTCTAllColumn.cpp b/src/runtime_src/core/tools/common/tests/TestTCTAllColumn.cpp index 43a1abcb011..d38453d8346 100644 --- a/src/runtime_src/core/tools/common/tests/TestTCTAllColumn.cpp +++ b/src/runtime_src/core/tools/common/tests/TestTCTAllColumn.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright (C) 2023-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (C) 2023-2026 Advanced Micro Devices, Inc. All rights reserved. // ------ I N C L U D E F I L E S ------------------------------------------- // Local - Include Files @@ -96,6 +96,12 @@ TestTCTAllColumn::run(const std::shared_ptr& dev, const xrt_co const auto pcie_id = xrt_core::device_query(dev); xrt_core::smi::smi_hardware_config smi_hrdw; const auto hardware_type = smi_hrdw.get_hardware_type(pcie_id); + if (smi_hrdw.get_family(hardware_type) == xrt_core::smi::smi_hardware_config::hardware_family::npu3) { + XBValidateUtils::logger(ptree, "Details", "N/A"); + ptree.put("status", XBValidateUtils::test_token_skipped); + return ptree; + } + const bool is_strix = XBU::is_strix_hardware(hardware_type); const std::vector artifacts = is_strix diff --git a/src/runtime_src/core/tools/common/tests/TestTCTOneColumn.cpp b/src/runtime_src/core/tools/common/tests/TestTCTOneColumn.cpp index 9639e16accd..8dfadac48c6 100644 --- a/src/runtime_src/core/tools/common/tests/TestTCTOneColumn.cpp +++ b/src/runtime_src/core/tools/common/tests/TestTCTOneColumn.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright (C) 2023-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (C) 2023-2026 Advanced Micro Devices, Inc. All rights reserved. // ------ I N C L U D E F I L E S ------------------------------------------- // Local - Include Files @@ -96,6 +96,12 @@ TestTCTOneColumn::run(const std::shared_ptr& dev, const xrt_co const auto pcie_id = xrt_core::device_query(dev); xrt_core::smi::smi_hardware_config smi_hrdw; const auto hardware_type = smi_hrdw.get_hardware_type(pcie_id); + if (smi_hrdw.get_family(hardware_type) == xrt_core::smi::smi_hardware_config::hardware_family::npu3) { + XBValidateUtils::logger(ptree, "Details", "N/A"); + ptree.put("status", XBValidateUtils::test_token_skipped); + return ptree; + } + const bool is_strix = XBU::is_strix_hardware(hardware_type); const std::vector artifacts = is_strix