From 0eb0c8b2e383a437ac53fc81d39047ee8fd46f32 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 6 Aug 2025 00:18:58 -0700 Subject: [PATCH 001/275] rx9060 config update --- rvs/conf/RX9060/gst_single.conf | 141 ++++++++++++++++++++++++++++++++ rvs/conf/RX9060/iet_single.conf | 118 ++++++++++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100644 rvs/conf/RX9060/gst_single.conf create mode 100644 rvs/conf/RX9060/iet_single.conf diff --git a/rvs/conf/RX9060/gst_single.conf b/rvs/conf/RX9060/gst_single.conf new file mode 100644 index 000000000..60000e9cc --- /dev/null +++ b/rvs/conf/RX9060/gst_single.conf @@ -0,0 +1,141 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + + + +# GST test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set parallel execution to false +# Set matrix_size to 8640 (for Vega 10 cards). For Vega 20, the recommended matrix_size is 8640 +# Set run count to 2 (each test will run twice) +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# +# Run test with: +# cd bin +# sudo ./rvs -c conf/gfx1200/gst_single.conf -d 3 +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves 5000 gflops +# in maximum 7 seconds and then the GPU sustains the gflops +# for the rest of the test duration (total duration is 18 seconds). +# A single Gflops violation (with a 7% tolerance) is allowed. +# FALSE otherwise + +actions: +- name: gpustress-4096-fp32-false + device: all + module: gst + parallel: false + count: 1 + duration: 10000 + copy_matrix: false + target_stress: 6000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + data_type: fp32_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + blas_source: hipblaslt + transa: 1 + transb: 0 + +- name: gpustress-4096-fp16-true + device: all + module: gst + parallel: false + count: 1 + duration: 10000 + copy_matrix: false + target_stress: 60000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + data_type: fp16_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + blas_source: hipblaslt + transa: 1 + transb: 0 + +- name: gpustress-4096-fp8-false + device: all + module: gst + parallel: false + count: 1 + duration: 10000 + copy_matrix: false + target_stress: 105000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + data_type: fp8_e4m3_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + blas_source: hipblaslt + transa: 1 + transb: 0 + + +- name: gpustress-4096-i8-false + device: all + module: gst + parallel: false + count: 1 + wait: 100 + duration: 18000 + ramp_interval: 7000 + log_interval: 1000 + max_violations: 1 + copy_matrix: true + target_stress: 82000 + data_type: i8_r + compute_type: i32_r + blas_source: hipblaslt + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + diff --git a/rvs/conf/RX9060/iet_single.conf b/rvs/conf/RX9060/iet_single.conf new file mode 100644 index 000000000..7a30ee508 --- /dev/null +++ b/rvs/conf/RX9060/iet_single.conf @@ -0,0 +1,118 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: action_1 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 20000 + ramp_interval: 5000 + sample_interval: 700 + log_interval: 700 + max_violations: 1 + target_power: 130 + tolerance: 0.06 + matrix_size: 8640 + ops_type: sgemm + blas_source: rocblas + +- name: action_2 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 20000 + ramp_interval: 5000 + sample_interval: 1500 + log_interval: 2000 + max_violations: 1 + target_power: 130 + tolerance: 0.2 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + data_type: fp16_r + compute_type: fp32_r + lda: 2080 + ldb: 2080 + ldc: 2080 + blas_source: hipblaslt + transa: 1 + transb: 0 + +- name: action_3 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 20000 + ramp_interval: 5000 + sample_interval: 1500 + log_interval: 2000 + max_violations: 1 + target_power: 130 + tolerance: 0.2 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + data_type: fp8_r + compute_type: fp32_r + lda: 2080 + ldb: 2080 + ldc: 2080 + blas_source: hipblaslt + transa: 1 + transb: 0 + + +- name: action_4 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 20000 + ramp_interval: 5000 + sample_interval: 1500 + log_interval: 2000 + max_violations: 1 + target_power: 130 + tolerance: 0.2 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + data_type: i8_r + compute_type: i32_r + lda: 2080 + ldb: 2080 + ldc: 2080 + blas_source: hipblaslt + transa: 1 + transb: 0 From 0592d75606ac8ac805fce713ea465abbcf6bb2b0 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 15 Sep 2025 17:16:41 -0500 Subject: [PATCH 002/275] RVS test summary and system overview. Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com> --- babel.so/include/rvs_memworker.h | 4 + babel.so/src/action.cpp | 21 +- babel.so/src/rvs_memworker.cpp | 4 +- babel.so/src/rvs_stress.cpp | 25 +- gpup.so/src/action.cpp | 2 +- gst.so/include/gst_worker.h | 4 + gst.so/src/action.cpp | 24 +- gst.so/src/gst_worker.cpp | 1 - iet.so/include/iet_worker.h | 4 + iet.so/src/action.cpp | 362 +++++++++++----------- iet.so/src/iet_worker.cpp | 1 - include/rvs_util.h | 12 +- mem.so/src/action.cpp | 3 +- perf.so/src/action.cpp | 3 +- pesm.so/src/action.cpp | 2 +- rvs/include/rvsexec.h | 15 + rvs/src/rvsexec_do_yaml.cpp | 495 ++++++++++++++++++++++++++++++- src/rvs_util.cpp | 115 +++---- 18 files changed, 830 insertions(+), 267 deletions(-) diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index 144da54a2..5a73aac65 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -226,6 +226,8 @@ class MemWorker : public rvs::ThreadBase { static void set_use_json(bool _bjson) { bjson = _bjson; } //! returns the JSON flag static bool get_use_json(void) { return bjson; } + //! get worker job result + bool get_result(void) { return result; } protected: bool do_mem_stress_test(int *error, std::string *err_description); @@ -270,6 +272,8 @@ class MemWorker : public rvs::ThreadBase { static bool bjson; //! synchronization mutex std::mutex wrkrmutex; + //! Worker job result + bool result; }; #endif // MEM_SO_INCLUDE_MEM_WORKER_H_ diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index f7069e502..2ba893456 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -68,16 +68,16 @@ mem_action::~mem_action() { * @return true if no error occured, false otherwise */ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { - size_t k = 0; + + uint64_t k = 0; string msg; + vector workers(mem_gpus_device_index.size()); for (;;) { - unsigned int i = 0; if (property_wait != 0) // delay mem execution sleep(property_wait); - vector workers(mem_gpus_device_index.size()); - + size_t i = 0; map::iterator it; // all worker instances have the same json settings @@ -139,7 +139,18 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { } } - return rvs::lp::Stopping() ? false : true; + if (rvs::lp::Stopping()) { + return false; + } + else { + for (size_t i = 0; i < mem_gpus_device_index.size(); i++) { + if(false == workers[i].get_result()) { + return false; + } + } + } + + return true; } /** diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index 4ba712a7c..c82c7b74d 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -39,7 +39,7 @@ using std::string; bool MemWorker::bjson = false; -extern void run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, +extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); #define FLOAT_TEST 1 @@ -80,7 +80,7 @@ void MemWorker::run() { HIP_CHECK(hipSetDevice(deviceId)); - run_babel(device, num_iterations, array_size, output_csv, mibibytes, + result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, subtest, dwords_per_lane, chunks_per_block, tb_size, MemWorker::bjson, action_name, rwtest); } diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index e4faf3e69..237141f96 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -37,36 +37,38 @@ template void check_solution(const unsigned int ntimes, std::vector& a, std::vector& b, std::vector& c, T& sum, uint64_t); template -void run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, +bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); template -void run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, +bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); void parseArguments(int argc, char *argv[]); -void run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, int subtest, +bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) { + bool result = false; + switch(test_type) { case FLOAT_TEST: - run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, + result = run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, json, action, rwtest); break; case DOUBLE_TEST: - run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, + result = run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, json, action, rwtest); break; case TRAID_FLOAT: - run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, + result = run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, json, action, rwtest); break; case TRIAD_DOUBLE: - run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, + result = run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, json, action, rwtest); break; @@ -74,10 +76,12 @@ void run_babel(std::pair device, int num_times, int array_size, b std::cout << "\n specify a valid testnumber"; break; } + + return result; } template -void run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, +bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) { std::string msg; @@ -344,10 +348,11 @@ void run_stress(std::pair device, int num_times, int ARRAY_SIZE, rvs::lp::Log(sstr.str(), rvs::logresults); delete stream; + return true; } template -void run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, +bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) { std::string msg; @@ -475,6 +480,8 @@ void run_triad(std::pair device, int num_times, int ARRAY_SIZE, b "pass", "true"); } delete stream; + + return true; } template diff --git a/gpup.so/src/action.cpp b/gpup.so/src/action.cpp index d2a7d8f97..00178e1c2 100644 --- a/gpup.so/src/action.cpp +++ b/gpup.so/src/action.cpp @@ -514,7 +514,7 @@ int gpup_action::run(void) { } if (!b_gpu_found) { msg = "No device matches criteria from configuration. "; - rvs::lp::Err(msg, MODULE_NAME, action_name); +// rvs::lp::Err(msg, MODULE_NAME, action_name); // Action callback action_result.state = rvs::actionstate::ACTION_COMPLETED; diff --git a/gst.so/include/gst_worker.h b/gst.so/include/gst_worker.h index 96a4e18f2..54f0d44ee 100644 --- a/gst.so/include/gst_worker.h +++ b/gst.so/include/gst_worker.h @@ -293,6 +293,8 @@ class GSTWorker : public rvs::ThreadBase { void set_gst_scale_b(std::string _scale_b) { gst_scale_b = _scale_b; } //! set rotating buffer size void set_gst_rotating(uint32_t _rotating) { gst_rotating = _rotating; } + //! get worker job result + bool get_result(void) { return result; } protected: void setup_blas(int *error, std::string *err_description); @@ -411,6 +413,8 @@ class GSTWorker : public rvs::ThreadBase { std::string gst_scale_b; //! Rotating buffer size uint32_t gst_rotating; + //! Worker job result + bool result; }; #endif // GST_SO_INCLUDE_GST_WORKER_H_ diff --git a/gst.so/src/action.cpp b/gst.so/src/action.cpp index 6c14c676b..66129b143 100644 --- a/gst.so/src/action.cpp +++ b/gst.so/src/action.cpp @@ -162,15 +162,16 @@ gst_action::~gst_action() { * @return true if no error occured, false otherwise */ bool gst_action::do_gpu_stress_test(map gst_gpus_device_index) { - size_t k = 0; + + uint64_t k = 0; + vector workers(gst_gpus_device_index.size()); + for (;;) { - unsigned int i = 0; if (property_wait != 0) // delay gst execution sleep(property_wait); - vector workers(gst_gpus_device_index.size()); - map::iterator it; + size_t i = 0; // all worker instances have the same json settings GSTWorker::set_use_json(bjson); @@ -255,7 +256,20 @@ bool gst_action::do_gpu_stress_test(map gst_gpus_device_index) { } } - return rvs::lp::Stopping() ? false : true; + if (rvs::lp::Stopping()) { + return false; + } + else { + + for (size_t i = 0; i < gst_gpus_device_index.size(); i++) { + if(false == workers[i].get_result()) { + return false; + } + } + } + + /* Action passed */ + return true; } /** diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 36ecd8f67..6227fc196 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -345,7 +345,6 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { */ void GSTWorker::check_target_stress(double gflops_interval) { string msg; - bool result; rvs::action_result_t action_result; char gpuid_buff[12]; auto desc = action_descriptor{action_name, MODULE_NAME,gpu_id}; diff --git a/iet.so/include/iet_worker.h b/iet.so/include/iet_worker.h index 1105d734e..3a98b320a 100644 --- a/iet.so/include/iet_worker.h +++ b/iet.so/include/iet_worker.h @@ -295,6 +295,8 @@ class IETWorker : public rvs::ThreadBase { //! BLAS callback static void blas_callback (bool status, void *user_data); + //! get worker job result + bool get_result(void) { return result; } protected: virtual void run(void); bool do_gpu_init_training(int gpuIdx, uint64_t matrix_size, std::string iet_ops_type); @@ -421,6 +423,8 @@ class IETWorker : public rvs::ThreadBase { bool nt_loads; //! gemm output data type std::string iet_out_data_type; + //! Worker job result + bool result; }; #endif // IET_SO_INCLUDE_IET_WORKER_H_ diff --git a/iet.so/src/action.cpp b/iet.so/src/action.cpp index 0ea42d623..1b8c89d07 100644 --- a/iet.so/src/action.cpp +++ b/iet.so/src/action.cpp @@ -162,7 +162,7 @@ iet_action::iet_action() { * @brief class destructor */ iet_action::~iet_action() { - property.clear(); + property.clear(); } /** @@ -487,155 +487,159 @@ bool iet_action::get_all_iet_config_keys(void) { */ void iet_action::hip_to_smi_indices(void) { - int hip_num_gpu_devices; - hipGetDeviceCount(&hip_num_gpu_devices); - // map this to smi as only these are visible - uint32_t smi_num_devices; - uint64_t val_ui64; - - std::map smi_map; - - smi_map = rvs::get_smi_pci_map(); - - for (int i = 0; i < hip_num_gpu_devices; i++) { - // get GPU device properties - //hipDeviceProp_t props; - //hipGetDeviceProperties(&props, i); - unsigned int pDom, pBus, pDev, pFun; - getBDF(i, pDom, pBus, pDev, pFun); - // compute device location_id (needed to match this device - // with one of those found while querying the pci bus - uint64_t hip_dev_location_id = ( ( ((uint64_t)pDom & 0xffff ) << 32) | - (((uint64_t) pBus & 0xff ) << 8) | (((uint64_t)pDev & 0x1f ) << 3)| ((uint64_t)pFun ) ); - - if(smi_map.find(hip_dev_location_id) != smi_map.end()){ - hip_to_smi_idxs.insert({i, smi_map[hip_dev_location_id]}); - } + + int hip_num_gpu_devices; + hipGetDeviceCount(&hip_num_gpu_devices); + // map this to smi as only these are visible + uint32_t smi_num_devices; + uint64_t val_ui64; + + std::map smi_map; + + smi_map = rvs::get_smi_pci_map(); + + for (int i = 0; i < hip_num_gpu_devices; i++) { + // get GPU device properties + //hipDeviceProp_t props; + //hipGetDeviceProperties(&props, i); + unsigned int pDom, pBus, pDev, pFun; + getBDF(i, pDom, pBus, pDev, pFun); + // compute device location_id (needed to match this device + // with one of those found while querying the pci bus + uint64_t hip_dev_location_id = ( ( ((uint64_t)pDom & 0xffff ) << 32) | + (((uint64_t) pBus & 0xff ) << 8) | (((uint64_t)pDev & 0x1f ) << 3)| ((uint64_t)pFun ) ); + + if(smi_map.find(hip_dev_location_id) != smi_map.end()){ + hip_to_smi_idxs.insert({i, smi_map[hip_dev_location_id]}); } + } } - /** * @brief runs the edp test * @return true if no error occured, false otherwise */ bool iet_action::do_edp_test(map iet_gpus_device_index) { - std::string msg; - uint32_t dev_idx = 0; - size_t k = 0; - int gpuId; - bool gpu_masking = false; // if HIP_VISIBLE_DEVICES is set, this will be true - int hip_num_gpu_devices; - hipGetDeviceCount(&hip_num_gpu_devices); - - vector workers(iet_gpus_device_index.size()); - for (;;) { - unsigned int i = 0; - map::iterator it; - - if (property_wait != 0) // delay iet execution - sleep(property_wait); - - // map hip indexes to smi indexes - hip_to_smi_indices(); - - IETWorker::set_use_json(bjson); - for (it = iet_gpus_device_index.begin(); it != iet_gpus_device_index.end(); ++it) { - if(hip_to_smi_idxs.find(it->first) != hip_to_smi_idxs.end()){ - workers[i].set_smi_device_handle(hip_to_smi_idxs[it->first]); - } else{ - workers[i].set_smi_device_handle(nullptr);// this must not happen - msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(i) + " has no handle"; - rvs::lp::Log(msg, rvs::logerror); - } - gpuId = it->second; - // set worker thread params - workers[i].set_name(action_name); - workers[i].set_action(*this); - workers[i].set_gpu_id(it->second); - workers[i].set_gpu_device_index(it->first); - workers[i].set_pwr_device_id(dev_idx++); - workers[i].set_run_wait_ms(property_wait); - workers[i].set_run_duration_ms(property_duration); - workers[i].set_ramp_interval(iet_ramp_interval); - workers[i].set_log_interval(property_log_interval); - workers[i].set_sample_interval(iet_sample_interval); - workers[i].set_max_violations(iet_max_violations); - workers[i].set_target_power(iet_target_power); - workers[i].set_tolerance(iet_tolerance); - workers[i].set_matrix_size(iet_matrix_size); - workers[i].set_matrix_size_a(iet_matrix_size_a); - workers[i].set_matrix_size_b(iet_matrix_size_b); - workers[i].set_matrix_size_c(iet_matrix_size_c); - workers[i].set_iet_ops_type(iet_ops_type); - workers[i].set_iet_data_type(iet_data_type); - workers[i].set_matrix_transpose_a(iet_trans_a); - workers[i].set_matrix_transpose_b(iet_trans_b); - workers[i].set_alpha_val(iet_alpha_val); - workers[i].set_beta_val(iet_beta_val); - workers[i].set_lda_offset(iet_lda_offset); - workers[i].set_ldb_offset(iet_ldb_offset); - workers[i].set_ldc_offset(iet_ldc_offset); - workers[i].set_ldd_offset(iet_ldd_offset); - workers[i].set_tp_flag(iet_tp_flag); - workers[i].set_bw_workload(iet_bw_workload); - workers[i].set_cp_workload(iet_cp_workload); - workers[i].set_hot_calls(iet_hot_calls); - workers[i].set_matrix_init(iet_matrix_init); - workers[i].set_gemm_mode(iet_gemm_mode); - workers[i].set_batch_size(iet_batch_size); - workers[i].set_stride_a(iet_stride_a); - workers[i].set_stride_b(iet_stride_b); - workers[i].set_stride_c(iet_stride_c); - workers[i].set_stride_d(iet_stride_d); - workers[i].set_blas_source(iet_blas_source); - workers[i].set_compute_type(iet_compute_type); - workers[i].set_wg_count(iet_wg_count); - workers[i].set_nt_loads(iet_nt_loads); - workers[i].set_iet_out_data_type(iet_out_data_type); - i++; - } - - if (property_parallel) { - for (i = 0; i < iet_gpus_device_index.size(); i++) - workers[i].start(); - // join threads - for (i = 0; i < iet_gpus_device_index.size(); i++) - workers[i].join(); - - } else { - for (i = 0; i < iet_gpus_device_index.size(); i++) { - workers[i].start(); - workers[i].join(); - - // check if stop signal was received - if (rvs::lp::Stopping()) { - return false; - } - } - } + std::string msg; + uint32_t dev_idx = 0; + size_t k = 0; + unsigned int i = 0; + int gpuId; + bool gpu_masking = false; // if HIP_VISIBLE_DEVICES is set, this will be true + int hip_num_gpu_devices; + hipGetDeviceCount(&hip_num_gpu_devices); + vector workers(iet_gpus_device_index.size()); + + for (;;) { + map::iterator it; + + if (property_wait != 0) // delay iet execution + sleep(property_wait); + + // map hip indexes to smi indexes + hip_to_smi_indices(); + + IETWorker::set_use_json(bjson); + for (it = iet_gpus_device_index.begin(); it != iet_gpus_device_index.end(); ++it) { + if(hip_to_smi_idxs.find(it->first) != hip_to_smi_idxs.end()){ + workers[i].set_smi_device_handle(hip_to_smi_idxs[it->first]); + } else{ + workers[i].set_smi_device_handle(nullptr);// this must not happen + msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(i) + " has no handle"; + rvs::lp::Log(msg, rvs::logerror); + } + gpuId = it->second; + // set worker thread params + workers[i].set_name(action_name); + workers[i].set_action(*this); + workers[i].set_gpu_id(it->second); + workers[i].set_gpu_device_index(it->first); + workers[i].set_pwr_device_id(dev_idx++); + workers[i].set_run_wait_ms(property_wait); + workers[i].set_run_duration_ms(property_duration); + workers[i].set_ramp_interval(iet_ramp_interval); + workers[i].set_log_interval(property_log_interval); + workers[i].set_sample_interval(iet_sample_interval); + workers[i].set_max_violations(iet_max_violations); + workers[i].set_target_power(iet_target_power); + workers[i].set_tolerance(iet_tolerance); + workers[i].set_matrix_size(iet_matrix_size); + workers[i].set_matrix_size_a(iet_matrix_size_a); + workers[i].set_matrix_size_b(iet_matrix_size_b); + workers[i].set_matrix_size_c(iet_matrix_size_c); + workers[i].set_iet_ops_type(iet_ops_type); + workers[i].set_iet_data_type(iet_data_type); + workers[i].set_matrix_transpose_a(iet_trans_a); + workers[i].set_matrix_transpose_b(iet_trans_b); + workers[i].set_alpha_val(iet_alpha_val); + workers[i].set_beta_val(iet_beta_val); + workers[i].set_lda_offset(iet_lda_offset); + workers[i].set_ldb_offset(iet_ldb_offset); + workers[i].set_ldc_offset(iet_ldc_offset); + workers[i].set_ldd_offset(iet_ldd_offset); + workers[i].set_tp_flag(iet_tp_flag); + workers[i].set_bw_workload(iet_bw_workload); + workers[i].set_cp_workload(iet_cp_workload); + workers[i].set_hot_calls(iet_hot_calls); + workers[i].set_matrix_init(iet_matrix_init); + workers[i].set_gemm_mode(iet_gemm_mode); + workers[i].set_batch_size(iet_batch_size); + workers[i].set_stride_a(iet_stride_a); + workers[i].set_stride_b(iet_stride_b); + workers[i].set_stride_c(iet_stride_c); + workers[i].set_stride_d(iet_stride_d); + workers[i].set_blas_source(iet_blas_source); + workers[i].set_compute_type(iet_compute_type); + workers[i].set_wg_count(iet_wg_count); + workers[i].set_nt_loads(iet_nt_loads); + workers[i].set_iet_out_data_type(iet_out_data_type); + i++; + } - msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpuId) + " Shutting down smi "; - rvs::lp::Log(msg, rvs::loginfo); + if (property_parallel) { + for (i = 0; i < iet_gpus_device_index.size(); i++) + workers[i].start(); + // join threads + for (i = 0; i < iet_gpus_device_index.size(); i++) + workers[i].join(); + } else { + for (i = 0; i < iet_gpus_device_index.size(); i++) { + workers[i].start(); + workers[i].join(); // check if stop signal was received - if (rvs::lp::Stopping()) - return false; - - if (property_count == ++k) { - break; + if (rvs::lp::Stopping()) { + return false; } + } } - - msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpuId) + " Done with iet test "; + msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpuId) + " Shutting down smi "; rvs::lp::Log(msg, rvs::loginfo); - sleep(1000); + // check if stop signal was received + if (rvs::lp::Stopping()) + return false; + + if (property_count == ++k) { + break; + } + } + + msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpuId) + " Done with iet test "; + rvs::lp::Log(msg, rvs::loginfo); - return true; + sleep(1000); + + for (i = 0; i < iet_gpus_device_index.size(); i++) { + if(false == workers[i].get_result()) + return false; + } + + /* IET action passed */ + return true; } /** @@ -643,64 +647,64 @@ bool iet_action::do_edp_test(map iet_gpus_device_index) { * @return run number of GPUs */ int iet_action::get_num_amd_gpu_devices(void) { - int hip_num_gpu_devices; - string msg; - - hipGetDeviceCount(&hip_num_gpu_devices); - return hip_num_gpu_devices; -} + int hip_num_gpu_devices; + string msg; + hipGetDeviceCount(&hip_num_gpu_devices); + return hip_num_gpu_devices; +} /** * @brief gets all selected GPUs and starts the worker threads * @return run result */ int iet_action::get_all_selected_gpus(void) { - int hip_num_gpu_devices; - bool amd_gpus_found = false; - map iet_gpus_device_index; - std::string msg; - std::stringstream msg_stream; - - hipGetDeviceCount(&hip_num_gpu_devices); - if (hip_num_gpu_devices < 1) - return hip_num_gpu_devices; - - // find compatible GPUs to run edp tests - amd_gpus_found = fetch_gpu_list(hip_num_gpu_devices, iet_gpus_device_index, - property_device, property_device_id, property_device_all, - property_device_index, property_device_index_all, true); // MCM checks - if(!amd_gpus_found){ - msg = "No devices match criteria from the test configuation."; - rvs::lp::Log(msg, rvs::logerror); - if (bjson) { - unsigned int sec; - unsigned int usec; - rvs::lp::get_ticks(&sec, &usec); - void *json_root_node = rvs::lp::LogRecordCreate(MODULE_NAME, - action_name.c_str(), rvs::logerror, sec, usec, true); - if (!json_root_node) { - // log the error - string msg = std::string(JSON_CREATE_NODE_ERROR); - rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); - return -1; - } - - rvs::lp::AddString(json_root_node, "ERROR", "No AMD compatible GPU found!"); - rvs::lp::LogRecordFlush(json_root_node, rvs::logerror); - } - - return 0; // no GPUs is not error + + int hip_num_gpu_devices; + bool amd_gpus_found = false; + map iet_gpus_device_index; + std::string msg; + std::stringstream msg_stream; + + hipGetDeviceCount(&hip_num_gpu_devices); + if (hip_num_gpu_devices < 1) + return hip_num_gpu_devices; + + // find compatible GPUs to run edp tests + amd_gpus_found = fetch_gpu_list(hip_num_gpu_devices, iet_gpus_device_index, + property_device, property_device_id, property_device_all, + property_device_index, property_device_index_all, true); // MCM checks + if(!amd_gpus_found){ + msg = "No devices match criteria from the test configuation."; + rvs::lp::Log(msg, rvs::logerror); + if (bjson) { + unsigned int sec; + unsigned int usec; + rvs::lp::get_ticks(&sec, &usec); + void *json_root_node = rvs::lp::LogRecordCreate(MODULE_NAME, + action_name.c_str(), rvs::logerror, sec, usec, true); + if (!json_root_node) { + // log the error + string msg = std::string(JSON_CREATE_NODE_ERROR); + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + return -1; + } + + rvs::lp::AddString(json_root_node, "ERROR", "No AMD compatible GPU found!"); + rvs::lp::LogRecordFlush(json_root_node, rvs::logerror); } - int iet_res = 0; - if(do_edp_test(iet_gpus_device_index)) - iet_res = 0; - else - iet_res = -1; - // append end node to json - return iet_res; + return 0; // no GPUs is not error + } + + int iet_res = 0; + if(do_edp_test(iet_gpus_device_index)) + iet_res = 0; + else + iet_res = -1; + // append end node to json + return iet_res; } diff --git a/iet.so/src/iet_worker.cpp b/iet.so/src/iet_worker.cpp index 16b65ea16..1aecc5219 100644 --- a/iet.so/src/iet_worker.cpp +++ b/iet.so/src/iet_worker.cpp @@ -170,7 +170,6 @@ bool IETWorker::do_iet_power_stress(void) { float cur_power_value = 0; float totalpower = 0; float max_power = 0; - bool result = true; bool start = true; rvs::action_result_t action_result; char gpuid_buff[12]; diff --git a/include/rvs_util.h b/include/rvs_util.h index 2da4358e0..9eeda6a0e 100644 --- a/include/rvs_util.h +++ b/include/rvs_util.h @@ -34,6 +34,15 @@ using std::map; +struct device_info { + std::string bus; + std::string name; + int32_t node_id; + int32_t gpu_id; + int32_t device_id; + uint64_t bdfId;// this is pcie location id to uniquely identify device +}; + struct action_descriptor{ std::string action_name; std::string module_name; @@ -135,8 +144,9 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind bool property_device_all, const std::vector& property_device_index, bool property_device_index_all, bool mcm_check = false); void getBDF(int idx ,unsigned int& domain,unsigned int& bus,unsigned int& device,unsigned int& function); -int display_gpu_info(void); +int display_gpu_info(std::vector); void *json_list_create(std::string lname, int log_level); +std::vector get_gpu_info (void); template void log_to_json(action_descriptor desc, int log_level, KVPairs... key_values ) { diff --git a/mem.so/src/action.cpp b/mem.so/src/action.cpp index 98e0a5a2e..2591fec9f 100644 --- a/mem.so/src/action.cpp +++ b/mem.so/src/action.cpp @@ -82,7 +82,8 @@ mem_action::~mem_action() { * @return true if no error occured, false otherwise */ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { - size_t k = 0; + + uint64_t k = 0; string msg; for (;;) { diff --git a/perf.so/src/action.cpp b/perf.so/src/action.cpp index 1f3e6890a..dd16eb914 100644 --- a/perf.so/src/action.cpp +++ b/perf.so/src/action.cpp @@ -119,7 +119,8 @@ perf_action::~perf_action() { * @return true if no error occured, false otherwise */ bool perf_action::do_gpu_stress_test(map perf_gpus_device_index) { - size_t k = 0; + + uint64_t k = 0; for (;;) { unsigned int i = 0; if (property_wait != 0) // delay perf execution diff --git a/pesm.so/src/action.cpp b/pesm.so/src/action.cpp index ec6cb336d..e9872d244 100644 --- a/pesm.so/src/action.cpp +++ b/pesm.so/src/action.cpp @@ -260,6 +260,6 @@ int pesm_action::run(void) { * * */ int pesm_action::do_gpu_list() { - return display_gpu_info(); + return display_gpu_info(get_gpu_info()); } diff --git a/rvs/include/rvsexec.h b/rvs/include/rvsexec.h index 5b7114f6a..a6ea7c835 100644 --- a/rvs/include/rvsexec.h +++ b/rvs/include/rvsexec.h @@ -41,6 +41,14 @@ enum class yaml_data_type_t { YAML_STRING = 1 }; +typedef struct { + std::string name; + std::string module; + std::string category; + bool result; + uint64_t duration; +} exec_action; + /** * @class exec * @ingroup Launcher @@ -87,6 +95,13 @@ class exec { int user_param; /* Number of times to execute the test */ int num_times; + /* Details of all executed actions */ + std::vector action_details; + + bool in_progress; + + void in_progress_thread(exec_action action_info); + }; } // namespace rvs diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index 94446d473..ceb0f24a0 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -26,6 +26,9 @@ #include #include #include +#include +#include +#include #include "include/rvsexec.h" #include "yaml-cpp/yaml.h" @@ -37,6 +40,7 @@ #include "include/rvsliblogger.h" #include "include/rvsoptions.h" #include "include/rvs_util.h" +#include "include/gpu_util.h" #define MODULE_NAME_CAPS "CLI" @@ -169,6 +173,303 @@ int rvs::exec::do_yaml(const std::string& config_file) { return 0; } +/** + * @brief Action test in progress spinner thread + */ +void rvs::exec::in_progress_thread(exec_action action_info) { + + const char boundary = '|'; + const int columnWidth = 14; + const int actionColumnWidth = 32; + + const string spinner[] = {"||||", "////", "----", "\\\\\\\\"}; + int spinnerIndex = 0; + + while (in_progress) { + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << action_info.name + << " | " << std::setw(columnWidth) << std::left << action_info.module + << " | " << std::setw(columnWidth) << std::left << spinner[spinnerIndex++] + << " " << boundary << std::flush; + + spinnerIndex %= 4; + + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + } +} + +/** + * @brief Get installed ROCm version + */ +std::string getROCmVersion(void) { + + std::string line = "N/A"; + std::ifstream inputFile("/opt/rocm/.info/version-rocm"); + if (!inputFile) { + return line; + } + std::getline(inputFile, line); + inputFile.close(); + + return line; +} + +/** + * @brief Get operating system name & version. + */ +std::string getOSNameVersion(void) { + + std::ifstream file("/etc/os-release"); + std::string line; + std::string osName; + + if (!file.is_open()) { + return "N/A"; + } + + while (std::getline(file, line)) { + + if (line.find("PRETTY_NAME=") == 0) { + /* Remove the key and quotes */ + + /* Skip "PRETTY_NAME=" */ + osName = line.substr(12); + if (!osName.empty() && osName.front() == '"' && osName.back() == '"') { + /* Remove surrounding quotes */ + osName = osName.substr(1, osName.size() - 2); + } + break; + } + } + + file.close(); + return osName.empty() ? "N/A" : osName; +} + + +/** + * @brief Get amdgpu driver version. + */ +std::string getAmdGpuDriverVersion() { + + std::array buffer; + std::string result; + + // Run the command + std::unique_ptr pipe(popen("dkms status", "r"), pclose); + if (!pipe) { + return "N/A"; + } + + // Read the output + while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { + result += buffer.data(); + } + + // Example output: "amdgpu/6.14.14-2204008.22.04, 6.8.0-59-generic, x86_64: installed " + // Extract version (e.g., 6.14.14) + size_t slashPos = result.find('/'); + size_t commaPos = result.find('-', slashPos); + if (slashPos != std::string::npos && commaPos != std::string::npos) { + return result.substr(slashPos + 1, commaPos - slashPos - 1); + } + + return "N/A"; +} + +/** + * @brief Print system overview details + */ +void systemOverview() { + + // Header column + std::string header = "System Overview"; + + std::string version1 = "RVS version"; + std::string version2 = "ROCm version"; + std::string version3 = "amdgpu version"; + std::string OS = "Operating System"; + std::string gpus = "GPUs"; + + // Define column width for consistent spacing + int columnWidth = 14;; + int actionColumnWidth = 32; + int TotalColumnWidth = 69; + + const char boundary = '|'; + + // Function to print a horizontal boundary line + auto printBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '-'; + } + std::cout << "+" << std::endl; + }; + + auto printDoubleBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '='; + } + std::cout << "+" << std::endl; + }; + + int padding = (TotalColumnWidth - header.size()); + int padleft = padding / 2; + int padright = padding - padleft; + + // Print header row + std::cout << boundary << std::string(padleft, ' ') << header << std::string(padright, ' ') << boundary << std::endl; + + // Print top boundary + printBoundary(); + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << OS + << " | " << std::setw(actionColumnWidth) << std::left << getOSNameVersion() + << " " << boundary << std::endl; + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << version1 + << " | " << std::setw(actionColumnWidth) << std::left << RVS_VERSION_STRING + << " " << boundary << std::endl; + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << version2 + << " | " << std::setw(actionColumnWidth) << std::left << getROCmVersion() + << " " << boundary << std::endl; + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << version3 + << " | " << std::setw(actionColumnWidth) << std::left << getAmdGpuDriverVersion() + << " " << boundary << std::endl; + + rvs::gpulist::Initialize(); + + std::vector gpu_info_list = get_gpu_info(); + + std::string gpu_list; + for (const auto& info : gpu_info_list) { + gpu_list += info.gpu_id + " "; + } + + if (!gpu_list.empty()) { + gpu_list.pop_back(); // Remove trailing space + } else { + gpu_list = "N/A"; + } + + if(gpu_info_list.size()) { + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << "GPUs" + << " | " << std::setw(actionColumnWidth) << std::left << gpu_info_list.size() + << " " << boundary << std::endl; + } + else { + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << "GPUs" + << " | " << "\033[31m" << std::setw(actionColumnWidth) << std::left << "No GPUs detected !" << "\033[0m" + << " " << boundary << std::endl; + } + + // Print bottom boundary + printBoundary(); + + std::string GPUdetailsPart1 = "GPU Name - GPU ID"; + std::string GPUdetailsPart2 = "ID - Node ID - BDF"; + padding = (actionColumnWidth - GPUdetailsPart1.size()); + padleft = padding / 2; + padright = padding - padleft; + int gpu_index = 0; + + if(gpu_info_list.size() % 2) { + + std::string GPU1 = gpu_info_list[gpu_index].name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); + padright = (actionColumnWidth - GPU1.size()); + + std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart1 << std::string(padding, ' ') << " " << boundary + << " " << GPU1 << std::string(padright, ' ') << " " << boundary + << std::endl; + + GPU1 = std::to_string(gpu_index) + " - " + std::to_string(gpu_info_list[gpu_index].node_id) + " - " + + gpu_info_list[gpu_index].bus; + padright = (actionColumnWidth - GPU1.size()); + + padding = (actionColumnWidth - GPUdetailsPart2.size()); + std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart2 << std::string(padding, ' ') << " " << boundary + << " " << GPU1 << std::string(padright, ' ') << " " << boundary + << std::endl; + + if (1 == gpu_info_list.size()) + printDoubleBoundary(); + else + printBoundary(); + + gpu_index++; + } + else { + + if (gpu_info_list.size()) { + std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart1 << std::string(padding, ' ') << " " << boundary + << " " << std::string(actionColumnWidth, ' ') << " " << boundary + << std::endl; + } + else { + std::string msg = "N/A"; + padright = (actionColumnWidth - msg.size()); + + std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart1 << std::string(padding, ' ') << " " << boundary + << " " << "\033[31m" << msg << std::string(padright, ' ') << " " << "\033[0m" << boundary + << std::endl; + } + + padding = (actionColumnWidth - GPUdetailsPart2.size()); + std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart2 << std::string(padding, ' ') << " " << boundary + << " " << std::string(actionColumnWidth, ' ') << " " << boundary + << std::endl; + + printBoundary(); + } + + for (;gpu_index < gpu_info_list.size();) { + + std::string GPU1 = gpu_info_list[gpu_index].name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); + padleft = (actionColumnWidth - GPU1.size()); + + + std::string GPU2 = gpu_info_list[gpu_index + 1].name + " - " + std::to_string(gpu_info_list[gpu_index + 1].gpu_id); + padright = (actionColumnWidth - GPU2.size()); + + std::cout << "\r" << boundary + << " " << GPU1 << std::string(padleft, ' ') << " " << boundary + << " " << GPU2 << std::string(padright, ' ') << " " << boundary + << std::endl; + + GPU1 = std::to_string(gpu_index) + " - " + std::to_string(gpu_info_list[gpu_index].node_id) + " - " + + gpu_info_list[gpu_index].bus; + padleft = (actionColumnWidth - GPU1.size()); + + GPU2 = std::to_string(gpu_index + 1) + " - " + std::to_string(gpu_info_list[gpu_index + 1].node_id) + " - " + + gpu_info_list[gpu_index + 1].bus; + padright = (actionColumnWidth - GPU2.size()); + + std::cout << "\r" << boundary + << " " << GPU1 << std::string(padleft, ' ') << " " << boundary + << " " << GPU2 << std::string(padright, ' ') << " " << boundary + << std::endl; + + gpu_index += 2; + + if (gpu_index == gpu_info_list.size()) + printDoubleBoundary(); + else + printBoundary(); + } +} + /** * @brief Executes actions listed in .conf file. * @@ -200,6 +501,70 @@ int rvs::exec::do_yaml(yaml_data_type_t data_type, const std::string& data) { return -1; } + /* Test Summary */ + + const char boundary = '|'; + + // Header columns + std::string header = "ROCm Validation Suite (RVS) Summary"; + std::string header1 = "Action Name"; + std::string header2 = "Module"; + std::string header3 = "Result"; + + // Define column width for consistent spacing + int columnWidth = 14; + int actionColumnWidth = 32; + int TotalColumnWidth = 69; + + // Function to print a horizontal boundary line + auto printBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '-'; + } + std::cout << "+" << std::endl; + }; + + // Function to print a horizontal boundary line + auto printDoubleBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '='; + } + std::cout << "+" << std::endl; + }; + + int padding = (TotalColumnWidth - header.size()); + int padleft = padding / 2; + int padright = padding - padleft; + + /* Quite logging is enabled */ + if (rvs::options::has_option("-q")) { + + // Print top boundary + printDoubleBoundary(); + + // Print header row + std::cout << boundary << std::string(padleft, ' ') << header << std::string(padright, ' ') << boundary << std::endl; + + // Print top boundary + printDoubleBoundary(); + + systemOverview(); + + // Print header row + std::cout << boundary << " " + << std::setw(actionColumnWidth) << std::left << header1 + << " | " << std::setw(columnWidth) << std::left << header2 + << " | " << std::setw(columnWidth) << std::left << header3 + << " " << boundary << std::endl; + + // Print inner boundary + printDoubleBoundary(); + } + + /* Start of action tests */ + /* Number of times to execute the test */ for (int i = 0; i < num_times; i++) { @@ -287,12 +652,49 @@ int rvs::exec::do_yaml(yaml_data_type_t data_type, const std::string& data) { pif1->callback_set(&rvs::exec::action_callback, (void *)this); } + exec_action action_info; + + action_info.name = action["name"].as(); + action_info.module = action["module"].as(); + + std::transform(action_info.module.begin(), + action_info.module.end(), + action_info.module.begin(), ::toupper); + + std::thread in_progress_t; + + if (rvs::options::has_option("-q")) { + + in_progress = true; + + // Start compute workload thread + in_progress_t = std::thread(&rvs::exec::in_progress_thread, this, action_info); + + } + // execute action sts = pif1->run(); + if (rvs::options::has_option("-q")) { + + in_progress = false; + + in_progress_t.join(); + + std::string actionresult = (!sts) ? "PASS" : "FAIL"; + std::string textcolor = (!sts) ? "\033[32m" : "\033[31m"; + + std::cout << "\r" << boundary << " " + << std::setw(actionColumnWidth) << std::left << action_info.name + << " | " << std::setw(columnWidth) << std::left << action_info.module + << " | " << textcolor << std::setw(columnWidth) << std::left << actionresult << "\033[0m" + << " " << boundary << std::endl; + } + // processing finished, release action object module::action_destroy(pa); + // Action pass fail status !! // errors? if (sts) { @@ -303,18 +705,105 @@ int rvs::exec::do_yaml(yaml_data_type_t data_type, const std::string& data) { result.output_log = buff; callback(&result); - rvs::logger::Err("Action failed to run successfully.", - action["module"].as().c_str(), - action["name"].as().c_str()); + if (!rvs::options::has_option("-q")) { + rvs::logger::Err("Action failed to run successfully.", + action["module"].as().c_str(), + action["name"].as().c_str()); + } + + action_info.result = false; } + else { + action_info.result = true; + } + action_details.push_back(action_info); + } + } + /* End of action tests */ + + /* Quite logging is not enabled */ + if (!rvs::options::has_option("-q")) { + + const char boundary = '|'; + + // Header columns + std::string header = "ROCm Validation Suite (RVS) Summary"; + std::string header1 = "Action Name"; + std::string header2 = "Module"; + std::string header3 = "Result"; + + // Define column width for consistent spacing + int columnWidth = 14; + int actionColumnWidth = 32; + int TotalColumnWidth = 69; + + // Function to print a horizontal boundary line + auto printBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '-'; + } + std::cout << "+" << std::endl; + }; + + // Function to print a horizontal boundary line + auto printDoubleBoundary = [&]() { + std::cout << "+"; + for (int i = 0; i < TotalColumnWidth; ++i) { + std::cout << '='; + } + std::cout << "+" << std::endl; + }; + + int padding = (TotalColumnWidth - header.size()); + int padleft = padding / 2; + int padright = padding - padleft; + + // Print top boundary + printDoubleBoundary(); + // Print header row + std::cout << boundary << std::string(padleft, ' ') << header << std::string(padright, ' ') << boundary << std::endl; + + // Print top boundary + printDoubleBoundary(); + + systemOverview(); + + // Print header row + std::cout << boundary << " " + << std::setw(actionColumnWidth) << std::left << header1 + << " | " << std::setw(columnWidth) << std::left << header2 + << " | " << std::setw(columnWidth) << std::left << header3 + << " " << boundary << std::endl; + + // Print inner boundary + printDoubleBoundary(); + + for(size_t i = 0; i < action_details.size(); i++) { + + std::string result = (action_details[i].result) ? "PASS" : "FAIL"; + std::string textcolor = (action_details[i].result) ? "\033[32m" : "\033[31m"; + + // Print data row + std::cout << boundary << " " + << std::setw(actionColumnWidth) << std::left << action_details[i].name + << " | " << std::setw(columnWidth) << std::left << action_details[i].module + << " | " << textcolor << std::setw(columnWidth) << std::left << result << "\033[0m" + << " " << boundary << std::endl; } + // Print bottom boundary + printBoundary(); + } + else { + printBoundary(); } result.status = RVS_STATUS_SUCCESS; result.output_log = "RVS session successfully completed."; callback(&result); + return 0; } diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index 042bf15d8..d796e5e35 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -41,19 +41,20 @@ */ std::vector str_split(const std::string& str_val, - const std::string& delimiter) { - std::vector str_tokens; - int prev_pos = 0, cur_pos = 0; - do { - cur_pos = str_val.find(delimiter, prev_pos); - if (cur_pos == std::string::npos) - cur_pos = str_val.length(); - std::string token = str_val.substr(prev_pos, cur_pos - prev_pos); - if (!token.empty()) - str_tokens.push_back(token); - prev_pos = cur_pos + delimiter.length(); - } while (cur_pos < str_val.length() && prev_pos < str_val.length()); - return str_tokens; + const std::string& delimiter) { + + std::vector str_tokens; + int prev_pos = 0, cur_pos = 0; + do { + cur_pos = str_val.find(delimiter, prev_pos); + if (cur_pos == std::string::npos) + cur_pos = str_val.length(); + std::string token = str_val.substr(prev_pos, cur_pos - prev_pos); + if (!token.empty()) + str_tokens.push_back(token); + prev_pos = cur_pos + delimiter.length(); + } while (cur_pos < str_val.length() && prev_pos < str_val.length()); + return str_tokens; } @@ -63,12 +64,14 @@ std::vector str_split(const std::string& str_val, * @return true if std::string is a positive integer number, false otherwise */ bool is_positive_integer(const std::string& str_val) { - return !str_val.empty() - && std::find_if(str_val.begin(), str_val.end(), - [](char c) {return !std::isdigit(c);}) == str_val.end(); + + return !str_val.empty() + && std::find_if(str_val.begin(), str_val.end(), + [](char c) {return !std::isdigit(c);}) == str_val.end(); } int rvs_util_parse(const std::string& buff, bool* pval) { + if (buff.empty()) { // method empty return 2; // not found } @@ -87,25 +90,23 @@ int rvs_util_parse(const std::string& buff, bool* pval) { } void *json_node_create(std::string module_name, std::string action_name, - int log_level){ - unsigned int sec; - unsigned int usec; - - rvs::lp::get_ticks(&sec, &usec); - void *json_node = rvs::lp::LogRecordCreate(module_name.c_str(), - action_name.c_str(), log_level, sec, usec, true); - return json_node; -} + int log_level){ + unsigned int sec; + unsigned int usec; + rvs::lp::get_ticks(&sec, &usec); + void *json_node = rvs::lp::LogRecordCreate(module_name.c_str(), + action_name.c_str(), log_level, sec, usec, true); + return json_node; +} void *json_list_create(std::string lname, int log_level){ - void *json_node = rvs::lp::JsonNamedListCreate(lname.c_str() ,log_level); - return json_node; + void *json_node = rvs::lp::JsonNamedListCreate(lname.c_str() ,log_level); + return json_node; } - /** * summary: Fetches gpu id to index map for valid set of GPUs as per config. * Note: mcm_check is needed to output MCM specific messages while we iterate @@ -214,47 +215,39 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind } void getBDF(int idx ,unsigned int& domain,unsigned int& bus,unsigned int& device,unsigned int& function){ - char pciString[256] = {0}; - auto hipRet = hipDeviceGetPCIBusId(pciString, 256, idx); - std::string msg; - if(hipRet != hipSuccess){ - msg = "For GPU:" + std::to_string(idx) + ", failed to get PCI Bus id"; - rvs::lp::Log(msg, rvs::logresults); - return; - } - if (sscanf(pciString, "%04x:%02x:%02x.%01x", reinterpret_cast(&domain), - reinterpret_cast(&bus), - reinterpret_cast(&device), - reinterpret_cast(&function)) != 4) { - msg = std::string("parsing incomplete for BDF id: ") + pciString ; - rvs::lp::Log(msg, rvs::logresults); - } -} -int display_gpu_info (void) { + char pciString[256] = {0}; + auto hipRet = hipDeviceGetPCIBusId(pciString, 256, idx); + std::string msg; + if(hipRet != hipSuccess){ + msg = "For GPU:" + std::to_string(idx) + ", failed to get PCI Bus id"; + rvs::lp::Log(msg, rvs::logresults); + return; + } + if (sscanf(pciString, "%04x:%02x:%02x.%01x", reinterpret_cast(&domain), + reinterpret_cast(&bus), + reinterpret_cast(&device), + reinterpret_cast(&function)) != 4) { + msg = std::string("parsing incomplete for BDF id: ") + pciString ; + rvs::lp::Log(msg, rvs::logresults); + } +} - struct device_info { - std::string bus; - std::string name; - int32_t node_id; - int32_t gpu_id; - int32_t device_id; - uint64_t bdfId;// this is pcie location id to uniquely identify device - }; +std::vector get_gpu_info (void) { char buf[256]; int hip_num_gpu_devices; - std::string errmsg = " No supported GPUs available."; std::vector gpu_info_list; hipGetDeviceCount(&hip_num_gpu_devices); if( hip_num_gpu_devices == 0){ - std::cout << std::endl << errmsg << std::endl; - return 0; + return {}; } + for (int i = 0; i < hip_num_gpu_devices; i++) { hipDeviceProp_t props; hipGetDeviceProperties(&props, i); + unsigned int pDom, pBus, pDev, pFun; getBDF(i , pDom, pBus, pDev, pFun); // compute device location_id (needed in order to identify this device @@ -295,6 +288,14 @@ int display_gpu_info (void) { std::sort(gpu_info_list.begin(), gpu_info_list.end(), [](const struct device_info& a, const struct device_info& b) { return a.bdfId < b.bdfId; }); + + return gpu_info_list; +} + +int display_gpu_info (std::vector gpu_info_list) { + + std::string errmsg = " No supported GPUs available."; + if (!gpu_info_list.empty()) { std::cout << "Supported GPUs available:\n"; for (const auto& info : gpu_info_list) { @@ -308,8 +309,8 @@ int display_gpu_info (void) { return 0; } - void json_add_primary_fields(std::string moduleName, std::string action_name){ + if (rvs::lp::JsonActionStartNodeCreate(moduleName.c_str(), action_name.c_str())){ rvs::lp::Err("json start create failed", moduleName, action_name); return; From 028cfe3b2b727fabec2f086d3ff213a8aff8d02f Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Mon, 22 Sep 2025 14:56:03 -0400 Subject: [PATCH 003/275] post release clean up (#1014) --- docs/conf.py | 4 ++ docs/install/installation.rst | 6 +- docs/install/prerequisites.md | 116 ---------------------------------- docs/ug1main.md | 2 +- 4 files changed, 6 insertions(+), 122 deletions(-) delete mode 100644 docs/install/prerequisites.md diff --git a/docs/conf.py b/docs/conf.py index 2bbe5fa18..5749e8b22 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,10 @@ left_nav_title = f"RVS {version_number} Documentation" +exclude_patterns = [ + 'ug1main.md' +] + # for PDF output on Read the Docs project = "RVS Documentation" author = "Advanced Micro Devices, Inc." diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 65989d85d..e2605bbc8 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -61,11 +61,7 @@ Ensure you review the following prerequisites carefully for each operating syste .. code-block:: shell - sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel - - wget http://mirror.centos.org/centos/7/os/x86_64/Packages/pciutils-devel-3.5.1-3.el7.x86_64.rpm - - sudo rpm -ivh pciutils-devel-3.5.1-3.el7.x86_64.rpm + sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel pciutils-devel .. tab-item:: SUSE :sync: SUSE diff --git a/docs/install/prerequisites.md b/docs/install/prerequisites.md deleted file mode 100644 index f6dbd2cf0..000000000 --- a/docs/install/prerequisites.md +++ /dev/null @@ -1,116 +0,0 @@ -## Prerequisites - -Follow the instructions below before compilation/installing compiled package. - -### Ubuntu: - - sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unzip cmake git libyaml-cpp-dev - -### CentOS: - - sudo yum install -y cmake3 doxygen pciutils-devel rpm rpm-build git gcc-c++ yaml-cpp-devel - -### RHEL: - - sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel pciutils-devel - -### SLES: - - sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel - -## Install ROCm stack, rocblas and rocm-smi-lib -Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to - [ROCm installation guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html) for more details. - -**Note** - -rocm_smi64 package has been renamed to rocm-smi-lib64 from >= ROCm3.0. If you are using ROCm release < 3.0 , install the package as "rocm_smi64". -rocm-smi-lib64 package has been renamed to rocm-smi-lib from >= ROCm4.1. - -Install rocBLAS and rocm-smi-lib : - -### Ubuntu: - - sudo apt-get install rocblas rocm-smi-lib - -### CentOS & RHEL: - - sudo yum install --nogpgcheck rocblas rocm-smi-lib - -### SUSE: - - sudo zypper install rocblas rocm-smi-lib - -**Note** - -If rocm-smi-lib is already installed but /opt/rocm/lib/librocm_smi64.so doesn't exist. Do below: - -### Ubuntu: - - sudo dpkg -r rocm-smi-lib && sudo apt install rocm-smi-lib - -### CentOS & RHEL: - - sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib - -### SUSE: - - sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib - -## Building from Source -This section explains how to get and compile current development stream of RVS. - -### Clone repository - - git clone https://github.com/ROCm/ROCmValidationSuite.git - -### Configure: - - cd ROCmValidationSuite - cmake -B ./build -DROCM_PATH= -DCMAKE_INSTALL_PREFIX= -DCPACK_PACKAGING_INSTALL_PREFIX= - - e.g. If ROCm 5.5 was installed, - cmake -B ./build -DROCM_PATH=/opt/rocm-5.5.0 -DCMAKE_INSTALL_PREFIX=/opt/rocm-5.5.0 -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm-5.5.0 - -### Build binary: - - make -C ./build - -### Build package: - - cd ./build - make package - -**Note** - -Based on your OS, only DEB or RPM package will be built. You may ignore an error for the unrelated configuration. - -### Install built package: - -#### Ubuntu: - - sudo dpkg -i rocm-validation-suite*.deb - -#### CentOS, RHEL, and SUSE: - - sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm - -**Note** - -RVS is getting packaged as part of ROCm release starting from 3.0. You can install pre-compiled package as below. -Please make sure Prerequisites, ROCm stack, rocblas and rocm-smi-lib64 are already installed - -### Install package packaged with ROCm release: - -#### Ubuntu: - - sudo apt install rocm-validation-suite - -#### CentOS & RHEL: - - sudo yum install rocm-validation-suite - -#### SUSE: - - sudo zypper install rocm-validation-suite - diff --git a/docs/ug1main.md b/docs/ug1main.md index 65e57eff5..9722ed3a3 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -987,7 +987,7 @@ Input keys are described in the table below: - + From f38a2636ea234b03de46b1cc49dffef4c6b6ec45 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 25 Sep 2025 23:45:39 +0000 Subject: [PATCH 004/275] Add pebb and pbqt conf. for MI350X/MI355X. --- rvs/conf/MI350X/pbqt_single.conf | 52 ++++++++++++++++++++++++++++++++ rvs/conf/MI350X/pebb_single.conf | 48 +++++++++++++++++++++++++++++ rvs/conf/MI355X/pbqt_single.conf | 52 ++++++++++++++++++++++++++++++++ rvs/conf/MI355X/pebb_single.conf | 48 +++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 rvs/conf/MI350X/pbqt_single.conf create mode 100644 rvs/conf/MI350X/pebb_single.conf create mode 100644 rvs/conf/MI355X/pbqt_single.conf create mode 100644 rvs/conf/MI355X/pebb_single.conf diff --git a/rvs/conf/MI350X/pbqt_single.conf b/rvs/conf/MI350X/pbqt_single.conf new file mode 100644 index 000000000..71f4c2398 --- /dev/null +++ b/rvs/conf/MI350X/pbqt_single.conf @@ -0,0 +1,52 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test via xgmi link. +- name: xgmi_d2d_unidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test via xgmi link. +- name: xgmi_d2d_bidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + diff --git a/rvs/conf/MI350X/pebb_single.conf b/rvs/conf/MI350X/pebb_single.conf new file mode 100644 index 000000000..d8a920d7c --- /dev/null +++ b/rvs/conf/MI350X/pebb_single.conf @@ -0,0 +1,48 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Device-to-Host/CPU-to-GPU bidirectional bandwidth test via pcie link. +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +# Host-to-Device/CPU-to-GPU bidirectional bandwidth test via pcie link. +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + diff --git a/rvs/conf/MI355X/pbqt_single.conf b/rvs/conf/MI355X/pbqt_single.conf new file mode 100644 index 000000000..71f4c2398 --- /dev/null +++ b/rvs/conf/MI355X/pbqt_single.conf @@ -0,0 +1,52 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test via xgmi link. +- name: xgmi_d2d_unidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test via xgmi link. +- name: xgmi_d2d_bidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + diff --git a/rvs/conf/MI355X/pebb_single.conf b/rvs/conf/MI355X/pebb_single.conf new file mode 100644 index 000000000..d8a920d7c --- /dev/null +++ b/rvs/conf/MI355X/pebb_single.conf @@ -0,0 +1,48 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Device-to-Host/CPU-to-GPU bidirectional bandwidth test via pcie link. +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +# Host-to-Device/CPU-to-GPU bidirectional bandwidth test via pcie link. +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + From e1fe3c10e55dbf18760ffe933fb34feace185d8f Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 25 Sep 2025 21:44:01 -0700 Subject: [PATCH 005/275] update right datatype for platform --- rvs/conf/RX9060/iet_single.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rvs/conf/RX9060/iet_single.conf b/rvs/conf/RX9060/iet_single.conf index 7a30ee508..86b7c1375 100644 --- a/rvs/conf/RX9060/iet_single.conf +++ b/rvs/conf/RX9060/iet_single.conf @@ -82,7 +82,7 @@ actions: matrix_size_a: 2048 matrix_size_b: 2048 matrix_size_c: 2048 - data_type: fp8_r + data_type: fp8_e4m3_r compute_type: fp32_r lda: 2080 ldb: 2080 From 7daddca3ebfd4dec97adf99e4654044584d1e0c1 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 30 Sep 2025 13:51:37 -0500 Subject: [PATCH 006/275] Babel subtest configurability --- babel.so/include/action.h | 30 +++- babel.so/include/rvs_memworker.h | 71 ++++++-- babel.so/src/action.cpp | 60 ++++++- babel.so/src/rvs_memworker.cpp | 9 +- babel.so/src/rvs_stress.cpp | 291 ++++++++++++++----------------- rvs/conf/MI210/babel.conf | 6 +- rvs/conf/MI300X/babel.conf | 6 +- rvs/conf/MI308X-HF/babel.conf | 6 +- rvs/conf/MI308X/babel.conf | 6 +- rvs/conf/MI325X/babel.conf | 8 +- rvs/conf/MI350X/babel.conf | 9 +- rvs/conf/MI355X/babel.conf | 9 +- rvs/conf/babel.conf | 9 +- 13 files changed, 319 insertions(+), 201 deletions(-) diff --git a/babel.so/include/action.h b/babel.so/include/action.h index fae960944..072da8ea5 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -52,22 +52,26 @@ using std::map; #define RVS_CONF_TEST_TYPE "test_type" #define RVS_CONF_MEM_MIBIBYTE "mibibytes" #define RVS_CONF_OP_CSV "o/p_csv" -#define RVS_CONF_RWTEST "rwtest" -#define RVS_CONF_SUBTEST "subtest" #define RVS_CONF_DWORDS_PER_LANE "dwords_per_lane" #define RVS_CONF_CHUNKS_PER_BLOCK "chunks_per_block" #define RVS_CONF_TB_SIZE "tb_size" +#define RVS_CONF_READ "read" +#define RVS_CONF_WRITE "write" +#define RVS_CONF_COPY "copy" +#define RVS_CONF_ADD "add" +#define RVS_CONF_MUL "mul" +#define RVS_CONF_DOT "dot" +#define RVS_CONF_TRIAD "triad" #define MEM_DEFAULT_ARRAY_SIZE 33554432 // 32 MB #define MEM_DEFAULT_NUM_ITER 100 #define MEM_DEFAULT_TEST_TYPE 1 #define MEM_DEFAULT_MEM_MIBIBYTE false #define MEM_DEFAULT_OP_CSV false -#define MEM_DEFAULT_RWTEST 0 -#define MEM_DEFAULT_SUBTEST 5 #define MEM_DEFAULT_DWORDS_PER_LANE 4 #define MEM_DEFAULT_CHUNKS_PER_BLOCK 2 #define MEM_DEFAULT_TB_SIZE 1024 +#define MEM_DEFAULT_TEST_ENABLE false #define MEM_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" #define FLOATING_POINT_REGEX "^[0-9]*\\.?[0-9]+$" @@ -98,12 +102,22 @@ class mem_action: public rvs::actionbase { bool mibibytes; //! output in csv bool output_csv; + //! read test enable/disable + bool read; + //! write test enable/disable + bool write; + //! copy test enable/disable + bool copy; + //! add test enable/disable + bool add; + //! mul test enable/disable + bool mul; + //! dot test enable/disable + bool dot; + //! triad test enable/disable + bool triad; //! test type int test_type; - //read-write test selection - int rwtest; - //subtest selection - int subtest; //! number of iterations uint64_t num_iterations; //! number of iterations diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index 5a73aac65..b2ba8d08e 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -103,6 +103,17 @@ #define TRAID_FLOAT 3 #define TRIAD_DOUBLE 4 +/* Babel subtest enable/disable */ +typedef struct { + bool read; + bool write; + bool copy; + bool add; + bool mul; + bool dot; + bool triad; +} subtest; + /** * @class MEMWorker * @ingroup MEM @@ -176,19 +187,40 @@ class MemWorker : public rvs::ThreadBase { //! returns the test type int get_test_type(void) { return test_type; } - //! sets rw test type - void set_rwtest_type(int _test_type) { - rwtest = _test_type; + //! sets read test enable/disable + void set_read(bool _read) { + read = _read; + } + + //! sets write test enable/disable + void set_write(bool _write) { + write = _write; + } + + //! sets copy test enable/disable + void set_copy(bool _copy) { + copy = _copy; + } + + //! sets add test enable/disable + void set_add(bool _add) { + add = _add; + } + + //! sets mul test enable/disable + void set_mul(bool _mul) { + mul = _mul; } - //! returns rw test type - int get_rwtest_type(void) { return rwtest; } - //! sets the sub test type - void set_subtest_type(int _test_type) { - subtest = _test_type; + //! sets dot test enable/disable + void set_dot(bool _dot) { + dot = _dot; + } + + //! sets triad test enable/disable + void set_triad(bool _triad) { + triad = _triad; } - //! returns the sub test type - int get_subtest_type(void) { return subtest; } //! sets the mibi bytes void set_mibibytes(bool _mibibytes) { @@ -257,10 +289,6 @@ class MemWorker : public rvs::ThreadBase { uint64_t array_size; //! Test type int test_type; - //! Read-Write Test type - int rwtest; - //! Sub Test type - int subtest; //! number of dwords per lane uint16_t dwords_per_lane; //! number of chunks per block @@ -274,6 +302,21 @@ class MemWorker : public rvs::ThreadBase { std::mutex wrkrmutex; //! Worker job result bool result; + + //! read test enable/disable + bool read; + //! write test enable/disable + bool write; + //! copy test enable/disable + bool copy; + //! add test enable/disable + bool add; + //! mul test enable/disable + bool mul; + //! dot test enable/disable + bool dot; + //! triad test enable/disable + bool triad; }; #endif // MEM_SO_INCLUDE_MEM_WORKER_H_ diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index 2ba893456..e5080c299 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -101,8 +101,13 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { workers[i].set_mibibytes(mibibytes); workers[i].set_output_csv(output_csv); workers[i].set_num_iterations(num_iterations); - workers[i].set_rwtest_type(rwtest); - workers[i].set_subtest_type(subtest); + workers[i].set_read(read); + workers[i].set_write(write); + workers[i].set_copy(copy); + workers[i].set_add(add); + workers[i].set_mul(mul); + workers[i].set_dot(dot); + workers[i].set_triad(triad); workers[i].set_dwords_per_lane(dwords_per_lane); workers[i].set_chunks_per_block(chunks_per_block); workers[i].set_tb_size(tb_size); @@ -184,19 +189,58 @@ bool mem_action::get_all_mem_config_keys(void) { rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); bsts = false; } + if (property_get(RVS_CONF_READ, + &read, MEM_DEFAULT_TEST_ENABLE)) { + msg = "invalid '" + + std::string(RVS_CONF_READ) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_WRITE, + &write, MEM_DEFAULT_TEST_ENABLE)) { + msg = "invalid '" + + std::string(RVS_CONF_WRITE) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_COPY, + ©, MEM_DEFAULT_TEST_ENABLE)) { + msg = "invalid '" + + std::string(RVS_CONF_COPY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_ADD, + &add, MEM_DEFAULT_TEST_ENABLE)) { + msg = "invalid '" + + std::string(RVS_CONF_ADD) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_MUL, + &mul, MEM_DEFAULT_TEST_ENABLE)) { + msg = "invalid '" + + std::string(RVS_CONF_MUL) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } - if (property_get_int(RVS_CONF_RWTEST, - &rwtest, MEM_DEFAULT_RWTEST)) { + if (property_get(RVS_CONF_DOT, + &dot, MEM_DEFAULT_TEST_ENABLE)) { msg = "invalid '" + - std::string(RVS_CONF_RWTEST) + "' key value"; + std::string(RVS_CONF_DOT) + "' key value"; rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); bsts = false; } - if (property_get_int(RVS_CONF_SUBTEST, - &subtest, MEM_DEFAULT_SUBTEST)) { + if (property_get(RVS_CONF_TRIAD, + &triad, MEM_DEFAULT_TEST_ENABLE)) { msg = "invalid '" + - std::string(RVS_CONF_SUBTEST) + "' key value"; + std::string(RVS_CONF_TRIAD) + "' key value"; rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); bsts = false; } diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index c82c7b74d..e60660a9d 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -40,7 +40,7 @@ using std::string; bool MemWorker::bjson = false; extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, - int test_type, int subtest, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); + int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); #define FLOAT_TEST 1 #define DOUBLE_TEST 2 @@ -80,8 +80,11 @@ void MemWorker::run() { HIP_CHECK(hipSetDevice(deviceId)); + /* Set Babel subtests enable/disable */ + subtest test = {read, write, copy, add, mul, triad, dot}; + result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, - test_type, subtest, dwords_per_lane, chunks_per_block, tb_size, - MemWorker::bjson, action_name, rwtest); + test_type, dwords_per_lane, chunks_per_block, tb_size, + MemWorker::bjson, action_name, &test); } diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 237141f96..9f4820376 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -32,44 +32,46 @@ static bool triad_only = false; bool event_timing = false; std::string module_name{"babel"}; +// Total no. of babel subtests +const int total_babel_subtests = 7; template void check_solution(const unsigned int ntimes, std::vector& a, std::vector& b, std::vector& c, T& sum, uint64_t); template -bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); +bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); template -bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest); +bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); void parseArguments(int argc, char *argv[]); -bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, int subtest, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) { +bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) { bool result = false; switch(test_type) { case FLOAT_TEST: - result = run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, - json, action, rwtest); + result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, + json, action, test); break; case DOUBLE_TEST: - result = run_stress(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, - json, action, rwtest); + result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, + json, action, test); break; case TRAID_FLOAT: - result = run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, - json, action, rwtest); + result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, + json, action, test); break; case TRIAD_DOUBLE: - result = run_triad(device, num_times, array_size, output_csv, mibibytes, subtest, dwords_per_lane, chunks_per_block, tb_size, - json, action, rwtest); + result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, + json, action, test); break; default: @@ -81,13 +83,14 @@ bool run_babel(std::pair device, int num_times, int array_size, b } template -bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) +bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) { std::string msg; std::streamsize ss = std::cout.precision(); std::stringstream sstr; auto desc = action_descriptor{action, module_name, device.second}; + if (!output_as_csv) { msg = "Running kernels " + std::to_string(num_times) + " times, " ; @@ -150,60 +153,69 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, stream->init_arrays(startA, startB, startC); // List of times - std::vector> rwtimings(2); - std::vector> timings(5); + std::vector> timings(total_babel_subtests); // Declare timers std::chrono::high_resolution_clock::time_point t1, t2; + // Main loop - run each babel subtest if enabled for (unsigned int k = 0; k < num_times; k++) { - // Execute Read - t1 = std::chrono::high_resolution_clock::now(); - stream->read(); - t2 = std::chrono::high_resolution_clock::now(); - rwtimings[0].push_back(std::chrono::duration_cast >(t2 - t1).count()); - - // Execute Write - t1 = std::chrono::high_resolution_clock::now(); - stream->write(); - t2 = std::chrono::high_resolution_clock::now(); - rwtimings[1].push_back(std::chrono::duration_cast >(t2 - t1).count()); - } + if(test->read) { + // Execute Read + t1 = std::chrono::high_resolution_clock::now(); + stream->read(); + t2 = std::chrono::high_resolution_clock::now(); + timings[0].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } - // Main loop - for (unsigned int k = 0; k < num_times; k++) - { - // Execute Copy - t1 = std::chrono::high_resolution_clock::now(); - stream->copy(); - t2 = std::chrono::high_resolution_clock::now(); - timings[0].push_back(std::chrono::duration_cast >(t2 - t1).count()); - - // Execute Mul - t1 = std::chrono::high_resolution_clock::now(); - stream->mul(); - t2 = std::chrono::high_resolution_clock::now(); - timings[1].push_back(std::chrono::duration_cast >(t2 - t1).count()); - - // Execute Add - t1 = std::chrono::high_resolution_clock::now(); - stream->add(); - t2 = std::chrono::high_resolution_clock::now(); - timings[2].push_back(std::chrono::duration_cast >(t2 - t1).count()); - - // Execute Triad - t1 = std::chrono::high_resolution_clock::now(); - stream->triad(); - t2 = std::chrono::high_resolution_clock::now(); - timings[3].push_back(std::chrono::duration_cast >(t2 - t1).count()); + if(test->write) { + // Execute Write + t1 = std::chrono::high_resolution_clock::now(); + stream->write(); + t2 = std::chrono::high_resolution_clock::now(); + timings[1].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } + + if(test->copy) { + // Execute Copy + t1 = std::chrono::high_resolution_clock::now(); + stream->copy(); + t2 = std::chrono::high_resolution_clock::now(); + timings[2].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } - // Execute Dot - t1 = std::chrono::high_resolution_clock::now(); - sum = stream->dot(); - t2 = std::chrono::high_resolution_clock::now(); - timings[4].push_back(std::chrono::duration_cast >(t2 - t1).count()); + if(test->mul) { + // Execute Mul + t1 = std::chrono::high_resolution_clock::now(); + stream->mul(); + t2 = std::chrono::high_resolution_clock::now(); + timings[3].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } + + if(test->add) { + // Execute Add + t1 = std::chrono::high_resolution_clock::now(); + stream->add(); + t2 = std::chrono::high_resolution_clock::now(); + timings[4].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } + + if(test->triad) { + // Execute Triad + t1 = std::chrono::high_resolution_clock::now(); + stream->triad(); + t2 = std::chrono::high_resolution_clock::now(); + timings[5].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } + if(test->dot) { + // Execute Dot + t1 = std::chrono::high_resolution_clock::now(); + sum = stream->dot(); + t2 = std::chrono::high_resolution_clock::now(); + timings[6].push_back(std::chrono::duration_cast >(t2 - t1).count()); + } } // Check solutions @@ -237,60 +249,10 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << std::fixed; } - std::string rwlabels[2] = {"Read", "Write"}; - size_t rwsizes[2] = { - sizeof(T) * ARRAY_SIZE, - sizeof(T) * ARRAY_SIZE - }; - - for (int i = 0; i < rwtest; i++) - { - // Get min/max; ignore the first result - auto minmax = std::minmax_element(rwtimings[i].begin()+1, rwtimings[i].end()); - - // Calculate average; ignore the first result - double average = std::accumulate(rwtimings[i].begin()+1, rwtimings[i].end(), 0.0) / (double)(num_times - 1); - // Display results - if (output_as_csv) - { - sstr - << device.second << csv_separator - << rwlabels[i] << csv_separator - << num_times << csv_separator - << ARRAY_SIZE << csv_separator - << sizeof(T) << csv_separator - << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * rwsizes[i] / (*minmax.first) << csv_separator - << *minmax.first << csv_separator - << *minmax.second << csv_separator - << average - << std::endl; - } - else - { - sstr - << std::left << std::setw(12) << device.second - << std::left << std::setw(12) << rwlabels[i] - << std::left << std::setw(12) << std::setprecision(3) << - ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * rwsizes[i] / (*minmax.first) - << std::left << std::setw(12) << std::setprecision(5) << *minmax.first - << std::left << std::setw(12) << std::setprecision(5) << *minmax.second - << std::left << std::setw(12) << std::setprecision(5) << average - << std::endl; - } - if (json){ - log_to_json(desc, rvs::logresults, "Function",std::string(rwlabels[i]), - "MBytes/sec", (mibibytes) ? - std::to_string(pow(2.0, -20.0)) : std::to_string((1.0E-6) * rwsizes[i] / (*minmax.first)), - "Min(s)",std::to_string( *minmax.first), - "Max(s)", std::to_string(*minmax.second), - "Average(s)", std::to_string(average), - "pass", "true"); - } - } - - //rvs::lp::Log(sstr.str(), rvs::logresults); - std::string labels[5] = {"Copy", "Mul", "Add", "Triad", "Dot"}; - size_t sizes[5] = { + std::string labels[total_babel_subtests] = {"Read","Write","Copy", "Mul", "Add", "Triad", "Dot"}; + size_t sizes[total_babel_subtests] = { + 2 * sizeof(T) * ARRAY_SIZE, + 2 * sizeof(T) * ARRAY_SIZE, 2 * sizeof(T) * ARRAY_SIZE, 2 * sizeof(T) * ARRAY_SIZE, 3 * sizeof(T) * ARRAY_SIZE, @@ -298,51 +260,64 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, 2 * sizeof(T) * ARRAY_SIZE }; - for (int i = 0; i < subtest; i++) + bool test_enable[total_babel_subtests] = { + test->read, + test->write, + test->copy, + test->mul, + test->add, + test->triad, + test->dot}; + + // Display babel subtest results + for (int i = 0; i < total_babel_subtests; i++) { - // Get min/max; ignore the first result - auto minmax = std::minmax_element(timings[i].begin()+1, timings[i].end()); - //sstr.str( std::string() ); - //sstr.clear(); - // Calculate average; ignore the first result - double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(num_times - 1); - // Display results - if (output_as_csv) - { - sstr - << device.second << csv_separator - << labels[i] << csv_separator - << num_times << csv_separator - << ARRAY_SIZE << csv_separator - << sizeof(T) << csv_separator - << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) << csv_separator - << *minmax.first << csv_separator - << *minmax.second << csv_separator - << average - << std::endl; - } - else - { - sstr - << std::left << std::setw(12) << device.second - << std::left << std::setw(12) << labels[i] - << std::left << std::setw(12) << std::setprecision(3) << + if(test_enable[i]) { + + // Get min/max; ignore the first result + auto minmax = std::minmax_element(timings[i].begin()+1, timings[i].end()); + + // Calculate average; ignore the first result + double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(num_times - 1); + // Display results + if (output_as_csv) + { + sstr + << device.second << csv_separator + << labels[i] << csv_separator + << num_times << csv_separator + << ARRAY_SIZE << csv_separator + << sizeof(T) << csv_separator + << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) << csv_separator + << *minmax.first << csv_separator + << *minmax.second << csv_separator + << average + << std::endl; + } + else + { + sstr + << std::left << std::setw(12) << device.second + << std::left << std::setw(12) << labels[i] + << std::left << std::setw(12) << std::setprecision(3) << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) - << std::left << std::setw(12) << std::setprecision(5) << *minmax.first - << std::left << std::setw(12) << std::setprecision(5) << *minmax.second - << std::left << std::setw(12) << std::setprecision(5) << average - << std::endl; + << std::left << std::setw(12) << std::setprecision(5) << *minmax.first + << std::left << std::setw(12) << std::setprecision(5) << *minmax.second + << std::left << std::setw(12) << std::setprecision(5) << average + << std::endl; + } + if (json){ + log_to_json(desc, rvs::logresults, "Function",std::string(labels[i]), + "MBytes/sec", (mibibytes) ? + std::to_string(pow(2.0, -20.0)) : std::to_string((1.0E-6) * sizes[i] / (*minmax.first)), + "Min(s)",std::to_string( *minmax.first), + "Max(s)", std::to_string(*minmax.second), + "Average(s)", std::to_string(average), + "pass", "true"); + } } - if (json){ - log_to_json(desc, rvs::logresults, "Function",std::string(labels[i]), - "MBytes/sec", (mibibytes) ? - std::to_string(pow(2.0, -20.0)) : std::to_string((1.0E-6) * sizes[i] / (*minmax.first)), - "Min(s)",std::to_string( *minmax.first), - "Max(s)", std::to_string(*minmax.second), - "Average(s)", std::to_string(average), - "pass", "true"); - } } + sstr << "------------------------------------------------------------------------" << std::endl; rvs::lp::Log(sstr.str(), rvs::logresults); @@ -352,8 +327,8 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, } template -bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, int subtest, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, int rwtest) +bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) { std::string msg; auto desc = action_descriptor{action, module_name, device.second}; diff --git a/rvs/conf/MI210/babel.conf b/rvs/conf/MI210/babel.conf index 6602ad933..83908b4a2 100644 --- a/rvs/conf/MI210/babel.conf +++ b/rvs/conf/MI210/babel.conf @@ -45,7 +45,11 @@ actions: test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + copy: true # copy operation + mul: true # mul operation + add: true # add operation + triad: true # triad operation + dot: true # dot operation dwords_per_lane: 4 # Number of dwords per lane chunks_per_block: 4 # Number of chunks per block diff --git a/rvs/conf/MI300X/babel.conf b/rvs/conf/MI300X/babel.conf index 22d2c6a4b..864636a12 100644 --- a/rvs/conf/MI300X/babel.conf +++ b/rvs/conf/MI300X/babel.conf @@ -45,5 +45,9 @@ actions: test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + copy: true # copy operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation diff --git a/rvs/conf/MI308X-HF/babel.conf b/rvs/conf/MI308X-HF/babel.conf index 0aac30965..2d44692aa 100644 --- a/rvs/conf/MI308X-HF/babel.conf +++ b/rvs/conf/MI308X-HF/babel.conf @@ -45,7 +45,11 @@ actions: test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot dwords_per_lane: 4 # Number of dwords per lane chunks_per_block: 4 # Number of chunks per block + copy: true # copy operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation diff --git a/rvs/conf/MI308X/babel.conf b/rvs/conf/MI308X/babel.conf index 2af387d5f..d01a40492 100644 --- a/rvs/conf/MI308X/babel.conf +++ b/rvs/conf/MI308X/babel.conf @@ -45,7 +45,11 @@ actions: test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot dwords_per_lane: 4 # Number of dwords per lane chunks_per_block: 4 # Number of chunks per block + copy: true # copy operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation diff --git a/rvs/conf/MI325X/babel.conf b/rvs/conf/MI325X/babel.conf index 55751ab38..95d70687f 100644 --- a/rvs/conf/MI325X/babel.conf +++ b/rvs/conf/MI325X/babel.conf @@ -45,5 +45,11 @@ actions: test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + read: true # read operation + write: true # write operation + copy: true # copy operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation diff --git a/rvs/conf/MI350X/babel.conf b/rvs/conf/MI350X/babel.conf index 6a5e1bbc0..e5d1be26f 100644 --- a/rvs/conf/MI350X/babel.conf +++ b/rvs/conf/MI350X/babel.conf @@ -45,8 +45,13 @@ actions: test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - rwtest: 2 # 1: read 2: read+write - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + read: true # read operation + write: true # write operation + copy: true # copy operation + mul: true # mul operation + add: true # add operation + triad: true # triad operation + dot: true # dot operation dwords_per_lane: 4 # Number of dwords per lane chunks_per_block: 1 # Number of chunks per block tb_size: 512 # Thread block size diff --git a/rvs/conf/MI355X/babel.conf b/rvs/conf/MI355X/babel.conf index 6a5e1bbc0..148addbbd 100644 --- a/rvs/conf/MI355X/babel.conf +++ b/rvs/conf/MI355X/babel.conf @@ -45,8 +45,13 @@ actions: test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB o/p_csv: false # o/p as csv file - rwtest: 2 # 1: read 2: read+write - subtest: 5 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + read: true # read operation + write: true # write operation + copy: true # copy operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation dwords_per_lane: 4 # Number of dwords per lane chunks_per_block: 1 # Number of chunks per block tb_size: 512 # Thread block size diff --git a/rvs/conf/babel.conf b/rvs/conf/babel.conf index 188135ad1..5964664ef 100644 --- a/rvs/conf/babel.conf +++ b/rvs/conf/babel.conf @@ -45,4 +45,11 @@ actions: test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes , if you want to specify in bytes (array size in bytes) , make this true o/p_csv: false # o/p as csv file - subtest: 1 # 1: copy 2: copy+mul 3: copy+mul+add 4: copy+mul+add+traid 5: copy+mul+add+traid+dot + copy: true # copy operation + read: true # read operation + write: true # write operation + mul: true # mul operation + add: true # add operation + dot: true # dot operation + triad: true # triad operation + From 9a4c622852b443a1cb3ecff6aff3f18cfb3c8bfb Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 2 Oct 2025 22:54:40 +0000 Subject: [PATCH 007/275] Initialize time variable --- gst.so/src/gst_worker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 6227fc196..1776bb806 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -437,7 +437,7 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { double start_time, end_time; double seconds_elapsed, gflops_interval; double timetakenforoneiteration; - double timetakenforniterations; + double timetakenforniterations = 0; string msg; std::chrono::time_point gst_start_time, gst_end_time, gst_log_interval_time; From 17b91a7ace3bfeb6cd1349cf231e28af899161c2 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 3 Oct 2025 14:15:36 -0500 Subject: [PATCH 008/275] libyaml-cpp as static library --- CMakeLists.txt | 7 ++++--- gm.so/tests.cmake | 2 +- gpup.so/tests.cmake | 2 +- pesm.so/tests.cmake | 2 +- rvs/CMakeLists.txt | 2 +- smqt.so/tests.cmake | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b16537f88..13617315b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,12 +236,12 @@ else() set(ROCM_DEPENDENT_PACKAGES "hip-runtime-amd, comgr, hsa-rocr, rocblas, amd-smi-lib, hiprand, hipblaslt") endif() if (${RVS_OS_TYPE} STREQUAL "ubuntu") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3") elseif (${RVS_OS_TYPE} STREQUAL "sles") -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") +set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3") else () # other supported rpm distros - RHEL, CentOS -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") +set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs") endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) @@ -333,6 +333,7 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) find_package(yaml-cpp) if (yaml-cpp_FOUND) message("yaml-cpp found") + set (YAML_CPP_STATIC_LIBRARIES "libyaml-cpp.a" CACHE STRING "yaml-cpp static library") else() message(FATAL_ERROR "yaml-cpp not found !!! Install to proceed ...") endif(yaml-cpp_FOUND) diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake index 8cfc648d2..3713f3938 100644 --- a/gm.so/tests.cmake +++ b/gm.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link diff --git a/gpup.so/tests.cmake b/gpup.so/tests.cmake index 3204b87f0..c7810f9de 100644 --- a/gpup.so/tests.cmake +++ b/gpup.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) diff --git a/pesm.so/tests.cmake b/pesm.so/tests.cmake index 072fb98f5..0aa18e1de 100644 --- a/pesm.so/tests.cmake +++ b/pesm.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 03c2a0678..13ff2b961 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -124,7 +124,7 @@ set(CORE_RUNTIME_NAME "hsa-runtime") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES}) +set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_STATIC_LIBRARIES}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) diff --git a/smqt.so/tests.cmake b/smqt.so/tests.cmake index 1c58c789c..ce88b8262 100644 --- a/smqt.so/tests.cmake +++ b/smqt.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link From 1f9386882b230c1fecdf94127d860cefe9197d70 Mon Sep 17 00:00:00 2001 From: jkottiku Date: Mon, 6 Oct 2025 01:58:13 -0700 Subject: [PATCH 009/275] Revert "Merge pull request #1029 from ROCm/libyaml_a" This reverts commit c4b275701856d3121e33c8964bd5e84d80755fa0, reversing changes made to 8d2ca5562e0b16194e70bae5397083348aad1ef0. --- CMakeLists.txt | 7 +++---- gm.so/tests.cmake | 2 +- gpup.so/tests.cmake | 2 +- pesm.so/tests.cmake | 2 +- rvs/CMakeLists.txt | 2 +- smqt.so/tests.cmake | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13617315b..b16537f88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,12 +236,12 @@ else() set(ROCM_DEPENDENT_PACKAGES "hip-runtime-amd, comgr, hsa-rocr, rocblas, amd-smi-lib, hiprand, hipblaslt") endif() if (${RVS_OS_TYPE} STREQUAL "ubuntu") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") elseif (${RVS_OS_TYPE} STREQUAL "sles") -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3") +set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") else () # other supported rpm distros - RHEL, CentOS -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs") +set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) @@ -333,7 +333,6 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) find_package(yaml-cpp) if (yaml-cpp_FOUND) message("yaml-cpp found") - set (YAML_CPP_STATIC_LIBRARIES "libyaml-cpp.a" CACHE STRING "yaml-cpp static library") else() message(FATAL_ERROR "yaml-cpp not found !!! Install to proceed ...") endif(yaml-cpp_FOUND) diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake index 3713f3938..8cfc648d2 100644 --- a/gm.so/tests.cmake +++ b/gm.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link diff --git a/gpup.so/tests.cmake b/gpup.so/tests.cmake index c7810f9de..3204b87f0 100644 --- a/gpup.so/tests.cmake +++ b/gpup.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) diff --git a/pesm.so/tests.cmake b/pesm.so/tests.cmake index 0aa18e1de..072fb98f5 100644 --- a/pesm.so/tests.cmake +++ b/pesm.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 13ff2b961..03c2a0678 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -124,7 +124,7 @@ set(CORE_RUNTIME_NAME "hsa-runtime") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_STATIC_LIBRARIES}) +set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) diff --git a/smqt.so/tests.cmake b/smqt.so/tests.cmake index ce88b8262..1c58c789c 100644 --- a/smqt.so/tests.cmake +++ b/smqt.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_STATIC_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link From 15e39747982d1bf478f21f371021b6789a78f5da Mon Sep 17 00:00:00 2001 From: Jonathan Luu Date: Tue, 7 Oct 2025 16:54:04 -0400 Subject: [PATCH 010/275] lintian errors no changelog, no copyright, dir-or-file-in-opt --- CMakeLists.txt | 10 ++- DEBIAN/changelog.in | 4 ++ DEBIAN/copyright.in | 25 ++++++++ DEBIAN/overrides.in | 3 + cmake_modules/utils.cmake | 125 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 DEBIAN/changelog.in create mode 100644 DEBIAN/copyright.in create mode 100644 DEBIAN/overrides.in diff --git a/CMakeLists.txt b/CMakeLists.txt index b16537f88..d6da30000 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,9 @@ cmake_minimum_required ( VERSION 3.5.0 ) set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN:$ORIGIN/.." CACHE STRING "RUNPATH for libraries") set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN/../lib" CACHE STRING "RUNPATH for executables") +set( COMP_TYPE "applications" ) +set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) +set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) project ("rocm-validation-suite" VERSION 1.2.0) @@ -220,6 +223,8 @@ set ( RVS_VERSION "${PROJECT_VERSION}" ) get_version ( ${RVS_VERSION} ) # Package Generator ####################################################### +set(PKG_MAINTAINER_NM "ROCM Validation Suite Support") +set(PKG_MAINTAINER_EMAIL "rocm-validation-suite.support@amd.com") set(CPACK_PACKAGE_NAME "rocm-validation-suite") set(CPACK_PACKAGE_DESCRIPTION "ROCm Validation Suite") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tool for validating AMD GPU functionality, performance, reliability in ROCm.") @@ -227,7 +232,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices Inc.") -set(CPACK_PACKAGE_CONTACT "ROCM Validation Suite Support ") +set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") # Package dependencies if(FETCH_ROCMPATH_FROM_ROCMCORE) @@ -686,6 +691,7 @@ if(RVS_ROCMSMI EQUAL 1) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/rvsso.conf" DESTINATION /${CMAKE_INSTALL_SYSCONFDIR}/ld.so.conf.d COMPONENT rvsmodule) + set( COMP_TYPE "rvsmodule" ) endif() # if(RVS_ROCMSMI EQUAL 1) @@ -717,4 +723,6 @@ install(FILES set(CPACK_RPM_PACKAGE_AUTOREQ 0) +configure_pkg( ${CPACK_PACKAGE_NAME} ${COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) + include (CPack) diff --git a/DEBIAN/changelog.in b/DEBIAN/changelog.in new file mode 100644 index 000000000..057151379 --- /dev/null +++ b/DEBIAN/changelog.in @@ -0,0 +1,4 @@ +@DEB_PACKAGE_NAME@ (@DEB_PACKAGE_VERSION@) stable; urgency=low + + * ROCm Runtime software stack Base Package. + -- @DEB_MAINTAINER_NAME@ <@DEB_MAINTAINER_EMAIL@> @DEB_TIMESTAMP@ diff --git a/DEBIAN/copyright.in b/DEBIAN/copyright.in new file mode 100644 index 000000000..2dfae2cc1 --- /dev/null +++ b/DEBIAN/copyright.in @@ -0,0 +1,25 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: @DEB_PACKAGE_NAME@ +Upstream-Contact: @DEB_MAINTAINER_NAME@ <@DEB_MAINTAINER_EMAIL@> +Source: https://github.com/ROCm/@DEB_PACKAGE_NAME@ +Files: * +License: @DEB_LICENSE@ +Copyright: @DEB_COPYRIGHT_YEAR@ Advanced Micro Devices, Inc. All rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/DEBIAN/overrides.in b/DEBIAN/overrides.in new file mode 100644 index 000000000..6bee886c1 --- /dev/null +++ b/DEBIAN/overrides.in @@ -0,0 +1,3 @@ +@DEB_OVERRIDES_INSTALL_FILENM@: no-copyright-file +@DEB_OVERRIDES_INSTALL_FILENM@: debian-changelog-file-missing +@DEB_OVERRIDES_INSTALL_FILENM@: dir-or-file-in-opt diff --git a/cmake_modules/utils.cmake b/cmake_modules/utils.cmake index 4c3dafc21..2de79d084 100644 --- a/cmake_modules/utils.cmake +++ b/cmake_modules/utils.cmake @@ -118,3 +118,128 @@ function ( get_version DEFAULT_VERSION_STRING ) set( VERSION_BUILD "${VERSION_BUILD}" PARENT_SCOPE ) endfunction() + +## Configure Copyright File for Debian Package +function( configure_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T MAINTAINER_NM_T MAINTAINER_EMAIL_T) + # Check If Debian Platform + find_file (DEBIAN debian_version debconf.conf PATHS /etc) + if(DEBIAN) + set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" FORCE ) + set_debian_pkg_cmake_flags( ${PACKAGE_NAME_T} ${PACKAGE_VERSION_T} + ${MAINTAINER_NM_T} ${MAINTAINER_EMAIL_T} ) + + # Create debian directory in build tree + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN") + + # Configure the copyright file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/copyright.in" + "${CMAKE_BINARY_DIR}/DEBIAN/copyright" + @ONLY + ) + + # Install copyright file + install ( FILES "${CMAKE_BINARY_DIR}/DEBIAN/copyright" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT ${COMPONENT_NAME_T} ) + + # Configure the changelog file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/changelog.in" + "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + @ONLY + ) + + if( BUILD_ENABLE_LINTIAN_OVERRIDES ) + if(DEFINED BUILD_SHARED_LIBS AND NOT ${BUILD_SHARED_LIBS} STREQUAL "") + string(FIND ${DEB_OVERRIDES_INSTALL_FILENM} "static" OUT_VAR1) + if(OUT_VAR1 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-static" ) + endif() + else() + if(ENABLE_ASAN_PACKAGING) + string( FIND ${DEB_OVERRIDES_INSTALL_FILENM} "asan" OUT_VAR2) + if(OUT_VAR2 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-asan" ) + endif() + endif() + endif() + set( DEB_OVERRIDES_INSTALL_FILENM + "${DEB_OVERRIDES_INSTALL_FILENM}" CACHE STRING "Debian Package Lintian Override File Name" FORCE) + # Configure the changelog file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/overrides.in" + "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + @ONLY + ) + endif() + + # Install Change Log + find_program ( DEB_GZIP_EXEC gzip ) + if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" ) + execute_process( + COMMAND ${DEB_GZIP_EXEC} -f -n -9 "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR "Failed to compress: ${error}") + endif() + install ( FILES "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_CHANGELOG_INSTALL_FILENM}" + DESTINATION ${CMAKE_INSTALL_DOCDIR} + COMPONENT ${COMPONENT_NAME_T}) + endif() + else() + # License file + install ( FILES ${LICENSE_FILE} + DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt + COMPONENT ${COMPONENT_NAME_T}) + endif() + + # Install lintian overrides + if( BUILD_ENABLE_LINTIAN_OVERRIDES STREQUAL "ON" AND BUILD_DEBIAN_PKGING_FLAG STREQUAL "ON") + set( OVERRIDE_FILE "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" ) + install ( FILES ${OVERRIDE_FILE} + DESTINATION ${DEB_OVERRIDES_INSTALL_PATH} + COMPONENT ${COMPONENT_NAME_T}) + endif() +endfunction() + +# Set variables for changelog and copyright +# For Debian specific Packages +function( set_debian_pkg_cmake_flags DEB_PACKAGE_NAME_T DEB_PACKAGE_VERSION_T DEB_MAINTAINER_NM_T DEB_MAINTAINER_EMAIL_T ) + # Setting configure flags + set( DEB_PACKAGE_NAME "${DEB_PACKAGE_NAME_T}" CACHE STRING "Debian Package Name" ) + set( DEB_PACKAGE_VERSION "${DEB_PACKAGE_VERSION_T}" CACHE STRING "Debian Package Version String" ) + set( DEB_MAINTAINER_NAME "${DEB_MAINTAINER_NM_T}" CACHE STRING "Debian Package Maintainer Name" ) + set( DEB_MAINTAINER_EMAIL "${DEB_MAINTAINER_EMAIL_T}" CACHE STRING "Debian Package Maintainer Email" ) + set( DEB_COPYRIGHT_YEAR "2025" CACHE STRING "Debian Package Copyright Year" ) + set( DEB_LICENSE "MIT" CACHE STRING "Debian Package License Type" ) + set( DEB_CHANGELOG_INSTALL_FILENM "changelog.Debian.gz" CACHE STRING "Debian Package ChangeLog File Name" ) + + if( BUILD_ENABLE_LINTIAN_OVERRIDES ) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_PACKAGE_NAME}" CACHE STRING "Debian Package Lintian Override File Name" ) + set( DEB_OVERRIDES_INSTALL_PATH "/usr/share/lintian/overrides/" CACHE STRING "Deb Pkg Lintian Override Install Loc" ) + endif() + + # Get TimeStamp + find_program( DEB_DATE_TIMESTAMP_EXEC date ) + set ( DEB_TIMESTAMP_FORMAT_OPTION "-R" ) + execute_process ( + COMMAND ${DEB_DATE_TIMESTAMP_EXEC} ${DEB_TIMESTAMP_FORMAT_OPTION} + OUTPUT_VARIABLE TIMESTAMP_T + ) + set( DEB_TIMESTAMP "${TIMESTAMP_T}" CACHE STRING "Current Time Stamp for Copyright/Changelog" ) + + message(STATUS "DEB_PACKAGE_NAME : ${DEB_PACKAGE_NAME}" ) + message(STATUS "DEB_PACKAGE_VERSION : ${DEB_PACKAGE_VERSION}" ) + message(STATUS "DEB_MAINTAINER_NAME : ${DEB_MAINTAINER_NAME}" ) + message(STATUS "DEB_MAINTAINER_EMAIL : ${DEB_MAINTAINER_EMAIL}" ) + message(STATUS "DEB_COPYRIGHT_YEAR : ${DEB_COPYRIGHT_YEAR}" ) + message(STATUS "DEB_LICENSE : ${DEB_LICENSE}" ) + message(STATUS "DEB_TIMESTAMP : ${DEB_TIMESTAMP}" ) + message(STATUS "DEB_CHANGELOG_INSTALL_FILENM : ${DEB_CHANGELOG_INSTALL_FILENM}" ) +endfunction() From 87ec9a4fa95ae11b9e9888cc8f80b4e704c33f03 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 8 Oct 2025 03:20:14 -0500 Subject: [PATCH 011/275] NPS2/DPX and NPS2/CPX mode in MI350X/MI355X --- rvs/conf/MI350X/NPS2/CPX/gst_single.conf | 391 +++++++++++++++++++++++ rvs/conf/MI350X/NPS2/DPX/gst_single.conf | 391 +++++++++++++++++++++++ rvs/conf/MI355X/NPS2/CPX/gst_single.conf | 391 +++++++++++++++++++++++ rvs/conf/MI355X/NPS2/DPX/gst_single.conf | 391 +++++++++++++++++++++++ 4 files changed, 1564 insertions(+) create mode 100644 rvs/conf/MI350X/NPS2/CPX/gst_single.conf create mode 100644 rvs/conf/MI350X/NPS2/DPX/gst_single.conf create mode 100644 rvs/conf/MI355X/NPS2/CPX/gst_single.conf create mode 100644 rvs/conf/MI355X/NPS2/DPX/gst_single.conf diff --git a/rvs/conf/MI350X/NPS2/CPX/gst_single.conf b/rvs/conf/MI350X/NPS2/CPX/gst_single.conf new file mode 100644 index 000000000..076a020f3 --- /dev/null +++ b/rvs/conf/MI350X/NPS2/CPX/gst_single.conf @@ -0,0 +1,391 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + diff --git a/rvs/conf/MI350X/NPS2/DPX/gst_single.conf b/rvs/conf/MI350X/NPS2/DPX/gst_single.conf new file mode 100644 index 000000000..076a020f3 --- /dev/null +++ b/rvs/conf/MI350X/NPS2/DPX/gst_single.conf @@ -0,0 +1,391 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + diff --git a/rvs/conf/MI355X/NPS2/CPX/gst_single.conf b/rvs/conf/MI355X/NPS2/CPX/gst_single.conf new file mode 100644 index 000000000..076a020f3 --- /dev/null +++ b/rvs/conf/MI355X/NPS2/CPX/gst_single.conf @@ -0,0 +1,391 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + diff --git a/rvs/conf/MI355X/NPS2/DPX/gst_single.conf b/rvs/conf/MI355X/NPS2/DPX/gst_single.conf new file mode 100644 index 000000000..076a020f3 --- /dev/null +++ b/rvs/conf/MI355X/NPS2/DPX/gst_single.conf @@ -0,0 +1,391 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + From 22ef552f356aa450ece2ad2fae46076e2ca38ed4 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 9 Oct 2025 01:48:00 -0500 Subject: [PATCH 012/275] Test levels for MI3XX --- babel.so/src/action.cpp | 2 +- babel.so/src/rvs_stress.cpp | 8 +- gst.so/src/action.cpp | 2 +- iet.so/src/action.cpp | 4 +- include/gpu_util.h | 4 +- include/rvs_util.h | 3 +- mem.so/src/action.cpp | 2 +- rvs/conf/MI300X-HF/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI300X-HF/levels/rvs_level_2.conf | 75 +++++ rvs/conf/MI300X-HF/levels/rvs_level_3.conf | 150 ++++++++++ rvs/conf/MI300X-HF/levels/rvs_level_4.conf | 228 ++++++++++++++ rvs/conf/MI300X-HF/levels/rvs_level_5.conf | 228 ++++++++++++++ rvs/conf/MI300X/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI300X/levels/rvs_level_2.conf | 75 +++++ rvs/conf/MI300X/levels/rvs_level_3.conf | 150 ++++++++++ rvs/conf/MI300X/levels/rvs_level_4.conf | 228 ++++++++++++++ rvs/conf/MI300X/levels/rvs_level_5.conf | 228 ++++++++++++++ rvs/conf/MI308X-HF/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI308X-HF/levels/rvs_level_2.conf | 77 +++++ rvs/conf/MI308X-HF/levels/rvs_level_3.conf | 173 +++++++++++ rvs/conf/MI308X-HF/levels/rvs_level_4.conf | 246 +++++++++++++++ rvs/conf/MI308X-HF/levels/rvs_level_5.conf | 246 +++++++++++++++ rvs/conf/MI308X/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI308X/levels/rvs_level_2.conf | 77 +++++ rvs/conf/MI308X/levels/rvs_level_3.conf | 173 +++++++++++ rvs/conf/MI308X/levels/rvs_level_4.conf | 245 +++++++++++++++ rvs/conf/MI308X/levels/rvs_level_5.conf | 246 +++++++++++++++ rvs/conf/MI325X/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI325X/levels/rvs_level_2.conf | 75 +++++ rvs/conf/MI325X/levels/rvs_level_3.conf | 150 ++++++++++ rvs/conf/MI325X/levels/rvs_level_4.conf | 228 ++++++++++++++ rvs/conf/MI325X/levels/rvs_level_5.conf | 228 ++++++++++++++ rvs/conf/MI350X/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI350X/levels/rvs_level_2.conf | 79 +++++ rvs/conf/MI350X/levels/rvs_level_3.conf | 248 ++++++++++++++++ rvs/conf/MI350X/levels/rvs_level_4.conf | 330 +++++++++++++++++++++ rvs/conf/MI350X/levels/rvs_level_5.conf | 330 +++++++++++++++++++++ rvs/conf/MI355X/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI355X/levels/rvs_level_2.conf | 79 +++++ rvs/conf/MI355X/levels/rvs_level_3.conf | 248 ++++++++++++++++ rvs/conf/MI355X/levels/rvs_level_4.conf | 326 ++++++++++++++++++++ rvs/conf/MI355X/levels/rvs_level_5.conf | 326 ++++++++++++++++++++ rvs/src/rvscli.cpp | 6 +- rvs/src/rvsexec.cpp | 78 +++-- src/gpu_util.cpp | 38 +++ src/rvs_util.cpp | 9 +- 46 files changed, 5883 insertions(+), 31 deletions(-) create mode 100644 rvs/conf/MI300X-HF/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI300X-HF/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI300X-HF/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI300X-HF/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI300X-HF/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI300X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI300X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI300X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI300X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI300X/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI308X-HF/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI308X-HF/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI308X-HF/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI308X-HF/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI308X-HF/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI308X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI308X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI308X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI308X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI308X/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI325X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI325X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI325X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI325X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI325X/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI350X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI350X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI350X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI350X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI350X/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI355X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI355X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI355X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI355X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI355X/levels/rvs_level_5.conf diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index e5080c299..f70bf86f3 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -325,7 +325,7 @@ int mem_action::get_num_amd_gpu_devices(void) { rvs::lp::AddString(json_root_node, "ERROR", MEM_NO_COMPATIBLE_GPUS); rvs::lp::LogRecordFlush(json_root_node); } - return 0; + return -1; } return hip_num_gpu_devices; } diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 9f4820376..9d50caf7e 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -220,7 +220,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, // Check solutions stream->read_arrays(a, b, c); - check_solution(num_times, a, b, c, sum, ARRAY_SIZE); +//check_solution(num_times, a, b, c, sum, ARRAY_SIZE); sstr.str( std::string() ); sstr.clear(); if (output_as_csv) @@ -240,7 +240,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, sstr << "\n------------------------------------------------------------------------" << std::endl << std::left << std::setw(12) << "GPU Id" << std::left << std::setw(12) << "Function" - << std::left << std::setw(12) << ((mibibytes) ? "MiBytes/sec" : "MBytes/sec") + << std::left << std::setw(15) << ((mibibytes) ? "MiBytes/sec" : "MBytes/sec") << std::left << std::setw(12) << "Min (sec)" << std::left << std::setw(12) << "Max" << std::left << std::setw(12) << "Average" @@ -299,7 +299,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, sstr << std::left << std::setw(12) << device.second << std::left << std::setw(12) << labels[i] - << std::left << std::setw(12) << std::setprecision(3) << + << std::left << std::setw(15) << std::setprecision(3) << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) << std::left << std::setw(12) << std::setprecision(5) << *minmax.first << std::left << std::setw(12) << std::setprecision(5) << *minmax.second @@ -405,7 +405,7 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b // Check solutions T sum = 0.0; stream->read_arrays(a, b, c); - check_solution(num_times, a, b, c, sum, ARRAY_SIZE); +// check_solution(num_times, a, b, c, sum, ARRAY_SIZE); // Display timing results double total_bytes = 3 * sizeof(T) * ARRAY_SIZE * num_times; diff --git a/gst.so/src/action.cpp b/gst.so/src/action.cpp index 66129b143..04cc7eced 100644 --- a/gst.so/src/action.cpp +++ b/gst.so/src/action.cpp @@ -637,7 +637,7 @@ int gst_action::get_num_amd_gpu_devices(void) { rvs::lp::AddString(json_root_node, "ERROR", GST_NO_COMPATIBLE_GPUS); rvs::lp::LogRecordFlush(json_root_node, rvs::logerror); } - return 0; + return -1; } return hip_num_gpu_devices; } diff --git a/iet.so/src/action.cpp b/iet.so/src/action.cpp index 1b8c89d07..fcebbf3c9 100644 --- a/iet.so/src/action.cpp +++ b/iet.so/src/action.cpp @@ -669,7 +669,7 @@ int iet_action::get_all_selected_gpus(void) { hipGetDeviceCount(&hip_num_gpu_devices); if (hip_num_gpu_devices < 1) - return hip_num_gpu_devices; + return -1; // find compatible GPUs to run edp tests amd_gpus_found = fetch_gpu_list(hip_num_gpu_devices, iet_gpus_device_index, @@ -695,7 +695,7 @@ int iet_action::get_all_selected_gpus(void) { rvs::lp::LogRecordFlush(json_root_node, rvs::logerror); } - return 0; // no GPUs is not error + return -1; } int iet_res = 0; diff --git a/include/gpu_util.h b/include/gpu_util.h index f66b29635..27dc7154f 100644 --- a/include/gpu_util.h +++ b/include/gpu_util.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -46,6 +46,7 @@ extern bool gpu_check_if_mcm_die (int idx); extern int gpu_hip_to_smi_hdl(int hip_index, amdsmi_processor_handle* smi_index); extern void gpu_get_all_pci_bdf(std::vector& ppci_bdf); extern bool gpu_check_if_gpu_indexes (const std::vector &idx); +extern std::string gpu_get_platform_name (void); namespace rvs { @@ -75,6 +76,7 @@ class gpulist { static int domlocation2gpu(const uint16_t domainID, const uint16_t LocationID, uint16_t* pGPUID); static int node2bdf(const uint16_t NodeID, std::string& pPciBDF); + static std::string gpu_get_platform_name (void); protected: //! Array of GPU location IDs static std::vector location_id; diff --git a/include/rvs_util.h b/include/rvs_util.h index 9eeda6a0e..f94db1380 100644 --- a/include/rvs_util.h +++ b/include/rvs_util.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -147,6 +147,7 @@ void getBDF(int idx ,unsigned int& domain,unsigned int& bus,unsigned int& device int display_gpu_info(std::vector); void *json_list_create(std::string lname, int log_level); std::vector get_gpu_info (void); +std::string get_gpu_name (void); template void log_to_json(action_descriptor desc, int log_level, KVPairs... key_values ) { diff --git a/mem.so/src/action.cpp b/mem.so/src/action.cpp index 2591fec9f..ef3528ba0 100644 --- a/mem.so/src/action.cpp +++ b/mem.so/src/action.cpp @@ -265,7 +265,7 @@ int mem_action::get_num_amd_gpu_devices(void) { rvs::lp::AddString(json_root_node, "ERROR", MEM_NO_COMPATIBLE_GPUS); rvs::lp::LogRecordFlush(json_root_node); } - return 0; + return -1; } return hip_num_gpu_devices; } diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_1.conf b/rvs/conf/MI300X-HF/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI300X-HF/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_2.conf b/rvs/conf/MI300X-HF/levels/rvs_level_2.conf new file mode 100644 index 000000000..fb3e444cb --- /dev/null +++ b/rvs/conf/MI300X-HF/levels/rvs_level_2.conf @@ -0,0 +1,75 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_3.conf b/rvs/conf/MI300X-HF/levels/rvs_level_3.conf new file mode 100644 index 000000000..ddb35de8e --- /dev/null +++ b/rvs/conf/MI300X-HF/levels/rvs_level_3.conf @@ -0,0 +1,150 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_4.conf b/rvs/conf/MI300X-HF/levels/rvs_level_4.conf new file mode 100644 index 000000000..667ee7456 --- /dev/null +++ b/rvs/conf/MI300X-HF/levels/rvs_level_4.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 850 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_5.conf b/rvs/conf/MI300X-HF/levels/rvs_level_5.conf new file mode 100644 index 000000000..aae299acc --- /dev/null +++ b/rvs/conf/MI300X-HF/levels/rvs_level_5.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 850 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI300X/levels/rvs_level_1.conf b/rvs/conf/MI300X/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI300X/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI300X/levels/rvs_level_2.conf b/rvs/conf/MI300X/levels/rvs_level_2.conf new file mode 100644 index 000000000..fb3e444cb --- /dev/null +++ b/rvs/conf/MI300X/levels/rvs_level_2.conf @@ -0,0 +1,75 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI300X/levels/rvs_level_3.conf b/rvs/conf/MI300X/levels/rvs_level_3.conf new file mode 100644 index 000000000..ddb35de8e --- /dev/null +++ b/rvs/conf/MI300X/levels/rvs_level_3.conf @@ -0,0 +1,150 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + diff --git a/rvs/conf/MI300X/levels/rvs_level_4.conf b/rvs/conf/MI300X/levels/rvs_level_4.conf new file mode 100644 index 000000000..454e99c52 --- /dev/null +++ b/rvs/conf/MI300X/levels/rvs_level_4.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 750 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI300X/levels/rvs_level_5.conf b/rvs/conf/MI300X/levels/rvs_level_5.conf new file mode 100644 index 000000000..289270c2f --- /dev/null +++ b/rvs/conf/MI300X/levels/rvs_level_5.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 981000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 523000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 552000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 750 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI308X-HF/levels/rvs_level_1.conf b/rvs/conf/MI308X-HF/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI308X-HF/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI308X-HF/levels/rvs_level_2.conf b/rvs/conf/MI308X-HF/levels/rvs_level_2.conf new file mode 100644 index 000000000..535db6e0a --- /dev/null +++ b/rvs/conf/MI308X-HF/levels/rvs_level_2.conf @@ -0,0 +1,77 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI308X-HF/levels/rvs_level_3.conf b/rvs/conf/MI308X-HF/levels/rvs_level_3.conf new file mode 100644 index 000000000..25998ba93 --- /dev/null +++ b/rvs/conf/MI308X-HF/levels/rvs_level_3.conf @@ -0,0 +1,173 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 170000 + copy_matrix: false + target_stress: 384000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 188000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 194000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + diff --git a/rvs/conf/MI308X-HF/levels/rvs_level_4.conf b/rvs/conf/MI308X-HF/levels/rvs_level_4.conf new file mode 100644 index 000000000..20e49f116 --- /dev/null +++ b/rvs/conf/MI308X-HF/levels/rvs_level_4.conf @@ -0,0 +1,246 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 170000 + copy_matrix: false + target_stress: 384000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 188000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 194000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-tf32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 50 + copy_matrix: false + target_stress: 96000 + matrix_size_a: 8192 + matrix_size_b: 12288 + matrix_size_c: 4096 + matrix_init: trig + data_type: fp32_r + compute_type: xf32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 100 + copy_matrix: false + target_stress: 26000 + matrix_size_a: 8192 + matrix_size_b: 8960 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp32_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 1000 + sample_interval: 5000 + log_interval: 5000 + target_power: 650 + tolerance: 0.05 + bw_workload: true + cp_workload: false + wg_count: 64 + diff --git a/rvs/conf/MI308X-HF/levels/rvs_level_5.conf b/rvs/conf/MI308X-HF/levels/rvs_level_5.conf new file mode 100644 index 000000000..010880284 --- /dev/null +++ b/rvs/conf/MI308X-HF/levels/rvs_level_5.conf @@ -0,0 +1,246 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 170000 + copy_matrix: false + target_stress: 336441 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-tf32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 50 + copy_matrix: false + target_stress: 96000 + matrix_size_a: 8192 + matrix_size_b: 12288 + matrix_size_c: 4096 + matrix_init: trig + data_type: fp32_r + compute_type: xf32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 100 + copy_matrix: false + target_stress: 26000 + matrix_size_a: 8192 + matrix_size_b: 8960 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp32_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 1000 + sample_interval: 5000 + log_interval: 5000 + target_power: 650 + tolerance: 0.05 + bw_workload: true + cp_workload: false + + diff --git a/rvs/conf/MI308X/levels/rvs_level_1.conf b/rvs/conf/MI308X/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI308X/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI308X/levels/rvs_level_2.conf b/rvs/conf/MI308X/levels/rvs_level_2.conf new file mode 100644 index 000000000..535db6e0a --- /dev/null +++ b/rvs/conf/MI308X/levels/rvs_level_2.conf @@ -0,0 +1,77 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI308X/levels/rvs_level_3.conf b/rvs/conf/MI308X/levels/rvs_level_3.conf new file mode 100644 index 000000000..912352a0b --- /dev/null +++ b/rvs/conf/MI308X/levels/rvs_level_3.conf @@ -0,0 +1,173 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 170000 + copy_matrix: false + target_stress: 336441 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + diff --git a/rvs/conf/MI308X/levels/rvs_level_4.conf b/rvs/conf/MI308X/levels/rvs_level_4.conf new file mode 100644 index 000000000..fe862c18e --- /dev/null +++ b/rvs/conf/MI308X/levels/rvs_level_4.conf @@ -0,0 +1,245 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 170000 + copy_matrix: false + target_stress: 336441 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-tf32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 50 + copy_matrix: false + target_stress: 96000 + matrix_size_a: 8192 + matrix_size_b: 12288 + matrix_size_c: 4096 + matrix_init: trig + data_type: fp32_r + compute_type: xf32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 100 + copy_matrix: false + target_stress: 26000 + matrix_size_a: 8192 + matrix_size_b: 8960 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp32_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 1000 + sample_interval: 5000 + log_interval: 5000 + target_power: 650 + tolerance: 0.05 + bw_workload: true + cp_workload: false + diff --git a/rvs/conf/MI308X/levels/rvs_level_5.conf b/rvs/conf/MI308X/levels/rvs_level_5.conf new file mode 100644 index 000000000..010880284 --- /dev/null +++ b/rvs/conf/MI308X/levels/rvs_level_5.conf @@ -0,0 +1,246 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 170000 + copy_matrix: false + target_stress: 336441 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-i8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 500 + copy_matrix: false + target_stress: 406000 + matrix_size_a: 8192 + matrix_size_b: 13312 + matrix_size_c: 17792 + matrix_init: trig + data_type: i8_r + compute_type: i32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 90000 + copy_matrix: false + target_stress: 172333 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-tf32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 50 + copy_matrix: false + target_stress: 96000 + matrix_size_a: 8192 + matrix_size_b: 12288 + matrix_size_c: 4096 + matrix_init: trig + data_type: fp32_r + compute_type: xf32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 100 + copy_matrix: false + target_stress: 26000 + matrix_size_a: 8192 + matrix_size_b: 8960 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp32_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 1000 + sample_interval: 5000 + log_interval: 5000 + target_power: 650 + tolerance: 0.05 + bw_workload: true + cp_workload: false + + diff --git a/rvs/conf/MI325X/levels/rvs_level_1.conf b/rvs/conf/MI325X/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI325X/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI325X/levels/rvs_level_2.conf b/rvs/conf/MI325X/levels/rvs_level_2.conf new file mode 100644 index 000000000..fb3e444cb --- /dev/null +++ b/rvs/conf/MI325X/levels/rvs_level_2.conf @@ -0,0 +1,75 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI325X/levels/rvs_level_3.conf b/rvs/conf/MI325X/levels/rvs_level_3.conf new file mode 100644 index 000000000..37ff5767e --- /dev/null +++ b/rvs/conf/MI325X/levels/rvs_level_3.conf @@ -0,0 +1,150 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 983000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 524000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 554000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + diff --git a/rvs/conf/MI325X/levels/rvs_level_4.conf b/rvs/conf/MI325X/levels/rvs_level_4.conf new file mode 100644 index 000000000..17ba3f41d --- /dev/null +++ b/rvs/conf/MI325X/levels/rvs_level_4.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 983000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 524000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 554000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1000 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI325X/levels/rvs_level_5.conf b/rvs/conf/MI325X/levels/rvs_level_5.conf new file mode 100644 index 000000000..a801f7483 --- /dev/null +++ b/rvs/conf/MI325X/levels/rvs_level_5.conf @@ -0,0 +1,228 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 268435456 + test_type: 1 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + add: true + mul: true + triad: true + dot: true + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 983000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 524000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 554000 + matrix_size_a: 4864 + matrix_size_b: 4096 + matrix_size_c: 8192 + matrix_init: trig + data_type: bf16_r + lda: 8320 + ldb: 8320 + ldc: 4992 + ldd: 4992 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 100000 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + ops_type: sgemm + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 70000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1000 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI350X/levels/rvs_level_1.conf b/rvs/conf/MI350X/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI350X/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI350X/levels/rvs_level_2.conf b/rvs/conf/MI350X/levels/rvs_level_2.conf new file mode 100644 index 000000000..c6bde5336 --- /dev/null +++ b/rvs/conf/MI350X/levels/rvs_level_2.conf @@ -0,0 +1,79 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + subtest: 0 + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI350X/levels/rvs_level_3.conf b/rvs/conf/MI350X/levels/rvs_level_3.conf new file mode 100644 index 000000000..9106e7dbb --- /dev/null +++ b/rvs/conf/MI350X/levels/rvs_level_3.conf @@ -0,0 +1,248 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + diff --git a/rvs/conf/MI350X/levels/rvs_level_4.conf b/rvs/conf/MI350X/levels/rvs_level_4.conf new file mode 100644 index 000000000..144d2aed5 --- /dev/null +++ b/rvs/conf/MI350X/levels/rvs_level_4.conf @@ -0,0 +1,330 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1000 + tolerance: 0.01 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI350X/levels/rvs_level_5.conf b/rvs/conf/MI350X/levels/rvs_level_5.conf new file mode 100644 index 000000000..cf3d3cc01 --- /dev/null +++ b/rvs/conf/MI350X/levels/rvs_level_5.conf @@ -0,0 +1,330 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1000 + tolerance: 0.01 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI355X/levels/rvs_level_1.conf b/rvs/conf/MI355X/levels/rvs_level_1.conf new file mode 100644 index 000000000..0d3512230 --- /dev/null +++ b/rvs/conf/MI355X/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI355X/levels/rvs_level_2.conf b/rvs/conf/MI355X/levels/rvs_level_2.conf new file mode 100644 index 000000000..c6bde5336 --- /dev/null +++ b/rvs/conf/MI355X/levels/rvs_level_2.conf @@ -0,0 +1,79 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + subtest: 0 + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI355X/levels/rvs_level_3.conf b/rvs/conf/MI355X/levels/rvs_level_3.conf new file mode 100644 index 000000000..7ec106c63 --- /dev/null +++ b/rvs/conf/MI355X/levels/rvs_level_3.conf @@ -0,0 +1,248 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + diff --git a/rvs/conf/MI355X/levels/rvs_level_4.conf b/rvs/conf/MI355X/levels/rvs_level_4.conf new file mode 100644 index 000000000..e8666a47d --- /dev/null +++ b/rvs/conf/MI355X/levels/rvs_level_4.conf @@ -0,0 +1,326 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 1000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1400 + tolerance: 0.01 + bw_workload: true + cp_workload: false + wg_count: 256 + nt_loads: true + diff --git a/rvs/conf/MI355X/levels/rvs_level_5.conf b/rvs/conf/MI355X/levels/rvs_level_5.conf new file mode 100644 index 000000000..dd6079558 --- /dev/null +++ b/rvs/conf/MI355X/levels/rvs_level_5.conf @@ -0,0 +1,326 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 2061000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 946000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 956000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 1400 + tolerance: 0.01 + bw_workload: true + cp_workload: false + wg_count: 256 + nt_loads: true + diff --git a/rvs/src/rvscli.cpp b/rvs/src/rvscli.cpp index 2ff9da5a7..3f6cd0706 100644 --- a/rvs/src/rvscli.cpp +++ b/rvs/src/rvscli.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -171,6 +171,10 @@ void rvs::cli::init_grammar() { grammar.insert(gpair("-p", sp)); grammar.insert(gpair("--parallel", sp)); + sp = std::make_shared("-r", command, value); + grammar.insert(gpair("-r", sp)); + grammar.insert(gpair("--run", sp)); + sp = std::make_shared("-t", command); grammar.insert(gpair("-t", sp)); grammar.insert(gpair("--listTests", sp)); diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index 748de2b8e..d5b18d7a1 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -127,34 +127,76 @@ int rvs::exec::run() { if (rvs::options::has_option("-j", &s_json_log_file)) { logger::to_json(true); logger::set_json_log_file(s_json_log_file); - } - // check -c option string config_file; - if (rvs::options::has_option("-c", &val)) { - config_file = val; - } else { - config_file = "../share/rocm-validation-suite/conf/rvs.conf"; + // check -r option + if (rvs::options::has_option("-r", &val)) { + + std::string plaftorm_name = get_gpu_name(); + + if(val != "1" && val != "2" && val != "3" && val != "4" && val != "5") { + rvs::logger::Err("Test level must be between 1 and 5 !", MODULE_NAME_CAPS); + return -1; + } + + if(plaftorm_name.empty()) { + rvs::logger::Err("No test levels support for the detected GPU or no GPU detected !", MODULE_NAME_CAPS); + return -1; + } + + config_file = "../share/rocm-validation-suite/conf/" + plaftorm_name + "/levels/rvs_level_" + val + ".conf"; + // Check if pConfig file exist if not use old path for backward compatibility std::ifstream file(path + config_file); if (!file.good()) { - config_file = "conf/rvs.conf"; + config_file = "conf/" + plaftorm_name + "/levels/rvs_level_" + val + ".conf"; } file.close(); config_file = path + config_file; + + // Check if pConfig file exists + file.open(config_file); + if (!file.good()) { + char buff[1024]; + snprintf(buff, sizeof(buff), + "%s file is missing.", config_file.c_str()); + rvs::logger::Err(buff, MODULE_NAME_CAPS); + return -1; + } else { + file.close(); + } } - // Check if pConfig file exists - std::ifstream file(config_file); - if (!file.good()) { - char buff[1024]; - snprintf(buff, sizeof(buff), - "%s file is missing.", config_file.c_str()); - rvs::logger::Err(buff, MODULE_NAME_CAPS); - return -1; - } else { - file.close(); + if (!rvs::options::has_option("-r", &val)) { + + // check -c option + if (rvs::options::has_option("-c", &val)) { + + config_file = val; + + } else { + config_file = "../share/rocm-validation-suite/conf/rvs.conf"; + // Check if pConfig file exist if not use old path for backward compatibility + std::ifstream file(path + config_file); + if (!file.good()) { + config_file = "conf/rvs.conf"; + } + file.close(); + config_file = path + config_file; + } + + // Check if pConfig file exists + std::ifstream file(config_file); + if (!file.good()) { + char buff[1024]; + snprintf(buff, sizeof(buff), + "%s file is missing.", config_file.c_str()); + rvs::logger::Err(buff, MODULE_NAME_CAPS); + return -1; + } else { + file.close(); + } } // check -n options diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index 9445f4e36..06326b247 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -48,6 +48,16 @@ std::vector rvs::gpulist::domain_id; std::map , uint16_t> rvs::gpulist::domain_loc_map; std::vector rvs::gpulist::pci_bdf; +const std::map gpu_dev_map = { + {0x74a1, "MI300X"}, // MI300X Bare Metal + {0x74a9, "MI300X-HF"}, // MI300-HF Bare Metal + {0x74a2, "MI308X"}, // MI308X Bare Metal + {0x74a8, "MI308X-HF"}, // MI308X-HF Bare Metal + {0x74a5, "MI325X"}, // MI325X Bare Metal + {0x75a0, "MI350X"}, // MI350X AC Bare Metal + {0x75a3, "MI355X"} // MI355X LC Bare Metal +}; + using std::vector; using std::string; using std::ifstream; @@ -745,3 +755,31 @@ bool gpu_check_if_gpu_indexes (const std::vector &index) { return true; } +/** + * @brief Get GPU platform name + * @param void + * @return GPU plaform name if found, else null + **/ +std::string rvs::gpulist::gpu_get_platform_name (void) { + + uint16_t dev_id = 0; + + if (rvs::gpulist::device_id.size()) { + dev_id = rvs::gpulist::device_id[0]; + } + + for(auto i = 0; i < rvs::gpulist::device_id.size(); i++) { + + if(dev_id != rvs::gpulist::device_id[i]) { + return ""; + } + } + + auto it = gpu_dev_map.find(dev_id); + if (it == gpu_dev_map.end()) { + return ""; + } + + return it->second; +} + diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index d796e5e35..5cae87837 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -321,3 +321,10 @@ void cleanup_logs(){ rvs::lp::JsonEndNodeCreate(); } +std::string get_gpu_name (void) { + + rvs::gpulist::Initialize(); + + return rvs::gpulist::gpu_get_platform_name () ; +} + From 4a03dbe65e98c08690d68d2a4d9089511bb38657 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 9 Oct 2025 22:54:58 +0000 Subject: [PATCH 013/275] Test level cli (-r) help & user guide. RCQT support for Alibaba OS OS name formatting --- docs/cli.md | 3 +++ docs/ug1main.md | 4 ++++ rcqt.so/include/rcutils.h | 4 +++- rcqt.so/src/handlerCreator.cpp | 4 ++-- rvs/src/rvsexec.cpp | 3 +++ rvs/src/rvsexec_do_yaml.cpp | 6 ++++++ 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 2afbc699c..63a8b52f7 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -16,6 +16,9 @@ -c --config Specify the test configuration file to use. This is a mandatory field for test execution. +-r --run Specify the test level to run. Valid range is 1 to 5, with 5 + indicating the highest stress test level. + -d --debugLevel Specify the debug level for the output log. The range is 0-5 with 5 being the highest verbose level. diff --git a/docs/ug1main.md b/docs/ug1main.md index 9722ed3a3..d808202d2 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -247,6 +247,10 @@ of the current log. Use in conjuction with -d and -l options. This is a mandatory field for test execution. + + diff --git a/rcqt.so/include/rcutils.h b/rcqt.so/include/rcutils.h index a1ed5a151..a2e3a897c 100644 --- a/rcqt.so/include/rcutils.h +++ b/rcqt.so/include/rcutils.h @@ -46,6 +46,7 @@ enum class OSType { Oracle, Azure, Amazon, + Alibaba, None }; @@ -59,7 +60,8 @@ const std::map op_systems { {"red hat enterprise linux", OSType::RHEL}, {"oracle linux server", OSType::Oracle}, {"microsoft azure linux", OSType::Azure}, - {"amazon linux", OSType::Amazon} + {"amazon linux", OSType::Amazon}, + {"alibaba cloud linux", OSType::Alibaba}, }; struct package_info{ diff --git a/rcqt.so/src/handlerCreator.cpp b/rcqt.so/src/handlerCreator.cpp index b3c0616b1..6ff8ed79e 100644 --- a/rcqt.so/src/handlerCreator.cpp +++ b/rcqt.so/src/handlerCreator.cpp @@ -36,7 +36,7 @@ PackageHandler* handlerCreator::getPackageHandler(const std::string& pkg){ } else if (OSType::Centos == osName || OSType::RHEL == osName || OSType::Oracle == osName || OSType::Azure == osName || - OSType::Amazon == osName) { + OSType::Amazon == osName || OSType::Alibaba == osName) { lptr = new PackageHandlerRpm{pkg}; } else if (OSType::SLES == osName) { @@ -55,7 +55,7 @@ PackageHandler* handlerCreator::getPackageHandler(){ } else if (OSType::Centos == osName || OSType::RHEL == osName || OSType::Oracle == osName || OSType::Azure == osName || - OSType::Amazon == osName) { + OSType::Amazon == osName || OSType::Alibaba == osName) { lptr = new PackageHandlerRpm{}; } else if (OSType::SLES == osName) { diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index d5b18d7a1..9b24b3f91 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -493,6 +493,9 @@ void rvs::exec::do_help() { cout << "-c --config Specify the test configuration file to use.\n\n"; + cout << "-r --run Specify the test level to run. Valid range is 1 to 5,\n"; + cout << " with 5 indicating the highest stress test level.\n\n"; + cout << "-d --debugLevel Specify the debug level for the output log. The range is 0-5 with\n"; cout << " 5 being the highest verbose level.\n\n"; diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index ceb0f24a0..d9bcb8b93 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -238,6 +238,12 @@ std::string getOSNameVersion(void) { if (!osName.empty() && osName.front() == '"' && osName.back() == '"') { /* Remove surrounding quotes */ osName = osName.substr(1, osName.size() - 2); + + /* OS name till braces */ + size_t pos = osName.find('('); + if (pos != std::string::npos) { + osName = osName.substr(0, pos); + } } break; } From c296e48ab1c3ffa3e59624e11a4d761f98bdea9e Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 10 Oct 2025 13:58:13 -0500 Subject: [PATCH 014/275] Update changelog and RVS version. --- CHANGELOG.md | 24 ++++++++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5afd6ffa5..c29a21828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,30 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.3.0 for ROCm 7.1.0 + +### Added + +- Added test summary and system overview. +- Support for different test levels with `-r` option. +- NPS2/DPX partition mode support for MI350X and MI355X. +- Support for Azure Linux and Alibaba Linux. +- Individual subtest configurability in Babel. + +## RVS 1.2.0 for ROCm 7.0.2 + +### Added +- Support for Amazon Linux. + +### Changed +- Update gst conf. files for MI350X and MI355X. +- Change GEMM execution method during ramp-up. + +## RVS 1.2.0 for ROCm 7.0.1 + +### Added +- Support for new platform: RX9060 + ## RVS 1.2.0 for ROCm 7.0.0 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index b16537f88..5c8f4107d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN:$ORIG set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN/../lib" CACHE STRING "RUNPATH for executables") project ("rocm-validation-suite" - VERSION 1.2.0) + VERSION 1.3.0) # Default libdir to "lib", this skips GNUInstallDirs from trying to take a guess if it's unset: set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") From 4a3814bcc9cef8a52f0a6b1a04efd0bfc63fc0d8 Mon Sep 17 00:00:00 2001 From: lfrischm Date: Thu, 16 Oct 2025 20:51:11 +0530 Subject: [PATCH 015/275] enable yaml-cpp is static lib --- CMakeLists.txt | 72 ++++++++++++++++++++++++++++++++++++++++++---- gm.so/tests.cmake | 2 +- rvs/CMakeLists.txt | 2 +- 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c8f4107d..30eee7b69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,12 +330,74 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) ################################################################################ # check yaml-cpp available at configure time -find_package(yaml-cpp) -if (yaml-cpp_FOUND) - message("yaml-cpp found") +# check yaml-cpp available at configure time +# First try to find static yaml-cpp library +find_library(YAML_CPP_STATIC_LIB + NAMES libyaml-cpp.a yaml-cpp.a + PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib ${CMAKE_PREFIX_PATH}/lib64 ${CMAKE_PREFIX_PATH}/lib + DOC "Path to yaml-cpp static library" +) + +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml-cpp/yaml.h + PATHS /usr/include /usr/local/include ${CMAKE_PREFIX_PATH}/include + DOC "Path to yaml-cpp include directory" +) + +# Set variables for yaml-cpp linking +set(YAML_CPP_STATIC_FOUND FALSE) +set(YAML_CPP_SHARED_FOUND FALSE) + +if (YAML_CPP_STATIC_LIB AND YAML_CPP_INCLUDE_DIR) + set(YAML_CPP_STATIC_FOUND TRUE) + message(STATUS "yaml-cpp static library found: ${YAML_CPP_STATIC_LIB}") + set(YAML_CPP_LIBRARIES ${YAML_CPP_STATIC_LIB}) + get_filename_component(YAML_CPP_LIBRARY_DIR ${YAML_CPP_STATIC_LIB} DIRECTORY) + + # Create imported target for static linking + add_library(yaml-cpp-static STATIC IMPORTED) + set_target_properties(yaml-cpp-static PROPERTIES + IMPORTED_LOCATION ${YAML_CPP_STATIC_LIB} + INTERFACE_INCLUDE_DIRECTORIES ${YAML_CPP_INCLUDE_DIR} + ) + + # For static linking, we might need pthread + find_package(Threads REQUIRED) + set_target_properties(yaml-cpp-static PROPERTIES + INTERFACE_LINK_LIBRARIES Threads::Threads + ) + + # Use static library as the target + set(YAML_CPP_TARGET yaml-cpp-static) + else() - message(FATAL_ERROR "yaml-cpp not found !!! Install to proceed ...") -endif(yaml-cpp_FOUND) + # Fall back to find_package for shared library + find_package(yaml-cpp QUIET) + if (yaml-cpp_FOUND) + set(YAML_CPP_SHARED_FOUND TRUE) + message(STATUS "yaml-cpp shared library found: ${YAML_CPP_LIBRARIES}") + + if (TARGET yaml-cpp::yaml-cpp) + set(YAML_CPP_TARGET yaml-cpp::yaml-cpp) + get_target_property(YAML_CPP_INCLUDE_DIR yaml-cpp::yaml-cpp INTERFACE_INCLUDE_DIRECTORIES) + if (NOT YAML_CPP_INCLUDE_DIR) + set(YAML_CPP_INCLUDE_DIR ${YAML_CPP_INCLUDE_DIRS}) + endif() + else() + # Legacy variables from find_package + set(YAML_CPP_TARGET ${YAML_CPP_LIBRARIES}) + endif() + else() + message(FATAL_ERROR "yaml-cpp not found !!! Install yaml-cpp (preferably static version) to proceed ...") + endif() +endif() + +# Final status message +if (YAML_CPP_STATIC_FOUND) + message(STATUS "Using yaml-cpp STATIC library: ${YAML_CPP_LIBRARIES}") +elseif (YAML_CPP_SHARED_FOUND) + message(STATUS "Using yaml-cpp SHARED library: ${YAML_CPP_LIBRARIES}") +endif() ################################################################################ ## GOOGLE TEST diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake index 8cfc648d2..0a620828b 100644 --- a/gm.so/tests.cmake +++ b/gm.so/tests.cmake @@ -32,7 +32,7 @@ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") find_package(OpenMP) set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_TARGET} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 03c2a0678..3f6b55429 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -124,7 +124,7 @@ set(CORE_RUNTIME_NAME "hsa-runtime") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES}) +set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_TARGET}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) From 0ee2e4dc1c780f671078efa54748d268405ce085 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 17 Oct 2025 17:21:14 +0530 Subject: [PATCH 016/275] install static when available,if not fall back --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9732e084c..007b5e734 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unz CentOS : ``` -sudo yum install -y cmake3 doxygen pciutils-devel rpm rpm-build git gcc-c++ yaml-cpp-devel +sudo yum install -y cmake3 doxygen pciutils-devel rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static ``` RHEL : ``` -sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel pciutils-devel +sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static pciutils-devel ``` SLES : From 78482a5e1e1f3d94d611a7b9428a4a781d5ae0a5 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 17 Oct 2025 17:40:58 +0530 Subject: [PATCH 017/275] threads not needed here --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30eee7b69..aa6db170c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,7 +330,6 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) ################################################################################ # check yaml-cpp available at configure time -# check yaml-cpp available at configure time # First try to find static yaml-cpp library find_library(YAML_CPP_STATIC_LIB NAMES libyaml-cpp.a yaml-cpp.a @@ -361,11 +360,6 @@ if (YAML_CPP_STATIC_LIB AND YAML_CPP_INCLUDE_DIR) INTERFACE_INCLUDE_DIRECTORIES ${YAML_CPP_INCLUDE_DIR} ) - # For static linking, we might need pthread - find_package(Threads REQUIRED) - set_target_properties(yaml-cpp-static PROPERTIES - INTERFACE_LINK_LIBRARIES Threads::Threads - ) # Use static library as the target set(YAML_CPP_TARGET yaml-cpp-static) From f68f255be4aad0eae2630b6601a326df060c380b Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 17 Oct 2025 17:53:59 +0530 Subject: [PATCH 018/275] set cpack dependencies appropriately --- CMakeLists.txt | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa6db170c..2e0be2ec4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,14 +235,6 @@ if(FETCH_ROCMPATH_FROM_ROCMCORE) else() set(ROCM_DEPENDENT_PACKAGES "hip-runtime-amd, comgr, hsa-rocr, rocblas, amd-smi-lib, hiprand, hipblaslt") endif() -if (${RVS_OS_TYPE} STREQUAL "ubuntu") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") -elseif (${RVS_OS_TYPE} STREQUAL "sles") -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") -else () -# other supported rpm distros - RHEL, CentOS -set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") -endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_COMPONENTS_ALL applications rvsmodule) @@ -393,6 +385,32 @@ elseif (YAML_CPP_SHARED_FOUND) message(STATUS "Using yaml-cpp SHARED library: ${YAML_CPP_LIBRARIES}") endif() + +# Package dependencies - yaml-cpp is conditionally required based on linking type +if (YAML_CPP_STATIC_FOUND) + # Static linking - no runtime yaml-cpp dependency needed + if (${RVS_OS_TYPE} STREQUAL "ubuntu") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3") + elseif (${RVS_OS_TYPE} STREQUAL "sles") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3") + else () + # other supported rpm distros - RHEL, CentOS + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs") + endif() + message(STATUS "Package dependencies: yaml-cpp statically linked, no runtime dependency") +else() + # Dynamic linking - yaml-cpp runtime dependency required + if (${RVS_OS_TYPE} STREQUAL "ubuntu") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") + elseif (${RVS_OS_TYPE} STREQUAL "sles") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") + else () + # other supported rpm distros - RHEL, CentOS + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") + endif() + message(STATUS "Package dependencies: yaml-cpp dynamically linked, runtime dependency included") +endif() + ################################################################################ ## GOOGLE TEST if(RVS_BUILD_TESTS) From f902b75f6dfb1eb39131ebcd17a1f21a24a3087a Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 19 Oct 2025 12:02:26 +0000 Subject: [PATCH 019/275] kept packages,meta packages to minimum required installing rocm via package manager or tools come with packages that are necessary to run. removing unnecessary packages in rcqt to avoid false errors --- rvs/conf/rcqt_single.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rvs/conf/rcqt_single.conf b/rvs/conf/rcqt_single.conf index f87d53362..937495509 100644 --- a/rvs/conf/rcqt_single.conf +++ b/rvs/conf/rcqt_single.conf @@ -28,10 +28,10 @@ actions: - name: metapackage-validation device: all module: rcqt - package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + package: rocm rocm-developer-tools rocm-openmp rocm-opencl-sdk rocm-hip - name: packagelist-install-validation device: all module: rcqt - rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel - debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd + rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd From 16ec2c3a2a76e8b48f27b85fb8f6f5512d6a1af0 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 23 Oct 2025 17:52:55 +0530 Subject: [PATCH 020/275] add few more packages that runtimes rely on --- rvs/conf/rcqt_single.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rvs/conf/rcqt_single.conf b/rvs/conf/rcqt_single.conf index 937495509..c107406d5 100644 --- a/rvs/conf/rcqt_single.conf +++ b/rvs/conf/rcqt_single.conf @@ -33,5 +33,5 @@ actions: - name: packagelist-install-validation device: all module: rcqt - debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd - rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd + debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd + rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd From 692a7bd9220f87ed8b84fb4713772b63123d9fab Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 23 Oct 2025 17:56:28 +0530 Subject: [PATCH 021/275] space fix --- rvs/conf/rcqt_single.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rvs/conf/rcqt_single.conf b/rvs/conf/rcqt_single.conf index c107406d5..a34d8eb6b 100644 --- a/rvs/conf/rcqt_single.conf +++ b/rvs/conf/rcqt_single.conf @@ -33,5 +33,5 @@ actions: - name: packagelist-install-validation device: all module: rcqt - debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd - rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd + debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd + rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd From 88800cc788c0c9608143eaa66e68c925a6e4b2ce Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 24 Oct 2025 17:53:44 +0530 Subject: [PATCH 022/275] check in system path for third party library --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e0be2ec4..e3e02bfbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,7 +325,7 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) # First try to find static yaml-cpp library find_library(YAML_CPP_STATIC_LIB NAMES libyaml-cpp.a yaml-cpp.a - PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib ${CMAKE_PREFIX_PATH}/lib64 ${CMAKE_PREFIX_PATH}/lib + PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib DOC "Path to yaml-cpp static library" ) @@ -403,7 +403,7 @@ else() if (${RVS_OS_TYPE} STREQUAL "ubuntu") set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp") else () # other supported rpm distros - RHEL, CentOS set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") From 4e8d5c7f742c8e27431a0eefea56a1e12abb159b Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sat, 25 Oct 2025 09:53:17 +0530 Subject: [PATCH 023/275] avoid default search,do only in specified paths --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e02bfbe..bfd29787c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,6 +326,7 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) find_library(YAML_CPP_STATIC_LIB NAMES libyaml-cpp.a yaml-cpp.a PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib + NO_DEFAULT_PATH # avoid searches in cmake_install_prefix etc DOC "Path to yaml-cpp static library" ) From 1de1427860244f032cff8970c2e9d24ab2d6c6b8 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 27 Oct 2025 13:19:48 +0530 Subject: [PATCH 024/275] adding version to yaml-cpp for sles --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfd29787c..4910e7cd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -404,7 +404,7 @@ else() if (${RVS_OS_TYPE} STREQUAL "ubuntu") set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") else () # other supported rpm distros - RHEL, CentOS set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") From 9eacc27cf7b7c6d3286255b5df80827f06e4d2f5 Mon Sep 17 00:00:00 2001 From: Jonathan Luu Date: Tue, 28 Oct 2025 16:23:00 -0400 Subject: [PATCH 025/275] move overrides location --- cmake_modules/utils.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmake_modules/utils.cmake b/cmake_modules/utils.cmake index 2de79d084..187be5fa2 100644 --- a/cmake_modules/utils.cmake +++ b/cmake_modules/utils.cmake @@ -192,20 +192,21 @@ function( configure_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T MAINTA DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${COMPONENT_NAME_T}) endif() - else() - # License file - install ( FILES ${LICENSE_FILE} - DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt - COMPONENT ${COMPONENT_NAME_T}) - endif() # Install lintian overrides if( BUILD_ENABLE_LINTIAN_OVERRIDES STREQUAL "ON" AND BUILD_DEBIAN_PKGING_FLAG STREQUAL "ON") set( OVERRIDE_FILE "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" ) install ( FILES ${OVERRIDE_FILE} - DESTINATION ${DEB_OVERRIDES_INSTALL_PATH} + DESTINATION ${DEB_OVERRIDES_INSTALL_PATH} COMPONENT ${COMPONENT_NAME_T}) endif() + + else() + # License file + install ( FILES ${LICENSE_FILE} + DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt + COMPONENT ${COMPONENT_NAME_T}) + endif() endfunction() # Set variables for changelog and copyright From 63ca100c5e2babcdfc05e5864967a996f8199fe9 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Oct 2025 18:37:06 +0530 Subject: [PATCH 026/275] default compute type is f32 which will be invalid if data is fp64 instead of leaving compute_type values in config, which makes them take default fp32 value, this PR specifies it to take same precision as the data type --- rvs/conf/MI350X/NPS2/CPX/gst_single.conf | 2 ++ rvs/conf/MI350X/NPS2/DPX/gst_single.conf | 2 ++ rvs/conf/MI350X/gst_single.conf | 2 ++ rvs/conf/MI350X/levels/rvs_level_4.conf | 1 + rvs/conf/MI350X/levels/rvs_level_5.conf | 1 + rvs/conf/MI355X/NPS2/CPX/gst_single.conf | 2 ++ rvs/conf/MI355X/NPS2/DPX/gst_single.conf | 2 ++ rvs/conf/MI355X/gst_single.conf | 2 ++ rvs/conf/MI355X/levels/rvs_level_4.conf | 1 + rvs/conf/MI355X/levels/rvs_level_5.conf | 1 + 10 files changed, 16 insertions(+) diff --git a/rvs/conf/MI350X/NPS2/CPX/gst_single.conf b/rvs/conf/MI350X/NPS2/CPX/gst_single.conf index 076a020f3..437f63b6d 100644 --- a/rvs/conf/MI350X/NPS2/CPX/gst_single.conf +++ b/rvs/conf/MI350X/NPS2/CPX/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI350X/NPS2/DPX/gst_single.conf b/rvs/conf/MI350X/NPS2/DPX/gst_single.conf index 076a020f3..437f63b6d 100644 --- a/rvs/conf/MI350X/NPS2/DPX/gst_single.conf +++ b/rvs/conf/MI350X/NPS2/DPX/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI350X/gst_single.conf b/rvs/conf/MI350X/gst_single.conf index 912c86e85..ae634a1fe 100644 --- a/rvs/conf/MI350X/gst_single.conf +++ b/rvs/conf/MI350X/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI350X/levels/rvs_level_4.conf b/rvs/conf/MI350X/levels/rvs_level_4.conf index 144d2aed5..ae9497516 100644 --- a/rvs/conf/MI350X/levels/rvs_level_4.conf +++ b/rvs/conf/MI350X/levels/rvs_level_4.conf @@ -299,6 +299,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI350X/levels/rvs_level_5.conf b/rvs/conf/MI350X/levels/rvs_level_5.conf index cf3d3cc01..190c5c5ab 100644 --- a/rvs/conf/MI350X/levels/rvs_level_5.conf +++ b/rvs/conf/MI350X/levels/rvs_level_5.conf @@ -299,6 +299,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI355X/NPS2/CPX/gst_single.conf b/rvs/conf/MI355X/NPS2/CPX/gst_single.conf index 076a020f3..437f63b6d 100644 --- a/rvs/conf/MI355X/NPS2/CPX/gst_single.conf +++ b/rvs/conf/MI355X/NPS2/CPX/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI355X/NPS2/DPX/gst_single.conf b/rvs/conf/MI355X/NPS2/DPX/gst_single.conf index 076a020f3..437f63b6d 100644 --- a/rvs/conf/MI355X/NPS2/DPX/gst_single.conf +++ b/rvs/conf/MI355X/NPS2/DPX/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI355X/gst_single.conf b/rvs/conf/MI355X/gst_single.conf index 912c86e85..ae634a1fe 100644 --- a/rvs/conf/MI355X/gst_single.conf +++ b/rvs/conf/MI355X/gst_single.conf @@ -357,6 +357,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 @@ -380,6 +381,7 @@ actions: matrix_size_c: 8192 matrix_init: rand data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI355X/levels/rvs_level_4.conf b/rvs/conf/MI355X/levels/rvs_level_4.conf index e8666a47d..685d0c18d 100644 --- a/rvs/conf/MI355X/levels/rvs_level_4.conf +++ b/rvs/conf/MI355X/levels/rvs_level_4.conf @@ -299,6 +299,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 diff --git a/rvs/conf/MI355X/levels/rvs_level_5.conf b/rvs/conf/MI355X/levels/rvs_level_5.conf index dd6079558..eb85e4af5 100644 --- a/rvs/conf/MI355X/levels/rvs_level_5.conf +++ b/rvs/conf/MI355X/levels/rvs_level_5.conf @@ -299,6 +299,7 @@ actions: matrix_size_c: 8192 matrix_init: trig data_type: fp64_r + compute_type: fp64_r lda: 8192 ldb: 8192 ldc: 8192 From 981fb8abb1070c765903cefbbd759398419c53d6 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 31 Oct 2025 06:36:01 +0000 Subject: [PATCH 027/275] rpm packages have different naming convention for every *-dev package , rpm will have a *-devel. this convention was missing while checking. Updating the name for this --- rvs/conf/rcqt_single.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rvs/conf/rcqt_single.conf b/rvs/conf/rcqt_single.conf index a34d8eb6b..3661c5a2f 100644 --- a/rvs/conf/rcqt_single.conf +++ b/rvs/conf/rcqt_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -28,10 +28,10 @@ actions: - name: metapackage-validation device: all module: rcqt - package: rocm rocm-developer-tools rocm-openmp rocm-opencl-sdk rocm-hip + package: rocm rocm-developer-tools rocm-openmp rocm-opencl-sdk rocm-hip - name: packagelist-install-validation device: all module: rcqt - debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd - rpmpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd + debpackagelist: amd-smi-lib migraphx migraphx-dev miopen-hip miopen-hip-dev mivisionx mivisionx-dev rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-dev roctracer-dev rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-dev hiptensor comgr openmp-extras-runtime openmp-extras-dev rocm-language-runtime hip-runtime-amd + rpmpackagelist: amd-smi-lib migraphx migraphx-devel miopen-hip miopen-hip-devel mivisionx mivisionx-devel rocm-cmake rocm-core rocminfo half rocm-llvm rpp rpp-devel roctracer-devel rocprofiler-sdk rocm-dbgapi hsa-amd-aqlprofile rocm-debug-agent rocprofiler-sdk-rocpd hsa-rocr hipblas hipblaslt rccl rocblas rocm-device-libs hipify-clang hipcc composablekernel-devel hiptensor comgr openmp-extras-runtime openmp-extras-devel rocm-language-runtime hip-runtime-amd From c0d2f0c43ef4b09d1ed54a8cf68ce9db895d6d0a Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 31 Oct 2025 17:08:31 -0500 Subject: [PATCH 028/275] Update Changelog. --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c29a21828..dd5567aec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,18 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.3.0 for ROCm 7.1.1 + +### Added + +- Support for different test levels with `-r` option for MI3XXX. +- Set compute type for DGEMM operations in MI350X and MI355X. + ## RVS 1.3.0 for ROCm 7.1.0 ### Added - Added test summary and system overview. -- Support for different test levels with `-r` option. - NPS2/DPX partition mode support for MI350X and MI355X. - Support for Azure Linux and Alibaba Linux. - Individual subtest configurability in Babel. From 3c4c32ad773f4ba951a94b844d0871b82b8abae3 Mon Sep 17 00:00:00 2001 From: Jonathan Luu Date: Wed, 12 Nov 2025 01:03:16 -0500 Subject: [PATCH 029/275] remove overrides install --- DEBIAN/overrides.in | 3 --- cmake_modules/utils.cmake | 49 +++++++++++++-------------------------- 2 files changed, 16 insertions(+), 36 deletions(-) delete mode 100644 DEBIAN/overrides.in diff --git a/DEBIAN/overrides.in b/DEBIAN/overrides.in deleted file mode 100644 index 6bee886c1..000000000 --- a/DEBIAN/overrides.in +++ /dev/null @@ -1,3 +0,0 @@ -@DEB_OVERRIDES_INSTALL_FILENM@: no-copyright-file -@DEB_OVERRIDES_INSTALL_FILENM@: debian-changelog-file-missing -@DEB_OVERRIDES_INSTALL_FILENM@: dir-or-file-in-opt diff --git a/cmake_modules/utils.cmake b/cmake_modules/utils.cmake index 187be5fa2..6511c67e6 100644 --- a/cmake_modules/utils.cmake +++ b/cmake_modules/utils.cmake @@ -145,41 +145,32 @@ function( configure_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T MAINTA # Configure the changelog file configure_file( - "${CMAKE_SOURCE_DIR}/DEBIAN/changelog.in" - "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + "${CMAKE_SOURCE_DIR}/CHANGELOG.md" + "${CMAKE_BINARY_DIR}/DEBIAN/CHANGELOG.md" @ONLY ) if( BUILD_ENABLE_LINTIAN_OVERRIDES ) - if(DEFINED BUILD_SHARED_LIBS AND NOT ${BUILD_SHARED_LIBS} STREQUAL "") - string(FIND ${DEB_OVERRIDES_INSTALL_FILENM} "static" OUT_VAR1) - if(OUT_VAR1 EQUAL -1) - set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-static" ) + if(DEFINED BUILD_SHARED_LIBS AND NOT ${BUILD_SHARED_LIBS} STREQUAL "") + string(FIND ${DEB_OVERRIDES_INSTALL_FILENM} "static" OUT_VAR1) + if(OUT_VAR1 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-static" ) endif() - else() + else() if(ENABLE_ASAN_PACKAGING) - string( FIND ${DEB_OVERRIDES_INSTALL_FILENM} "asan" OUT_VAR2) - if(OUT_VAR2 EQUAL -1) - set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-asan" ) - endif() + string( FIND ${DEB_OVERRIDES_INSTALL_FILENM} "asan" OUT_VAR2) + if(OUT_VAR2 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-asan" ) + endif() endif() - endif() - set( DEB_OVERRIDES_INSTALL_FILENM - "${DEB_OVERRIDES_INSTALL_FILENM}" CACHE STRING "Debian Package Lintian Override File Name" FORCE) - # Configure the changelog file - configure_file( - "${CMAKE_SOURCE_DIR}/DEBIAN/overrides.in" - "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - @ONLY - ) + endif() endif() # Install Change Log find_program ( DEB_GZIP_EXEC gzip ) - if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" ) + if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/CHANGELOG.md" ) execute_process( - COMMAND ${DEB_GZIP_EXEC} -f -n -9 "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + COMMAND ${DEB_GZIP_EXEC} -f -n -9 "${CMAKE_BINARY_DIR}/DEBIAN/CHANGELOG.md" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN" RESULT_VARIABLE result OUTPUT_VARIABLE output @@ -192,15 +183,7 @@ function( configure_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T MAINTA DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${COMPONENT_NAME_T}) endif() - - # Install lintian overrides - if( BUILD_ENABLE_LINTIAN_OVERRIDES STREQUAL "ON" AND BUILD_DEBIAN_PKGING_FLAG STREQUAL "ON") - set( OVERRIDE_FILE "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" ) - install ( FILES ${OVERRIDE_FILE} - DESTINATION ${DEB_OVERRIDES_INSTALL_PATH} - COMPONENT ${COMPONENT_NAME_T}) - endif() - + else() # License file install ( FILES ${LICENSE_FILE} @@ -219,7 +202,7 @@ function( set_debian_pkg_cmake_flags DEB_PACKAGE_NAME_T DEB_PACKAGE_VERSION_T DE set( DEB_MAINTAINER_EMAIL "${DEB_MAINTAINER_EMAIL_T}" CACHE STRING "Debian Package Maintainer Email" ) set( DEB_COPYRIGHT_YEAR "2025" CACHE STRING "Debian Package Copyright Year" ) set( DEB_LICENSE "MIT" CACHE STRING "Debian Package License Type" ) - set( DEB_CHANGELOG_INSTALL_FILENM "changelog.Debian.gz" CACHE STRING "Debian Package ChangeLog File Name" ) + set( DEB_CHANGELOG_INSTALL_FILENM "CHANGELOG.md.gz" CACHE STRING "Debian Package ChangeLog File Name" ) if( BUILD_ENABLE_LINTIAN_OVERRIDES ) set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_PACKAGE_NAME}" CACHE STRING "Debian Package Lintian Override File Name" ) From 66e336540ab640efdd9bfed287d2e1002d7c0c86 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 21 Nov 2025 14:13:46 -0600 Subject: [PATCH 030/275] Correction in Dot-Triad configurability --- babel.so/src/rvs_memworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index e60660a9d..058308532 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -81,7 +81,7 @@ void MemWorker::run() { HIP_CHECK(hipSetDevice(deviceId)); /* Set Babel subtests enable/disable */ - subtest test = {read, write, copy, add, mul, triad, dot}; + subtest test = {read, write, copy, add, mul, dot, triad}; result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, dwords_per_lane, chunks_per_block, tb_size, From 65e77fa7042fd1c7aef92ace8bbdb5713cfa82cb Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 26 Nov 2025 16:36:02 -0600 Subject: [PATCH 031/275] Remove stale log code. --- rvs/src/rvsexec_do_yaml.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index d9bcb8b93..cc3db1e3e 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -356,17 +356,6 @@ void systemOverview() { std::vector gpu_info_list = get_gpu_info(); - std::string gpu_list; - for (const auto& info : gpu_info_list) { - gpu_list += info.gpu_id + " "; - } - - if (!gpu_list.empty()) { - gpu_list.pop_back(); // Remove trailing space - } else { - gpu_list = "N/A"; - } - if(gpu_info_list.size()) { std::cout << "\r" << boundary << " " From 15f810d326411878655c7706d640d11a9ff3dea8 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 3 Dec 2025 18:00:57 +0530 Subject: [PATCH 032/275] adding configs --- rvs/conf/R9600D/gst_single.conf | 129 ++++++++++++++++++++++++++++++++ rvs/conf/R9600D/iet_single.conf | 108 ++++++++++++++++++++++++++ 2 files changed, 237 insertions(+) create mode 100644 rvs/conf/R9600D/gst_single.conf create mode 100644 rvs/conf/R9600D/iet_single.conf diff --git a/rvs/conf/R9600D/gst_single.conf b/rvs/conf/R9600D/gst_single.conf new file mode 100644 index 000000000..fad2a366e --- /dev/null +++ b/rvs/conf/R9600D/gst_single.conf @@ -0,0 +1,129 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + + + +# GST test +# +# +# Run test with: +# cd bin +# sudo ./rvs -c conf/R9600D/gst_single.conf -d 3 +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves target gflops +# and GPU sustains the gflops +# for the rest of the test duration . +# FALSE otherwise + +actions: +- name: gpustress-4K-fp16-false + device: all + module: gst + parallel: false + count: 1 + duration: 15000 + copy_matrix: false + target_stress: 85000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + hotcalls: 1000 + data_type: fp16_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + transa: 1 + transb: 0 + blas_source: hipblaslt + +- name: gpustress-4K-fp8-true + device: all + module: gst + parallel: true + count: 1 + duration: 15000 + copy_matrix: false + target_stress: 160000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + hotcalls: 1000 + data_type: fp8_e4m3_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + transa: 1 + transb: 0 + blas_source: hipblaslt + +- name: gpustress-4K-fp8-false + device: all + module: gst + parallel: false + count: 1 + duration: 15000 + copy_matrix: false + target_stress: 160000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + hotcalls: 1000 + data_type: fp8_e4m3_r + compute_type: fp32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + transa: 1 + transb: 0 + blas_source: hipblaslt + +- name: gpustress-4K-i8-false + device: all + module: gst + parallel: false + count: 1 + duration: 15000 + copy_matrix: false + target_stress: 120000 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 4096 + hotcalls: 1000 + data_type: i8_r + compute_type: i32_r + lda: 4128 + ldb: 4128 + ldc: 4128 + ldd: 4128 + transa: 1 + transb: 0 + blas_source: hipblaslt + diff --git a/rvs/conf/R9600D/iet_single.conf b/rvs/conf/R9600D/iet_single.conf new file mode 100644 index 000000000..a228380eb --- /dev/null +++ b/rvs/conf/R9600D/iet_single.conf @@ -0,0 +1,108 @@ +# ################################################################################ +# # +# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: action_1 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 30000 + ramp_interval: 5000 + sample_interval: 700 + log_interval: 700 + max_violations: 1 + target_power: 150 + tolerance: 0.06 + matrix_size: 10640 + ops_type: sgemm + +- name: action_2 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 40000 + ramp_interval: 5000 + sample_interval: 1500 + log_interval: 2000 + max_violations: 1 + target_power: 150 + tolerance: 0.2 + blas_source: rocblas + matrix_size: 8640 + ops_type: sgemm + +- name: action_3 + device: all + module: iet + parallel: false + count: 1 + wait: 100 + duration: 30000 + ramp_interval: 5000 + log_interval: 500 + max_violations: 1 + target_power: 150 + data_type: i8_r + compute_type: i32_r + blas_source: hipblaslt + matrix_size_a: 4608 + matrix_size_b: 4608 + matrix_size_c: 4608 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + lda: 4608 + ldb: 4608 + ldc: 4608 + +- name: action_4 + device: all + module: iet + parallel: true + count: 1 + wait: 100 + duration: 25000 + ramp_interval: 5000 + log_interval: 500 + max_violations: 1 + target_power: 150 + data_type: i8_r + compute_type: i32_r + blas_source: hipblaslt + matrix_size_a: 4608 + matrix_size_b: 4608 + matrix_size_c: 4608 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + lda: 4608 + ldb: 4608 + ldc: 4608 From 415d970576d93b1893982192a739af5c4704436e Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 9 Dec 2025 08:14:54 +0000 Subject: [PATCH 033/275] Fix redundant close braces in generic case --- babel.so/src/rvs_module.cpp | 1 - gpup.so/src/rvs_module.cpp | 3 +-- gst.so/src/rvs_module.cpp | 3 +-- iet.so/src/rvs_module.cpp | 3 +-- mem.so/src/rvs_module.cpp | 3 +-- pbqt.so/src/rvs_module.cpp | 1 - pebb.so/src/rvs_module.cpp | 1 - peqt.so/src/rvs_module.cpp | 3 +-- pesm.so/src/rvs_module.cpp | 3 +-- rcqt.so/src/rvs_module.cpp | 3 +-- rvs/src/rvsexec_do_yaml.cpp | 4 +++- tst.so/src/rvs_module.cpp | 3 +-- 12 files changed, 11 insertions(+), 20 deletions(-) diff --git a/babel.so/src/rvs_module.cpp b/babel.so/src/rvs_module.cpp index 8b9dd0971..034b92438 100644 --- a/babel.so/src/rvs_module.cpp +++ b/babel.so/src/rvs_module.cpp @@ -74,7 +74,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/gpup.so/src/rvs_module.cpp b/gpup.so/src/rvs_module.cpp index 42b2a6ba9..0d995f6f2 100644 --- a/gpup.so/src/rvs_module.cpp +++ b/gpup.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -68,7 +68,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/gst.so/src/rvs_module.cpp b/gst.so/src/rvs_module.cpp index 9f285d70d..b5ef86c07 100644 --- a/gst.so/src/rvs_module.cpp +++ b/gst.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -73,7 +73,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/iet.so/src/rvs_module.cpp b/iet.so/src/rvs_module.cpp index 5511248dd..137575d2e 100644 --- a/iet.so/src/rvs_module.cpp +++ b/iet.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -74,7 +74,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/mem.so/src/rvs_module.cpp b/mem.so/src/rvs_module.cpp index 2c0859ccb..bdbf6d643 100644 --- a/mem.so/src/rvs_module.cpp +++ b/mem.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -84,7 +84,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/pbqt.so/src/rvs_module.cpp b/pbqt.so/src/rvs_module.cpp index da94822eb..08ad32e10 100644 --- a/pbqt.so/src/rvs_module.cpp +++ b/pbqt.so/src/rvs_module.cpp @@ -75,7 +75,6 @@ extern "C" int rvs_module_init(void* pMi) { extern "C" int rvs_module_terminate(void) { rvs::hsa::Terminate(); - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/pebb.so/src/rvs_module.cpp b/pebb.so/src/rvs_module.cpp index cf5dc79c0..b0213b9a4 100644 --- a/pebb.so/src/rvs_module.cpp +++ b/pebb.so/src/rvs_module.cpp @@ -79,7 +79,6 @@ extern "C" int rvs_module_init(void* pMi) { extern "C" int rvs_module_terminate(void) { rvs::lp::Log("[module_terminate] pebb rvs_module_terminate() - entered", rvs::logtrace); - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/peqt.so/src/rvs_module.cpp b/peqt.so/src/rvs_module.cpp index 1a393168b..f4ae5d506 100644 --- a/peqt.so/src/rvs_module.cpp +++ b/peqt.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -67,7 +67,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/pesm.so/src/rvs_module.cpp b/pesm.so/src/rvs_module.cpp index 4f468c2df..0ec005f01 100644 --- a/pesm.so/src/rvs_module.cpp +++ b/pesm.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -92,7 +92,6 @@ extern "C" int rvs_module_terminate(void) { "[module_terminate] pesm rvs_module_terminate() - monitoring stopped", rvs::logtrace); } - cleanup_logs(); amdsmi_shut_down(); return 0; } diff --git a/rcqt.so/src/rvs_module.cpp b/rcqt.so/src/rvs_module.cpp index 8409e34ea..a0ed909c7 100644 --- a/rcqt.so/src/rvs_module.cpp +++ b/rcqt.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -69,7 +69,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); return 0; } diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index cc3db1e3e..1bc5883c0 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -794,7 +794,9 @@ int rvs::exec::do_yaml(yaml_data_type_t data_type, const std::string& data) { else { printBoundary(); } - + if (rvs::logger::to_json()) { + rvs::lp::JsonEndNodeCreate(); + } result.status = RVS_STATUS_SUCCESS; result.output_log = "RVS session successfully completed."; callback(&result); diff --git a/tst.so/src/rvs_module.cpp b/tst.so/src/rvs_module.cpp index e2b5c453b..ae173fd93 100644 --- a/tst.so/src/rvs_module.cpp +++ b/tst.so/src/rvs_module.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -72,7 +72,6 @@ extern "C" int rvs_module_init(void* pMi) { } extern "C" int rvs_module_terminate(void) { - cleanup_logs(); amdsmi_shut_down(); return 0; } From 38a206cae1f82971415cd614f19e5f8d5710366b Mon Sep 17 00:00:00 2001 From: srawat <120587655+SwRaw@users.noreply.github.com> Date: Fri, 2 Jan 2026 18:16:26 +0530 Subject: [PATCH 034/275] Add note for using rocm-smi-lib and amd-smi-lib --- README.md | 9 ++--- docs/install/installation.rst | 66 ++++++++++++++++------------------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 007b5e734..ad6ebf36a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ SLES : sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel ``` -## Install ROCm stack, rocblas and rocm-smi-lib +## Install ROCm stack, rocblas and SMI lib + Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to [ROCm installation guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html) for more details. @@ -43,7 +44,7 @@ Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to rocm_smi64 package has been renamed to rocm-smi-lib64 from >= ROCm3.0. If you are using ROCm release < 3.0 , install the package as "rocm_smi64". rocm-smi-lib64 package has been renamed to rocm-smi-lib from >= ROCm4.1. -Install rocBLAS and rocm-smi-lib : +Install rocBLAS. For ROCm 6.4 and earlier, install ``rocm-smi-lib``. For ROCm 7.0 and later, install ``amd-smi-lib``. Ubuntu : @@ -94,7 +95,7 @@ This section explains how to get and compile current development stream of RVS. git clone https://github.com/ROCm/ROCmValidationSuite.git ``` -**Note:** +**Note:** The above command clones the master branch. If you're using a specific ROCm release, it's recommended to use the corresponding RVS version from the same release branch to ensure compatibility. If ROCm 6.4 is installed, clone the RVS repository from the 6.4 release branch by running: @@ -219,7 +220,7 @@ To run GPU specific test configuration, use configuration files from GPU folders ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration ``` -**Note:** +**Note:** If present, always use GPU specific configurations instead of default test configurations. ## Reporting diff --git a/docs/install/installation.rst b/docs/install/installation.rst index e2605bbc8..6a0d24b00 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -6,10 +6,10 @@ ********************************** Installing ROCm Validation Suite ********************************** - + You can obtain ROCm Validation Suite (RVS) by building it from: -* the source code base +* the source code base * a prebuilt package @@ -21,7 +21,7 @@ RVS is an open-source solution. For more details, refer to the `ROCm Validation Package manager installation ------------------------------ - + Based on the OS, use the appropriate package manager to install the RVS package. For more details, refer to the `ROCm Validation Suite GitHub repository. `_ @@ -58,30 +58,30 @@ Ensure you review the following prerequisites carefully for each operating syste .. tab-item:: RHEL :sync: RHEL - - .. code-block:: shell - + + .. code-block:: shell + sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel pciutils-devel .. tab-item:: SUSE :sync: SUSE - + .. code-block:: shell - - sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel + + sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel -Install ROCm stack, rocBLAS, and ROCm-SMI-lib ------------------------------------------------ +Install ROCm stack, rocBLAS, and SMI lib +------------------------------------------ -1. Install the ROCm software stack for Ubuntu, SLES or RHEL. Refer to the `ROCm installation guide `_ for more details. +1. Install the ROCm software stack for Ubuntu, SLES or RHEL. Refer to the `ROCm installation guide `_ for more details. -2. Install rocBLAS and rocm-smi-lib. +2. Install rocBLAS. For ROCm 6.4 and earlier, install ``rocm-smi-lib``. For ROCm 7.0 and later, install ``amd-smi-lib``. .. tab-set:: .. tab-item:: Ubuntu :sync: Ubuntu - + .. code-block:: shell sudo apt-get install rocblas rocm-smi-lib @@ -89,24 +89,24 @@ Install ROCm stack, rocBLAS, and ROCm-SMI-lib .. tab-item:: RHEL :sync: RHEL - .. code-block:: shell + .. code-block:: shell sudo yum install --nogpgcheck rocblas rocm-smi-lib .. tab-item:: SUSE :sync: SUSE - .. code-block:: shell + .. code-block:: shell sudo zypper install rocblas rocm-smi-lib -If rocm-smi-lib is already installed, but ``/opt/rocm/lib/librocm_smi64.so`` doesn't exist, run the following command: +If rocm-smi-lib is already installed, but ``/opt/rocm/lib/librocm_smi64.so`` doesn't exist, run the following commands as per the OS: .. tab-set:: .. tab-item:: Ubuntu :sync: Ubuntu - - .. code-block:: shell + + .. code-block:: shell sudo dpkg -r rocm-smi-lib && sudo apt install rocm-smi-lib @@ -114,14 +114,14 @@ If rocm-smi-lib is already installed, but ``/opt/rocm/lib/librocm_smi64.so`` doe .. tab-item:: RHEL :sync: RHEL - .. code-block:: shell + .. code-block:: shell sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib .. tab-item:: SUSE :sync: SUSE - .. code-block:: shell + .. code-block:: shell sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib @@ -165,7 +165,7 @@ For example, if ROCm 5.5 was installed, run the following command: .. Note:: - Depending on your OS, only DEB or RPM package will be built. + Depending on your OS, only DEB or RPM package will be built. .. Note:: @@ -177,21 +177,21 @@ For example, if ROCm 5.5 was installed, run the following command: .. tab-item:: Ubuntu :sync: Ubuntu - .. code-block:: + .. code-block:: sudo dpkg -i rocm-validation-suite*.deb .. tab-item:: RHEL :sync: RHEL - .. code-block:: shell + .. code-block:: shell sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm .. tab-item:: SUSE :sync: SUSE - .. code-block:: shell + .. code-block:: shell sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm @@ -205,7 +205,7 @@ For example, if ROCm 5.5 was installed, run the following command: .. tab-item:: Ubuntu :sync: Ubuntu - .. code-block:: + .. code-block:: sudo apt install rocm-validation-suite @@ -213,14 +213,14 @@ For example, if ROCm 5.5 was installed, run the following command: .. tab-item:: RHEL :sync: RHEL - .. code-block:: shell + .. code-block:: shell sudo yum install rocm-validation-suite .. tab-item:: SUSE :sync: SUSE - .. code-block:: shell + .. code-block:: shell sudo zypper install rocm-validation-suite @@ -230,7 +230,7 @@ Reporting Test results, errors, and verbose logs are printed as terminal output. To enable JSON logging, use the ``-j`` option. The JSON output file is stored in the ``/var/tmp`` folder and the file name will be printed. -You can build RVS from the source code base or by installing from a pre-built package. See the preceding sections for more details. +You can build RVS from the source code base or by installing from a pre-built package. See the preceding sections for more details. Running RVS ------------ @@ -279,11 +279,7 @@ Run the following commands to build documentation locally. .. code-block:: - cd docs - pip3 install -r .sphinx/requirements.txt + cd docs + pip3 install -r .sphinx/requirements.txt python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html - - - - From 8341785c811863bffd69ef577e43da865b22e6b9 Mon Sep 17 00:00:00 2001 From: Swati Rawat <120587655+SwRaw@users.noreply.github.com> Date: Tue, 6 Jan 2026 20:20:52 +0530 Subject: [PATCH 035/275] Update README.md Co-authored-by: Jeffrey Novotny --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad6ebf36a..1c2579029 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ SLES : sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel ``` -## Install ROCm stack, rocblas and SMI lib +## Install ROCm stack, rocBLAS, and SMI library Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to [ROCm installation guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html) for more details. From cc7cb0eceef70229542e2b1e145e87082ba6bc7e Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Thu, 15 Jan 2026 14:05:58 -0500 Subject: [PATCH 036/275] Bump rocm-docs-core to 1.31.2 (#1076) --- docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index e4ada44c2..aff7ac0be 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==1.18.2 +rocm-docs-core==1.31.2 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index 46db293d8..e32c7f47d 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -188,7 +188,7 @@ requests==2.32.3 # via # pygithub # sphinx -rocm-docs-core==1.18.2 +rocm-docs-core==1.31.2 # via -r requirements.in rpds-py==0.22.3 # via @@ -214,7 +214,7 @@ sphinx==7.4.5 # sphinx-design # sphinx-external-toc # sphinx-notfound-page -sphinx-book-theme==1.1.3 +sphinx-book-theme==1.1.4 # via rocm-docs-core sphinx-copybutton==0.5.2 # via rocm-docs-core From fdf5864a1ffe663ecb79b2df484e5e94c581b8ff Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 19 Jan 2026 19:08:31 -0600 Subject: [PATCH 037/275] dkms command error handling --- rvs/src/rvsexec_do_yaml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index 1bc5883c0..1c285d61a 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -263,7 +263,7 @@ std::string getAmdGpuDriverVersion() { std::string result; // Run the command - std::unique_ptr pipe(popen("dkms status", "r"), pclose); + std::unique_ptr pipe(popen("dkms status 2>/dev/null", "r"), pclose); if (!pipe) { return "N/A"; } From 60ecc94e45f5ce7bf3019bde380ef70b9a9bbb0b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 21 Jan 2026 13:51:44 -0600 Subject: [PATCH 038/275] GPU name format --- rvs/src/rvsexec_do_yaml.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index 1c285d61a..b08d66d44 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -302,6 +302,7 @@ void systemOverview() { int columnWidth = 14;; int actionColumnWidth = 32; int TotalColumnWidth = 69; + int maxGPUNameLength = 24; const char boundary = '|'; @@ -382,7 +383,10 @@ void systemOverview() { if(gpu_info_list.size() % 2) { - std::string GPU1 = gpu_info_list[gpu_index].name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); + std::string GPU1name = gpu_info_list[gpu_index].name; + GPU1name = (GPU1name.size() > maxGPUNameLength) ? GPU1name.substr(0, maxGPUNameLength - 4) + "..." : GPU1name; + + std::string GPU1 = GPU1name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); padright = (actionColumnWidth - GPU1.size()); std::cout << "\r" << boundary << " " << std::left << GPUdetailsPart1 << std::string(padding, ' ') << " " << boundary @@ -431,11 +435,16 @@ void systemOverview() { for (;gpu_index < gpu_info_list.size();) { - std::string GPU1 = gpu_info_list[gpu_index].name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); + std::string GPU1name = gpu_info_list[gpu_index].name; + GPU1name = (GPU1name.size() > maxGPUNameLength) ? GPU1name.substr(0, maxGPUNameLength - 4) + "..." : GPU1name; + + std::string GPU1 = GPU1name + " - " + std::to_string(gpu_info_list[gpu_index].gpu_id); padleft = (actionColumnWidth - GPU1.size()); + std::string GPU2name = gpu_info_list[gpu_index + 1].name; + GPU2name = (GPU2name.size() > maxGPUNameLength) ? GPU2name.substr(0, maxGPUNameLength - 4) + "..." : GPU2name; - std::string GPU2 = gpu_info_list[gpu_index + 1].name + " - " + std::to_string(gpu_info_list[gpu_index + 1].gpu_id); + std::string GPU2 = GPU2name + " - " + std::to_string(gpu_info_list[gpu_index + 1].gpu_id); padright = (actionColumnWidth - GPU2.size()); std::cout << "\r" << boundary From ac6239d2ea0a20d113c7e7d45a9a6879d63e6c40 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 28 Jan 2026 19:40:49 -0600 Subject: [PATCH 039/275] MCM GPU handling in IET --- iet.so/include/action.h | 3 ++- iet.so/include/iet_worker.h | 6 ++++++ iet.so/src/action.cpp | 10 +++++++--- iet.so/src/iet_worker.cpp | 23 +++++++++++++++++------ include/rvs_util.h | 11 ++++++++++- src/gpu_util.cpp | 4 ++-- src/rvs_util.cpp | 10 +++++++++- 7 files changed, 53 insertions(+), 14 deletions(-) diff --git a/iet.so/include/action.h b/iet.so/include/action.h index 04c3c0fbc..1010ede52 100644 --- a/iet.so/include/action.h +++ b/iet.so/include/action.h @@ -178,7 +178,8 @@ class iet_action: public rvs::actionbase { */ int get_all_selected_gpus(void); - bool do_edp_test(std::map iet_gpus_device_index); + bool do_edp_test(map iet_gpus_device_index, + std::vector& mcm_type); }; #endif // IET_SO_INCLUDE_ACTION_H_ diff --git a/iet.so/include/iet_worker.h b/iet.so/include/iet_worker.h index 3a98b320a..5189dc366 100644 --- a/iet.so/include/iet_worker.h +++ b/iet.so/include/iet_worker.h @@ -293,6 +293,9 @@ class IETWorker : public rvs::ThreadBase { //! sets gemm output data type void set_iet_out_data_type(std::string out_data_type) { iet_out_data_type = out_data_type; } + //! set GPU MCM (Multi-Chip Module) type - Primary/Secondary + void set_mcm_type(mcm_type_t _mcm_type) { mcm_type = _mcm_type; } + //! BLAS callback static void blas_callback (bool status, void *user_data); //! get worker job result @@ -423,6 +426,9 @@ class IETWorker : public rvs::ThreadBase { bool nt_loads; //! gemm output data type std::string iet_out_data_type; + //! GPU MCM (Multi-Chip Module) type - Primary/Secondary + mcm_type_t mcm_type; + //! Worker job result bool result; }; diff --git a/iet.so/src/action.cpp b/iet.so/src/action.cpp index fcebbf3c9..4c8bb6e0e 100644 --- a/iet.so/src/action.cpp +++ b/iet.so/src/action.cpp @@ -519,7 +519,8 @@ void iet_action::hip_to_smi_indices(void) { * @brief runs the edp test * @return true if no error occured, false otherwise */ -bool iet_action::do_edp_test(map iet_gpus_device_index) { +bool iet_action::do_edp_test(map iet_gpus_device_index, + std::vector& mcm_type) { std::string msg; uint32_t dev_idx = 0; @@ -594,6 +595,8 @@ bool iet_action::do_edp_test(map iet_gpus_device_index) { workers[i].set_wg_count(iet_wg_count); workers[i].set_nt_loads(iet_nt_loads); workers[i].set_iet_out_data_type(iet_out_data_type); + workers[i].set_mcm_type(mcm_type[i]); + i++; } @@ -666,6 +669,7 @@ int iet_action::get_all_selected_gpus(void) { map iet_gpus_device_index; std::string msg; std::stringstream msg_stream; + std::vector mcm_type; hipGetDeviceCount(&hip_num_gpu_devices); if (hip_num_gpu_devices < 1) @@ -674,7 +678,7 @@ int iet_action::get_all_selected_gpus(void) { // find compatible GPUs to run edp tests amd_gpus_found = fetch_gpu_list(hip_num_gpu_devices, iet_gpus_device_index, property_device, property_device_id, property_device_all, - property_device_index, property_device_index_all, true); // MCM checks + property_device_index, property_device_index_all, true, &mcm_type); // MCM checks if(!amd_gpus_found){ msg = "No devices match criteria from the test configuation."; rvs::lp::Log(msg, rvs::logerror); @@ -699,7 +703,7 @@ int iet_action::get_all_selected_gpus(void) { } int iet_res = 0; - if(do_edp_test(iet_gpus_device_index)) + if(do_edp_test(iet_gpus_device_index, mcm_type)) iet_res = 0; else iet_res = -1; diff --git a/iet.so/src/iet_worker.cpp b/iet.so/src/iet_worker.cpp index 1aecc5219..7c820390f 100644 --- a/iet.so/src/iet_worker.cpp +++ b/iet.so/src/iet_worker.cpp @@ -254,12 +254,23 @@ bool IETWorker::do_iet_power_stress(void) { result = true; } else { - msg = "[" + action_name + "] " + MODULE_NAME + " " + - std::to_string(gpu_id) + " " + " Average power could not meet the target power \ - in the given interval, increase the duration and try again, \ - Average power is :" + " " + std::to_string(max_power); - rvs::lp::Log(msg, rvs::loginfo); - result = false; + + if(mcm_type == mcm_type_t::PRIMARY) { + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " " + " Average power could not meet the target power \ + in the given interval, increase the duration and try again, \ + Average power is :" + " " + std::to_string(max_power); + rvs::lp::Log(msg, rvs::loginfo); + result = false; + } + else { + /* For secondary MCM, there is no power reporting - so by default considering it as pass */ + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " " + " No power reporting present for \ + secondary MCM, considering the test as pass by default" ; + rvs::lp::Log(msg, rvs::loginfo); + result = true; + } } if (IETWorker::bjson) diff --git a/include/rvs_util.h b/include/rvs_util.h index f94db1380..56b1c88c3 100644 --- a/include/rvs_util.h +++ b/include/rvs_util.h @@ -34,6 +34,12 @@ using std::map; +//! GPU MCM (Multi-Chip Module) types - Primary/Secondary +enum class mcm_type_t { + PRIMARY = 0, + SECONDARY = 1 +}; + struct device_info { std::string bus; std::string name; @@ -139,10 +145,13 @@ int rvs_util_parse(const std::string& buff, void *json_node_create(std::string module_name, std::string action_name, int log_level); + bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_index, const std::vector& property_device, const int& property_device_id, bool property_device_all, const std::vector& property_device_index, - bool property_device_index_all, bool mcm_check = false); + bool property_device_index_all, bool mcm_check = false, + std::vector* mcm_type = nullptr); + void getBDF(int idx ,unsigned int& domain,unsigned int& bus,unsigned int& device,unsigned int& function); int display_gpu_info(std::vector); void *json_list_create(std::string lname, int log_level); diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index 06326b247..df45b6fba 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -440,9 +440,9 @@ void gpu_get_all_pci_bdf(std::vector& ppci_bdf) { } /** - * @brief Check if the GPU is die (chiplet) in Multi-Chip Module (MCM) GPU. + * @brief Check if the GPU is secondary die (chiplet) in Multi-Chip Module (MCM) GPU. * @param device_id GPU Device ID - * @return true if GPU is die in MCM GPU, false if GPU is single die GPU. + * @return true if GPU is secondary die in MCM GPU, false if GPU is single die GPU. **/ bool gpu_check_if_mcm_die (int idx) { amdsmi_status_t ret; diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index 5cae87837..191541df4 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -116,7 +116,8 @@ void *json_list_create(std::string lname, int log_level){ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_index, const std::vector& property_device, const int& property_device_id, bool property_device_all, const std::vector& property_device_index, - bool property_device_index_all, bool mcm_check) { + bool property_device_index_all, bool mcm_check, + std::vector* mcm_type) { bool amd_gpus_found = false; bool mcm_die = false; @@ -191,8 +192,15 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind rvs::lp::Log(msg_stream.str(), rvs::logresults); amd_mcm_gpu_found = true; + mcm_type->push_back(mcm_type_t::SECONDARY); + + } else { + mcm_type->push_back(mcm_type_t::PRIMARY); } + } else { + mcm_type->push_back(mcm_type_t::PRIMARY); } + // excluding secondary die from test list, drops power reading substantially if (cur_gpu_selected) { // need not exclude secondary die, just log it out. gpus_device_index.insert From 2931405a269172f0476f677ced10615738e20125 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 30 Jan 2026 00:24:08 +0000 Subject: [PATCH 040/275] Added MI250X IET power stress test --- rvs/conf/MI250X/iet_stress.conf | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 rvs/conf/MI250X/iet_stress.conf diff --git a/rvs/conf/MI250X/iet_stress.conf b/rvs/conf/MI250X/iet_stress.conf new file mode 100644 index 000000000..252a8fc0f --- /dev/null +++ b/rvs/conf/MI250X/iet_stress.conf @@ -0,0 +1,64 @@ +# ################################################################################ +# # +# # Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET stress test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by comma. +# Set parallel execution to true (gemm workload execution on all GPUs in parallel) +# Set gemm operation type as dgemm. +# Set matrix_size to 28000. +# Test duration set to 10 mins. +# Target power set to 560W for each GPU. +# +# Run test with: +# cd bin +# ./rvs -c conf/MI250X/iet_stress.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves power target of 560W. +# + +actions: +- name: iet-stress-560W-dgemm-true + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 560 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + From bfc6e5bd4a4ed4da94dc7e5bdeab3d5fde91d2c6 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 30 Jan 2026 00:34:41 -0600 Subject: [PATCH 041/275] GPU MCM handling --- src/rvs_util.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index 191541df4..629fbfad4 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -182,7 +182,7 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind // if mcm check enabled, print message if device is MCM // MCM is only for mi200, so check only if gfx90a - if (mcm_check && (std::string{props.gcnArchName}.find("gfx90a") != std::string::npos) ){ + if (mcm_check && (std::string{props.gcnArchName}.find("gfx90a") != std::string::npos)){ std::stringstream msg_stream; mcm_die = gpu_check_if_mcm_die(i); if (mcm_die) { @@ -198,7 +198,8 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind mcm_type->push_back(mcm_type_t::PRIMARY); } } else { - mcm_type->push_back(mcm_type_t::PRIMARY); + if(mcm_check) + mcm_type->push_back(mcm_type_t::PRIMARY); } // excluding secondary die from test list, drops power reading substantially From e3d57c6f1d3831782839975d6057b7efcf194497 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Jan 2026 18:37:41 -0800 Subject: [PATCH 042/275] Add github-action to build and release rpm,deb*tgz Build and packaging script is kept same for local and for building on github action. Signed-off-by: Paul --- .github/workflows/README_BUILD_PACKAGES.md | 396 ++++++++++++++ .../workflows/build-relocatable-packages.yml | 253 +++++++++ CHANGES_SUMMARY.md | 344 ++++++++++++ PACKAGE_BUILD_SUMMARY.md | 499 ++++++++++++++++++ QUICKSTART_PACKAGES.md | 405 ++++++++++++++ VERIFICATION_CHECKLIST.md | 412 +++++++++++++++ build_packages_local.sh | 350 ++++++++++++ 7 files changed, 2659 insertions(+) create mode 100644 .github/workflows/README_BUILD_PACKAGES.md create mode 100644 .github/workflows/build-relocatable-packages.yml create mode 100644 CHANGES_SUMMARY.md create mode 100644 PACKAGE_BUILD_SUMMARY.md create mode 100644 QUICKSTART_PACKAGES.md create mode 100644 VERIFICATION_CHECKLIST.md create mode 100644 build_packages_local.sh diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md new file mode 100644 index 000000000..2ff9b05a7 --- /dev/null +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -0,0 +1,396 @@ +# Building Relocatable Packages with GitHub Actions + +This document describes the GitHub Actions workflow for building relocatable ROCm Validation Suite (RVS) packages using the ROCm SDK from [TheRock](https://github.com/ROCm/TheRock). + +## Overview + +The workflow (`.github/workflows/build-relocatable-packages.yml`) automatically builds: +- **DEB packages** for Ubuntu/Debian systems +- **RPM packages** for CentOS/RHEL/Rocky Linux systems +- **TGZ archives** for any Linux distribution (relocatable) + +All packages are built with relocatable RPATH settings, meaning they can be installed to different locations. + +## Workflow Triggers + +The workflow runs automatically on: +- Push to `master`, `main`, or `release/**` branches +- Pull requests to `master` or `main` branches +- Manual trigger via GitHub Actions UI (workflow_dispatch) + +### Manual Trigger Parameters + +When manually triggering the workflow, you can specify: + +1. **ROCm Version** (e.g., `6.5.0rc20250610`) + - Default: `6.5.0rc20250610` + +2. **GPU Family Target**: + - `gfx94X-dcgpu` - MI300A/MI300X + - `gfx950-dcgpu` - MI350X/MI355X + - `gfx110X-all` - AMD RX 7900 XTX, 7800 XT, 7700S, Radeon 780M (default) + - `gfx1151` - AMD Strix Halo iGPU + - `gfx120X-all` - AMD RX 9060/XT, 9070/XT + +## How It Works + +The workflow leverages the `build_packages_local.sh` script for all build operations, ensuring consistency between local development and CI/CD environments. + +### Workflow Architecture + +``` +GitHub Actions Workflow +├── Checkout Repository (with submodules) +├── Set Environment Variables (ROCM_VERSION, GPU_FAMILY, BUILD_TYPE) +└── Execute build_packages_local.sh + ├── 1. Detect OS and Install Dependencies + │ ├── Ubuntu/Debian: apt-get install build-essential, cmake, etc. + │ └── CentOS/RHEL: yum install gcc, gcc-c++, cmake3, etc. + ├── 2. Download ROCm SDK from TheRock + │ └── URL: https://therock-nightly-tarball.s3.../${GPU_FAMILY}-${ROCM_VERSION}.tar.gz + ├── 3. Extract and Setup ROCm Environment + │ ├── export ROCM_PATH="$HOME/rocm-sdk/install" + │ ├── export PATH="$ROCM_PATH/bin:$PATH" + │ ├── export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" + │ └── export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" + ├── 4. Configure CMake with Relocatable RPATH + │ └── cmake -B ./build \ + │ -DCMAKE_BUILD_TYPE=Release \ + │ -DROCM_PATH=$ROCM_PATH \ + │ -DHIP_PLATFORM=amd \ + │ -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ + │ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ + │ -DCMAKE_SKIP_RPATH=FALSE \ + │ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ + │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" + ├── 5. Build RVS + │ └── make -C ./build -j$(nproc) + └── 6. Create Packages + ├── Ubuntu: DEB + TGZ (via CPack) + └── CentOS/RHEL: RPM + TGZ (via CPack) +``` + +### Key Technical Details + +**Relocatable RPATH**: The `$ORIGIN` relative RPATH ensures binaries can find their libraries regardless of installation location: + +```bash +CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" +``` + +**Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. + +**HIP Platform**: Set to `amd` via CMake parameter for AMD GPU support. + +**Single Source of Truth**: All build logic resides in `build_packages_local.sh`, which can be used for both local builds and CI/CD. + +### Workflow Steps + +The GitHub Actions workflow performs minimal platform-specific operations: + +1. **Checkout Repository** with recursive submodule initialization +2. **Set Environment Variables** from workflow inputs or defaults +3. **Execute Build Script** - `./build_packages_local.sh` handles everything +4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) +5. **Upload Artifacts** - Store packages with 30-day retention + +## Build Script: build_packages_local.sh + +The workflow uses `build_packages_local.sh` as the core build engine. This script provides a complete, self-contained build system that works identically in both local development and CI/CD environments. + +### Script Features + +- **OS Detection**: Automatically identifies Ubuntu/Debian vs CentOS/RHEL +- **Dependency Management**: Installs all required build tools and libraries +- **ROCm SDK Setup**: Downloads and configures ROCm from TheRock tarballs +- **CMake Configuration**: Sets up relocatable RPATHs and all build parameters +- **Building**: Compiles RVS with parallel builds +- **Packaging**: Creates DEB, RPM, and TGZ packages using CPack +- **Color Output**: Clear, colored progress indicators +- **Error Handling**: Robust error checking at each step + +### Running Locally + +```bash +# Basic usage (uses default ROCm version and GPU family) +./build_packages_local.sh + +# Custom ROCm version and GPU family +ROCM_VERSION=6.5.0rc20250610 GPU_FAMILY=gfx110X-all ./build_packages_local.sh + +# Debug build +BUILD_TYPE=Debug ./build_packages_local.sh +``` + +### Environment Variables + +| Variable | Default | Description | +|----------|---------|-------------| +| `ROCM_VERSION` | `6.5.0rc20250610` | ROCm SDK version from TheRock | +| `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | +| `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | + +## Build Matrix + +The workflow builds packages for: + +| Platform | Container/Runner | Package Types | Script Mode | +|----------|------------------|---------------|-------------| +| Ubuntu 22.04 | ubuntu-22.04 | DEB, TGZ | Auto-detects Ubuntu | +| Rocky Linux 8 | rockylinux:8 | RPM, TGZ | Auto-detects CentOS | + +## Package Naming Convention + +Packages are named automatically by CPack using the RVS version from `CMakeLists.txt`: + +- **DEB**: `rocm-validation-suite_${RVS_VERSION}_amd64.deb` +- **RPM**: `rocm-validation-suite-${RVS_VERSION}.x86_64.rpm` +- **TGZ**: `rocm-validation-suite-${RVS_VERSION}-Linux.tar.gz` + +Example (if RVS version is 1.0.0): +``` +rocm-validation-suite_1.0.0_amd64.deb +rocm-validation-suite-1.0.0.x86_64.rpm +rocm-validation-suite-1.0.0-Linux.tar.gz +``` + +**Important**: Package filenames match the internal package metadata, ensuring compliance with Debian and RPM standards. The version is sourced directly from `CMakeLists.txt` via CMake's `project(VERSION)` command. + +## Installing Generated Packages + +### Ubuntu/Debian (DEB) + +```bash +# Download the artifact from GitHub Actions +sudo dpkg -i rocm-validation-suite_*.deb + +# Run RVS +/opt/rocm/rvs/bin/rvs --help +``` + +### CentOS/RHEL/Rocky Linux (RPM) + +```bash +# Download the artifact from GitHub Actions +sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm + +# Run RVS +/opt/rocm/rvs/bin/rvs --help +``` + +### Any Linux Distribution (TGZ - Relocatable) + +```bash +# Extract to /opt (or any location) +sudo mkdir -p /opt/rocm +sudo tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ + +# Or extract to custom location +mkdir -p ~/myrocm +tar -xzf rocm-validation-suite-*.tar.gz -C ~/myrocm/ + +# Setup environment +export PATH=/opt/rocm/rvs/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH + +# Run RVS +rvs --help +``` + +## Verifying Packages + +The workflow automatically verifies package contents: + +### DEB Package Verification + +```bash +dpkg-deb -I rocm-validation-suite_*.deb # Package info +dpkg-deb -c rocm-validation-suite_*.deb # Package contents +``` + +### RPM Package Verification + +```bash +rpm -qip rocm-validation-suite-*.rpm # Package info +rpm -qlp rocm-validation-suite-*.rpm # Package contents +rpm -qRp rocm-validation-suite-*.rpm # Package dependencies +``` + +## Accessing Build Artifacts + +1. Go to the **Actions** tab in your GitHub repository +2. Click on the latest workflow run +3. Scroll down to **Artifacts** section +4. Download the package artifacts: + - `ubuntu-22.04-packages-${GPU_FAMILY}` + - `rockylinux8-packages-${GPU_FAMILY}` + - `build-report` (contains build summary) + +## Customization + +### Changing ROCm Version or GPU Family + +**Option 1: Via GitHub Actions UI (Manual Trigger)** + +1. Go to **Actions** → **Build Relocatable Packages** +2. Click **Run workflow** +3. Enter custom values for: + - ROCm Version (e.g., `6.5.0rc20250610`) + - GPU Family (e.g., `gfx110X-all`) + +**Option 2: Edit Workflow Defaults** + +Edit the `env` section in `.github/workflows/build-relocatable-packages.yml`: + +```yaml +env: + ROCM_VERSION: '6.5.0rc20250610' # Change this + GPU_FAMILY: 'gfx110X-all' # Change this + BUILD_TYPE: Release +``` + +**Option 3: Edit Build Script Defaults** + +Edit `build_packages_local.sh`: + +```bash +ROCM_VERSION="${ROCM_VERSION:-6.5.0rc20250610}" # Change default here +GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" # Change default here +BUILD_TYPE="${BUILD_TYPE:-Release}" +``` + +### Adding More Distributions + +To add support for more distributions, extend the workflow matrix: + +**For Ubuntu variants:** + +```yaml +build-ubuntu: + strategy: + matrix: + ubuntu_version: ['20.04', '22.04', '24.04'] + runs-on: ubuntu-${{ matrix.ubuntu_version }} +``` + +**For other RPM-based distributions:** + +```yaml +build-fedora: + runs-on: ubuntu-latest + container: + image: fedora:39 + steps: + - uses: actions/checkout@v4 + - run: | + chmod +x build_packages_local.sh + ROCM_VERSION=${{ env.ROCM_VERSION }} \ + GPU_FAMILY=${{ env.GPU_FAMILY }} \ + ./build_packages_local.sh +``` + +**For SLES/OpenSUSE:** + +```yaml +build-sles: + runs-on: ubuntu-latest + container: + image: opensuse/leap:15.5 + steps: + - uses: actions/checkout@v4 + - run: | + chmod +x build_packages_local.sh + ROCM_VERSION=${{ env.ROCM_VERSION }} \ + GPU_FAMILY=${{ env.GPU_FAMILY }} \ + ./build_packages_local.sh +``` + +Note: You may need to update the OS detection logic in `build_packages_local.sh` to handle additional distributions. + +### Customizing Build Parameters + +Edit the CMake configuration section in `build_packages_local.sh`: + +```bash +cmake -B "$BUILD_DIR" \ + -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ + -DROCM_PATH="$ROCM_PATH" \ + -DHIP_PLATFORM=amd \ + -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ + -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ + -DCMAKE_SKIP_RPATH=FALSE \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" \ + -DRPATH_MODE=OFF \ + -DYOUR_CUSTOM_OPTION=ON # Add custom options here +``` + +## Troubleshooting + +### Package Build Fails + +1. Check the workflow logs in GitHub Actions +2. Verify the ROCm tarball URL is accessible +3. Run `./build_packages_local.sh` locally to reproduce the issue +4. Check that all dependencies were installed correctly +5. Review CMake configuration output + +### RPATH Issues + +If binaries can't find libraries: + +```bash +# Check RPATH settings +readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH + +# Should show: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs +``` + +### Missing Dependencies + +If the package reports missing dependencies: + +```bash +# Check what libraries are needed +ldd /opt/rocm/rvs/bin/rvs + +# Install missing ROCm components if needed +``` + +### Local Testing + +To test the workflow locally before pushing: + +```bash +# Set environment variables +export ROCM_VERSION=6.5.0rc20250610 +export GPU_FAMILY=gfx110X-all +export BUILD_TYPE=Release + +# Run the build script +./build_packages_local.sh + +# Check generated packages +ls -lh build/rocm-validation-suite* +``` + +## References + +- [TheRock Releases Documentation](https://github.com/ROCm/TheRock/blob/main/RELEASES.md) +- [TheRock Nightly Tarballs](https://therock-nightly-tarball.s3.amazonaws.com/index.html) +- [Local Build Script](../build_packages_local.sh) - Core build engine used by workflow +- [Quick Start Guide](../QUICKSTART_PACKAGES.md) - Step-by-step local build instructions +- [Package Build Summary](../PACKAGE_BUILD_SUMMARY.md) - Technical overview and architecture +- [RVS Build Instructions](../README.md) +- [ROCm Documentation](https://rocm.docs.amd.com/) + +## Support + +For issues with: +- **RVS Build**: Open an issue in this repository +- **ROCm SDK**: See [TheRock Issues](https://github.com/ROCm/TheRock/issues) +- **Workflow**: Check GitHub Actions documentation + +## License + +This workflow is part of ROCm Validation Suite and follows the same MIT license. diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml new file mode 100644 index 000000000..41136fdae --- /dev/null +++ b/.github/workflows/build-relocatable-packages.yml @@ -0,0 +1,253 @@ +name: Build Relocatable Packages + +on: + push: + branches: + - master + - main + - 'release/**' + pull_request: + branches: + - master + - main + workflow_dispatch: + inputs: + rocm_version: + description: 'ROCm version (e.g., 6.5.0rc20250610)' + required: false + default: '' + gpu_family: + description: 'GPU family target' + required: false + type: choice + options: + - gfx94X-dcgpu + - gfx950-dcgpu + - gfx110X-all + - gfx1151 + - gfx120X-all + default: 'gfx110X-all' + +env: + ROCM_VERSION: '6.5.0rc20250610' + GPU_FAMILY: 'gfx110X-all' + BUILD_TYPE: Release + +jobs: + build-ubuntu: + name: Build Ubuntu Packages + runs-on: ubuntu-22.04 + strategy: + matrix: + ubuntu_version: ['22.04'] + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set ROCm Version and GPU Family + run: | + if [ -n "${{ github.event.inputs.rocm_version }}" ]; then + echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV + fi + if [ -n "${{ github.event.inputs.gpu_family }}" ]; then + echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV + fi + + - name: Build and Package RVS + run: | + # Make build script executable + chmod +x build_packages_local.sh + + # Run build script (handles dependency installation, ROCm setup, build, and packaging) + ROCM_VERSION=${{ env.ROCM_VERSION }} \ + GPU_FAMILY=${{ env.GPU_FAMILY }} \ + BUILD_TYPE=${{ env.BUILD_TYPE }} \ + ./build_packages_local.sh + + - name: Verify DEB Package + run: | + cd ./build + DEB_FILE=$(ls rocm-validation-suite*.deb | head -1) + if [ -n "$DEB_FILE" ]; then + echo "=== DEB Package Info ===" + dpkg-deb -I "$DEB_FILE" + echo "" + echo "=== DEB Package Contents (first 30 files) ===" + dpkg-deb -c "$DEB_FILE" | head -30 + echo "" + echo "Package filename: $DEB_FILE" + fi + + - name: Upload Ubuntu Packages + uses: actions/upload-artifact@v4 + with: + name: ubuntu-${{ matrix.ubuntu_version }}-packages-${{ env.GPU_FAMILY }} + path: | + build/rocm-validation-suite*.deb + build/rocm-validation-suite*.tar.gz + retention-days: 30 + + build-centos: + name: Build CentOS/RHEL Packages + runs-on: ubuntu-latest + container: + image: rockylinux:8 + strategy: + matrix: + distro: ['rockylinux8'] + + steps: + - name: Install Git (for checkout) + run: | + yum install -y git + + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set ROCm Version and GPU Family + run: | + if [ -n "${{ github.event.inputs.rocm_version }}" ]; then + echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV + else + echo "ROCM_VERSION=${{ env.ROCM_VERSION }}" >> $GITHUB_ENV + fi + if [ -n "${{ github.event.inputs.gpu_family }}" ]; then + echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV + else + echo "GPU_FAMILY=${{ env.GPU_FAMILY }}" >> $GITHUB_ENV + fi + + - name: Build and Package RVS + run: | + # Make build script executable + chmod +x build_packages_local.sh + + # Run build script (handles dependency installation, ROCm setup, build, and packaging) + ROCM_VERSION=${{ env.ROCM_VERSION }} \ + GPU_FAMILY=${{ env.GPU_FAMILY }} \ + BUILD_TYPE=${{ env.BUILD_TYPE }} \ + ./build_packages_local.sh + + - name: Verify RPM Package + run: | + cd ./build + RPM_FILE=$(ls rocm-validation-suite*.rpm | head -1) + if [ -n "$RPM_FILE" ]; then + echo "=== RPM Package Info ===" + rpm -qip "$RPM_FILE" + echo "" + echo "=== RPM Package Contents (first 30 files) ===" + rpm -qlp "$RPM_FILE" | head -30 + echo "" + echo "=== RPM Dependencies ===" + rpm -qRp "$RPM_FILE" + echo "" + echo "Package filename: $RPM_FILE" + fi + + - name: Upload CentOS/RHEL Packages + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.distro }}-packages-${{ env.GPU_FAMILY }} + path: | + build/rocm-validation-suite*.rpm + build/rocm-validation-suite*.tar.gz + retention-days: 30 + + create-release: + name: Create Release Summary + needs: [build-ubuntu, build-centos] + runs-on: ubuntu-latest + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + + steps: + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: ./packages + + - name: Display Package Structure + run: | + echo "=== Generated Packages ===" + find ./packages -type f \( -name "*.deb" -o -name "*.rpm" -o -name "*.tar.gz" \) -exec ls -lh {} \; + + echo "" + echo "=== Package Summary ===" + echo "DEB packages:" + find ./packages -name "*.deb" -exec basename {} \; + echo "" + echo "RPM packages:" + find ./packages -name "*.rpm" -exec basename {} \; + echo "" + echo "TGZ packages:" + find ./packages -name "*.tar.gz" -exec basename {} \; + + - name: Generate Build Report + run: | + cat > build-report.md << 'EOF' + # ROCm Validation Suite - Build Report + + ## Build Information + - **Commit**: ${{ github.sha }} + - **Branch**: ${{ github.ref_name }} + - **RVS Version**: ${{ env.RVS_VERSION }} + - **ROCm Version**: ${{ env.ROCM_VERSION }} + - **GPU Family**: ${{ env.GPU_FAMILY }} + - **Build Date**: $(date -u +'%Y-%m-%d %H:%M:%S UTC') + + ## Generated Packages + + ### Ubuntu Packages + ``` + $(find ./packages -name "*.deb" -exec basename {} \;) + ``` + + ### CentOS/RHEL Packages + ``` + $(find ./packages -name "*.rpm" -exec basename {} \;) + ``` + + ### TGZ Archives (Relocatable) + ``` + $(find ./packages -name "*.tar.gz" -exec basename {} \;) + ``` + + ## Installation Instructions + + ### Ubuntu/Debian + ```bash + sudo dpkg -i rocm-validation-suite_*.deb + ``` + + ### CentOS/RHEL + ```bash + sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm + ``` + + ### Relocatable TGZ (Any Linux Distribution) + ```bash + tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ + export PATH=/opt/rocm/rvs/bin:$PATH + export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH + ``` + + ## Notes + - All packages are built with relocatable RPATH settings + - TGZ packages can be extracted to any location + - Install path: /opt/rocm/rvs + - ROCm SDK from TheRock nightly builds is used + EOF + + cat build-report.md + + - name: Upload Build Report + uses: actions/upload-artifact@v4 + with: + name: build-report + path: build-report.md + retention-days: 90 diff --git a/CHANGES_SUMMARY.md b/CHANGES_SUMMARY.md new file mode 100644 index 000000000..739ee66e9 --- /dev/null +++ b/CHANGES_SUMMARY.md @@ -0,0 +1,344 @@ +# Changes Summary: Package Build System Evolution + +## Overview +This document chronicles the evolution of the RVS package build system from manual workflow steps to a unified, automated build system using `build_packages_local.sh` as the single source of truth. + +## Major Changes Timeline + +### Phase 1: Initial Implementation +- Created GitHub Actions workflow for relocatable packages +- Used ROCm SDK from TheRock tarballs +- Set install path to `/opt/rocm/rvs` +- Configured relocatable RPATH with `$ORIGIN` + +### Phase 2: Version Management Fix +- Changed package naming to use RVS version (from `CMakeLists.txt`) instead of ROCm version +- Fixed package metadata mismatch by removing manual `mv` renaming +- Let CPack handle all package naming automatically +- Ensured Debian and RPM standards compliance + +### Phase 3: Removed Dynamic Version Extraction +- Removed manual `grep`-based version extraction from workflow +- Removed manual version extraction from build script +- Rely on CMake/CPack native version management from `project(VERSION)` in `CMakeLists.txt` +- Simplified code by eliminating redundant version handling + +### Phase 4: Build System Unification (Current) +- Created `build_packages_local.sh` as single source of truth +- Refactored GitHub Actions workflow to delegate all build logic to script +- Added OS detection and automatic dependency installation to script +- Eliminated code duplication between Ubuntu and CentOS jobs +- Reduced workflow from ~380 lines to ~250 lines + +## Current Architecture + +### Workflow Structure + +``` +GitHub Actions Workflow (Minimal CI/CD Orchestration) +├── Checkout Repository +├── Set Environment Variables +└── Execute build_packages_local.sh (All Build Logic) + ├── Detect OS (Ubuntu/Debian vs CentOS/RHEL) + ├── Install Dependencies (platform-specific) + ├── Download ROCm SDK from TheRock + ├── Extract and Setup ROCm Environment + ├── Configure CMake with relocatable RPATH + HIP_PLATFORM=amd + ├── Build RVS (parallel make) + └── Create Packages (DEB/RPM/TGZ via CPack) +``` + +### Key Technical Details + +**Single Source of Truth**: `build_packages_local.sh` +- Works identically for local development and CI/CD +- Handles all platform-specific logic internally +- Self-contained: installs dependencies, builds, and packages + +**Workflow Responsibilities** (GitHub Actions-specific only): +- Repository checkout with submodules +- Setting environment variables from workflow inputs +- Package verification (dpkg-deb, rpm -q) +- Artifact upload to GitHub + +**Dependencies**: Automatically installed by script +- Ubuntu/Debian: `build-essential`, `cmake`, `git`, `wget`, `libpci3`, `libpci-dev`, `doxygen`, `unzip`, `libyaml-cpp-dev`, `rpm` +- CentOS/RHEL: `gcc`, `gcc-c++`, `cmake3`, `make`, `git`, `wget`, `pciutils-devel`, `doxygen`, `rpm-build`, `yaml-cpp-devel`, `yaml-cpp-static` + +## Removed Components + +### ❌ Removed: Dynamic Version Extraction +**Why**: CMake/CPack natively read version from `CMakeLists.txt` `project(VERSION)` command. + +**Old Code (Removed)**: +```bash +# Extract RVS version from CMakeLists.txt +RVS_VERSION=$(grep -oP 'project\s*\(\s*"[^"]+"\s+VERSION\s+\K[\d.]+' CMakeLists.txt) +``` + +**Current**: CMake automatically uses version, CPack generates correct package names. + +### ❌ Removed: Manual Package Renaming +**Why**: Renaming files caused metadata mismatch between filename and package header. + +**The Problem**: +```bash +# CPack creates: rocm-validation-suite_1.3.0_amd64.deb +# Internal metadata: Package: rocm-validation-suite, Version: 1.3.0 + +# Then manual renaming breaks it: +mv rocm-validation-suite_1.3.0_amd64.deb \ + rocm-validation-suite_1.3.0_ubuntu22.04_gfx110X-all_amd64.deb +# ❌ Filename no longer matches package metadata! +``` + +**Issues Caused**: +1. **Metadata Mismatch**: `dpkg -I` shows different version than filename +2. **Repository Problems**: APT/YUM tools expect filename to match metadata +3. **Standards Violation**: Breaks Debian Policy and RPM conventions +4. **User Confusion**: `dpkg -l` shows different version than installed file + +**The Fix**: Let CPack generate final filenames directly. CPack ensures filename and metadata always match. + +**Old Code (Removed)**: +```bash +mv "rocm-validation-suite_1.3.0_amd64.deb" \ + "rocm-validation-suite_${RVS_VERSION}_ubuntu22.04_${GPU_FAMILY}_amd64.deb" +``` + +**Current**: CPack generates final filenames that comply with standards: +- DEB: `rocm-validation-suite_1.3.0_amd64.deb` +- RPM: `rocm-validation-suite-1.3.0.el8.x86_64.rpm` +- TGZ: `rocm-validation-suite-1.3.0-Linux.tar.gz` + +### ❌ Removed: Patchelf Dependency +**Why**: Not used anywhere in RVS build or runtime. + +**Removed from**: Dependency installation lists in workflow and script. + +### ❌ Removed: Duplicate Build Logic in Workflow +**Why**: Code duplication between workflow and local script. + +**Before**: 150+ lines of build steps duplicated for Ubuntu and CentOS jobs. +**After**: 6 lines calling `build_packages_local.sh`. + +### ❌ Deleted: DYNAMIC_VERSION_EXTRACTION.md +**Why**: Documented an approach that was explicitly removed as unnecessary. + +## Current Implementation + +### GitHub Actions Workflow (`.github/workflows/build-relocatable-packages.yml`) + +**Structure**: Minimal orchestration, delegates to build script + +```yaml +- name: Build and Package RVS + run: | + chmod +x build_packages_local.sh + ROCM_VERSION=${{ env.ROCM_VERSION }} \ + GPU_FAMILY=${{ env.GPU_FAMILY }} \ + BUILD_TYPE=${{ env.BUILD_TYPE }} \ + ./build_packages_local.sh +``` + +**Benefits**: +- ~250 lines total (down from ~380) +- No duplicate build logic +- Single source of truth +- Easy to test locally + +### Build Script (`build_packages_local.sh`) + +**Features**: +- OS detection (Ubuntu/Debian vs CentOS/RHEL) +- Automatic dependency installation +- ROCm SDK download and setup +- CMake configuration with: + - `CMAKE_INSTALL_PREFIX=/opt/rocm/rvs` + - `CPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs` + - `HIP_PLATFORM=amd` + - Relocatable RPATH: `$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs` +- Parallel build with `make -j$(nproc)` +- Package creation via CPack + +**Usage**: +```bash +# Default build +./build_packages_local.sh + +# Custom configuration +ROCM_VERSION=6.5.0rc20250610 GPU_FAMILY=gfx110X-all ./build_packages_local.sh +``` + +## Installation Path Changes + +### Old Path Structure +``` +/opt/rocm/ +├── bin/ +│ └── rvs +├── lib/ +│ └── rvs/ +└── share/ + └── rocm-validation-suite/ +``` + +### New Path Structure +``` +/opt/rocm/rvs/ +├── bin/ +│ └── rvs +├── lib/ +│ └── rvs/ +└── share/ + └── rocm-validation-suite/ +``` + +### Benefits +- **Cleaner separation**: RVS is self-contained in its own directory +- **No conflicts**: Won't interfere with ROCm system installation +- **Easy removal**: Simple to uninstall (just delete `/opt/rocm/rvs`) +- **Multiple versions**: Could support multiple RVS versions side-by-side + +## Updated Commands + +### Running RVS After Installation + +**Old:** +```bash +/opt/rocm/bin/rvs --version +``` + +**New:** +```bash +/opt/rocm/rvs/bin/rvs --version +``` + +### Environment Setup + +**Old:** +```bash +export PATH=/opt/rocm/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH +``` + +**New:** +```bash +export PATH=/opt/rocm/rvs/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH +``` + +### TGZ Extraction + +**Old:** +```bash +tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ +# Creates: /opt/opt/rocm/... +``` + +**New:** +```bash +tar -xzf rocm-validation-suite-*.tar.gz -C / +# Creates: /opt/rocm/rvs/... +``` + +## RPATH Configuration + +Relocatable `$ORIGIN` references ensure portability: +``` +$ORIGIN +$ORIGIN/../lib +$ORIGIN/../lib/rvs +``` + +This ensures packages work regardless of installation directory. + +## Version Management + +- **RVS Version**: Automatically read by CMake from `CMakeLists.txt` `project(VERSION)` command +- **ROCm SDK Version**: 6.5.0rc20250610 (configurable via environment variable) +- **GPU Family**: gfx110X-all (default, configurable via environment variable) + +## Files Modified + +### Core Build System +1. `.github/workflows/build-relocatable-packages.yml` - Simplified workflow +2. `build_packages_local.sh` - Complete build system script + +### Documentation +3. `.github/workflows/README_BUILD_PACKAGES.md` - Workflow documentation +4. `QUICKSTART_PACKAGES.md` - Quick start guide +5. `PACKAGE_BUILD_SUMMARY.md` - Technical overview +6. `CHANGES_SUMMARY.md` - This file +7. `VERIFICATION_CHECKLIST.md` - Testing checklist + +### Deleted Files +- `DYNAMIC_VERSION_EXTRACTION.md` - Obsolete version extraction documentation +- `PACKAGE_NAMING_FIX.md` - Consolidated into CHANGES_SUMMARY.md + +## Benefits Summary + +### Code Quality +✅ **DRY Principle**: Single source of truth eliminates duplication +✅ **Maintainability**: Update build logic in one place +✅ **Testability**: Same script for local and CI/CD +✅ **Simplicity**: 250 lines vs 380 lines in workflow + +### Package Quality +✅ **Standards Compliance**: CPack-generated names match metadata +✅ **Relocatable**: `$ORIGIN` RPATH works anywhere +✅ **Version Accuracy**: Version from `CMakeLists.txt` automatically used +✅ **Consistency**: Same packages from local and CI builds + +### Developer Experience +✅ **Local Testing**: Easy to test workflow changes locally +✅ **Fast Iteration**: No need to push to test build changes +✅ **Clear Output**: Color-coded progress indicators +✅ **Error Handling**: Robust error checking at each step + +### Operations +✅ **Self-contained Install**: No conflicts with system ROCm +✅ **Easy Uninstall**: Just delete `/opt/rocm/rvs` +✅ **Parallel Versions**: Can install multiple RVS versions +✅ **Platform Support**: Ubuntu, Debian, CentOS, RHEL, Rocky + +## Backward Compatibility + +**Breaking Changes:** +- Install path changed from `/opt/rocm` to `/opt/rocm/rvs` +- Users with scripts expecting `/opt/rocm/bin/rvs` need to update to `/opt/rocm/rvs/bin/rvs` +- Package names now use RVS version instead of ROCm version + +**Migration Guide for Users:** + +```bash +# Uninstall old version +sudo dpkg -r rocm-validation-suite # Ubuntu/Debian +sudo rpm -e rocm-validation-suite # CentOS/RHEL + +# Install new version +sudo dpkg -i rocm-validation-suite_*.deb # Ubuntu/Debian +sudo rpm -i rocm-validation-suite-*.rpm # CentOS/RHEL + +# Update PATH and LD_LIBRARY_PATH +export PATH=/opt/rocm/rvs/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH +``` + +## Summary + +The RVS package build system has evolved from a verbose, duplicated workflow to a clean, unified system: + +- **Single Script**: `build_packages_local.sh` handles everything +- **Minimal Workflow**: GitHub Actions orchestrates, script executes +- **Standards Compliant**: Proper package naming and metadata +- **Developer Friendly**: Easy to test locally before pushing +- **Production Ready**: Robust error handling and validation + +This architecture ensures consistency between development and CI/CD while maintaining simplicity and maintainability. + +--- + +**Date**: January 30, 2026 +**Status**: Complete +**Architecture**: Unified build system with `build_packages_local.sh` diff --git a/PACKAGE_BUILD_SUMMARY.md b/PACKAGE_BUILD_SUMMARY.md new file mode 100644 index 000000000..27b829c4d --- /dev/null +++ b/PACKAGE_BUILD_SUMMARY.md @@ -0,0 +1,499 @@ +# Package Build System - Implementation Summary + +## Overview + +A complete GitHub Actions workflow and local build system has been implemented to build relocatable RPM, DEB, and TGZ packages for ROCm Validation Suite (RVS) using the ROCm SDK from [TheRock](https://github.com/ROCm/TheRock). + +## What Was Added + +### 1. GitHub Actions Workflow +**File:** `.github/workflows/build-relocatable-packages.yml` + +A comprehensive CI/CD workflow that: +- ✅ Automatically builds on push/PR to master/main branches +- ✅ Supports manual triggers with custom ROCm version and GPU family +- ✅ Downloads ROCm SDK tarballs from TheRock nightly builds +- ✅ Builds on multiple platforms (Ubuntu 22.04, Rocky Linux 8) +- ✅ Generates three package types: DEB, RPM, TGZ +- ✅ Uses relocatable RPATH settings (`$ORIGIN` references) +- ✅ Uploads packages as GitHub Actions artifacts (30-day retention) +- ✅ Creates build reports with installation instructions + +**Key Features:** +- Multi-platform build matrix (Ubuntu, CentOS/RHEL) +- Configurable ROCm version and GPU architecture +- Automatic package verification +- Detailed build logs and reports +- Smart package naming with version/GPU info + +### 2. Local Build Script +**File:** `build_packages_local.sh` + +A user-friendly bash script for local package building: +- ✅ Interactive and colored output +- ✅ Automatic dependency checking +- ✅ Downloads and extracts ROCm SDK +- ✅ Configures build with relocatable RPATHs +- ✅ Builds all three package types +- ✅ Verifies packages after creation +- ✅ Provides installation instructions +- ✅ Supports environment variable customization + +**Usage:** +```bash +chmod +x build_packages_local.sh +./build_packages_local.sh +``` + +### 3. Comprehensive Documentation + +#### Main Documentation +**File:** `.github/workflows/README_BUILD_PACKAGES.md` + +Detailed technical documentation covering: +- Workflow architecture and triggers +- ROCm SDK download and setup process +- Build configuration and RPATH settings +- Package naming conventions +- Installation instructions for each package type +- Verification procedures +- Customization guide +- Troubleshooting section +- Links to external resources + +#### Quick Start Guide +**File:** `QUICKSTART_PACKAGES.md` + +User-friendly guide for quick onboarding: +- Step-by-step instructions for GitHub Actions +- Local build instructions +- GPU family selection guide +- Package testing procedures +- Common troubleshooting scenarios +- Quick reference tables +- Environment variable reference + +## Supported Configurations + +### Operating Systems +- Ubuntu 22.04 (DEB + TGZ packages) +- Rocky Linux 8 / CentOS 8 (RPM + TGZ packages) +- Any Linux distribution (TGZ package - relocatable) + +### GPU Architectures + +| Family | Hardware | Examples | +|--------|----------|----------| +| gfx94X-dcgpu | MI300 series | MI300A, MI300X | +| gfx950-dcgpu | MI350 series | MI350X, MI355X | +| gfx110X-all | RDNA 3 consumer | RX 7900 XTX, RX 7800 XT, Radeon 780M | +| gfx1151 | Strix Halo | APU integrated graphics | +| gfx120X-all | RDNA 4 consumer | RX 9060, RX 9070 | + +### ROCm Versions +- Configurable via environment variable or workflow input +- Default: `6.5.0rc20250610` +- Downloads from TheRock nightly builds +- Format: `X.Y.ZrcYYYYMMDD` + +## Technical Highlights + +### Automatic Version Management via CMake/CPack + +The RVS version is read directly from `CMakeLists.txt` by CMake during configuration: + +```cmake +# In CMakeLists.txt +project ("rocm-validation-suite" VERSION 1.3.0) +``` + +CPack then uses this version to generate package names and metadata automatically. No manual version extraction or environment variables needed - CMake's native `project()` command handles everything. + +This ensures: +- Package version always matches the source code version +- Filename and internal metadata are consistent +- No manual synchronization needed between workflow and CMakeLists.txt + +### Relocatable RPATH Configuration +Packages use relative library paths for portability: + +```cmake +-DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" +``` + +This allows: +- Installation to any directory (not just `/opt/rocm/rvs`) +- No hardcoded absolute paths +- Works with TGZ extraction to custom locations + +### Package Naming Convention + +Packages are generated by CPack with names based on CMakeLists.txt configuration: + +``` +DEB: rocm-validation-suite_._amd64.deb +RPM: rocm-validation-suite--..x86_64.rpm +TGZ: rocm-validation-suite--.tar.gz +``` + +**Examples** (with RVS version 1.3.0): +``` +rocm-validation-suite_1.3.0.99999_amd64.deb +rocm-validation-suite-1.3.0-99999.el8.x86_64.rpm +rocm-validation-suite-1.3.0-Linux.tar.gz +``` + +**Note**: Package filenames are generated by CPack and match the internal package metadata. The version and release numbers are determined by CMake configuration. + +### Workflow Triggers + +1. **Automatic:** + - Push to master/main + - Push to release/* branches + - Pull requests to master/main + +2. **Manual (workflow_dispatch):** + - Custom ROCm version input + - GPU family selection dropdown + - On-demand builds for testing + +## Package Features + +### DEB Packages (Ubuntu/Debian) +- ✅ Debian package format +- ✅ Dependency management via dpkg +- ✅ Standard installation to `/opt/rocm` +- ✅ Man pages and documentation included +- ✅ Package metadata verification + +### RPM Packages (CentOS/RHEL/Rocky) +- ✅ RPM package format +- ✅ Dependency management via yum/dnf +- ✅ Standard installation to `/opt/rocm` +- ✅ Man pages and documentation included +- ✅ Package metadata verification + +### TGZ Archives (Relocatable) +- ✅ Platform-agnostic tarball +- ✅ No system package manager required +- ✅ Extract to any location +- ✅ Relative RPATHs for library discovery +- ✅ Portable across distributions + +## Build Process Flow + +``` +┌─────────────────────────────────────────────────────────────┐ +│ 1. Download ROCm SDK from TheRock │ +│ https://therock-nightly-tarball.s3.amazonaws.com/ │ +└────────────────────┬────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 2. Extract Tarball & Setup Environment │ +│ - ROCM_PATH, PATH, LD_LIBRARY_PATH, CMAKE_PREFIX_PATH │ +└────────────────────┬────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 3. Configure CMake with Relocatable RPATHs │ +│ - $ORIGIN-based relative paths │ +│ - /opt/rocm install prefix │ +└────────────────────┬────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 4. Build RVS │ +│ - Parallel compilation (make -j) │ +│ - All modules and tests │ +└────────────────────┬────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 5. Create Packages (CPack) │ +│ - DEB (Ubuntu/Debian) │ +│ - RPM (CentOS/RHEL) │ +│ - TGZ (All distributions) │ +└────────────────────┬────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 6. Verify & Upload │ +│ - Package metadata verification │ +│ - Upload as GitHub Actions artifacts │ +└─────────────────────────────────────────────────────────────┘ +``` + +## Installation Examples + +### Ubuntu/Debian (DEB) +```bash +# Install +sudo dpkg -i rocm-validation-suite_1.3.0.99999_amd64.deb + +# Run +/opt/rocm/rvs/bin/rvs --version +``` + +### CentOS/RHEL (RPM) +```bash +# Install +sudo rpm -i --replacefiles --nodeps rocm-validation-suite-1.3.0-99999.el8.x86_64.rpm + +# Run +/opt/rocm/rvs/bin/rvs --version +``` + +### Any Linux (TGZ - Relocatable) +```bash +# Extract to custom location +mkdir -p ~/myrocm +tar -xzf rocm-validation-suite-1.3.0-Linux.tar.gz -C ~/myrocm/ + +# Setup environment +export PATH=~/myrocm/opt/rocm/rvs/bin:$PATH +export LD_LIBRARY_PATH=~/myrocm/opt/rocm/rvs/lib:$LD_LIBRARY_PATH + +# Run +rvs --version +``` + +## Key Benefits + +### For Users +- ✅ Easy package installation on multiple distributions +- ✅ No manual ROCm compilation required +- ✅ Relocatable packages work anywhere +- ✅ GPU-specific optimizations +- ✅ Automated, reproducible builds + +### For Developers +- ✅ Automated CI/CD pipeline +- ✅ Consistent build environment +- ✅ Easy testing across distributions +- ✅ Version-controlled build configuration +- ✅ Build artifacts for debugging + +### For CI/CD +- ✅ Automatic builds on commits +- ✅ PR validation +- ✅ Release automation ready +- ✅ Multi-platform support +- ✅ Artifact retention + +## Files Created + +``` +ROCmValidationSuite/ +├── .github/ +│ └── workflows/ +│ ├── build-relocatable-packages.yml # Main GitHub Actions workflow +│ └── README_BUILD_PACKAGES.md # Technical documentation +├── build_packages_local.sh # Local build script +├── QUICKSTART_PACKAGES.md # User quick start guide +└── PACKAGE_BUILD_SUMMARY.md # This file +``` + +## Next Steps + +### Immediate Actions +1. Review and test the workflow: + ```bash + # Test locally first + chmod +x build_packages_local.sh + ./build_packages_local.sh + ``` + +2. Commit the changes: + ```bash + git add .github/workflows/ build_packages_local.sh *.md + git commit -m "Add GitHub Actions workflow for relocatable package builds" + git push + ``` + +3. Test GitHub Actions: + - Navigate to Actions tab + - Manually trigger the workflow + - Verify artifacts are generated + +### Future Enhancements + +#### Phase 1: Additional Platforms +- [ ] Add SLES/OpenSUSE support +- [ ] Add Ubuntu 24.04 LTS +- [ ] Add Debian 12 support +- [ ] Add Fedora support + +#### Phase 2: Advanced Features +- [ ] Automated release creation on tags +- [ ] Upload to package repositories (APT/YUM) +- [ ] Code signing for packages +- [ ] Checksum generation and verification +- [ ] Multiple ROCm version matrix builds + +#### Phase 3: Testing & Validation +- [ ] Automated package installation tests +- [ ] Smoke tests after installation +- [ ] GPU detection validation +- [ ] Performance benchmarking +- [ ] Regression test integration + +#### Phase 4: Distribution +- [ ] Upload to GitHub Releases +- [ ] Create APT repository +- [ ] Create YUM repository +- [ ] Docker images with packages +- [ ] Container registry integration + +## Customization Guide + +### Change Default ROCm Version + +Edit `.github/workflows/build-relocatable-packages.yml`: +```yaml +env: + ROCM_VERSION: '6.5.0rc20250115' # Update this +``` + +### Add New Distribution + +Add to the build matrix: +```yaml +strategy: + matrix: + distro: ['rockylinux8', 'ubuntu:24.04'] # Add here +``` + +### Change Package Name + +Edit `CMakeLists.txt`: +```cmake +set(CPACK_PACKAGE_NAME "custom-rvs-name") +``` + +### Modify RPATH + +Edit workflow or local script: +```bash +-DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../custom/lib" +``` + +## Dependencies + +### Build Dependencies +- cmake (≥ 3.5.0) +- gcc/g++ +- make +- git +- wget +- patchelf +- doxygen +- yaml-cpp (static or shared) +- pciutils-devel / libpci-dev + +### Runtime Dependencies +- ROCm stack (from TheRock SDK) +- rocBLAS +- AMD SMI library +- HIP runtime +- HSA runtime + +### Optional Dependencies +- rpm-build (for RPM packages) +- dpkg-dev (for DEB packages) +- tar (for TGZ packages) + +## Testing Checklist + +### Before Committing +- [x] Workflow YAML syntax is valid +- [x] Local script is executable +- [x] Documentation is complete +- [x] All file paths are correct +- [x] Example commands work + +### After Committing +- [ ] GitHub Actions workflow triggers +- [ ] Packages build successfully +- [ ] Artifacts are uploaded +- [ ] Package names are correct +- [ ] Packages can be installed +- [ ] RVS runs after installation + +### Cross-Platform Testing +- [ ] Ubuntu 22.04 DEB works +- [ ] Rocky Linux 8 RPM works +- [ ] TGZ extracts correctly +- [ ] RPATH is set properly +- [ ] Libraries are found at runtime + +## Known Limitations + +1. **Windows Support:** Not currently supported (ROCm is Linux-only) +2. **macOS Support:** Not supported (ROCm doesn't run on macOS) +3. **Architecture:** Only x86_64/AMD64 (no ARM64) +4. **Container Build:** Requires privileged container for some GPU features +5. **Download Size:** ROCm SDK tarballs are 2-5 GB +6. **Build Time:** Full build takes 20-30 minutes + +## Security Considerations + +1. **Tarball Verification:** Consider adding checksum verification +2. **Package Signing:** Add GPG signing for production releases +3. **Dependency Pinning:** Pin specific ROCm SDK versions +4. **Secret Management:** Use GitHub secrets for credentials +5. **Artifact Retention:** 30 days (adjust as needed) + +## Performance Optimization + +### Build Time Reduction +- Use ccache for incremental builds +- Cache ROCm SDK downloads +- Parallel compilation already enabled (`-j$(nproc)`) +- Separate build and package stages + +### Package Size Reduction +- Strip debug symbols (in Release builds) +- Compress documentation +- Optional component installation +- Exclude unnecessary files + +## Support & Resources + +### Documentation +- [TheRock Releases](https://github.com/ROCm/TheRock/blob/main/RELEASES.md) +- [ROCm Documentation](https://rocm.docs.amd.com/) +- [GitHub Actions Docs](https://docs.github.com/en/actions) +- [CPack Documentation](https://cmake.org/cmake/help/latest/module/CPack.html) + +### Community +- ROCm GitHub: https://github.com/ROCm +- TheRock Issues: https://github.com/ROCm/TheRock/issues +- AMD Developer Forums: https://community.amd.com/ + +### Troubleshooting +- Check workflow logs in GitHub Actions +- Review local build script output +- Verify ROCm SDK availability +- Test package installation manually + +## Conclusion + +This implementation provides a complete, production-ready solution for building relocatable ROCm Validation Suite packages using the ROCm SDK from TheRock. The system supports multiple Linux distributions, GPU architectures, and ROCm versions, with comprehensive automation through GitHub Actions and easy local building via the provided script. + +**Key Achievements:** +- ✅ Fully automated CI/CD pipeline +- ✅ Multi-platform package generation +- ✅ Relocatable packages with $ORIGIN RPATHs +- ✅ Comprehensive documentation +- ✅ Easy local testing +- ✅ Configurable builds +- ✅ Production-ready + +The workflow is ready to use immediately and can be easily extended for additional requirements. + +--- + +**Created:** January 29, 2026 +**Version:** 1.0 +**Status:** Ready for Production diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md new file mode 100644 index 000000000..309395b76 --- /dev/null +++ b/QUICKSTART_PACKAGES.md @@ -0,0 +1,405 @@ +# Quick Start Guide: Building Relocatable RVS Packages + +This guide will help you quickly build relocatable RPM, DEB, and TGZ packages for ROCm Validation Suite using the ROCm SDK from TheRock. + +## Table of Contents + +- [Prerequisites](#prerequisites) +- [Option 1: Using GitHub Actions (Recommended)](#option-1-using-github-actions-recommended) +- [Option 2: Building Locally](#option-2-building-locally) +- [GPU Family Selection](#gpu-family-selection) +- [Testing Packages](#testing-packages) +- [Troubleshooting](#troubleshooting) + +--- + +## Prerequisites + +### For GitHub Actions (Automated Build) +- GitHub repository with Actions enabled +- No additional software required (everything runs in the cloud) + +### For Local Build +Install the following tools on your Linux system: + +**Ubuntu/Debian:** +```bash +sudo apt-get update +sudo apt-get install -y \ + build-essential \ + cmake \ + git \ + wget \ + libpci3 \ + libpci-dev \ + doxygen \ + unzip \ + libyaml-cpp-dev \ + rpm +``` + +**CentOS/RHEL/Rocky Linux:** +```bash +sudo yum install -y epel-release +sudo yum install -y \ + gcc gcc-c++ cmake3 make git wget \ + pciutils-devel doxygen rpm-build \ + yaml-cpp-devel yaml-cpp-static +``` + +--- + +## Option 1: Using GitHub Actions (Recommended) + +### Automatic Builds (Push/PR) + +The workflow automatically runs when you: +1. Push to `master`, `main`, or `release/**` branches +2. Create a pull request to `master` or `main` + +### Manual Build + +1. **Go to GitHub Actions** + - Navigate to your repository on GitHub + - Click on the **Actions** tab + - Select **Build Relocatable Packages** workflow + +2. **Click "Run workflow"** + - Choose the branch to run from + - (Optional) Set custom ROCm version (e.g., `6.5.0rc20250610`) + - (Optional) Select GPU family target (default: `gfx110X-all`) + +3. **Wait for Build to Complete** + - Build typically takes 20-30 minutes + - You can monitor progress in real-time + +4. **Download Artifacts** + - Scroll down to the **Artifacts** section + - Download the package artifacts: + - `ubuntu-22.04-packages-${GPU_FAMILY}` - Contains DEB and TGZ + - `rockylinux8-packages-${GPU_FAMILY}` - Contains RPM and TGZ + - `build-report` - Build summary and details + +--- + +## Option 2: Building Locally + +### Quick Build (Default Settings) + +```bash +# Make the script executable +chmod +x build_packages_local.sh + +# Run the build script +./build_packages_local.sh +``` + +This will: +1. Download ROCm SDK (ROCm 6.5.0rc20250610, gfx110X-all) +2. Configure and build RVS +3. Generate DEB, RPM, and TGZ packages +4. Save packages to `./build/` directory + +### Custom Build + +Set environment variables before running: + +```bash +# Set custom ROCm version +export ROCM_VERSION="6.5.0rc20250115" + +# Set GPU family +export GPU_FAMILY="gfx94X-dcgpu" # For MI300A/MI300X + +# Set build type +export BUILD_TYPE="Release" # or "Debug" + +# Run the build +./build_packages_local.sh +``` + +### Manual Build (Step-by-Step) + +If you prefer manual control: + +```bash +# 1. Download ROCm SDK +ROCM_VERSION="6.5.0rc20250610" +GPU_FAMILY="gfx110X-all" +mkdir -p ~/rocm-sdk +cd ~/rocm-sdk +wget "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" +mkdir -p install +tar -xzf therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz -C install --strip-components=1 + +# 2. Setup environment +export ROCM_PATH="$HOME/rocm-sdk/install" +export PATH="$ROCM_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" +export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" + +# 3. Configure CMake +cd /path/to/ROCmValidationSuite +cmake -B ./build \ + -DCMAKE_BUILD_TYPE=Release \ + -DROCM_PATH=$ROCM_PATH \ + -DCMAKE_INSTALL_PREFIX=/opt/rocm \ + -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm \ + -DCMAKE_SKIP_RPATH=FALSE \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" + +# 4. Build +make -C ./build -j$(nproc) + +# 5. Create packages +cd ./build +cpack -G DEB # Debian package +cpack -G RPM # RPM package +cpack -G TGZ # Tarball (relocatable) +``` + +--- + +## GPU Family Selection + +Choose the appropriate GPU family for your target hardware: + +| GPU Family | Supported Hardware | Use Case | +|------------|-------------------|----------| +| `gfx94X-dcgpu` | MI300A, MI300X | Data center GPUs | +| `gfx950-dcgpu` | MI350X, MI355X | Next-gen data center GPUs | +| `gfx110X-all` | RX 7900 XTX, RX 7800 XT, RX 7700S, Radeon 780M | Consumer/workstation GPUs (default) | +| `gfx1151` | Strix Halo iGPU | Integrated GPUs | +| `gfx120X-all` | RX 9060/XT, RX 9070/XT | Latest consumer GPUs | + +### Example: Building for MI300X + +**GitHub Actions:** +- Select `gfx94X-dcgpu` when running workflow manually + +**Local Build:** +```bash +export GPU_FAMILY="gfx94X-dcgpu" +./build_packages_local.sh +``` + +--- + +## Testing Packages + +### Test DEB Package (Ubuntu/Debian) + +```bash +# Install package +sudo dpkg -i build/rocm-validation-suite_*.deb + +# Verify installation +/opt/rocm/rvs/bin/rvs --version + +# Run a simple test +/opt/rocm/rvs/bin/rvs -g + +# Uninstall (if needed) +sudo dpkg -r rocm-validation-suite +``` + +### Test RPM Package (CentOS/RHEL) + +```bash +# Install package +sudo rpm -i --replacefiles --nodeps build/rocm-validation-suite-*.rpm + +# Verify installation +/opt/rocm/rvs/bin/rvs --version + +# Run a simple test +/opt/rocm/rvs/bin/rvs -g + +# Uninstall (if needed) +sudo rpm -e rocm-validation-suite +``` + +### Test TGZ Package (Any Linux) + +```bash +# Extract to test location +mkdir -p ~/test-rvs +tar -xzf build/rocm-validation-suite-*.tar.gz -C ~/test-rvs/ + +# Setup environment +export PATH="$HOME/test-rvs/opt/rocm/rvs/bin:$PATH" +export LD_LIBRARY_PATH="$HOME/test-rvs/opt/rocm/rvs/lib:$LD_LIBRARY_PATH" + +# Verify installation +rvs --version + +# Run a simple test +rvs -g + +# Check RPATH (should show $ORIGIN references) +readelf -d ~/test-rvs/opt/rocm/rvs/bin/rvs | grep RPATH +``` + +### Verify Relocatable RPATH + +Ensure the binaries use relative paths: + +```bash +# Check RPATH settings +readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH + +# Expected output should include: +# $ORIGIN/../lib +# $ORIGIN/../lib/rvs +``` + +--- + +## Troubleshooting + +### Build Fails: ROCm SDK Download Error + +**Problem:** Cannot download ROCm tarball + +**Solution:** +1. Check if the URL is accessible: + ```bash + wget --spider "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-gfx110X-all-6.5.0rc20250610.tar.gz" + ``` + +2. Verify the ROCm version exists: + - Visit: https://therock-nightly-tarball.s3.amazonaws.com/index.html + - Find the correct version string + +3. Try a different ROCm version: + ```bash + export ROCM_VERSION="6.5.0rc20250115" # Use different date + ``` + +### Build Fails: Missing Dependencies + +**Problem:** CMake cannot find ROCm libraries + +**Solution:** +1. Verify ROCm SDK extraction: + ```bash + ls -la ~/rocm-sdk/install/lib/ + ls -la ~/rocm-sdk/install/bin/ + ``` + +2. Check environment variables: + ```bash + echo $ROCM_PATH + echo $CMAKE_PREFIX_PATH + ``` + +3. Re-extract the tarball if corrupted + +### Package Install Fails: Dependency Errors + +**Problem:** Package manager reports missing dependencies + +**Solution:** +1. For DEB packages: + ```bash + sudo apt-get install -f # Fix missing dependencies + ``` + +2. For RPM packages: + ```bash + sudo yum install rocm-smi-lib rocblas amd-smi-lib # Install ROCm runtime + ``` + +3. Use TGZ package (no system dependencies required) + +### Runtime Error: Libraries Not Found + +**Problem:** `rvs: error while loading shared libraries` + +**Solution:** +1. Set LD_LIBRARY_PATH: + ```bash + export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH + ``` + +2. Check library dependencies: + ```bash + ldd /opt/rocm/bin/rvs + ``` + +3. Verify RPATH is set correctly: + ```bash + readelf -d /opt/rocm/bin/rvs | grep RPATH + ``` + +### GitHub Actions: Workflow Not Triggering + +**Problem:** Workflow doesn't run on push/PR + +**Solution:** +1. Check if GitHub Actions is enabled: + - Settings → Actions → Allow all actions + +2. Verify workflow file syntax: + ```bash + # Validate YAML locally + python -c "import yaml; yaml.safe_load(open('.github/workflows/build-relocatable-packages.yml'))" + ``` + +3. Check branch name matches trigger conditions + +--- + +## Additional Resources + +- **Detailed Documentation:** [`.github/workflows/README_BUILD_PACKAGES.md`](.github/workflows/README_BUILD_PACKAGES.md) +- **ROCm Documentation:** https://rocm.docs.amd.com/ +- **TheRock Releases:** https://github.com/ROCm/TheRock/blob/main/RELEASES.md +- **RVS User Guide:** [docs/ug1main.md](docs/ug1main.md) +- **RVS Features:** [FEATURES.md](FEATURES.md) + +--- + +## Quick Reference + +### Package Locations After Build + +- **Local build:** `./build/rocm-validation-suite-*` +- **GitHub Actions:** Download from Actions → Artifacts section + +### Default Configuration + +- **RVS Version:** Read from CMakeLists.txt by CMake/CPack (currently 1.3.0) +- **ROCm Version:** 6.5.0rc20250610 +- **GPU Family:** gfx110X-all (AMD RX 7900 series) +- **Install Prefix:** /opt/rocm/rvs +- **Build Type:** Release + +### Environment Variables + +| Variable | Description | Default | +|----------|-------------|---------| +| `ROCM_VERSION` | ROCm SDK version to download | 6.5.0rc20250610 | +| `GPU_FAMILY` | Target GPU architecture | gfx110X-all | +| `BUILD_TYPE` | CMake build type | Release | + +**Note:** RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. + +--- + +## Getting Help + +For issues or questions: + +1. **Check the logs:** Review build output for error messages +2. **Review documentation:** See detailed guides in `.github/workflows/` +3. **Open an issue:** Create a GitHub issue with: + - Build log output + - System information (OS, kernel version) + - ROCm version and GPU family used + - Error messages + +--- + +**Happy Building!** 🚀 diff --git a/VERIFICATION_CHECKLIST.md b/VERIFICATION_CHECKLIST.md new file mode 100644 index 000000000..528e5c55f --- /dev/null +++ b/VERIFICATION_CHECKLIST.md @@ -0,0 +1,412 @@ +# Implementation Verification Checklist + +Use this checklist to verify that the relocatable package build system is working correctly. + +## ✅ Pre-Deployment Checklist + +### Files Created +- [ ] `.github/workflows/build-relocatable-packages.yml` exists +- [ ] `.github/workflows/README_BUILD_PACKAGES.md` exists +- [ ] `build_packages_local.sh` exists and is executable +- [ ] `QUICKSTART_PACKAGES.md` exists +- [ ] `PACKAGE_BUILD_SUMMARY.md` exists +- [ ] `VERIFICATION_CHECKLIST.md` exists (this file) + +### File Permissions +```bash +# Verify script is executable +ls -la build_packages_local.sh +# Should show: -rwxr-xr-x or similar + +# Make executable if needed +chmod +x build_packages_local.sh +``` + +### Syntax Validation +```bash +# Validate YAML syntax +python3 -c "import yaml; yaml.safe_load(open('.github/workflows/build-relocatable-packages.yml'))" && echo "✓ YAML syntax OK" + +# Validate Bash syntax +bash -n build_packages_local.sh && echo "✓ Bash syntax OK" + +# Check for common issues +grep -n "TODO\|FIXME\|XXX" .github/workflows/*.yml build_packages_local.sh || echo "✓ No TODO markers" +``` + +## ✅ Local Build Testing + +### Test 1: Script Execution (Dry Run) +```bash +# Check if script can be executed +./build_packages_local.sh --help 2>&1 | head -5 +# Should show usage information or start running +``` + +### Test 2: Dependency Check +```bash +# Verify required tools are available +for tool in cmake make wget tar patchelf git; do + command -v $tool >/dev/null 2>&1 && echo "✓ $tool found" || echo "✗ $tool missing" +done +``` + +### Test 3: ROCm SDK Download Test +```bash +# Test if ROCm tarball URL is accessible +ROCM_VERSION="6.5.0rc20250610" +GPU_FAMILY="gfx110X-all" +TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" + +wget --spider "$TARBALL_URL" 2>&1 | grep "200 OK" && echo "✓ Tarball accessible" || echo "✗ Tarball not found" +``` + +### Test 4: Full Local Build (Optional - Takes 30+ minutes) +```bash +# Run full build locally +export ROCM_VERSION="6.5.0rc20250610" +export GPU_FAMILY="gfx110X-all" +./build_packages_local.sh + +# Verify packages were created +ls -lh ./build/rocm-validation-suite*.{deb,rpm,tar.gz} 2>/dev/null || echo "✗ No packages found" +``` + +### Test 5: Package Verification +```bash +# If DEB was created +if [ -f build/rocm-validation-suite*.deb ]; then + dpkg-deb -I build/rocm-validation-suite*.deb && echo "✓ DEB package valid" + dpkg-deb -c build/rocm-validation-suite*.deb | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in package" +fi + +# If RPM was created +if [ -f build/rocm-validation-suite*.rpm ]; then + rpm -qip build/rocm-validation-suite*.rpm && echo "✓ RPM package valid" + rpm -qlp build/rocm-validation-suite*.rpm | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in package" +fi + +# If TGZ was created +if [ -f build/rocm-validation-suite*.tar.gz ]; then + tar -tzf build/rocm-validation-suite*.tar.gz | head -20 && echo "✓ TGZ archive valid" + tar -tzf build/rocm-validation-suite*.tar.gz | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in archive" +fi +``` + +### Test 6: RPATH Verification +```bash +# After building, check if RPATH is set correctly +if [ -f ./build/bin/rvs ]; then + readelf -d ./build/bin/rvs | grep -i "rpath" | grep "\$ORIGIN" && echo "✓ RPATH uses \$ORIGIN" || echo "✗ RPATH not relocatable" +fi +``` + +## ✅ GitHub Actions Testing + +### Test 1: Workflow File Validation +- [ ] Go to GitHub repository +- [ ] Navigate to **Actions** tab +- [ ] Check if "Build Relocatable Packages" workflow appears +- [ ] No syntax error warnings shown + +### Test 2: Manual Workflow Trigger +- [ ] Go to Actions → Build Relocatable Packages +- [ ] Click "Run workflow" +- [ ] Select branch (e.g., `master`) +- [ ] Leave default values or customize: + - [ ] ROCm Version: (leave default or enter custom) + - [ ] GPU Family: (select from dropdown) +- [ ] Click "Run workflow" button +- [ ] Workflow starts successfully + +### Test 3: Workflow Execution Monitor +- [ ] Workflow shows "In progress" status +- [ ] Click on the running workflow +- [ ] All jobs appear (build-ubuntu, build-centos) +- [ ] Jobs are running (yellow spinner icons) +- [ ] No immediate failures + +### Test 4: Build Logs Review +For each job (build-ubuntu, build-centos): +- [ ] "Download ROCm SDK Tarball" step succeeds +- [ ] ROCm SDK extraction completes +- [ ] CMake configuration succeeds +- [ ] Build completes without errors +- [ ] Packages are created +- [ ] Artifacts are uploaded + +### Test 5: Artifact Download +After workflow completes: +- [ ] Scroll to "Artifacts" section at bottom +- [ ] Verify artifacts exist: + - [ ] `ubuntu-22.04-packages-${GPU_FAMILY}` + - [ ] `rockylinux8-packages-${GPU_FAMILY}` + - [ ] `build-report` +- [ ] Download one artifact +- [ ] Extract and verify contents: + ```bash + unzip ubuntu-22.04-packages-*.zip + ls -lh rocm-validation-suite* + ``` + +### Test 6: Automatic Trigger Test +```bash +# Create a test commit to trigger workflow +git add VERIFICATION_CHECKLIST.md +git commit -m "test: verify GitHub Actions workflow trigger" +git push origin master # or your default branch + +# Check if workflow triggered automatically +# Go to Actions tab and verify new workflow run started +``` + +## ✅ Package Installation Testing + +### Test 7: DEB Package Installation (Ubuntu/Debian) +```bash +# Download DEB package from artifacts +# Install test +sudo dpkg -i rocm-validation-suite_*.deb + +# Verify installation +[ -f /opt/rocm/bin/rvs ] && echo "✓ RVS binary installed" +/opt/rocm/bin/rvs --version && echo "✓ RVS runs" +/opt/rocm/bin/rvs -g && echo "✓ RVS GPU detection works" + +# Check libraries +ldd /opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" + +# Uninstall +sudo dpkg -r rocm-validation-suite +``` + +### Test 8: RPM Package Installation (CentOS/RHEL) +```bash +# Download RPM package from artifacts +# Install test +sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm + +# Verify installation +[ -f /opt/rocm/bin/rvs ] && echo "✓ RVS binary installed" +/opt/rocm/bin/rvs --version && echo "✓ RVS runs" +/opt/rocm/bin/rvs -g && echo "✓ RVS GPU detection works" + +# Check libraries +ldd /opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" + +# Uninstall +sudo rpm -e rocm-validation-suite +``` + +### Test 9: TGZ Package Relocatable Test +```bash +# Download TGZ package from artifacts +# Test extraction to custom location +mkdir -p ~/test-rvs-install +tar -xzf rocm-validation-suite-*.tar.gz -C ~/test-rvs-install/ + +# Setup environment +export PATH="$HOME/test-rvs-install/opt/rocm/bin:$PATH" +export LD_LIBRARY_PATH="$HOME/test-rvs-install/opt/rocm/lib:$LD_LIBRARY_PATH" + +# Verify it works from custom location +[ -f ~/test-rvs-install/opt/rocm/bin/rvs ] && echo "✓ RVS binary extracted" +rvs --version && echo "✓ RVS runs from custom location" +rvs -g && echo "✓ RVS GPU detection works" + +# Verify RPATH +readelf -d ~/test-rvs-install/opt/rocm/bin/rvs | grep RPATH | grep "\$ORIGIN" && echo "✓ RPATH is relocatable" + +# Check libraries resolve +ldd ~/test-rvs-install/opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" + +# Cleanup +rm -rf ~/test-rvs-install +``` + +## ✅ Documentation Review + +### Test 10: Documentation Completeness +- [ ] `QUICKSTART_PACKAGES.md` has clear instructions +- [ ] `.github/workflows/README_BUILD_PACKAGES.md` explains workflow +- [ ] `PACKAGE_BUILD_SUMMARY.md` summarizes implementation +- [ ] All example commands are accurate +- [ ] All file paths are correct +- [ ] GPU family table is complete +- [ ] ROCm version references are current + +### Test 11: Link Validation +```bash +# Check for broken links in documentation +for file in QUICKSTART_PACKAGES.md .github/workflows/README_BUILD_PACKAGES.md PACKAGE_BUILD_SUMMARY.md; do + echo "Checking $file..." + grep -oE 'https?://[^)]+' "$file" | while read url; do + curl -I -s -o /dev/null -w "%{http_code}" "$url" | grep -q "^[23]" && echo " ✓ $url" || echo " ✗ $url" + done +done +``` + +## ✅ Edge Cases & Error Handling + +### Test 12: Invalid ROCm Version +```bash +# Test with non-existent ROCm version +export ROCM_VERSION="invalid-version" +./build_packages_local.sh 2>&1 | grep -i "error\|fail" && echo "✓ Error handled correctly" +``` + +### Test 13: Missing Dependencies +```bash +# Test behavior when a tool is missing +# (Rename a required tool temporarily) +sudo mv /usr/bin/cmake /usr/bin/cmake.bak 2>/dev/null +./build_packages_local.sh 2>&1 | grep -i "missing\|cmake" && echo "✓ Dependency check works" +sudo mv /usr/bin/cmake.bak /usr/bin/cmake 2>/dev/null +``` + +### Test 14: Disk Space Check +```bash +# Ensure adequate disk space (need ~10GB for build) +df -h . | awk 'NR==2 {print $4}' | numfmt --from=auto --to=unit=G | awk '{if($1 < 10) print "✗ Less than 10GB available"; else print "✓ Sufficient disk space"}' +``` + +## ✅ Cross-Platform Verification + +### Test 15: Multi-Distribution Test Matrix +Test on different distributions if possible: +- [ ] Ubuntu 20.04 +- [ ] Ubuntu 22.04 +- [ ] Ubuntu 24.04 +- [ ] Rocky Linux 8 +- [ ] CentOS Stream 9 +- [ ] RHEL 8 +- [ ] Debian 11 +- [ ] Debian 12 + +### Test 16: GPU Family Variants +Test with different GPU families: +- [ ] gfx94X-dcgpu (MI300) +- [ ] gfx950-dcgpu (MI350) +- [ ] gfx110X-all (RX 7900 series) +- [ ] gfx1151 (Strix Halo) +- [ ] gfx120X-all (RX 9000 series) + +## ✅ Performance & Optimization + +### Test 17: Build Time Measurement +```bash +# Measure build time +time ./build_packages_local.sh +# Record and compare: +# Expected: 15-30 minutes depending on hardware +``` + +### Test 18: Package Size Check +```bash +# Check package sizes are reasonable +ls -lh ./build/rocm-validation-suite*.{deb,rpm,tar.gz} 2>/dev/null +# Expected sizes: +# DEB: ~5-50 MB +# RPM: ~5-50 MB +# TGZ: ~5-50 MB +``` + +## ✅ Security & Best Practices + +### Test 19: Security Scan +```bash +# Check for hardcoded secrets or sensitive data +grep -r "password\|token\|secret\|key" .github/workflows/*.yml build_packages_local.sh +# Should only find variable names, not actual secrets + +# Check file permissions +find .github -type f -executable && echo "✗ Executable files in .github" || echo "✓ No unnecessary executable files" +``` + +### Test 20: Code Quality +```bash +# Check for shell script issues (if shellcheck is installed) +if command -v shellcheck >/dev/null; then + shellcheck build_packages_local.sh && echo "✓ Shell script passes shellcheck" +fi + +# Check for common mistakes +grep -n "rm -rf /" build_packages_local.sh && echo "✗ Dangerous rm command found" || echo "✓ No dangerous commands" +``` + +## ✅ Final Verification + +### Test 21: End-to-End Test +Complete end-to-end test: +1. [ ] Fresh git clone of repository +2. [ ] Run local build script successfully +3. [ ] Verify all three package types created +4. [ ] Install one package and test RVS +5. [ ] Push to GitHub and verify Actions run +6. [ ] Download artifacts and verify contents +7. [ ] Install artifact package and test RVS + +### Test 22: Documentation Test +Have someone unfamiliar with the system: +1. [ ] Follow QUICKSTART_PACKAGES.md instructions +2. [ ] Successfully build packages locally +3. [ ] Successfully trigger GitHub Actions workflow +4. [ ] Successfully install and test a package + +## 📊 Test Results Summary + +After completing all tests, fill in the results: + +``` +Total Tests: 22 +Passed: ___ / 22 +Failed: ___ / 22 +Skipped: ___ / 22 + +Critical Failures: ___ +Minor Issues: ___ +Warnings: ___ +``` + +## 🚀 Deployment Readiness + +Mark as complete when all critical tests pass: +- [ ] All syntax validation passes +- [ ] Local build succeeds +- [ ] GitHub Actions workflow runs successfully +- [ ] At least one package type installs and runs +- [ ] Documentation is accurate and complete +- [ ] No critical security issues found + +## 📝 Notes & Issues + +Record any issues found during testing: + +``` +Issue 1: +Description: +Severity: [Critical/Major/Minor] +Status: [Open/Fixed] + +Issue 2: +Description: +Severity: [Critical/Major/Minor] +Status: [Open/Fixed] +``` + +## ✅ Sign-off + +When all critical tests pass and the system is ready for production: + +``` +Tested by: ________________ +Date: ____________________ +Status: [ ] Ready for Production / [ ] Needs Work +Signature: ________________ +``` + +--- + +**Last Updated:** January 29, 2026 +**Version:** 1.0 +**Next Review:** After first production deployment diff --git a/build_packages_local.sh b/build_packages_local.sh new file mode 100644 index 000000000..c0210d72d --- /dev/null +++ b/build_packages_local.sh @@ -0,0 +1,350 @@ +#!/bin/bash +################################################################################ +# Local Build Script for Testing Package Generation +# This script mimics the GitHub Actions workflow for local testing +################################################################################ + +set -e # Exit on error + +# Configuration +ROCM_VERSION="${ROCM_VERSION:-6.5.0rc20250610}" +GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" +BUILD_TYPE="${BUILD_TYPE:-Release}" +BUILD_DIR="./build" +ROCM_INSTALL_DIR="$HOME/rocm-sdk" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +print_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Print configuration +echo "================================================================================" +echo " ROCm Validation Suite - Local Package Build Script" +echo "================================================================================" +print_info "ROCm Version: $ROCM_VERSION" +print_info "GPU Family: $GPU_FAMILY" +print_info "Build Type: $BUILD_TYPE" +print_info "Build Directory: $BUILD_DIR" +print_info "ROCm Install: $ROCM_INSTALL_DIR" +print_info "RVS Version: Will be read from CMakeLists.txt by CMake/CPack" +echo "================================================================================" +echo "" + +# Function to check and install dependencies +check_and_install_dependencies() { + print_info "Checking for required build dependencies..." + + # Detect OS + if [ -f /etc/os-release ]; then + . /etc/os-release + OS=$ID + else + print_error "Cannot detect OS. Please install dependencies manually." + exit 1 + fi + + # Check for basic tools first + MISSING_TOOLS=() + command -v cmake >/dev/null 2>&1 || MISSING_TOOLS+=("cmake") + command -v make >/dev/null 2>&1 || MISSING_TOOLS+=("make") + command -v wget >/dev/null 2>&1 || MISSING_TOOLS+=("wget") + command -v tar >/dev/null 2>&1 || MISSING_TOOLS+=("tar") + command -v gcc >/dev/null 2>&1 || MISSING_TOOLS+=("gcc/g++") + command -v git >/dev/null 2>&1 || MISSING_TOOLS+=("git") + + if [ ${#MISSING_TOOLS[@]} -ne 0 ]; then + print_warning "Missing required tools: ${MISSING_TOOLS[*]}" + echo "" + + if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then + print_info "Installing dependencies for Ubuntu/Debian..." + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + cmake \ + git \ + wget \ + libpci3 \ + libpci-dev \ + doxygen \ + unzip \ + libyaml-cpp-dev \ + rpm + elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then + print_info "Installing dependencies for CentOS/RHEL..." + sudo yum install -y epel-release + sudo yum install -y \ + gcc \ + gcc-c++ \ + cmake3 \ + make \ + git \ + wget \ + pciutils-devel \ + doxygen \ + rpm-build \ + yaml-cpp-devel \ + yaml-cpp-static + else + print_error "Unsupported OS: $OS" + echo "" + echo "Please install the following dependencies manually:" + echo " - build tools (gcc, g++, make)" + echo " - cmake" + echo " - git" + echo " - wget" + echo " - libpci-dev (or pciutils-devel)" + echo " - doxygen" + echo " - libyaml-cpp-dev (or yaml-cpp-devel)" + echo " - rpm-build tools" + exit 1 + fi + + print_success "Dependencies installed successfully" + else + print_success "All required tools found" + fi + echo "" +} + +# Check and install dependencies +check_and_install_dependencies + +# Step 1: Download ROCm SDK +print_info "Step 1: Downloading ROCm SDK tarball..." +TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" +TARBALL_FILE="$ROCM_INSTALL_DIR/rocm-sdk.tar.gz" + +mkdir -p "$ROCM_INSTALL_DIR" + +if [ -f "$ROCM_INSTALL_DIR/install/bin/hipconfig" ]; then + print_warning "ROCm SDK already exists at $ROCM_INSTALL_DIR/install" + read -p "Do you want to re-download? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + rm -rf "$ROCM_INSTALL_DIR/install" + else + print_info "Using existing ROCm SDK" + export ROCM_PATH="$ROCM_INSTALL_DIR/install" + print_success "ROCm SDK path set to: $ROCM_PATH" + echo "" + goto_step2=true + fi +fi + +if [ -z "$goto_step2" ]; then + print_info "Downloading from: $TARBALL_URL" + if wget --spider "$TARBALL_URL" 2>/dev/null; then + wget --show-progress -O "$TARBALL_FILE" "$TARBALL_URL" + print_success "Download complete" + else + print_error "Failed to download ROCm SDK tarball" + print_error "URL: $TARBALL_URL" + print_info "Please check if the ROCm version and GPU family are correct" + exit 1 + fi + + # Extract tarball + print_info "Extracting ROCm SDK..." + mkdir -p "$ROCM_INSTALL_DIR/install" + tar -xzf "$TARBALL_FILE" -C "$ROCM_INSTALL_DIR/install" --strip-components=1 + print_success "Extraction complete" + + export ROCM_PATH="$ROCM_INSTALL_DIR/install" + print_success "ROCm SDK installed to: $ROCM_PATH" +fi +echo "" + +# Step 2: Setup environment +print_info "Step 2: Setting up ROCm environment..." +export PATH="$ROCM_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" +export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" + +print_info "Environment variables set:" +echo " ROCM_PATH=$ROCM_PATH" +echo " PATH includes: $ROCM_PATH/bin" +echo " LD_LIBRARY_PATH includes: $ROCM_PATH/lib" + +# Verify ROCm installation +print_info "Verifying ROCm installation..." +if [ -x "$ROCM_PATH/bin/hipconfig" ]; then + print_success "hipconfig found" +else + print_warning "hipconfig not found or not executable" +fi + +if [ -d "$ROCM_PATH/lib" ]; then + LIB_COUNT=$(ls -1 "$ROCM_PATH/lib"/*.so 2>/dev/null | wc -l) + print_success "Found $LIB_COUNT shared libraries in $ROCM_PATH/lib" +else + print_error "ROCm lib directory not found" + exit 1 +fi +echo "" + +# Step 3: Configure CMake +print_info "Step 3: Configuring CMake with relocatable paths..." +if [ -d "$BUILD_DIR" ]; then + print_warning "Build directory exists. Cleaning..." + rm -rf "$BUILD_DIR" +fi + +cmake -B "$BUILD_DIR" \ + -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ + -DROCM_PATH="$ROCM_PATH" \ + -DHIP_PLATFORM=amd \ + -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ + -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ + -DCMAKE_SKIP_RPATH=FALSE \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" \ + -DRPATH_MODE=OFF + +if [ $? -eq 0 ]; then + print_success "CMake configuration successful" +else + print_error "CMake configuration failed" + exit 1 +fi +echo "" + +# Step 4: Build RVS +print_info "Step 4: Building RVS..." +NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4) +print_info "Using $NPROC parallel jobs" + +make -C "$BUILD_DIR" -j"$NPROC" + +if [ $? -eq 0 ]; then + print_success "Build successful" +else + print_error "Build failed" + exit 1 +fi +echo "" + +# Step 5: Create packages +print_info "Step 5: Creating packages..." + +# Detect OS type +if [ -f /etc/os-release ]; then + . /etc/os-release + OS_NAME=$ID + OS_VERSION=$VERSION_ID +else + OS_NAME="unknown" + OS_VERSION="unknown" +fi + +print_info "Detected OS: $OS_NAME $OS_VERSION" + +# Create TGZ package +print_info "Creating TGZ package..." +cd "$BUILD_DIR" +cpack -G TGZ + +if [ $? -eq 0 ]; then + TGZ_FILE=$(ls rocm-validation-suite*.tar.gz 2>/dev/null | head -1) + if [ -n "$TGZ_FILE" ]; then + print_success "Created TGZ package: $TGZ_FILE" + TGZ_SIZE=$(du -h "$TGZ_FILE" | cut -f1) + print_info "Package size: $TGZ_SIZE" + fi +else + print_error "TGZ package creation failed" +fi + +# Create DEB package (Ubuntu/Debian) +if command -v dpkg >/dev/null 2>&1; then + print_info "Creating DEB package..." + cpack -G DEB + + if [ $? -eq 0 ]; then + DEB_FILE=$(ls rocm-validation-suite*.deb 2>/dev/null | head -1) + if [ -n "$DEB_FILE" ]; then + print_success "Created DEB package: $DEB_FILE" + DEB_SIZE=$(du -h "$DEB_FILE" | cut -f1) + print_info "Package size: $DEB_SIZE" + + # Verify DEB package + print_info "Verifying DEB package..." + dpkg-deb -I "$DEB_FILE" | head -20 + fi + else + print_warning "DEB package creation failed (might be expected on non-Debian systems)" + fi +fi + +# Create RPM package (CentOS/RHEL/SLES) +if command -v rpm >/dev/null 2>&1; then + print_info "Creating RPM package..." + cpack -G RPM + + if [ $? -eq 0 ]; then + RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) + if [ -n "$RPM_FILE" ]; then + print_success "Created RPM package: $RPM_FILE" + RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1) + print_info "Package size: $RPM_SIZE" + + # Verify RPM package + print_info "Verifying RPM package..." + rpm -qip "$RPM_FILE" | head -20 + fi + else + print_warning "RPM package creation failed (might be expected on non-RPM systems)" + fi +fi + +cd - > /dev/null +echo "" + +# Summary +echo "================================================================================" +print_success "Package build completed successfully!" +echo "================================================================================" +print_info "Generated packages are in: $BUILD_DIR" +echo "" +ls -lh "$BUILD_DIR"/rocm-validation-suite*{.deb,.rpm,.tar.gz} 2>/dev/null || \ + print_warning "No packages found in build directory" +echo "" + +# Installation instructions +echo "================================================================================" +echo " Installation Instructions" +echo "================================================================================" +echo "" +echo "Ubuntu/Debian (DEB):" +echo " sudo dpkg -i $BUILD_DIR/rocm-validation-suite_*.deb" +echo "" +echo "CentOS/RHEL (RPM):" +echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/rocm-validation-suite-*.rpm" +echo "" +echo "Any Linux (TGZ - Relocatable):" +echo " sudo tar -xzf $BUILD_DIR/rocm-validation-suite-*.tar.gz -C /" +echo " export PATH=/opt/rocm/rvs/bin:\$PATH" +echo " export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:\$LD_LIBRARY_PATH" +echo "" +echo "================================================================================" + +print_success "Done!" From 4e9fe2dd6fac121af9f3ddc8318574b836a0c25e Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Jan 2026 19:01:54 -0800 Subject: [PATCH 043/275] Update build script to pull the latest ROCm tarball --- build_packages_local.sh | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index c0210d72d..0fccedf54 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -7,7 +7,6 @@ set -e # Exit on error # Configuration -ROCM_VERSION="${ROCM_VERSION:-6.5.0rc20250610}" GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" BUILD_TYPE="${BUILD_TYPE:-Release}" BUILD_DIR="./build" @@ -36,6 +35,39 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1" } +# Function to fetch latest ROCm version for specified GPU family +fetch_latest_rocm_version() { + local gpu_family="$1" + local index_url="https://therock-nightly-tarball.s3.amazonaws.com/index.html" + + print_info "Fetching latest ROCm version for $gpu_family from TheRock..." + + # Download index page and parse for latest tarball matching GPU family + # Pattern: therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz + local latest_version=$(wget -qO- "$index_url" 2>/dev/null | \ + grep -oP "therock-dist-linux-${gpu_family}-\K[^<\"]+(?=\.tar\.gz)" | \ + sort -V | tail -1) + + if [ -z "$latest_version" ]; then + print_error "Could not fetch latest ROCm version for $gpu_family" + print_info "Falling back to default version: 6.5.0rc20250610" + echo "6.5.0rc20250610" + return 1 + fi + + print_success "Found latest ROCm version: $latest_version" + echo "$latest_version" + return 0 +} + +# Determine ROCm version: use environment variable or fetch latest +if [ -n "$ROCM_VERSION" ]; then + print_info "Using specified ROCm version: $ROCM_VERSION" +else + print_info "No ROCm version specified, fetching latest..." + ROCM_VERSION=$(fetch_latest_rocm_version "$GPU_FAMILY") +fi + # Print configuration echo "================================================================================" echo " ROCm Validation Suite - Local Package Build Script" From ab961374b34488580dad4547f0f5856bc07e0068 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Jan 2026 20:06:41 -0800 Subject: [PATCH 044/275] Set default ROCm Version to 7.11 --- .github/workflows/build-relocatable-packages.yml | 4 ++-- build_packages_local.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 41136fdae..756e9af0d 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -13,7 +13,7 @@ on: workflow_dispatch: inputs: rocm_version: - description: 'ROCm version (e.g., 6.5.0rc20250610)' + description: 'ROCm version (e.g., 7.11.0a20260121)' required: false default: '' gpu_family: @@ -29,7 +29,7 @@ on: default: 'gfx110X-all' env: - ROCM_VERSION: '6.5.0rc20250610' + ROCM_VERSION: '7.11.0a20260121' GPU_FAMILY: 'gfx110X-all' BUILD_TYPE: Release diff --git a/build_packages_local.sh b/build_packages_local.sh index 0fccedf54..4524215e0 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -50,8 +50,8 @@ fetch_latest_rocm_version() { if [ -z "$latest_version" ]; then print_error "Could not fetch latest ROCm version for $gpu_family" - print_info "Falling back to default version: 6.5.0rc20250610" - echo "6.5.0rc20250610" + print_info "Falling back to default version: 7.11.0a20260121" + echo "7.11.0a20260121" return 1 fi From 85f68670f6055acccb72f93aaaa6f997834403a1 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Jan 2026 20:24:38 -0800 Subject: [PATCH 045/275] Update check for dependency --- .github/workflows/README_BUILD_PACKAGES.md | 30 ++++++---- QUICKSTART_PACKAGES.md | 21 ++++--- build_packages_local.sh | 67 ++++++++++++++++++---- 3 files changed, 88 insertions(+), 30 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 2ff9b05a7..ecd13c355 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -112,21 +112,28 @@ The workflow uses `build_packages_local.sh` as the core build engine. This scrip ### Running Locally ```bash -# Basic usage (uses default ROCm version and GPU family) -./build_packages_local.sh +# Basic usage (automatically installs dependencies, fetches latest ROCm) +sudo ./build_packages_local.sh -# Custom ROCm version and GPU family -ROCM_VERSION=6.5.0rc20250610 GPU_FAMILY=gfx110X-all ./build_packages_local.sh +# Custom ROCm version and GPU family (use sudo -E to preserve environment variables) +sudo -E ROCM_VERSION=7.11.0a20260121 GPU_FAMILY=gfx110X-all ./build_packages_local.sh + +# Or export first, then run with sudo -E +export ROCM_VERSION=7.11.0a20260121 +export GPU_FAMILY=gfx110X-all +sudo -E ./build_packages_local.sh # Debug build -BUILD_TYPE=Debug ./build_packages_local.sh +sudo BUILD_TYPE=Debug ./build_packages_local.sh ``` +**Important**: The script requires root privileges to install system dependencies. Use `sudo` when running locally. In GitHub Actions, the workflow runs without `sudo` as the runner already has appropriate privileges. + ### Environment Variables | Variable | Default | Description | |----------|---------|-------------| -| `ROCM_VERSION` | `6.5.0rc20250610` | ROCm SDK version from TheRock | +| `ROCM_VERSION` | Auto-fetched (fallback: `7.11.0a20260121`) | ROCm SDK version from TheRock. If not set, script fetches latest version automatically. | | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | @@ -362,13 +369,16 @@ ldd /opt/rocm/rvs/bin/rvs To test the workflow locally before pushing: ```bash -# Set environment variables -export ROCM_VERSION=6.5.0rc20250610 +# Option 1: Auto-fetch latest ROCm version +sudo ./build_packages_local.sh + +# Option 2: Set environment variables for custom configuration +export ROCM_VERSION=7.11.0a20260121 export GPU_FAMILY=gfx110X-all export BUILD_TYPE=Release -# Run the build script -./build_packages_local.sh +# Run with sudo -E to preserve environment variables +sudo -E ./build_packages_local.sh # Check generated packages ls -lh build/rocm-validation-suite* diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index 309395b76..6e310a55d 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -90,14 +90,17 @@ The workflow automatically runs when you: # Make the script executable chmod +x build_packages_local.sh -# Run the build script -./build_packages_local.sh +# Run the build script with sudo (required for installing dependencies) +sudo ./build_packages_local.sh ``` +**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, the runner already has sudo privileges, so it runs without the `sudo` prefix. + This will: -1. Download ROCm SDK (ROCm 6.5.0rc20250610, gfx110X-all) -2. Configure and build RVS -3. Generate DEB, RPM, and TGZ packages +1. Automatically detect and install missing dependencies +2. Fetch latest ROCm SDK version (or use default 7.11.0a20260121) +3. Configure and build RVS +4. Generate DEB, RPM, and TGZ packages 4. Save packages to `./build/` directory ### Custom Build @@ -106,7 +109,7 @@ Set environment variables before running: ```bash # Set custom ROCm version -export ROCM_VERSION="6.5.0rc20250115" +export ROCM_VERSION="7.11.0a20260121" # Set GPU family export GPU_FAMILY="gfx94X-dcgpu" # For MI300A/MI300X @@ -114,10 +117,12 @@ export GPU_FAMILY="gfx94X-dcgpu" # For MI300A/MI300X # Set build type export BUILD_TYPE="Release" # or "Debug" -# Run the build -./build_packages_local.sh +# Run the build with sudo +sudo -E ./build_packages_local.sh ``` +**Note**: Use `sudo -E` to preserve environment variables when running with sudo. + ### Manual Build (Step-by-Step) If you prefer manual control: diff --git a/build_packages_local.sh b/build_packages_local.sh index 4524215e0..4bfefd5a3 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -94,23 +94,45 @@ check_and_install_dependencies() { exit 1 fi - # Check for basic tools first + # Check for command-line tools MISSING_TOOLS=() command -v cmake >/dev/null 2>&1 || MISSING_TOOLS+=("cmake") command -v make >/dev/null 2>&1 || MISSING_TOOLS+=("make") + command -v gcc >/dev/null 2>&1 || MISSING_TOOLS+=("gcc") + command -v g++ >/dev/null 2>&1 || MISSING_TOOLS+=("g++") + command -v git >/dev/null 2>&1 || MISSING_TOOLS+=("git") command -v wget >/dev/null 2>&1 || MISSING_TOOLS+=("wget") command -v tar >/dev/null 2>&1 || MISSING_TOOLS+=("tar") - command -v gcc >/dev/null 2>&1 || MISSING_TOOLS+=("gcc/g++") - command -v git >/dev/null 2>&1 || MISSING_TOOLS+=("git") + command -v doxygen >/dev/null 2>&1 || MISSING_TOOLS+=("doxygen") + + # Check for library dependencies (platform-specific) + MISSING_LIBS=() + if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then + # Check for Ubuntu/Debian library headers + [ -f /usr/include/pci/pci.h ] || MISSING_LIBS+=("libpci-dev") + [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("libyaml-cpp-dev") + command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm") + command -v unzip >/dev/null 2>&1 || MISSING_LIBS+=("unzip") + elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then + # Check for CentOS/RHEL library headers + [ -f /usr/include/pci/pci.h ] || MISSING_LIBS+=("pciutils-devel") + [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("yaml-cpp-devel") + command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm-build") + fi - if [ ${#MISSING_TOOLS[@]} -ne 0 ]; then - print_warning "Missing required tools: ${MISSING_TOOLS[*]}" + # Combine missing tools and libraries + MISSING_DEPS=() + [ ${#MISSING_TOOLS[@]} -ne 0 ] && MISSING_DEPS+=("${MISSING_TOOLS[@]}") + [ ${#MISSING_LIBS[@]} -ne 0 ] && MISSING_DEPS+=("${MISSING_LIBS[@]}") + + if [ ${#MISSING_DEPS[@]} -ne 0 ]; then + print_warning "Missing dependencies: ${MISSING_DEPS[*]}" echo "" if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then print_info "Installing dependencies for Ubuntu/Debian..." - sudo apt-get update - sudo apt-get install -y \ + apt-get update + apt-get install -y \ build-essential \ cmake \ git \ @@ -123,8 +145,8 @@ check_and_install_dependencies() { rpm elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then print_info "Installing dependencies for CentOS/RHEL..." - sudo yum install -y epel-release - sudo yum install -y \ + yum install -y epel-release + yum install -y \ gcc \ gcc-c++ \ cmake3 \ @@ -140,20 +162,41 @@ check_and_install_dependencies() { print_error "Unsupported OS: $OS" echo "" echo "Please install the following dependencies manually:" - echo " - build tools (gcc, g++, make)" + echo "" + echo "Build Tools:" + echo " - gcc, g++, make" echo " - cmake" echo " - git" echo " - wget" - echo " - libpci-dev (or pciutils-devel)" + echo " - tar" echo " - doxygen" + echo "" + echo "Development Libraries:" + echo " - libpci-dev (or pciutils-devel)" echo " - libyaml-cpp-dev (or yaml-cpp-devel)" echo " - rpm-build tools" exit 1 fi print_success "Dependencies installed successfully" + echo "" + + # Verify installation by re-checking + print_info "Verifying installation..." + VERIFY_FAILED=() + for tool in "${MISSING_TOOLS[@]}"; do + if ! command -v "$tool" >/dev/null 2>&1; then + VERIFY_FAILED+=("$tool") + fi + done + + if [ ${#VERIFY_FAILED[@]} -ne 0 ]; then + print_error "Failed to install: ${VERIFY_FAILED[*]}" + exit 1 + fi + print_success "All dependencies verified" else - print_success "All required tools found" + print_success "All required dependencies found" fi echo "" } From 7fdf1453ececd19f2df91c4a911e0e23a3a51e0f Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Jan 2026 20:35:27 -0800 Subject: [PATCH 046/275] Update sudo for workflow --- .github/workflows/README_BUILD_PACKAGES.md | 4 +++- .github/workflows/build-relocatable-packages.yml | 6 +++--- QUICKSTART_PACKAGES.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index ecd13c355..c7afb120f 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -127,7 +127,9 @@ sudo -E ./build_packages_local.sh sudo BUILD_TYPE=Debug ./build_packages_local.sh ``` -**Important**: The script requires root privileges to install system dependencies. Use `sudo` when running locally. In GitHub Actions, the workflow runs without `sudo` as the runner already has appropriate privileges. +**Important**: The script requires root privileges to install system dependencies. Use `sudo` when running locally. In GitHub Actions: +- **Ubuntu runners**: Use `sudo` (runner has sudo access but not root by default) +- **Container builds** (Rocky/CentOS): No sudo needed (containers run as root) ### Environment Variables diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 756e9af0d..7c4c6f275 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -61,8 +61,8 @@ jobs: # Make build script executable chmod +x build_packages_local.sh - # Run build script (handles dependency installation, ROCm setup, build, and packaging) - ROCM_VERSION=${{ env.ROCM_VERSION }} \ + # Run build script with sudo (Ubuntu runner needs sudo for apt-get) + sudo ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ ./build_packages_local.sh @@ -127,7 +127,7 @@ jobs: # Make build script executable chmod +x build_packages_local.sh - # Run build script (handles dependency installation, ROCm setup, build, and packaging) + # Run build script (no sudo needed - container runs as root) ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index 6e310a55d..bbcab4743 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -94,7 +94,7 @@ chmod +x build_packages_local.sh sudo ./build_packages_local.sh ``` -**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, the runner already has sudo privileges, so it runs without the `sudo` prefix. +**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, Ubuntu runners use `sudo` while container builds (Rocky/CentOS) run as root directly. This will: 1. Automatically detect and install missing dependencies From 0e8ff043fd1838072fbff3fe7f0c8aa1cd819b37 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 31 Jan 2026 18:32:48 -0800 Subject: [PATCH 047/275] Add devicelib path to help clang++ For some reason clang is not able to find the path for amdgcn Help clang by exporting HIP_DEVICE_LIB_PATH. Fix Rockylinux install issue. RockyLinux has doxygen hosted on powertool. --- build_packages_local.sh | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 4bfefd5a3..a064bdf58 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -144,8 +144,28 @@ check_and_install_dependencies() { libyaml-cpp-dev \ rpm elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then - print_info "Installing dependencies for CentOS/RHEL..." + print_info "Installing dependencies for CentOS/RHEL/Rocky Linux..." + + # Enable PowerTools repository (contains doxygen) + print_info "Enabling PowerTools/CRB repository..." + if command -v dnf >/dev/null 2>&1; then + # Rocky Linux 8+ uses dnf and powertools + dnf install -y dnf-plugins-core + dnf config-manager --set-enabled powertools 2>/dev/null || \ + dnf config-manager --set-enabled crb 2>/dev/null || \ + print_warning "Could not enable PowerTools/CRB repo (may already be enabled)" + else + # CentOS 8 uses yum and PowerTools + yum install -y yum-utils + yum-config-manager --enable powertools 2>/dev/null || \ + yum-config-manager --enable PowerTools 2>/dev/null || \ + print_warning "Could not enable PowerTools repo (may already be enabled)" + fi + + print_info "Installing EPEL repository..." yum install -y epel-release + + print_info "Installing build dependencies..." yum install -y \ gcc \ gcc-c++ \ @@ -251,14 +271,30 @@ echo "" # Step 2: Setup environment print_info "Step 2: Setting up ROCm environment..." + +# Find HIP device library path (amdgcn/bitcode) first +print_info "Locating HIP device libraries (amdgcn/bitcode)..." +HIP_DEVICE_LIB_PATH=$(find "$ROCM_PATH" -type d -path "*/amdgcn/bitcode" 2>/dev/null | head -1) + +if [ -z "$HIP_DEVICE_LIB_PATH" ]; then + print_error "Could not find amdgcn/bitcode directory in $ROCM_PATH" + print_error "HIP device libraries are required for GPU code compilation" + print_error "Please verify your ROCm SDK installation" + exit 1 +fi + +# Export all environment variables export PATH="$ROCM_PATH/bin:$PATH" export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" +export HIP_DEVICE_LIB_PATH="$HIP_DEVICE_LIB_PATH" + print_info "Environment variables set:" echo " ROCM_PATH=$ROCM_PATH" echo " PATH includes: $ROCM_PATH/bin" echo " LD_LIBRARY_PATH includes: $ROCM_PATH/lib" +echo " HIP_DEVICE_LIB_PATH=$HIP_DEVICE_LIB_PATH" # Verify ROCm installation print_info "Verifying ROCm installation..." From 02bf7ed6153651558dde7c38998de2f9ad563348 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 31 Jan 2026 18:59:06 -0800 Subject: [PATCH 048/275] Adding python3 to dependency list --- QUICKSTART_PACKAGES.md | 6 ++++-- build_packages_local.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index bbcab4743..14c7f55bf 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -35,7 +35,8 @@ sudo apt-get install -y \ doxygen \ unzip \ libyaml-cpp-dev \ - rpm + rpm \ + python3 ``` **CentOS/RHEL/Rocky Linux:** @@ -44,7 +45,8 @@ sudo yum install -y epel-release sudo yum install -y \ gcc gcc-c++ cmake3 make git wget \ pciutils-devel doxygen rpm-build \ - yaml-cpp-devel yaml-cpp-static + yaml-cpp-devel yaml-cpp-static \ + python3 ``` --- diff --git a/build_packages_local.sh b/build_packages_local.sh index a064bdf58..322996ee8 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -104,6 +104,7 @@ check_and_install_dependencies() { command -v wget >/dev/null 2>&1 || MISSING_TOOLS+=("wget") command -v tar >/dev/null 2>&1 || MISSING_TOOLS+=("tar") command -v doxygen >/dev/null 2>&1 || MISSING_TOOLS+=("doxygen") + command -v python3 >/dev/null 2>&1 || MISSING_TOOLS+=("python3") # Check for library dependencies (platform-specific) MISSING_LIBS=() @@ -142,7 +143,8 @@ check_and_install_dependencies() { doxygen \ unzip \ libyaml-cpp-dev \ - rpm + rpm \ + python3 elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then print_info "Installing dependencies for CentOS/RHEL/Rocky Linux..." @@ -177,7 +179,8 @@ check_and_install_dependencies() { doxygen \ rpm-build \ yaml-cpp-devel \ - yaml-cpp-static + yaml-cpp-static \ + python3 else print_error "Unsupported OS: $OS" echo "" @@ -190,6 +193,7 @@ check_and_install_dependencies() { echo " - wget" echo " - tar" echo " - doxygen" + echo " - python3" echo "" echo "Development Libraries:" echo " - libpci-dev (or pciutils-devel)" From 237d50db3412a45690fe70206663f523f3339080 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 31 Jan 2026 20:52:14 -0800 Subject: [PATCH 049/275] Switching to manylinux for rocky --- .github/workflows/README_BUILD_PACKAGES.md | 4 +- .../workflows/build-relocatable-packages.yml | 6 +-- QUICKSTART_PACKAGES.md | 2 +- build_packages_local.sh | 48 ++++++++++++------- 4 files changed, 38 insertions(+), 22 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index c7afb120f..ac7a3ac73 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -146,7 +146,7 @@ The workflow builds packages for: | Platform | Container/Runner | Package Types | Script Mode | |----------|------------------|---------------|-------------| | Ubuntu 22.04 | ubuntu-22.04 | DEB, TGZ | Auto-detects Ubuntu | -| Rocky Linux 8 | rockylinux:8 | RPM, TGZ | Auto-detects CentOS | +| Manylinux 2.28 (AlmaLinux 8) | manylinux_2_28_x86_64 | RPM, TGZ | Auto-detects AlmaLinux | ## Package Naming Convention @@ -232,7 +232,7 @@ rpm -qRp rocm-validation-suite-*.rpm # Package dependencies 3. Scroll down to **Artifacts** section 4. Download the package artifacts: - `ubuntu-22.04-packages-${GPU_FAMILY}` - - `rockylinux8-packages-${GPU_FAMILY}` + - `manylinux_2_28-packages-${GPU_FAMILY}` - `build-report` (contains build summary) ## Customization diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 7c4c6f275..196e522ff 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -91,13 +91,13 @@ jobs: retention-days: 30 build-centos: - name: Build CentOS/RHEL Packages + name: Build CentOS/RHEL Packages (manylinux_2_28) runs-on: ubuntu-latest container: - image: rockylinux:8 + image: quay.io/pypa/manylinux_2_28_x86_64 strategy: matrix: - distro: ['rockylinux8'] + distro: ['manylinux_2_28'] steps: - name: Install Git (for checkout) diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index 14c7f55bf..7120d40be 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -79,7 +79,7 @@ The workflow automatically runs when you: - Scroll down to the **Artifacts** section - Download the package artifacts: - `ubuntu-22.04-packages-${GPU_FAMILY}` - Contains DEB and TGZ - - `rockylinux8-packages-${GPU_FAMILY}` - Contains RPM and TGZ + - `manylinux_2_28-packages-${GPU_FAMILY}` - Contains RPM and TGZ - `build-report` - Build summary and details --- diff --git a/build_packages_local.sh b/build_packages_local.sh index 322996ee8..ba3135788 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -114,8 +114,8 @@ check_and_install_dependencies() { [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("libyaml-cpp-dev") command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm") command -v unzip >/dev/null 2>&1 || MISSING_LIBS+=("unzip") - elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then - # Check for CentOS/RHEL library headers + elif [[ "$OS" =~ ^(centos|rhel|rocky|almalinux|amzn)$ ]]; then + # Check for CentOS/RHEL/Rocky/AlmaLinux library headers [ -f /usr/include/pci/pci.h ] || MISSING_LIBS+=("pciutils-devel") [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("yaml-cpp-devel") command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm-build") @@ -145,42 +145,58 @@ check_and_install_dependencies() { libyaml-cpp-dev \ rpm \ python3 - elif [[ "$OS" =~ ^(centos|rhel|rocky)$ ]]; then - print_info "Installing dependencies for CentOS/RHEL/Rocky Linux..." + elif [[ "$OS" =~ ^(centos|rhel|rocky|almalinux|amzn)$ ]]; then + print_info "Installing dependencies for CentOS/RHEL/Rocky/AlmaLinux..." - # Enable PowerTools repository (contains doxygen) + # Check if running in manylinux container (has /opt/python) + if [ -d /opt/python ]; then + print_info "Detected manylinux environment - some tools may be pre-installed" + fi + + # Enable PowerTools/CRB repository (contains doxygen and yaml-cpp) print_info "Enabling PowerTools/CRB repository..." if command -v dnf >/dev/null 2>&1; then - # Rocky Linux 8+ uses dnf and powertools - dnf install -y dnf-plugins-core + # AlmaLinux/Rocky Linux 8+ uses dnf + dnf install -y dnf-plugins-core 2>/dev/null || true dnf config-manager --set-enabled powertools 2>/dev/null || \ dnf config-manager --set-enabled crb 2>/dev/null || \ - print_warning "Could not enable PowerTools/CRB repo (may already be enabled)" + dnf config-manager --set-enabled devel 2>/dev/null || \ + print_warning "Could not enable PowerTools/CRB/devel repo (may already be enabled)" else - # CentOS 8 uses yum and PowerTools - yum install -y yum-utils + # CentOS 8 uses yum + yum install -y yum-utils 2>/dev/null || true yum-config-manager --enable powertools 2>/dev/null || \ yum-config-manager --enable PowerTools 2>/dev/null || \ - print_warning "Could not enable PowerTools repo (may already be enabled)" + yum-config-manager --enable devel 2>/dev/null || \ + print_warning "Could not enable PowerTools/devel repo (may already be enabled)" fi + # Install EPEL repository (may already be present in manylinux) print_info "Installing EPEL repository..." - yum install -y epel-release + yum install -y epel-release 2>/dev/null || print_warning "EPEL may already be installed" print_info "Installing build dependencies..." + # Note: manylinux typically has gcc, g++, make pre-installed yum install -y \ gcc \ gcc-c++ \ - cmake3 \ make \ git \ wget \ + tar \ pciutils-devel \ doxygen \ rpm-build \ - yaml-cpp-devel \ - yaml-cpp-static \ - python3 + python3 \ + || print_warning "Some packages may already be installed" + + # Install cmake and yaml-cpp separately as they may need special handling + print_info "Installing cmake..." + yum install -y cmake3 || yum install -y cmake || print_warning "cmake installation may have failed" + + print_info "Installing yaml-cpp..." + yum install -y yaml-cpp-devel yaml-cpp-static 2>/dev/null || \ + print_warning "yaml-cpp may not be available - will try to continue" else print_error "Unsupported OS: $OS" echo "" From 42f20c4fb7ea9da045ce9137153b6d025b1ca993 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 31 Jan 2026 23:29:27 -0800 Subject: [PATCH 050/275] Set COMPILER as hipcc and cmake as cmake3 On almalinux gtest compiled with g++ and rvs compiled with hipcc casuing mismatch hence set both to hipcc(clang++) using default cmake on almalinux causing policy issue hence use cmake3 --- build_packages_local.sh | 54 ++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index ba3135788..67899b407 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -309,12 +309,38 @@ export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" export HIP_DEVICE_LIB_PATH="$HIP_DEVICE_LIB_PATH" +# TODO: Currently hipcc and cmake3 are only set for AlmaLinux (manylinux_2_28) +# Ubuntu works fine without these settings. Need to verify later if these +# should be applied universally for all OS or kept OS-specific. + +# AlmaLinux-specific settings for manylinux_2_28 +if [[ "$OS" == "almalinux" ]]; then + # Set C++ compiler to hipcc from ROCm for AlmaLinux + if [ -x "$ROCM_PATH/bin/hipcc" ]; then + export CMAKE_CXX_COMPILER="$ROCM_PATH/bin/hipcc" + print_success "Set CMAKE_CXX_COMPILER to hipcc (AlmaLinux)" + else + print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" + fi + + # Use cmake3 for AlmaLinux + export CMAKE_COMMAND="cmake3" + print_info "Using cmake3 (AlmaLinux/Manylinux)" +else + # Ubuntu: use defaults (system compiler and cmake) + export CMAKE_COMMAND="cmake" + print_info "Using cmake (Ubuntu)" +fi print_info "Environment variables set:" echo " ROCM_PATH=$ROCM_PATH" echo " PATH includes: $ROCM_PATH/bin" echo " LD_LIBRARY_PATH includes: $ROCM_PATH/lib" echo " HIP_DEVICE_LIB_PATH=$HIP_DEVICE_LIB_PATH" +if [ -n "$CMAKE_CXX_COMPILER" ]; then + echo " CMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER" +fi +echo " CMAKE_COMMAND=$CMAKE_COMMAND" # Verify ROCm installation print_info "Verifying ROCm installation..." @@ -340,16 +366,26 @@ if [ -d "$BUILD_DIR" ]; then rm -rf "$BUILD_DIR" fi -cmake -B "$BUILD_DIR" \ - -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ - -DROCM_PATH="$ROCM_PATH" \ - -DHIP_PLATFORM=amd \ - -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ - -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ - -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" \ +# Build cmake command with optional CXX compiler +CMAKE_ARGS=( + -B "$BUILD_DIR" + -DCMAKE_BUILD_TYPE="$BUILD_TYPE" + -DROCM_PATH="$ROCM_PATH" + -DHIP_PLATFORM=amd + -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs + -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs + -DCMAKE_SKIP_RPATH=FALSE + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" -DRPATH_MODE=OFF +) + +# Add CXX compiler if set +if [ -n "$CMAKE_CXX_COMPILER" ]; then + CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") +fi + +$CMAKE_COMMAND "${CMAKE_ARGS[@]}" if [ $? -eq 0 ]; then print_success "CMake configuration successful" From f1a7cfb08c33599baba0fb4d39d7b5df52b3b25f Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 3 Feb 2026 11:51:01 -0800 Subject: [PATCH 051/275] Fix RUNPATH and detecting latests ROCm version RUPATH had build location as well in it and had to set CMAKE setting to remove that.ROCm version assingment after fetching verison from index was having issue. Updated the documents as per latest cdode. --- QUICKSTART_PACKAGES.md | 32 ++++++++++++++++++++------------ build_packages_local.sh | 23 +++++++++++++++-------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index 7120d40be..fde466bc7 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -68,8 +68,12 @@ The workflow automatically runs when you: 2. **Click "Run workflow"** - Choose the branch to run from - - (Optional) Set custom ROCm version (e.g., `6.5.0rc20250610`) - - (Optional) Select GPU family target (default: `gfx110X-all`) + - (Optional) Set custom ROCm version (e.g., `7.11.0a20260121`) + - Default: `7.11.0a20260121` + - If not specified, script auto-fetches latest version from TheRock + - (Optional) Select GPU family target + - Default: `gfx110X-all` (AMD RX 7000 series) + - Options: `gfx94X-dcgpu`, `gfx950-dcgpu`, `gfx110X-all`, `gfx1151`, `gfx120X-all` 3. **Wait for Build to Complete** - Build typically takes 20-30 minutes @@ -96,14 +100,15 @@ chmod +x build_packages_local.sh sudo ./build_packages_local.sh ``` -**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, Ubuntu runners use `sudo` while container builds (Rocky/CentOS) run as root directly. +**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, Ubuntu runners use `sudo` while container builds (Manylinux/AlmaLinux) run as root directly. This will: 1. Automatically detect and install missing dependencies -2. Fetch latest ROCm SDK version (or use default 7.11.0a20260121) -3. Configure and build RVS -4. Generate DEB, RPM, and TGZ packages -4. Save packages to `./build/` directory +2. Fetch latest ROCm SDK version from TheRock (or use default 7.11.0a20260121) +3. Locate HIP device libraries (amdgcn/bitcode) +4. Configure and build RVS with relocatable RPATH +5. Generate DEB, RPM, and TGZ packages +6. Save packages to `./build/` directory ### Custom Build @@ -377,9 +382,9 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH ### Default Configuration -- **RVS Version:** Read from CMakeLists.txt by CMake/CPack (currently 1.3.0) -- **ROCm Version:** 6.5.0rc20250610 -- **GPU Family:** gfx110X-all (AMD RX 7900 series) +- **RVS Version:** Read from CMakeLists.txt by CMake/CPack +- **ROCm Version:** Auto-fetched from TheRock (fallback: 7.11.0a20260121) +- **GPU Family:** gfx110X-all (AMD RX 7000 series) - **Install Prefix:** /opt/rocm/rvs - **Build Type:** Release @@ -387,11 +392,14 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH | Variable | Description | Default | |----------|-------------|---------| -| `ROCM_VERSION` | ROCm SDK version to download | 6.5.0rc20250610 | +| `ROCM_VERSION` | ROCm SDK version to download | Auto-fetched (fallback: 7.11.0a20260121) | | `GPU_FAMILY` | Target GPU architecture | gfx110X-all | | `BUILD_TYPE` | CMake build type | Release | -**Note:** RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. +**Note:** +- RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. +- ROCm version is automatically fetched from TheRock. Set `ROCM_VERSION` to override. +- HIP device libraries (amdgcn/bitcode) are auto-located and exported. --- diff --git a/build_packages_local.sh b/build_packages_local.sh index 67899b407..0bf9f0c54 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -20,22 +20,23 @@ BLUE='\033[0;34m' NC='\033[0m' # No Color print_info() { - echo -e "${BLUE}[INFO]${NC} $1" + echo -e "${BLUE}[INFO]${NC} $1" >&2 } print_success() { - echo -e "${GREEN}[SUCCESS]${NC} $1" + echo -e "${GREEN}[SUCCESS]${NC} $1" >&2 } print_warning() { - echo -e "${YELLOW}[WARNING]${NC} $1" + echo -e "${YELLOW}[WARNING]${NC} $1" >&2 } print_error() { - echo -e "${RED}[ERROR]${NC} $1" + echo -e "${RED}[ERROR]${NC} $1" >&2 } # Function to fetch latest ROCm version for specified GPU family +# Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { local gpu_family="$1" local index_url="https://therock-nightly-tarball.s3.amazonaws.com/index.html" @@ -51,12 +52,12 @@ fetch_latest_rocm_version() { if [ -z "$latest_version" ]; then print_error "Could not fetch latest ROCm version for $gpu_family" print_info "Falling back to default version: 7.11.0a20260121" - echo "7.11.0a20260121" + ROCM_VERSION="7.11.0a20260121" return 1 fi print_success "Found latest ROCm version: $latest_version" - echo "$latest_version" + ROCM_VERSION="$latest_version" return 0 } @@ -65,7 +66,13 @@ if [ -n "$ROCM_VERSION" ]; then print_info "Using specified ROCm version: $ROCM_VERSION" else print_info "No ROCm version specified, fetching latest..." - ROCM_VERSION=$(fetch_latest_rocm_version "$GPU_FAMILY") + fetch_latest_rocm_version "$GPU_FAMILY" + + # Validate that ROCM_VERSION was properly set + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm version" + exit 1 + fi fi # Print configuration @@ -375,7 +382,7 @@ CMAKE_ARGS=( -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs -DCMAKE_SKIP_RPATH=FALSE - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" -DRPATH_MODE=OFF ) From 7a5d446f116e8c0af4188e227a7f993ff1be9018 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 3 Feb 2026 17:44:58 -0800 Subject: [PATCH 052/275] add ROCm version & branach info to pkg version Updated package version info and add parameter to use librocm-core to fetch ROCm install location dynamically. --- QUICKSTART_PACKAGES.md | 6 +++++ build_packages_local.sh | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index fde466bc7..6cb4140d9 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -395,11 +395,17 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH | `ROCM_VERSION` | ROCm SDK version to download | Auto-fetched (fallback: 7.11.0a20260121) | | `GPU_FAMILY` | Target GPU architecture | gfx110X-all | | `BUILD_TYPE` | CMake build type | Release | +| `ROCM_LIBPATCH_VERSION` | Major.minor in xxyy format (auto-extracted) | Derived from ROCM_VERSION (e.g., `7.11` → `0711`) | +| `CPACK_DEBIAN_PACKAGE_RELEASE` | DEB package release string (auto-generated) | **Dev**: `branch.commit` (e.g., `master.a1b2c3d`). **Rel**: `GITHUB_RUN_NUMBER` (default: `1`) | +| `CPACK_RPM_PACKAGE_RELEASE` | RPM package release string (auto-generated) | **Dev**: `branch.commit` (e.g., `master.a1b2c3d`). **Rel**: `GITHUB_RUN_NUMBER` (default: `1`) | +| `GITHUB_RUN_NUMBER` | GitHub Actions workflow run number | `1` (for local builds) | **Note:** - RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. - ROCm version is automatically fetched from TheRock. Set `ROCM_VERSION` to override. - HIP device libraries (amdgcn/bitcode) are auto-located and exported. +- `ROCM_LIBPATCH_VERSION` is automatically extracted and formatted as xxyy (e.g., `6.5` → `0605`, `10.2` → `1002`). +- Package release strings: **Development branches** use `branch.commit`, **Release branches** (starting with "rel") use GitHub run number. --- diff --git a/build_packages_local.sh b/build_packages_local.sh index 0bf9f0c54..db4c3db24 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -316,6 +316,50 @@ export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" export HIP_DEVICE_LIB_PATH="$HIP_DEVICE_LIB_PATH" +# Extract major.minor version from ROCM_VERSION for ROCM_LIBPATCH_VERSION +# Convert to xxyy format with zero padding +# Example: "7.11.0a20260121" -> "0711", "6.5.0" -> "0605", "10.2.0" -> "1002" +ROCM_VERSION_MAJOR_MINOR=$(echo "$ROCM_VERSION" | grep -oP '^\d+\.\d+') +if [ -z "$ROCM_VERSION_MAJOR_MINOR" ]; then + print_error "Could not extract major.minor version from ROCM_VERSION: $ROCM_VERSION" + exit 1 +fi + +# Split into major and minor, zero-pad to 2 digits each +ROCM_MAJOR=$(echo "$ROCM_VERSION_MAJOR_MINOR" | cut -d'.' -f1) +ROCM_MINOR=$(echo "$ROCM_VERSION_MAJOR_MINOR" | cut -d'.' -f2) +ROCM_LIBPATCH_VERSION=$(printf "%02d%02d" "$ROCM_MAJOR" "$ROCM_MINOR") + +export ROCM_LIBPATCH_VERSION +print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION (from $ROCM_VERSION_MAJOR_MINOR)" + +# Set CPACK package release based on branch type +# - Non-release branches (not starting with "rel"): use branch.commit format +# - Release branches (starting with "rel"): use GitHub run number +GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown") +GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") + +if [[ "$GIT_BRANCH" =~ ^rel ]]; then + # Release branch: use GitHub run number (fallback to 1 for local builds) + GITHUB_RUN_NUMBER="${GITHUB_RUN_NUMBER:-1}" + PACKAGE_RELEASE="$GITHUB_RUN_NUMBER" + + export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" + export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" + + print_success "Set CPACK package release: $PACKAGE_RELEASE (release branch: $GIT_BRANCH, run: $GITHUB_RUN_NUMBER)" +else + # Development branch: use branch name and commit + # Sanitize branch name: replace / and other special chars with - + SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g') + PACKAGE_RELEASE="${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" + + export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" + export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" + + print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" +fi + # TODO: Currently hipcc and cmake3 are only set for AlmaLinux (manylinux_2_28) # Ubuntu works fine without these settings. Need to verify later if these # should be applied universally for all OS or kept OS-specific. @@ -344,6 +388,13 @@ echo " ROCM_PATH=$ROCM_PATH" echo " PATH includes: $ROCM_PATH/bin" echo " LD_LIBRARY_PATH includes: $ROCM_PATH/lib" echo " HIP_DEVICE_LIB_PATH=$HIP_DEVICE_LIB_PATH" +echo " ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION" +if [ -n "$CPACK_DEBIAN_PACKAGE_RELEASE" ]; then + echo " CPACK_DEBIAN_PACKAGE_RELEASE=$CPACK_DEBIAN_PACKAGE_RELEASE" +fi +if [ -n "$CPACK_RPM_PACKAGE_RELEASE" ]; then + echo " CPACK_RPM_PACKAGE_RELEASE=$CPACK_RPM_PACKAGE_RELEASE" +fi if [ -n "$CMAKE_CXX_COMPILER" ]; then echo " CMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER" fi @@ -385,6 +436,8 @@ CMAKE_ARGS=( -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" -DRPATH_MODE=OFF + -DCMAKE_VERBOSE_MAKEFILE=1 + -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ) # Add CXX compiler if set From bc67411837023b2a777663456dce8bef94d644ce Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 3 Feb 2026 21:00:53 -0800 Subject: [PATCH 053/275] Update documentation --- .github/workflows/README_BUILD_PACKAGES.md | 57 ++++++++++++++++------ 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index ac7a3ac73..d5591ef23 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -22,8 +22,9 @@ The workflow runs automatically on: When manually triggering the workflow, you can specify: -1. **ROCm Version** (e.g., `6.5.0rc20250610`) - - Default: `6.5.0rc20250610` +1. **ROCm Version** (e.g., `7.11.0a20260121`) + - Default: `7.11.0a20260121` + - The script can also auto-fetch the latest version from TheRock 2. **GPU Family Target**: - `gfx94X-dcgpu` - MI300A/MI300X @@ -44,30 +45,40 @@ GitHub Actions Workflow ├── Set Environment Variables (ROCM_VERSION, GPU_FAMILY, BUILD_TYPE) └── Execute build_packages_local.sh ├── 1. Detect OS and Install Dependencies - │ ├── Ubuntu/Debian: apt-get install build-essential, cmake, etc. - │ └── CentOS/RHEL: yum install gcc, gcc-c++, cmake3, etc. - ├── 2. Download ROCm SDK from TheRock + │ ├── Ubuntu: apt-get install build-essential, cmake, python3, etc. + │ └── AlmaLinux: yum install gcc, gcc-c++, cmake3, python3, etc. + │ └── Enable PowerTools/CRB for doxygen and yaml-cpp + ├── 2. Auto-fetch Latest ROCm or Use Specified Version │ └── URL: https://therock-nightly-tarball.s3.../${GPU_FAMILY}-${ROCM_VERSION}.tar.gz ├── 3. Extract and Setup ROCm Environment │ ├── export ROCM_PATH="$HOME/rocm-sdk/install" │ ├── export PATH="$ROCM_PATH/bin:$PATH" │ ├── export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" - │ └── export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" + │ ├── export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" + │ ├── export HIP_DEVICE_LIB_PATH (auto-detected amdgcn/bitcode path) + │ ├── export ROCM_LIBPATCH_VERSION (major.minor in xxyy format, e.g., 0711) + │ ├── export CPACK_DEBIAN_PACKAGE_RELEASE (dev: branch.commit, rel: run number) + │ ├── export CPACK_RPM_PACKAGE_RELEASE (dev: branch.commit, rel: run number) + │ ├── export CMAKE_CXX_COMPILER=hipcc (AlmaLinux only) + │ └── export CMAKE_COMMAND=cmake3 (AlmaLinux) or cmake (Ubuntu) ├── 4. Configure CMake with Relocatable RPATH - │ └── cmake -B ./build \ + │ └── $CMAKE_COMMAND -B ./build \ │ -DCMAKE_BUILD_TYPE=Release \ │ -DROCM_PATH=$ROCM_PATH \ │ -DHIP_PLATFORM=amd \ + │ -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER (if set) \ │ -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ │ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ │ -DCMAKE_SKIP_RPATH=FALSE \ - │ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ - │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" + │ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ + │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" \ + │ -DCMAKE_VERBOSE_MAKEFILE=1 \ + │ -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ├── 5. Build RVS │ └── make -C ./build -j$(nproc) └── 6. Create Packages ├── Ubuntu: DEB + TGZ (via CPack) - └── CentOS/RHEL: RPM + TGZ (via CPack) + └── AlmaLinux: RPM + TGZ (via CPack) ``` ### Key Technical Details @@ -80,7 +91,15 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" **Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. -**HIP Platform**: Set to `amd` via CMake parameter for AMD GPU support. +**HIP Device Libraries**: Automatically located and exported as `HIP_DEVICE_LIB_PATH` for clang device library discovery. + +**Compiler Selection**: For AlmaLinux (manylinux_2_28), `CMAKE_CXX_COMPILER` is set to ROCm's `hipcc`. Ubuntu uses system default compiler. + +**CMake Command**: Uses `cmake3` on AlmaLinux (manylinux_2_28) and `cmake` on Ubuntu. + +**Verbose Build Output**: `CMAKE_VERBOSE_MAKEFILE=1` enables detailed compilation output for debugging and transparency. + +**Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. **Single Source of Truth**: All build logic resides in `build_packages_local.sh`, which can be used for both local builds and CI/CD. @@ -100,10 +119,14 @@ The workflow uses `build_packages_local.sh` as the core build engine. This scrip ### Script Features -- **OS Detection**: Automatically identifies Ubuntu/Debian vs CentOS/RHEL +- **OS Detection**: Automatically identifies Ubuntu vs AlmaLinux - **Dependency Management**: Installs all required build tools and libraries -- **ROCm SDK Setup**: Downloads and configures ROCm from TheRock tarballs + - Enables PowerTools/CRB repository on AlmaLinux for doxygen and yaml-cpp +- **ROCm SDK Setup**: Auto-fetches latest version or downloads specified version from TheRock tarballs +- **HIP Device Libraries**: Auto-locates amdgcn/bitcode directory and exports HIP_DEVICE_LIB_PATH - **CMake Configuration**: Sets up relocatable RPATHs and all build parameters + - Uses cmake3 on AlmaLinux, cmake on Ubuntu + - Sets CMAKE_CXX_COMPILER to hipcc on AlmaLinux - **Building**: Compiles RVS with parallel builds - **Packaging**: Creates DEB, RPM, and TGZ packages using CPack - **Color Output**: Clear, colored progress indicators @@ -138,6 +161,10 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_VERSION` | Auto-fetched (fallback: `7.11.0a20260121`) | ROCm SDK version from TheRock. If not set, script fetches latest version automatically. | | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | +| `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `6.5` → `0605`) - used for RVS version tagging | +| `CPACK_DEBIAN_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | +| `CPACK_RPM_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | +| `GITHUB_RUN_NUMBER` | `1` (local) | GitHub Actions run number - automatically set in CI, defaults to `1` for local builds | ## Build Matrix @@ -328,9 +355,11 @@ cmake -B "$BUILD_DIR" \ -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" \ -DRPATH_MODE=OFF \ + -DCMAKE_VERBOSE_MAKEFILE=1 \ + -DFETCH_ROCMPATH_FROM_ROCMCORE=ON \ -DYOUR_CUSTOM_OPTION=ON # Add custom options here ``` From 44983084c322def252799f3e89075408d442474e Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 4 Feb 2026 15:02:33 -0800 Subject: [PATCH 054/275] Updated comments and docs to refer newer ROCm Default is set to 7.11, so better to point to default of later as the older ones will be removed from the repo. --- .github/workflows/README_BUILD_PACKAGES.md | 8 ++++---- CHANGES_SUMMARY.md | 4 ++-- PACKAGE_BUILD_SUMMARY.md | 6 +++--- QUICKSTART_PACKAGES.md | 8 ++++---- VERIFICATION_CHECKLIST.md | 4 ++-- build_packages_local.sh | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index d5591ef23..0b3fe9c5a 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -161,7 +161,7 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_VERSION` | Auto-fetched (fallback: `7.11.0a20260121`) | ROCm SDK version from TheRock. If not set, script fetches latest version automatically. | | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | -| `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `6.5` → `0605`) - used for RVS version tagging | +| `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `8.0` → `0800`) - used for RVS version tagging | | `CPACK_DEBIAN_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | | `CPACK_RPM_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | | `GITHUB_RUN_NUMBER` | `1` (local) | GitHub Actions run number - automatically set in CI, defaults to `1` for local builds | @@ -271,7 +271,7 @@ rpm -qRp rocm-validation-suite-*.rpm # Package dependencies 1. Go to **Actions** → **Build Relocatable Packages** 2. Click **Run workflow** 3. Enter custom values for: - - ROCm Version (e.g., `6.5.0rc20250610`) + - ROCm Version (e.g., `7.11.0a20260121`) - GPU Family (e.g., `gfx110X-all`) **Option 2: Edit Workflow Defaults** @@ -280,7 +280,7 @@ Edit the `env` section in `.github/workflows/build-relocatable-packages.yml`: ```yaml env: - ROCM_VERSION: '6.5.0rc20250610' # Change this + ROCM_VERSION: '7.11.0a20260121' # Change this GPU_FAMILY: 'gfx110X-all' # Change this BUILD_TYPE: Release ``` @@ -290,7 +290,7 @@ env: Edit `build_packages_local.sh`: ```bash -ROCM_VERSION="${ROCM_VERSION:-6.5.0rc20250610}" # Change default here +ROCM_VERSION="${ROCM_VERSION:-7.11.0a20260121}" # Change default here GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" # Change default here BUILD_TYPE="${BUILD_TYPE:-Release}" ``` diff --git a/CHANGES_SUMMARY.md b/CHANGES_SUMMARY.md index 739ee66e9..86addce53 100644 --- a/CHANGES_SUMMARY.md +++ b/CHANGES_SUMMARY.md @@ -167,7 +167,7 @@ mv "rocm-validation-suite_1.3.0_amd64.deb" \ ./build_packages_local.sh # Custom configuration -ROCM_VERSION=6.5.0rc20250610 GPU_FAMILY=gfx110X-all ./build_packages_local.sh +ROCM_VERSION=7.11.0a20260121 GPU_FAMILY=gfx110X-all ./build_packages_local.sh ``` ## Installation Path Changes @@ -256,7 +256,7 @@ This ensures packages work regardless of installation directory. ## Version Management - **RVS Version**: Automatically read by CMake from `CMakeLists.txt` `project(VERSION)` command -- **ROCm SDK Version**: 6.5.0rc20250610 (configurable via environment variable) +- **ROCm SDK Version**: 7.11.0a20260121 (default, auto-fetched if not specified, configurable via environment variable) - **GPU Family**: gfx110X-all (default, configurable via environment variable) ## Files Modified diff --git a/PACKAGE_BUILD_SUMMARY.md b/PACKAGE_BUILD_SUMMARY.md index 27b829c4d..e2fa129bd 100644 --- a/PACKAGE_BUILD_SUMMARY.md +++ b/PACKAGE_BUILD_SUMMARY.md @@ -92,9 +92,9 @@ User-friendly guide for quick onboarding: ### ROCm Versions - Configurable via environment variable or workflow input -- Default: `6.5.0rc20250610` +- Default: `7.11.0a20260121` (auto-fetched if not specified) - Downloads from TheRock nightly builds -- Format: `X.Y.ZrcYYYYMMDD` +- Format: `X.Y.ZaYYYYMMDD` or `X.Y.ZrcYYYYMMDD` ## Technical Highlights @@ -352,7 +352,7 @@ ROCmValidationSuite/ Edit `.github/workflows/build-relocatable-packages.yml`: ```yaml env: - ROCM_VERSION: '6.5.0rc20250115' # Update this + ROCM_VERSION: '7.11.0a20260121' # Update this ``` ### Add New Distribution diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md index 6cb4140d9..030a3bde9 100644 --- a/QUICKSTART_PACKAGES.md +++ b/QUICKSTART_PACKAGES.md @@ -136,7 +136,7 @@ If you prefer manual control: ```bash # 1. Download ROCm SDK -ROCM_VERSION="6.5.0rc20250610" +ROCM_VERSION="7.11.0a20260121" GPU_FAMILY="gfx110X-all" mkdir -p ~/rocm-sdk cd ~/rocm-sdk @@ -277,7 +277,7 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH **Solution:** 1. Check if the URL is accessible: ```bash - wget --spider "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-gfx110X-all-6.5.0rc20250610.tar.gz" + wget --spider "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-gfx110X-all-7.11.0a20260121.tar.gz" ``` 2. Verify the ROCm version exists: @@ -286,7 +286,7 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH 3. Try a different ROCm version: ```bash - export ROCM_VERSION="6.5.0rc20250115" # Use different date + export ROCM_VERSION="7.12.0a20260205" # Use a later version ``` ### Build Fails: Missing Dependencies @@ -404,7 +404,7 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH - RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. - ROCm version is automatically fetched from TheRock. Set `ROCM_VERSION` to override. - HIP device libraries (amdgcn/bitcode) are auto-located and exported. -- `ROCM_LIBPATCH_VERSION` is automatically extracted and formatted as xxyy (e.g., `6.5` → `0605`, `10.2` → `1002`). +- `ROCM_LIBPATCH_VERSION` is automatically extracted and formatted as xxyy (e.g., `7.11` → `0711`, `10.2` → `1002`). - Package release strings: **Development branches** use `branch.commit`, **Release branches** (starting with "rel") use GitHub run number. --- diff --git a/VERIFICATION_CHECKLIST.md b/VERIFICATION_CHECKLIST.md index 528e5c55f..16ec93408 100644 --- a/VERIFICATION_CHECKLIST.md +++ b/VERIFICATION_CHECKLIST.md @@ -54,7 +54,7 @@ done ### Test 3: ROCm SDK Download Test ```bash # Test if ROCm tarball URL is accessible -ROCM_VERSION="6.5.0rc20250610" +ROCM_VERSION="7.11.0a20260121" GPU_FAMILY="gfx110X-all" TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" @@ -64,7 +64,7 @@ wget --spider "$TARBALL_URL" 2>&1 | grep "200 OK" && echo "✓ Tarball accessibl ### Test 4: Full Local Build (Optional - Takes 30+ minutes) ```bash # Run full build locally -export ROCM_VERSION="6.5.0rc20250610" +export ROCM_VERSION="7.11.0a20260121" export GPU_FAMILY="gfx110X-all" ./build_packages_local.sh diff --git a/build_packages_local.sh b/build_packages_local.sh index db4c3db24..787255d23 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -318,7 +318,7 @@ export HIP_DEVICE_LIB_PATH="$HIP_DEVICE_LIB_PATH" # Extract major.minor version from ROCM_VERSION for ROCM_LIBPATCH_VERSION # Convert to xxyy format with zero padding -# Example: "7.11.0a20260121" -> "0711", "6.5.0" -> "0605", "10.2.0" -> "1002" +# Example: "7.11.0a20260121" -> "0711", "8.0.0" -> "0800", "10.2.0" -> "1002" ROCM_VERSION_MAJOR_MINOR=$(echo "$ROCM_VERSION" | grep -oP '^\d+\.\d+') if [ -z "$ROCM_VERSION_MAJOR_MINOR" ]; then print_error "Could not extract major.minor version from ROCM_VERSION: $ROCM_VERSION" From a72dbb52bb39c6259e4a3424e00715376606dae8 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 5 Feb 2026 16:01:03 -0800 Subject: [PATCH 055/275] Enable daily build for 5AM PST --- .github/workflows/README_BUILD_PACKAGES.md | 1 + .github/workflows/build-relocatable-packages.yml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 0b3fe9c5a..2fd6f2f49 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -16,6 +16,7 @@ All packages are built with relocatable RPATH settings, meaning they can be inst The workflow runs automatically on: - Push to `master`, `main`, or `release/**` branches - Pull requests to `master` or `main` branches +- **Scheduled**: Daily at **5:00 AM PST** (13:00 UTC); uses **latest ROCm version** (auto-fetched from TheRock) - Manual trigger via GitHub Actions UI (workflow_dispatch) ### Manual Trigger Parameters diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 196e522ff..8b0912f1e 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -10,6 +10,9 @@ on: branches: - master - main + schedule: + # Run daily at 5:00 AM PST (13:00 UTC; PST is UTC-8) + - cron: '0 13 * * *' workflow_dispatch: inputs: rocm_version: @@ -49,6 +52,11 @@ jobs: - name: Set ROCm Version and GPU Family run: | + if [ "${{ github.event_name }}" = "schedule" ]; then + # Scheduled run: use latest ROCm (leave ROCM_VERSION unset for auto-fetch) + echo "ROCM_VERSION=" >> $GITHUB_ENV + echo "Scheduled run: will auto-fetch latest ROCm version" + fi if [ -n "${{ github.event.inputs.rocm_version }}" ]; then echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV fi @@ -111,7 +119,10 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ -n "${{ github.event.inputs.rocm_version }}" ]; then + if [ "${{ github.event_name }}" = "schedule" ]; then + echo "ROCM_VERSION=" >> $GITHUB_ENV + echo "Scheduled run: will auto-fetch latest ROCm version" + elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV else echo "ROCM_VERSION=${{ env.ROCM_VERSION }}" >> $GITHUB_ENV From aa9a891bf2ff93a20bf5a97dd46bf80dcb93ccb7 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 6 Feb 2026 10:39:46 -0800 Subject: [PATCH 056/275] Removing unecessary worklog documents --- CHANGES_SUMMARY.md | 344 -------------------------- PACKAGE_BUILD_SUMMARY.md | 499 -------------------------------------- QUICKSTART_PACKAGES.md | 426 -------------------------------- VERIFICATION_CHECKLIST.md | 412 ------------------------------- 4 files changed, 1681 deletions(-) delete mode 100644 CHANGES_SUMMARY.md delete mode 100644 PACKAGE_BUILD_SUMMARY.md delete mode 100644 QUICKSTART_PACKAGES.md delete mode 100644 VERIFICATION_CHECKLIST.md diff --git a/CHANGES_SUMMARY.md b/CHANGES_SUMMARY.md deleted file mode 100644 index 86addce53..000000000 --- a/CHANGES_SUMMARY.md +++ /dev/null @@ -1,344 +0,0 @@ -# Changes Summary: Package Build System Evolution - -## Overview -This document chronicles the evolution of the RVS package build system from manual workflow steps to a unified, automated build system using `build_packages_local.sh` as the single source of truth. - -## Major Changes Timeline - -### Phase 1: Initial Implementation -- Created GitHub Actions workflow for relocatable packages -- Used ROCm SDK from TheRock tarballs -- Set install path to `/opt/rocm/rvs` -- Configured relocatable RPATH with `$ORIGIN` - -### Phase 2: Version Management Fix -- Changed package naming to use RVS version (from `CMakeLists.txt`) instead of ROCm version -- Fixed package metadata mismatch by removing manual `mv` renaming -- Let CPack handle all package naming automatically -- Ensured Debian and RPM standards compliance - -### Phase 3: Removed Dynamic Version Extraction -- Removed manual `grep`-based version extraction from workflow -- Removed manual version extraction from build script -- Rely on CMake/CPack native version management from `project(VERSION)` in `CMakeLists.txt` -- Simplified code by eliminating redundant version handling - -### Phase 4: Build System Unification (Current) -- Created `build_packages_local.sh` as single source of truth -- Refactored GitHub Actions workflow to delegate all build logic to script -- Added OS detection and automatic dependency installation to script -- Eliminated code duplication between Ubuntu and CentOS jobs -- Reduced workflow from ~380 lines to ~250 lines - -## Current Architecture - -### Workflow Structure - -``` -GitHub Actions Workflow (Minimal CI/CD Orchestration) -├── Checkout Repository -├── Set Environment Variables -└── Execute build_packages_local.sh (All Build Logic) - ├── Detect OS (Ubuntu/Debian vs CentOS/RHEL) - ├── Install Dependencies (platform-specific) - ├── Download ROCm SDK from TheRock - ├── Extract and Setup ROCm Environment - ├── Configure CMake with relocatable RPATH + HIP_PLATFORM=amd - ├── Build RVS (parallel make) - └── Create Packages (DEB/RPM/TGZ via CPack) -``` - -### Key Technical Details - -**Single Source of Truth**: `build_packages_local.sh` -- Works identically for local development and CI/CD -- Handles all platform-specific logic internally -- Self-contained: installs dependencies, builds, and packages - -**Workflow Responsibilities** (GitHub Actions-specific only): -- Repository checkout with submodules -- Setting environment variables from workflow inputs -- Package verification (dpkg-deb, rpm -q) -- Artifact upload to GitHub - -**Dependencies**: Automatically installed by script -- Ubuntu/Debian: `build-essential`, `cmake`, `git`, `wget`, `libpci3`, `libpci-dev`, `doxygen`, `unzip`, `libyaml-cpp-dev`, `rpm` -- CentOS/RHEL: `gcc`, `gcc-c++`, `cmake3`, `make`, `git`, `wget`, `pciutils-devel`, `doxygen`, `rpm-build`, `yaml-cpp-devel`, `yaml-cpp-static` - -## Removed Components - -### ❌ Removed: Dynamic Version Extraction -**Why**: CMake/CPack natively read version from `CMakeLists.txt` `project(VERSION)` command. - -**Old Code (Removed)**: -```bash -# Extract RVS version from CMakeLists.txt -RVS_VERSION=$(grep -oP 'project\s*\(\s*"[^"]+"\s+VERSION\s+\K[\d.]+' CMakeLists.txt) -``` - -**Current**: CMake automatically uses version, CPack generates correct package names. - -### ❌ Removed: Manual Package Renaming -**Why**: Renaming files caused metadata mismatch between filename and package header. - -**The Problem**: -```bash -# CPack creates: rocm-validation-suite_1.3.0_amd64.deb -# Internal metadata: Package: rocm-validation-suite, Version: 1.3.0 - -# Then manual renaming breaks it: -mv rocm-validation-suite_1.3.0_amd64.deb \ - rocm-validation-suite_1.3.0_ubuntu22.04_gfx110X-all_amd64.deb -# ❌ Filename no longer matches package metadata! -``` - -**Issues Caused**: -1. **Metadata Mismatch**: `dpkg -I` shows different version than filename -2. **Repository Problems**: APT/YUM tools expect filename to match metadata -3. **Standards Violation**: Breaks Debian Policy and RPM conventions -4. **User Confusion**: `dpkg -l` shows different version than installed file - -**The Fix**: Let CPack generate final filenames directly. CPack ensures filename and metadata always match. - -**Old Code (Removed)**: -```bash -mv "rocm-validation-suite_1.3.0_amd64.deb" \ - "rocm-validation-suite_${RVS_VERSION}_ubuntu22.04_${GPU_FAMILY}_amd64.deb" -``` - -**Current**: CPack generates final filenames that comply with standards: -- DEB: `rocm-validation-suite_1.3.0_amd64.deb` -- RPM: `rocm-validation-suite-1.3.0.el8.x86_64.rpm` -- TGZ: `rocm-validation-suite-1.3.0-Linux.tar.gz` - -### ❌ Removed: Patchelf Dependency -**Why**: Not used anywhere in RVS build or runtime. - -**Removed from**: Dependency installation lists in workflow and script. - -### ❌ Removed: Duplicate Build Logic in Workflow -**Why**: Code duplication between workflow and local script. - -**Before**: 150+ lines of build steps duplicated for Ubuntu and CentOS jobs. -**After**: 6 lines calling `build_packages_local.sh`. - -### ❌ Deleted: DYNAMIC_VERSION_EXTRACTION.md -**Why**: Documented an approach that was explicitly removed as unnecessary. - -## Current Implementation - -### GitHub Actions Workflow (`.github/workflows/build-relocatable-packages.yml`) - -**Structure**: Minimal orchestration, delegates to build script - -```yaml -- name: Build and Package RVS - run: | - chmod +x build_packages_local.sh - ROCM_VERSION=${{ env.ROCM_VERSION }} \ - GPU_FAMILY=${{ env.GPU_FAMILY }} \ - BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ./build_packages_local.sh -``` - -**Benefits**: -- ~250 lines total (down from ~380) -- No duplicate build logic -- Single source of truth -- Easy to test locally - -### Build Script (`build_packages_local.sh`) - -**Features**: -- OS detection (Ubuntu/Debian vs CentOS/RHEL) -- Automatic dependency installation -- ROCm SDK download and setup -- CMake configuration with: - - `CMAKE_INSTALL_PREFIX=/opt/rocm/rvs` - - `CPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs` - - `HIP_PLATFORM=amd` - - Relocatable RPATH: `$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs` -- Parallel build with `make -j$(nproc)` -- Package creation via CPack - -**Usage**: -```bash -# Default build -./build_packages_local.sh - -# Custom configuration -ROCM_VERSION=7.11.0a20260121 GPU_FAMILY=gfx110X-all ./build_packages_local.sh -``` - -## Installation Path Changes - -### Old Path Structure -``` -/opt/rocm/ -├── bin/ -│ └── rvs -├── lib/ -│ └── rvs/ -└── share/ - └── rocm-validation-suite/ -``` - -### New Path Structure -``` -/opt/rocm/rvs/ -├── bin/ -│ └── rvs -├── lib/ -│ └── rvs/ -└── share/ - └── rocm-validation-suite/ -``` - -### Benefits -- **Cleaner separation**: RVS is self-contained in its own directory -- **No conflicts**: Won't interfere with ROCm system installation -- **Easy removal**: Simple to uninstall (just delete `/opt/rocm/rvs`) -- **Multiple versions**: Could support multiple RVS versions side-by-side - -## Updated Commands - -### Running RVS After Installation - -**Old:** -```bash -/opt/rocm/bin/rvs --version -``` - -**New:** -```bash -/opt/rocm/rvs/bin/rvs --version -``` - -### Environment Setup - -**Old:** -```bash -export PATH=/opt/rocm/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH -``` - -**New:** -```bash -export PATH=/opt/rocm/rvs/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH -``` - -### TGZ Extraction - -**Old:** -```bash -tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ -# Creates: /opt/opt/rocm/... -``` - -**New:** -```bash -tar -xzf rocm-validation-suite-*.tar.gz -C / -# Creates: /opt/rocm/rvs/... -``` - -## RPATH Configuration - -Relocatable `$ORIGIN` references ensure portability: -``` -$ORIGIN -$ORIGIN/../lib -$ORIGIN/../lib/rvs -``` - -This ensures packages work regardless of installation directory. - -## Version Management - -- **RVS Version**: Automatically read by CMake from `CMakeLists.txt` `project(VERSION)` command -- **ROCm SDK Version**: 7.11.0a20260121 (default, auto-fetched if not specified, configurable via environment variable) -- **GPU Family**: gfx110X-all (default, configurable via environment variable) - -## Files Modified - -### Core Build System -1. `.github/workflows/build-relocatable-packages.yml` - Simplified workflow -2. `build_packages_local.sh` - Complete build system script - -### Documentation -3. `.github/workflows/README_BUILD_PACKAGES.md` - Workflow documentation -4. `QUICKSTART_PACKAGES.md` - Quick start guide -5. `PACKAGE_BUILD_SUMMARY.md` - Technical overview -6. `CHANGES_SUMMARY.md` - This file -7. `VERIFICATION_CHECKLIST.md` - Testing checklist - -### Deleted Files -- `DYNAMIC_VERSION_EXTRACTION.md` - Obsolete version extraction documentation -- `PACKAGE_NAMING_FIX.md` - Consolidated into CHANGES_SUMMARY.md - -## Benefits Summary - -### Code Quality -✅ **DRY Principle**: Single source of truth eliminates duplication -✅ **Maintainability**: Update build logic in one place -✅ **Testability**: Same script for local and CI/CD -✅ **Simplicity**: 250 lines vs 380 lines in workflow - -### Package Quality -✅ **Standards Compliance**: CPack-generated names match metadata -✅ **Relocatable**: `$ORIGIN` RPATH works anywhere -✅ **Version Accuracy**: Version from `CMakeLists.txt` automatically used -✅ **Consistency**: Same packages from local and CI builds - -### Developer Experience -✅ **Local Testing**: Easy to test workflow changes locally -✅ **Fast Iteration**: No need to push to test build changes -✅ **Clear Output**: Color-coded progress indicators -✅ **Error Handling**: Robust error checking at each step - -### Operations -✅ **Self-contained Install**: No conflicts with system ROCm -✅ **Easy Uninstall**: Just delete `/opt/rocm/rvs` -✅ **Parallel Versions**: Can install multiple RVS versions -✅ **Platform Support**: Ubuntu, Debian, CentOS, RHEL, Rocky - -## Backward Compatibility - -**Breaking Changes:** -- Install path changed from `/opt/rocm` to `/opt/rocm/rvs` -- Users with scripts expecting `/opt/rocm/bin/rvs` need to update to `/opt/rocm/rvs/bin/rvs` -- Package names now use RVS version instead of ROCm version - -**Migration Guide for Users:** - -```bash -# Uninstall old version -sudo dpkg -r rocm-validation-suite # Ubuntu/Debian -sudo rpm -e rocm-validation-suite # CentOS/RHEL - -# Install new version -sudo dpkg -i rocm-validation-suite_*.deb # Ubuntu/Debian -sudo rpm -i rocm-validation-suite-*.rpm # CentOS/RHEL - -# Update PATH and LD_LIBRARY_PATH -export PATH=/opt/rocm/rvs/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH -``` - -## Summary - -The RVS package build system has evolved from a verbose, duplicated workflow to a clean, unified system: - -- **Single Script**: `build_packages_local.sh` handles everything -- **Minimal Workflow**: GitHub Actions orchestrates, script executes -- **Standards Compliant**: Proper package naming and metadata -- **Developer Friendly**: Easy to test locally before pushing -- **Production Ready**: Robust error handling and validation - -This architecture ensures consistency between development and CI/CD while maintaining simplicity and maintainability. - ---- - -**Date**: January 30, 2026 -**Status**: Complete -**Architecture**: Unified build system with `build_packages_local.sh` diff --git a/PACKAGE_BUILD_SUMMARY.md b/PACKAGE_BUILD_SUMMARY.md deleted file mode 100644 index e2fa129bd..000000000 --- a/PACKAGE_BUILD_SUMMARY.md +++ /dev/null @@ -1,499 +0,0 @@ -# Package Build System - Implementation Summary - -## Overview - -A complete GitHub Actions workflow and local build system has been implemented to build relocatable RPM, DEB, and TGZ packages for ROCm Validation Suite (RVS) using the ROCm SDK from [TheRock](https://github.com/ROCm/TheRock). - -## What Was Added - -### 1. GitHub Actions Workflow -**File:** `.github/workflows/build-relocatable-packages.yml` - -A comprehensive CI/CD workflow that: -- ✅ Automatically builds on push/PR to master/main branches -- ✅ Supports manual triggers with custom ROCm version and GPU family -- ✅ Downloads ROCm SDK tarballs from TheRock nightly builds -- ✅ Builds on multiple platforms (Ubuntu 22.04, Rocky Linux 8) -- ✅ Generates three package types: DEB, RPM, TGZ -- ✅ Uses relocatable RPATH settings (`$ORIGIN` references) -- ✅ Uploads packages as GitHub Actions artifacts (30-day retention) -- ✅ Creates build reports with installation instructions - -**Key Features:** -- Multi-platform build matrix (Ubuntu, CentOS/RHEL) -- Configurable ROCm version and GPU architecture -- Automatic package verification -- Detailed build logs and reports -- Smart package naming with version/GPU info - -### 2. Local Build Script -**File:** `build_packages_local.sh` - -A user-friendly bash script for local package building: -- ✅ Interactive and colored output -- ✅ Automatic dependency checking -- ✅ Downloads and extracts ROCm SDK -- ✅ Configures build with relocatable RPATHs -- ✅ Builds all three package types -- ✅ Verifies packages after creation -- ✅ Provides installation instructions -- ✅ Supports environment variable customization - -**Usage:** -```bash -chmod +x build_packages_local.sh -./build_packages_local.sh -``` - -### 3. Comprehensive Documentation - -#### Main Documentation -**File:** `.github/workflows/README_BUILD_PACKAGES.md` - -Detailed technical documentation covering: -- Workflow architecture and triggers -- ROCm SDK download and setup process -- Build configuration and RPATH settings -- Package naming conventions -- Installation instructions for each package type -- Verification procedures -- Customization guide -- Troubleshooting section -- Links to external resources - -#### Quick Start Guide -**File:** `QUICKSTART_PACKAGES.md` - -User-friendly guide for quick onboarding: -- Step-by-step instructions for GitHub Actions -- Local build instructions -- GPU family selection guide -- Package testing procedures -- Common troubleshooting scenarios -- Quick reference tables -- Environment variable reference - -## Supported Configurations - -### Operating Systems -- Ubuntu 22.04 (DEB + TGZ packages) -- Rocky Linux 8 / CentOS 8 (RPM + TGZ packages) -- Any Linux distribution (TGZ package - relocatable) - -### GPU Architectures - -| Family | Hardware | Examples | -|--------|----------|----------| -| gfx94X-dcgpu | MI300 series | MI300A, MI300X | -| gfx950-dcgpu | MI350 series | MI350X, MI355X | -| gfx110X-all | RDNA 3 consumer | RX 7900 XTX, RX 7800 XT, Radeon 780M | -| gfx1151 | Strix Halo | APU integrated graphics | -| gfx120X-all | RDNA 4 consumer | RX 9060, RX 9070 | - -### ROCm Versions -- Configurable via environment variable or workflow input -- Default: `7.11.0a20260121` (auto-fetched if not specified) -- Downloads from TheRock nightly builds -- Format: `X.Y.ZaYYYYMMDD` or `X.Y.ZrcYYYYMMDD` - -## Technical Highlights - -### Automatic Version Management via CMake/CPack - -The RVS version is read directly from `CMakeLists.txt` by CMake during configuration: - -```cmake -# In CMakeLists.txt -project ("rocm-validation-suite" VERSION 1.3.0) -``` - -CPack then uses this version to generate package names and metadata automatically. No manual version extraction or environment variables needed - CMake's native `project()` command handles everything. - -This ensures: -- Package version always matches the source code version -- Filename and internal metadata are consistent -- No manual synchronization needed between workflow and CMakeLists.txt - -### Relocatable RPATH Configuration -Packages use relative library paths for portability: - -```cmake --DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" -``` - -This allows: -- Installation to any directory (not just `/opt/rocm/rvs`) -- No hardcoded absolute paths -- Works with TGZ extraction to custom locations - -### Package Naming Convention - -Packages are generated by CPack with names based on CMakeLists.txt configuration: - -``` -DEB: rocm-validation-suite_._amd64.deb -RPM: rocm-validation-suite--..x86_64.rpm -TGZ: rocm-validation-suite--.tar.gz -``` - -**Examples** (with RVS version 1.3.0): -``` -rocm-validation-suite_1.3.0.99999_amd64.deb -rocm-validation-suite-1.3.0-99999.el8.x86_64.rpm -rocm-validation-suite-1.3.0-Linux.tar.gz -``` - -**Note**: Package filenames are generated by CPack and match the internal package metadata. The version and release numbers are determined by CMake configuration. - -### Workflow Triggers - -1. **Automatic:** - - Push to master/main - - Push to release/* branches - - Pull requests to master/main - -2. **Manual (workflow_dispatch):** - - Custom ROCm version input - - GPU family selection dropdown - - On-demand builds for testing - -## Package Features - -### DEB Packages (Ubuntu/Debian) -- ✅ Debian package format -- ✅ Dependency management via dpkg -- ✅ Standard installation to `/opt/rocm` -- ✅ Man pages and documentation included -- ✅ Package metadata verification - -### RPM Packages (CentOS/RHEL/Rocky) -- ✅ RPM package format -- ✅ Dependency management via yum/dnf -- ✅ Standard installation to `/opt/rocm` -- ✅ Man pages and documentation included -- ✅ Package metadata verification - -### TGZ Archives (Relocatable) -- ✅ Platform-agnostic tarball -- ✅ No system package manager required -- ✅ Extract to any location -- ✅ Relative RPATHs for library discovery -- ✅ Portable across distributions - -## Build Process Flow - -``` -┌─────────────────────────────────────────────────────────────┐ -│ 1. Download ROCm SDK from TheRock │ -│ https://therock-nightly-tarball.s3.amazonaws.com/ │ -└────────────────────┬────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 2. Extract Tarball & Setup Environment │ -│ - ROCM_PATH, PATH, LD_LIBRARY_PATH, CMAKE_PREFIX_PATH │ -└────────────────────┬────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 3. Configure CMake with Relocatable RPATHs │ -│ - $ORIGIN-based relative paths │ -│ - /opt/rocm install prefix │ -└────────────────────┬────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 4. Build RVS │ -│ - Parallel compilation (make -j) │ -│ - All modules and tests │ -└────────────────────┬────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 5. Create Packages (CPack) │ -│ - DEB (Ubuntu/Debian) │ -│ - RPM (CentOS/RHEL) │ -│ - TGZ (All distributions) │ -└────────────────────┬────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 6. Verify & Upload │ -│ - Package metadata verification │ -│ - Upload as GitHub Actions artifacts │ -└─────────────────────────────────────────────────────────────┘ -``` - -## Installation Examples - -### Ubuntu/Debian (DEB) -```bash -# Install -sudo dpkg -i rocm-validation-suite_1.3.0.99999_amd64.deb - -# Run -/opt/rocm/rvs/bin/rvs --version -``` - -### CentOS/RHEL (RPM) -```bash -# Install -sudo rpm -i --replacefiles --nodeps rocm-validation-suite-1.3.0-99999.el8.x86_64.rpm - -# Run -/opt/rocm/rvs/bin/rvs --version -``` - -### Any Linux (TGZ - Relocatable) -```bash -# Extract to custom location -mkdir -p ~/myrocm -tar -xzf rocm-validation-suite-1.3.0-Linux.tar.gz -C ~/myrocm/ - -# Setup environment -export PATH=~/myrocm/opt/rocm/rvs/bin:$PATH -export LD_LIBRARY_PATH=~/myrocm/opt/rocm/rvs/lib:$LD_LIBRARY_PATH - -# Run -rvs --version -``` - -## Key Benefits - -### For Users -- ✅ Easy package installation on multiple distributions -- ✅ No manual ROCm compilation required -- ✅ Relocatable packages work anywhere -- ✅ GPU-specific optimizations -- ✅ Automated, reproducible builds - -### For Developers -- ✅ Automated CI/CD pipeline -- ✅ Consistent build environment -- ✅ Easy testing across distributions -- ✅ Version-controlled build configuration -- ✅ Build artifacts for debugging - -### For CI/CD -- ✅ Automatic builds on commits -- ✅ PR validation -- ✅ Release automation ready -- ✅ Multi-platform support -- ✅ Artifact retention - -## Files Created - -``` -ROCmValidationSuite/ -├── .github/ -│ └── workflows/ -│ ├── build-relocatable-packages.yml # Main GitHub Actions workflow -│ └── README_BUILD_PACKAGES.md # Technical documentation -├── build_packages_local.sh # Local build script -├── QUICKSTART_PACKAGES.md # User quick start guide -└── PACKAGE_BUILD_SUMMARY.md # This file -``` - -## Next Steps - -### Immediate Actions -1. Review and test the workflow: - ```bash - # Test locally first - chmod +x build_packages_local.sh - ./build_packages_local.sh - ``` - -2. Commit the changes: - ```bash - git add .github/workflows/ build_packages_local.sh *.md - git commit -m "Add GitHub Actions workflow for relocatable package builds" - git push - ``` - -3. Test GitHub Actions: - - Navigate to Actions tab - - Manually trigger the workflow - - Verify artifacts are generated - -### Future Enhancements - -#### Phase 1: Additional Platforms -- [ ] Add SLES/OpenSUSE support -- [ ] Add Ubuntu 24.04 LTS -- [ ] Add Debian 12 support -- [ ] Add Fedora support - -#### Phase 2: Advanced Features -- [ ] Automated release creation on tags -- [ ] Upload to package repositories (APT/YUM) -- [ ] Code signing for packages -- [ ] Checksum generation and verification -- [ ] Multiple ROCm version matrix builds - -#### Phase 3: Testing & Validation -- [ ] Automated package installation tests -- [ ] Smoke tests after installation -- [ ] GPU detection validation -- [ ] Performance benchmarking -- [ ] Regression test integration - -#### Phase 4: Distribution -- [ ] Upload to GitHub Releases -- [ ] Create APT repository -- [ ] Create YUM repository -- [ ] Docker images with packages -- [ ] Container registry integration - -## Customization Guide - -### Change Default ROCm Version - -Edit `.github/workflows/build-relocatable-packages.yml`: -```yaml -env: - ROCM_VERSION: '7.11.0a20260121' # Update this -``` - -### Add New Distribution - -Add to the build matrix: -```yaml -strategy: - matrix: - distro: ['rockylinux8', 'ubuntu:24.04'] # Add here -``` - -### Change Package Name - -Edit `CMakeLists.txt`: -```cmake -set(CPACK_PACKAGE_NAME "custom-rvs-name") -``` - -### Modify RPATH - -Edit workflow or local script: -```bash --DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../custom/lib" -``` - -## Dependencies - -### Build Dependencies -- cmake (≥ 3.5.0) -- gcc/g++ -- make -- git -- wget -- patchelf -- doxygen -- yaml-cpp (static or shared) -- pciutils-devel / libpci-dev - -### Runtime Dependencies -- ROCm stack (from TheRock SDK) -- rocBLAS -- AMD SMI library -- HIP runtime -- HSA runtime - -### Optional Dependencies -- rpm-build (for RPM packages) -- dpkg-dev (for DEB packages) -- tar (for TGZ packages) - -## Testing Checklist - -### Before Committing -- [x] Workflow YAML syntax is valid -- [x] Local script is executable -- [x] Documentation is complete -- [x] All file paths are correct -- [x] Example commands work - -### After Committing -- [ ] GitHub Actions workflow triggers -- [ ] Packages build successfully -- [ ] Artifacts are uploaded -- [ ] Package names are correct -- [ ] Packages can be installed -- [ ] RVS runs after installation - -### Cross-Platform Testing -- [ ] Ubuntu 22.04 DEB works -- [ ] Rocky Linux 8 RPM works -- [ ] TGZ extracts correctly -- [ ] RPATH is set properly -- [ ] Libraries are found at runtime - -## Known Limitations - -1. **Windows Support:** Not currently supported (ROCm is Linux-only) -2. **macOS Support:** Not supported (ROCm doesn't run on macOS) -3. **Architecture:** Only x86_64/AMD64 (no ARM64) -4. **Container Build:** Requires privileged container for some GPU features -5. **Download Size:** ROCm SDK tarballs are 2-5 GB -6. **Build Time:** Full build takes 20-30 minutes - -## Security Considerations - -1. **Tarball Verification:** Consider adding checksum verification -2. **Package Signing:** Add GPG signing for production releases -3. **Dependency Pinning:** Pin specific ROCm SDK versions -4. **Secret Management:** Use GitHub secrets for credentials -5. **Artifact Retention:** 30 days (adjust as needed) - -## Performance Optimization - -### Build Time Reduction -- Use ccache for incremental builds -- Cache ROCm SDK downloads -- Parallel compilation already enabled (`-j$(nproc)`) -- Separate build and package stages - -### Package Size Reduction -- Strip debug symbols (in Release builds) -- Compress documentation -- Optional component installation -- Exclude unnecessary files - -## Support & Resources - -### Documentation -- [TheRock Releases](https://github.com/ROCm/TheRock/blob/main/RELEASES.md) -- [ROCm Documentation](https://rocm.docs.amd.com/) -- [GitHub Actions Docs](https://docs.github.com/en/actions) -- [CPack Documentation](https://cmake.org/cmake/help/latest/module/CPack.html) - -### Community -- ROCm GitHub: https://github.com/ROCm -- TheRock Issues: https://github.com/ROCm/TheRock/issues -- AMD Developer Forums: https://community.amd.com/ - -### Troubleshooting -- Check workflow logs in GitHub Actions -- Review local build script output -- Verify ROCm SDK availability -- Test package installation manually - -## Conclusion - -This implementation provides a complete, production-ready solution for building relocatable ROCm Validation Suite packages using the ROCm SDK from TheRock. The system supports multiple Linux distributions, GPU architectures, and ROCm versions, with comprehensive automation through GitHub Actions and easy local building via the provided script. - -**Key Achievements:** -- ✅ Fully automated CI/CD pipeline -- ✅ Multi-platform package generation -- ✅ Relocatable packages with $ORIGIN RPATHs -- ✅ Comprehensive documentation -- ✅ Easy local testing -- ✅ Configurable builds -- ✅ Production-ready - -The workflow is ready to use immediately and can be easily extended for additional requirements. - ---- - -**Created:** January 29, 2026 -**Version:** 1.0 -**Status:** Ready for Production diff --git a/QUICKSTART_PACKAGES.md b/QUICKSTART_PACKAGES.md deleted file mode 100644 index 030a3bde9..000000000 --- a/QUICKSTART_PACKAGES.md +++ /dev/null @@ -1,426 +0,0 @@ -# Quick Start Guide: Building Relocatable RVS Packages - -This guide will help you quickly build relocatable RPM, DEB, and TGZ packages for ROCm Validation Suite using the ROCm SDK from TheRock. - -## Table of Contents - -- [Prerequisites](#prerequisites) -- [Option 1: Using GitHub Actions (Recommended)](#option-1-using-github-actions-recommended) -- [Option 2: Building Locally](#option-2-building-locally) -- [GPU Family Selection](#gpu-family-selection) -- [Testing Packages](#testing-packages) -- [Troubleshooting](#troubleshooting) - ---- - -## Prerequisites - -### For GitHub Actions (Automated Build) -- GitHub repository with Actions enabled -- No additional software required (everything runs in the cloud) - -### For Local Build -Install the following tools on your Linux system: - -**Ubuntu/Debian:** -```bash -sudo apt-get update -sudo apt-get install -y \ - build-essential \ - cmake \ - git \ - wget \ - libpci3 \ - libpci-dev \ - doxygen \ - unzip \ - libyaml-cpp-dev \ - rpm \ - python3 -``` - -**CentOS/RHEL/Rocky Linux:** -```bash -sudo yum install -y epel-release -sudo yum install -y \ - gcc gcc-c++ cmake3 make git wget \ - pciutils-devel doxygen rpm-build \ - yaml-cpp-devel yaml-cpp-static \ - python3 -``` - ---- - -## Option 1: Using GitHub Actions (Recommended) - -### Automatic Builds (Push/PR) - -The workflow automatically runs when you: -1. Push to `master`, `main`, or `release/**` branches -2. Create a pull request to `master` or `main` - -### Manual Build - -1. **Go to GitHub Actions** - - Navigate to your repository on GitHub - - Click on the **Actions** tab - - Select **Build Relocatable Packages** workflow - -2. **Click "Run workflow"** - - Choose the branch to run from - - (Optional) Set custom ROCm version (e.g., `7.11.0a20260121`) - - Default: `7.11.0a20260121` - - If not specified, script auto-fetches latest version from TheRock - - (Optional) Select GPU family target - - Default: `gfx110X-all` (AMD RX 7000 series) - - Options: `gfx94X-dcgpu`, `gfx950-dcgpu`, `gfx110X-all`, `gfx1151`, `gfx120X-all` - -3. **Wait for Build to Complete** - - Build typically takes 20-30 minutes - - You can monitor progress in real-time - -4. **Download Artifacts** - - Scroll down to the **Artifacts** section - - Download the package artifacts: - - `ubuntu-22.04-packages-${GPU_FAMILY}` - Contains DEB and TGZ - - `manylinux_2_28-packages-${GPU_FAMILY}` - Contains RPM and TGZ - - `build-report` - Build summary and details - ---- - -## Option 2: Building Locally - -### Quick Build (Default Settings) - -```bash -# Make the script executable -chmod +x build_packages_local.sh - -# Run the build script with sudo (required for installing dependencies) -sudo ./build_packages_local.sh -``` - -**Note**: The script requires root privileges to install system dependencies. In GitHub Actions, Ubuntu runners use `sudo` while container builds (Manylinux/AlmaLinux) run as root directly. - -This will: -1. Automatically detect and install missing dependencies -2. Fetch latest ROCm SDK version from TheRock (or use default 7.11.0a20260121) -3. Locate HIP device libraries (amdgcn/bitcode) -4. Configure and build RVS with relocatable RPATH -5. Generate DEB, RPM, and TGZ packages -6. Save packages to `./build/` directory - -### Custom Build - -Set environment variables before running: - -```bash -# Set custom ROCm version -export ROCM_VERSION="7.11.0a20260121" - -# Set GPU family -export GPU_FAMILY="gfx94X-dcgpu" # For MI300A/MI300X - -# Set build type -export BUILD_TYPE="Release" # or "Debug" - -# Run the build with sudo -sudo -E ./build_packages_local.sh -``` - -**Note**: Use `sudo -E` to preserve environment variables when running with sudo. - -### Manual Build (Step-by-Step) - -If you prefer manual control: - -```bash -# 1. Download ROCm SDK -ROCM_VERSION="7.11.0a20260121" -GPU_FAMILY="gfx110X-all" -mkdir -p ~/rocm-sdk -cd ~/rocm-sdk -wget "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" -mkdir -p install -tar -xzf therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz -C install --strip-components=1 - -# 2. Setup environment -export ROCM_PATH="$HOME/rocm-sdk/install" -export PATH="$ROCM_PATH/bin:$PATH" -export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" -export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" - -# 3. Configure CMake -cd /path/to/ROCmValidationSuite -cmake -B ./build \ - -DCMAKE_BUILD_TYPE=Release \ - -DROCM_PATH=$ROCM_PATH \ - -DCMAKE_INSTALL_PREFIX=/opt/rocm \ - -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm \ - -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \ - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" - -# 4. Build -make -C ./build -j$(nproc) - -# 5. Create packages -cd ./build -cpack -G DEB # Debian package -cpack -G RPM # RPM package -cpack -G TGZ # Tarball (relocatable) -``` - ---- - -## GPU Family Selection - -Choose the appropriate GPU family for your target hardware: - -| GPU Family | Supported Hardware | Use Case | -|------------|-------------------|----------| -| `gfx94X-dcgpu` | MI300A, MI300X | Data center GPUs | -| `gfx950-dcgpu` | MI350X, MI355X | Next-gen data center GPUs | -| `gfx110X-all` | RX 7900 XTX, RX 7800 XT, RX 7700S, Radeon 780M | Consumer/workstation GPUs (default) | -| `gfx1151` | Strix Halo iGPU | Integrated GPUs | -| `gfx120X-all` | RX 9060/XT, RX 9070/XT | Latest consumer GPUs | - -### Example: Building for MI300X - -**GitHub Actions:** -- Select `gfx94X-dcgpu` when running workflow manually - -**Local Build:** -```bash -export GPU_FAMILY="gfx94X-dcgpu" -./build_packages_local.sh -``` - ---- - -## Testing Packages - -### Test DEB Package (Ubuntu/Debian) - -```bash -# Install package -sudo dpkg -i build/rocm-validation-suite_*.deb - -# Verify installation -/opt/rocm/rvs/bin/rvs --version - -# Run a simple test -/opt/rocm/rvs/bin/rvs -g - -# Uninstall (if needed) -sudo dpkg -r rocm-validation-suite -``` - -### Test RPM Package (CentOS/RHEL) - -```bash -# Install package -sudo rpm -i --replacefiles --nodeps build/rocm-validation-suite-*.rpm - -# Verify installation -/opt/rocm/rvs/bin/rvs --version - -# Run a simple test -/opt/rocm/rvs/bin/rvs -g - -# Uninstall (if needed) -sudo rpm -e rocm-validation-suite -``` - -### Test TGZ Package (Any Linux) - -```bash -# Extract to test location -mkdir -p ~/test-rvs -tar -xzf build/rocm-validation-suite-*.tar.gz -C ~/test-rvs/ - -# Setup environment -export PATH="$HOME/test-rvs/opt/rocm/rvs/bin:$PATH" -export LD_LIBRARY_PATH="$HOME/test-rvs/opt/rocm/rvs/lib:$LD_LIBRARY_PATH" - -# Verify installation -rvs --version - -# Run a simple test -rvs -g - -# Check RPATH (should show $ORIGIN references) -readelf -d ~/test-rvs/opt/rocm/rvs/bin/rvs | grep RPATH -``` - -### Verify Relocatable RPATH - -Ensure the binaries use relative paths: - -```bash -# Check RPATH settings -readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH - -# Expected output should include: -# $ORIGIN/../lib -# $ORIGIN/../lib/rvs -``` - ---- - -## Troubleshooting - -### Build Fails: ROCm SDK Download Error - -**Problem:** Cannot download ROCm tarball - -**Solution:** -1. Check if the URL is accessible: - ```bash - wget --spider "https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-gfx110X-all-7.11.0a20260121.tar.gz" - ``` - -2. Verify the ROCm version exists: - - Visit: https://therock-nightly-tarball.s3.amazonaws.com/index.html - - Find the correct version string - -3. Try a different ROCm version: - ```bash - export ROCM_VERSION="7.12.0a20260205" # Use a later version - ``` - -### Build Fails: Missing Dependencies - -**Problem:** CMake cannot find ROCm libraries - -**Solution:** -1. Verify ROCm SDK extraction: - ```bash - ls -la ~/rocm-sdk/install/lib/ - ls -la ~/rocm-sdk/install/bin/ - ``` - -2. Check environment variables: - ```bash - echo $ROCM_PATH - echo $CMAKE_PREFIX_PATH - ``` - -3. Re-extract the tarball if corrupted - -### Package Install Fails: Dependency Errors - -**Problem:** Package manager reports missing dependencies - -**Solution:** -1. For DEB packages: - ```bash - sudo apt-get install -f # Fix missing dependencies - ``` - -2. For RPM packages: - ```bash - sudo yum install rocm-smi-lib rocblas amd-smi-lib # Install ROCm runtime - ``` - -3. Use TGZ package (no system dependencies required) - -### Runtime Error: Libraries Not Found - -**Problem:** `rvs: error while loading shared libraries` - -**Solution:** -1. Set LD_LIBRARY_PATH: - ```bash - export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH - ``` - -2. Check library dependencies: - ```bash - ldd /opt/rocm/bin/rvs - ``` - -3. Verify RPATH is set correctly: - ```bash - readelf -d /opt/rocm/bin/rvs | grep RPATH - ``` - -### GitHub Actions: Workflow Not Triggering - -**Problem:** Workflow doesn't run on push/PR - -**Solution:** -1. Check if GitHub Actions is enabled: - - Settings → Actions → Allow all actions - -2. Verify workflow file syntax: - ```bash - # Validate YAML locally - python -c "import yaml; yaml.safe_load(open('.github/workflows/build-relocatable-packages.yml'))" - ``` - -3. Check branch name matches trigger conditions - ---- - -## Additional Resources - -- **Detailed Documentation:** [`.github/workflows/README_BUILD_PACKAGES.md`](.github/workflows/README_BUILD_PACKAGES.md) -- **ROCm Documentation:** https://rocm.docs.amd.com/ -- **TheRock Releases:** https://github.com/ROCm/TheRock/blob/main/RELEASES.md -- **RVS User Guide:** [docs/ug1main.md](docs/ug1main.md) -- **RVS Features:** [FEATURES.md](FEATURES.md) - ---- - -## Quick Reference - -### Package Locations After Build - -- **Local build:** `./build/rocm-validation-suite-*` -- **GitHub Actions:** Download from Actions → Artifacts section - -### Default Configuration - -- **RVS Version:** Read from CMakeLists.txt by CMake/CPack -- **ROCm Version:** Auto-fetched from TheRock (fallback: 7.11.0a20260121) -- **GPU Family:** gfx110X-all (AMD RX 7000 series) -- **Install Prefix:** /opt/rocm/rvs -- **Build Type:** Release - -### Environment Variables - -| Variable | Description | Default | -|----------|-------------|---------| -| `ROCM_VERSION` | ROCm SDK version to download | Auto-fetched (fallback: 7.11.0a20260121) | -| `GPU_FAMILY` | Target GPU architecture | gfx110X-all | -| `BUILD_TYPE` | CMake build type | Release | -| `ROCM_LIBPATCH_VERSION` | Major.minor in xxyy format (auto-extracted) | Derived from ROCM_VERSION (e.g., `7.11` → `0711`) | -| `CPACK_DEBIAN_PACKAGE_RELEASE` | DEB package release string (auto-generated) | **Dev**: `branch.commit` (e.g., `master.a1b2c3d`). **Rel**: `GITHUB_RUN_NUMBER` (default: `1`) | -| `CPACK_RPM_PACKAGE_RELEASE` | RPM package release string (auto-generated) | **Dev**: `branch.commit` (e.g., `master.a1b2c3d`). **Rel**: `GITHUB_RUN_NUMBER` (default: `1`) | -| `GITHUB_RUN_NUMBER` | GitHub Actions workflow run number | `1` (for local builds) | - -**Note:** -- RVS version is read from `CMakeLists.txt` by CMake/CPack automatically. -- ROCm version is automatically fetched from TheRock. Set `ROCM_VERSION` to override. -- HIP device libraries (amdgcn/bitcode) are auto-located and exported. -- `ROCM_LIBPATCH_VERSION` is automatically extracted and formatted as xxyy (e.g., `7.11` → `0711`, `10.2` → `1002`). -- Package release strings: **Development branches** use `branch.commit`, **Release branches** (starting with "rel") use GitHub run number. - ---- - -## Getting Help - -For issues or questions: - -1. **Check the logs:** Review build output for error messages -2. **Review documentation:** See detailed guides in `.github/workflows/` -3. **Open an issue:** Create a GitHub issue with: - - Build log output - - System information (OS, kernel version) - - ROCm version and GPU family used - - Error messages - ---- - -**Happy Building!** 🚀 diff --git a/VERIFICATION_CHECKLIST.md b/VERIFICATION_CHECKLIST.md deleted file mode 100644 index 16ec93408..000000000 --- a/VERIFICATION_CHECKLIST.md +++ /dev/null @@ -1,412 +0,0 @@ -# Implementation Verification Checklist - -Use this checklist to verify that the relocatable package build system is working correctly. - -## ✅ Pre-Deployment Checklist - -### Files Created -- [ ] `.github/workflows/build-relocatable-packages.yml` exists -- [ ] `.github/workflows/README_BUILD_PACKAGES.md` exists -- [ ] `build_packages_local.sh` exists and is executable -- [ ] `QUICKSTART_PACKAGES.md` exists -- [ ] `PACKAGE_BUILD_SUMMARY.md` exists -- [ ] `VERIFICATION_CHECKLIST.md` exists (this file) - -### File Permissions -```bash -# Verify script is executable -ls -la build_packages_local.sh -# Should show: -rwxr-xr-x or similar - -# Make executable if needed -chmod +x build_packages_local.sh -``` - -### Syntax Validation -```bash -# Validate YAML syntax -python3 -c "import yaml; yaml.safe_load(open('.github/workflows/build-relocatable-packages.yml'))" && echo "✓ YAML syntax OK" - -# Validate Bash syntax -bash -n build_packages_local.sh && echo "✓ Bash syntax OK" - -# Check for common issues -grep -n "TODO\|FIXME\|XXX" .github/workflows/*.yml build_packages_local.sh || echo "✓ No TODO markers" -``` - -## ✅ Local Build Testing - -### Test 1: Script Execution (Dry Run) -```bash -# Check if script can be executed -./build_packages_local.sh --help 2>&1 | head -5 -# Should show usage information or start running -``` - -### Test 2: Dependency Check -```bash -# Verify required tools are available -for tool in cmake make wget tar patchelf git; do - command -v $tool >/dev/null 2>&1 && echo "✓ $tool found" || echo "✗ $tool missing" -done -``` - -### Test 3: ROCm SDK Download Test -```bash -# Test if ROCm tarball URL is accessible -ROCM_VERSION="7.11.0a20260121" -GPU_FAMILY="gfx110X-all" -TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" - -wget --spider "$TARBALL_URL" 2>&1 | grep "200 OK" && echo "✓ Tarball accessible" || echo "✗ Tarball not found" -``` - -### Test 4: Full Local Build (Optional - Takes 30+ minutes) -```bash -# Run full build locally -export ROCM_VERSION="7.11.0a20260121" -export GPU_FAMILY="gfx110X-all" -./build_packages_local.sh - -# Verify packages were created -ls -lh ./build/rocm-validation-suite*.{deb,rpm,tar.gz} 2>/dev/null || echo "✗ No packages found" -``` - -### Test 5: Package Verification -```bash -# If DEB was created -if [ -f build/rocm-validation-suite*.deb ]; then - dpkg-deb -I build/rocm-validation-suite*.deb && echo "✓ DEB package valid" - dpkg-deb -c build/rocm-validation-suite*.deb | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in package" -fi - -# If RPM was created -if [ -f build/rocm-validation-suite*.rpm ]; then - rpm -qip build/rocm-validation-suite*.rpm && echo "✓ RPM package valid" - rpm -qlp build/rocm-validation-suite*.rpm | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in package" -fi - -# If TGZ was created -if [ -f build/rocm-validation-suite*.tar.gz ]; then - tar -tzf build/rocm-validation-suite*.tar.gz | head -20 && echo "✓ TGZ archive valid" - tar -tzf build/rocm-validation-suite*.tar.gz | grep "opt/rocm/bin/rvs" && echo "✓ RVS binary in archive" -fi -``` - -### Test 6: RPATH Verification -```bash -# After building, check if RPATH is set correctly -if [ -f ./build/bin/rvs ]; then - readelf -d ./build/bin/rvs | grep -i "rpath" | grep "\$ORIGIN" && echo "✓ RPATH uses \$ORIGIN" || echo "✗ RPATH not relocatable" -fi -``` - -## ✅ GitHub Actions Testing - -### Test 1: Workflow File Validation -- [ ] Go to GitHub repository -- [ ] Navigate to **Actions** tab -- [ ] Check if "Build Relocatable Packages" workflow appears -- [ ] No syntax error warnings shown - -### Test 2: Manual Workflow Trigger -- [ ] Go to Actions → Build Relocatable Packages -- [ ] Click "Run workflow" -- [ ] Select branch (e.g., `master`) -- [ ] Leave default values or customize: - - [ ] ROCm Version: (leave default or enter custom) - - [ ] GPU Family: (select from dropdown) -- [ ] Click "Run workflow" button -- [ ] Workflow starts successfully - -### Test 3: Workflow Execution Monitor -- [ ] Workflow shows "In progress" status -- [ ] Click on the running workflow -- [ ] All jobs appear (build-ubuntu, build-centos) -- [ ] Jobs are running (yellow spinner icons) -- [ ] No immediate failures - -### Test 4: Build Logs Review -For each job (build-ubuntu, build-centos): -- [ ] "Download ROCm SDK Tarball" step succeeds -- [ ] ROCm SDK extraction completes -- [ ] CMake configuration succeeds -- [ ] Build completes without errors -- [ ] Packages are created -- [ ] Artifacts are uploaded - -### Test 5: Artifact Download -After workflow completes: -- [ ] Scroll to "Artifacts" section at bottom -- [ ] Verify artifacts exist: - - [ ] `ubuntu-22.04-packages-${GPU_FAMILY}` - - [ ] `rockylinux8-packages-${GPU_FAMILY}` - - [ ] `build-report` -- [ ] Download one artifact -- [ ] Extract and verify contents: - ```bash - unzip ubuntu-22.04-packages-*.zip - ls -lh rocm-validation-suite* - ``` - -### Test 6: Automatic Trigger Test -```bash -# Create a test commit to trigger workflow -git add VERIFICATION_CHECKLIST.md -git commit -m "test: verify GitHub Actions workflow trigger" -git push origin master # or your default branch - -# Check if workflow triggered automatically -# Go to Actions tab and verify new workflow run started -``` - -## ✅ Package Installation Testing - -### Test 7: DEB Package Installation (Ubuntu/Debian) -```bash -# Download DEB package from artifacts -# Install test -sudo dpkg -i rocm-validation-suite_*.deb - -# Verify installation -[ -f /opt/rocm/bin/rvs ] && echo "✓ RVS binary installed" -/opt/rocm/bin/rvs --version && echo "✓ RVS runs" -/opt/rocm/bin/rvs -g && echo "✓ RVS GPU detection works" - -# Check libraries -ldd /opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" - -# Uninstall -sudo dpkg -r rocm-validation-suite -``` - -### Test 8: RPM Package Installation (CentOS/RHEL) -```bash -# Download RPM package from artifacts -# Install test -sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm - -# Verify installation -[ -f /opt/rocm/bin/rvs ] && echo "✓ RVS binary installed" -/opt/rocm/bin/rvs --version && echo "✓ RVS runs" -/opt/rocm/bin/rvs -g && echo "✓ RVS GPU detection works" - -# Check libraries -ldd /opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" - -# Uninstall -sudo rpm -e rocm-validation-suite -``` - -### Test 9: TGZ Package Relocatable Test -```bash -# Download TGZ package from artifacts -# Test extraction to custom location -mkdir -p ~/test-rvs-install -tar -xzf rocm-validation-suite-*.tar.gz -C ~/test-rvs-install/ - -# Setup environment -export PATH="$HOME/test-rvs-install/opt/rocm/bin:$PATH" -export LD_LIBRARY_PATH="$HOME/test-rvs-install/opt/rocm/lib:$LD_LIBRARY_PATH" - -# Verify it works from custom location -[ -f ~/test-rvs-install/opt/rocm/bin/rvs ] && echo "✓ RVS binary extracted" -rvs --version && echo "✓ RVS runs from custom location" -rvs -g && echo "✓ RVS GPU detection works" - -# Verify RPATH -readelf -d ~/test-rvs-install/opt/rocm/bin/rvs | grep RPATH | grep "\$ORIGIN" && echo "✓ RPATH is relocatable" - -# Check libraries resolve -ldd ~/test-rvs-install/opt/rocm/bin/rvs | grep "not found" && echo "✗ Missing libraries" || echo "✓ All libraries found" - -# Cleanup -rm -rf ~/test-rvs-install -``` - -## ✅ Documentation Review - -### Test 10: Documentation Completeness -- [ ] `QUICKSTART_PACKAGES.md` has clear instructions -- [ ] `.github/workflows/README_BUILD_PACKAGES.md` explains workflow -- [ ] `PACKAGE_BUILD_SUMMARY.md` summarizes implementation -- [ ] All example commands are accurate -- [ ] All file paths are correct -- [ ] GPU family table is complete -- [ ] ROCm version references are current - -### Test 11: Link Validation -```bash -# Check for broken links in documentation -for file in QUICKSTART_PACKAGES.md .github/workflows/README_BUILD_PACKAGES.md PACKAGE_BUILD_SUMMARY.md; do - echo "Checking $file..." - grep -oE 'https?://[^)]+' "$file" | while read url; do - curl -I -s -o /dev/null -w "%{http_code}" "$url" | grep -q "^[23]" && echo " ✓ $url" || echo " ✗ $url" - done -done -``` - -## ✅ Edge Cases & Error Handling - -### Test 12: Invalid ROCm Version -```bash -# Test with non-existent ROCm version -export ROCM_VERSION="invalid-version" -./build_packages_local.sh 2>&1 | grep -i "error\|fail" && echo "✓ Error handled correctly" -``` - -### Test 13: Missing Dependencies -```bash -# Test behavior when a tool is missing -# (Rename a required tool temporarily) -sudo mv /usr/bin/cmake /usr/bin/cmake.bak 2>/dev/null -./build_packages_local.sh 2>&1 | grep -i "missing\|cmake" && echo "✓ Dependency check works" -sudo mv /usr/bin/cmake.bak /usr/bin/cmake 2>/dev/null -``` - -### Test 14: Disk Space Check -```bash -# Ensure adequate disk space (need ~10GB for build) -df -h . | awk 'NR==2 {print $4}' | numfmt --from=auto --to=unit=G | awk '{if($1 < 10) print "✗ Less than 10GB available"; else print "✓ Sufficient disk space"}' -``` - -## ✅ Cross-Platform Verification - -### Test 15: Multi-Distribution Test Matrix -Test on different distributions if possible: -- [ ] Ubuntu 20.04 -- [ ] Ubuntu 22.04 -- [ ] Ubuntu 24.04 -- [ ] Rocky Linux 8 -- [ ] CentOS Stream 9 -- [ ] RHEL 8 -- [ ] Debian 11 -- [ ] Debian 12 - -### Test 16: GPU Family Variants -Test with different GPU families: -- [ ] gfx94X-dcgpu (MI300) -- [ ] gfx950-dcgpu (MI350) -- [ ] gfx110X-all (RX 7900 series) -- [ ] gfx1151 (Strix Halo) -- [ ] gfx120X-all (RX 9000 series) - -## ✅ Performance & Optimization - -### Test 17: Build Time Measurement -```bash -# Measure build time -time ./build_packages_local.sh -# Record and compare: -# Expected: 15-30 minutes depending on hardware -``` - -### Test 18: Package Size Check -```bash -# Check package sizes are reasonable -ls -lh ./build/rocm-validation-suite*.{deb,rpm,tar.gz} 2>/dev/null -# Expected sizes: -# DEB: ~5-50 MB -# RPM: ~5-50 MB -# TGZ: ~5-50 MB -``` - -## ✅ Security & Best Practices - -### Test 19: Security Scan -```bash -# Check for hardcoded secrets or sensitive data -grep -r "password\|token\|secret\|key" .github/workflows/*.yml build_packages_local.sh -# Should only find variable names, not actual secrets - -# Check file permissions -find .github -type f -executable && echo "✗ Executable files in .github" || echo "✓ No unnecessary executable files" -``` - -### Test 20: Code Quality -```bash -# Check for shell script issues (if shellcheck is installed) -if command -v shellcheck >/dev/null; then - shellcheck build_packages_local.sh && echo "✓ Shell script passes shellcheck" -fi - -# Check for common mistakes -grep -n "rm -rf /" build_packages_local.sh && echo "✗ Dangerous rm command found" || echo "✓ No dangerous commands" -``` - -## ✅ Final Verification - -### Test 21: End-to-End Test -Complete end-to-end test: -1. [ ] Fresh git clone of repository -2. [ ] Run local build script successfully -3. [ ] Verify all three package types created -4. [ ] Install one package and test RVS -5. [ ] Push to GitHub and verify Actions run -6. [ ] Download artifacts and verify contents -7. [ ] Install artifact package and test RVS - -### Test 22: Documentation Test -Have someone unfamiliar with the system: -1. [ ] Follow QUICKSTART_PACKAGES.md instructions -2. [ ] Successfully build packages locally -3. [ ] Successfully trigger GitHub Actions workflow -4. [ ] Successfully install and test a package - -## 📊 Test Results Summary - -After completing all tests, fill in the results: - -``` -Total Tests: 22 -Passed: ___ / 22 -Failed: ___ / 22 -Skipped: ___ / 22 - -Critical Failures: ___ -Minor Issues: ___ -Warnings: ___ -``` - -## 🚀 Deployment Readiness - -Mark as complete when all critical tests pass: -- [ ] All syntax validation passes -- [ ] Local build succeeds -- [ ] GitHub Actions workflow runs successfully -- [ ] At least one package type installs and runs -- [ ] Documentation is accurate and complete -- [ ] No critical security issues found - -## 📝 Notes & Issues - -Record any issues found during testing: - -``` -Issue 1: -Description: -Severity: [Critical/Major/Minor] -Status: [Open/Fixed] - -Issue 2: -Description: -Severity: [Critical/Major/Minor] -Status: [Open/Fixed] -``` - -## ✅ Sign-off - -When all critical tests pass and the system is ready for production: - -``` -Tested by: ________________ -Date: ____________________ -Status: [ ] Ready for Production / [ ] Needs Work -Signature: ________________ -``` - ---- - -**Last Updated:** January 29, 2026 -**Version:** 1.0 -**Next Review:** After first production deployment From 4ffa67bcfc69c2edde79fa56c332cf6e1522151a Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 9 Feb 2026 08:15:52 -0800 Subject: [PATCH 057/275] install dependencies first --- build_packages_local.sh | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 787255d23..ea0bc22a5 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -61,33 +61,6 @@ fetch_latest_rocm_version() { return 0 } -# Determine ROCm version: use environment variable or fetch latest -if [ -n "$ROCM_VERSION" ]; then - print_info "Using specified ROCm version: $ROCM_VERSION" -else - print_info "No ROCm version specified, fetching latest..." - fetch_latest_rocm_version "$GPU_FAMILY" - - # Validate that ROCM_VERSION was properly set - if [ -z "$ROCM_VERSION" ]; then - print_error "Failed to determine ROCm version" - exit 1 - fi -fi - -# Print configuration -echo "================================================================================" -echo " ROCm Validation Suite - Local Package Build Script" -echo "================================================================================" -print_info "ROCm Version: $ROCM_VERSION" -print_info "GPU Family: $GPU_FAMILY" -print_info "Build Type: $BUILD_TYPE" -print_info "Build Directory: $BUILD_DIR" -print_info "ROCm Install: $ROCM_INSTALL_DIR" -print_info "RVS Version: Will be read from CMakeLists.txt by CMake/CPack" -echo "================================================================================" -echo "" - # Function to check and install dependencies check_and_install_dependencies() { print_info "Checking for required build dependencies..." @@ -248,9 +221,36 @@ check_and_install_dependencies() { echo "" } -# Check and install dependencies +# Check and install dependencies (installs wget, etc. - required before fetch_latest_rocm_version) check_and_install_dependencies +# Determine ROCm version: use environment variable or fetch latest (wget is now available) +if [ -n "$ROCM_VERSION" ]; then + print_info "Using specified ROCm version: $ROCM_VERSION" +else + print_info "No ROCm version specified, fetching latest..." + fetch_latest_rocm_version "$GPU_FAMILY" + + # Validate that ROCM_VERSION was properly set + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm version" + exit 1 + fi +fi + +# Print configuration +echo "================================================================================" +echo " ROCm Validation Suite - Local Package Build Script" +echo "================================================================================" +print_info "ROCm Version: $ROCM_VERSION" +print_info "GPU Family: $GPU_FAMILY" +print_info "Build Type: $BUILD_TYPE" +print_info "Build Directory: $BUILD_DIR" +print_info "ROCm Install: $ROCM_INSTALL_DIR" +print_info "RVS Version: Will be read from CMakeLists.txt by CMake/CPack" +echo "================================================================================" +echo "" + # Step 1: Download ROCm SDK print_info "Step 1: Downloading ROCm SDK tarball..." TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" From c356ee26a0db35a47503e92250f14a2eb53a9a3e Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 11 Feb 2026 21:10:38 -0800 Subject: [PATCH 058/275] Fix generation of TGZ package CPACK need different settings to generate TGZ file Removed unused OS_DETECTION code and package file check warning --- build_packages_local.sh | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index ea0bc22a5..42bb6732d 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -473,38 +473,11 @@ echo "" # Step 5: Create packages print_info "Step 5: Creating packages..." -# Detect OS type -if [ -f /etc/os-release ]; then - . /etc/os-release - OS_NAME=$ID - OS_VERSION=$VERSION_ID -else - OS_NAME="unknown" - OS_VERSION="unknown" -fi - -print_info "Detected OS: $OS_NAME $OS_VERSION" - -# Create TGZ package -print_info "Creating TGZ package..." -cd "$BUILD_DIR" -cpack -G TGZ - -if [ $? -eq 0 ]; then - TGZ_FILE=$(ls rocm-validation-suite*.tar.gz 2>/dev/null | head -1) - if [ -n "$TGZ_FILE" ]; then - print_success "Created TGZ package: $TGZ_FILE" - TGZ_SIZE=$(du -h "$TGZ_FILE" | cut -f1) - print_info "Package size: $TGZ_SIZE" - fi -else - print_error "TGZ package creation failed" -fi - # Create DEB package (Ubuntu/Debian) if command -v dpkg >/dev/null 2>&1; then print_info "Creating DEB package..." - cpack -G DEB + cd "$BUILD_DIR" + cpack -G DEB --verbose if [ $? -eq 0 ]; then DEB_FILE=$(ls rocm-validation-suite*.deb 2>/dev/null | head -1) @@ -520,12 +493,15 @@ if command -v dpkg >/dev/null 2>&1; then else print_warning "DEB package creation failed (might be expected on non-Debian systems)" fi + cd - > /dev/null fi # Create RPM package (CentOS/RHEL/SLES) if command -v rpm >/dev/null 2>&1; then print_info "Creating RPM package..." - cpack -G RPM + cd "$BUILD_DIR" + cpack -G RPM --verbose + if [ $? -eq 0 ]; then RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) @@ -541,6 +517,25 @@ if command -v rpm >/dev/null 2>&1; then else print_warning "RPM package creation failed (might be expected on non-RPM systems)" fi + cd - > /dev/null +fi + +# Create TGZ package +print_info "Creating TGZ package..." +CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX="") +$CMAKE_COMMAND "${CMAKE_ARGS[@]}" +cd "$BUILD_DIR" +cpack -G TGZ --verbose + +if [ $? -eq 0 ]; then + TGZ_FILE=$(ls rocm-validation-suite*.tar.gz 2>/dev/null | head -1) + if [ -n "$TGZ_FILE" ]; then + print_success "Created TGZ package: $TGZ_FILE" + TGZ_SIZE=$(du -h "$TGZ_FILE" | cut -f1) + print_info "Package size: $TGZ_SIZE" + fi +else + print_error "TGZ package creation failed" fi cd - > /dev/null @@ -552,8 +547,13 @@ print_success "Package build completed successfully!" echo "================================================================================" print_info "Generated packages are in: $BUILD_DIR" echo "" -ls -lh "$BUILD_DIR"/rocm-validation-suite*{.deb,.rpm,.tar.gz} 2>/dev/null || \ +# List only package types that were actually generated (DEB on Ubuntu, RPM on CentOS/RHEL, TGZ on all) +PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) +if [ -n "$PKGS" ]; then + echo "$PKGS" | xargs ls -lh +else print_warning "No packages found in build directory" +fi echo "" # Installation instructions From e4746cbe124f0e9a8cd91f1e7fea8536e66b0dcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:10:20 -0500 Subject: [PATCH 059/275] Bump rocm-docs-core from 1.31.2 to 1.31.3 in /docs/sphinx (#1077) Bumps [rocm-docs-core](https://github.com/ROCm/rocm-docs-core) from 1.31.2 to 1.31.3. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](https://github.com/ROCm/rocm-docs-core/compare/v1.31.2...v1.31.3) --- updated-dependencies: - dependency-name: rocm-docs-core dependency-version: 1.31.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index aff7ac0be..e2b7a5714 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==1.31.2 +rocm-docs-core==1.31.3 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index e32c7f47d..d087b84bd 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -188,7 +188,7 @@ requests==2.32.3 # via # pygithub # sphinx -rocm-docs-core==1.31.2 +rocm-docs-core==1.31.3 # via -r requirements.in rpds-py==0.22.3 # via From d33bbb887caa344785eb9e4f7940c0ab53a7f024 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 25 Mar 2026 19:04:57 -0500 Subject: [PATCH 060/275] Fix Babel read/write bandwidth calculation --- babel.so/src/rvs_stress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 9d50caf7e..bb6da2bec 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -251,8 +251,8 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, std::string labels[total_babel_subtests] = {"Read","Write","Copy", "Mul", "Add", "Triad", "Dot"}; size_t sizes[total_babel_subtests] = { - 2 * sizeof(T) * ARRAY_SIZE, - 2 * sizeof(T) * ARRAY_SIZE, + 1 * sizeof(T) * ARRAY_SIZE, + 1 * sizeof(T) * ARRAY_SIZE, 2 * sizeof(T) * ARRAY_SIZE, 2 * sizeof(T) * ARRAY_SIZE, 3 * sizeof(T) * ARRAY_SIZE, From 434352d4c661505a61c0ef6731ac645518e9faa7 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 30 Mar 2026 18:09:42 -0500 Subject: [PATCH 061/275] Support for normal distribution data init. --- babel.so/include/HIPStream.h | 3 + babel.so/include/action.h | 4 + babel.so/include/rvs_memworker.h | 9 +++ babel.so/src/action.cpp | 17 ++++ babel.so/src/rvs_memworker.cpp | 5 +- babel.so/src/rvs_stream.cpp | 130 +++++++++++++++++++++++++++++-- babel.so/src/rvs_stress.cpp | 55 ++++++++----- 7 files changed, 194 insertions(+), 29 deletions(-) diff --git a/babel.so/include/HIPStream.h b/babel.so/include/HIPStream.h index 8d254d09e..70fb47bac 100644 --- a/babel.so/include/HIPStream.h +++ b/babel.so/include/HIPStream.h @@ -11,6 +11,7 @@ #include #include #include +#include #include "Stream.h" #include "hip/hip_runtime.h" @@ -61,6 +62,8 @@ class HIPStream : public Stream virtual T dot() override; virtual void init_arrays(T initA, T initB, T initC) override; + virtual void init_arrays_normdist(T mean, T stddev, bool gpu_init, + std::vector& a, std::vector& b, std::vector& c); virtual void read_arrays(std::vector& a, std::vector& b, std::vector& c) override; }; diff --git a/babel.so/include/action.h b/babel.so/include/action.h index 072da8ea5..c30949a37 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -62,6 +62,7 @@ using std::map; #define RVS_CONF_MUL "mul" #define RVS_CONF_DOT "dot" #define RVS_CONF_TRIAD "triad" +#define RVS_CONF_DATA_INIT "data_init" #define MEM_DEFAULT_ARRAY_SIZE 33554432 // 32 MB #define MEM_DEFAULT_NUM_ITER 100 @@ -72,6 +73,7 @@ using std::map; #define MEM_DEFAULT_CHUNKS_PER_BLOCK 2 #define MEM_DEFAULT_TB_SIZE 1024 #define MEM_DEFAULT_TEST_ENABLE false +#define MEM_DEFAULT_DATA_INIT "default" #define MEM_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" #define FLOATING_POINT_REGEX "^[0-9]*\\.?[0-9]+$" @@ -128,6 +130,8 @@ class mem_action: public rvs::actionbase { uint16_t chunks_per_block; //! thread block size uint16_t tb_size; + //! data initialization mode ("gpu_norm_dist", "cpu_norm_dist", "zero_init" or "default") + std::string data_init; // configuration properties getters bool get_all_mem_config_keys(void); diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index b2ba8d08e..409430835 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -255,6 +255,13 @@ class MemWorker : public rvs::ThreadBase { tb_size = _tb_size; } + //! sets data initialization mode + void set_data_init(const std::string& _data_init) { + data_init = _data_init; + } + //! returns data initialization mode + const std::string& get_data_init(void) { return data_init; } + static void set_use_json(bool _bjson) { bjson = _bjson; } //! returns the JSON flag static bool get_use_json(void) { return bjson; } @@ -295,6 +302,8 @@ class MemWorker : public rvs::ThreadBase { uint16_t chunks_per_block; //! thread block size uint16_t tb_size; + //! data initialization mode + std::string data_init; //! TRUE if JSON output is required static bool bjson; diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index f70bf86f3..a6ab2cea7 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -111,6 +111,7 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { workers[i].set_dwords_per_lane(dwords_per_lane); workers[i].set_chunks_per_block(chunks_per_block); workers[i].set_tb_size(tb_size); + workers[i].set_data_init(data_init); i++; } @@ -292,6 +293,22 @@ bool mem_action::get_all_mem_config_keys(void) { bsts = false; } + auto it = property.find(RVS_CONF_DATA_INIT); + if (it != property.end()) { + data_init = it->second; + } else { + data_init = MEM_DEFAULT_DATA_INIT; + } + + if (data_init != "default" && data_init != "gpu_norm_dist" && + data_init != "cpu_norm_dist" && data_init != "zero_init") { + msg = "invalid '" + std::string(RVS_CONF_DATA_INIT) + + "' key value '" + data_init + + "'. Must be 'default', 'gpu_norm_dist', 'cpu_norm_dist' or 'zero_init'"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + return bsts; } diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index 058308532..f990a88db 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -40,7 +40,8 @@ using std::string; bool MemWorker::bjson = false; extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, - int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); + int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init); #define FLOAT_TEST 1 #define DOUBLE_TEST 2 @@ -85,6 +86,6 @@ void MemWorker::run() { result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, dwords_per_lane, chunks_per_block, tb_size, - MemWorker::bjson, action_name, &test); + MemWorker::bjson, action_name, &test, data_init); } diff --git a/babel.so/src/rvs_stream.cpp b/babel.so/src/rvs_stream.cpp index 797a7f44c..a4a4db610 100644 --- a/babel.so/src/rvs_stream.cpp +++ b/babel.so/src/rvs_stream.cpp @@ -8,8 +8,11 @@ #include "include/HIPStream.h" #include "hip/hip_runtime.h" #include "include/rvsloglp.h" +#include "hiprand/hiprand.hpp" #include +#include +#include #ifndef TBSIZE #define TBSIZE 1024 @@ -197,6 +200,98 @@ void HIPStream::init_arrays(T initA, T initB, T initC) check_error(hipDeviceSynchronize()); } +template +void HIPStream::init_arrays_normdist( + T mean, T stddev, bool gpu_init, + std::vector& a, std::vector& b, std::vector& c) +{ + if (!gpu_init) { + +#if !defined(USE_CPU_THREADS_INIT) + rvs::lp::Log("Using a Single Thread on CPU to Initialize NORMAL distributed data", + rvs::loginfo); + + std::random_device rd{}; + std::mt19937_64 gen{rd()}; + std::normal_distribution dist{mean, stddev}; + + auto gen_func = [&]() { return dist(gen); }; + + std::generate(a.begin(), a.end(), gen_func); + std::generate(b.begin(), b.end(), gen_func); + std::generate(c.begin(), c.end(), gen_func); + +#else + constexpr uint32_t NUM_CHUNKS = NUM_CPU_THREADS_INIT; + rvs::lp::Log(std::string("Using ") + std::to_string(NUM_CHUNKS) + + " Threads on CPU to Initialize NORMAL distributed data", + rvs::loginfo); + + std::vector workers; + workers.reserve(NUM_CHUNKS); + + const uint32_t CHUNK_SIZE = array_size / NUM_CHUNKS; + + for (uint32_t work_id = 0; work_id < NUM_CHUNKS; ++work_id) { + const uint32_t start = work_id * CHUNK_SIZE; + const uint32_t end = + (work_id == NUM_CHUNKS - 1) ? array_size : start + CHUNK_SIZE; + + workers.emplace_back([&, start, end]() { + std::random_device rd{}; + std::mt19937_64 gen{rd()}; + std::normal_distribution dist{mean, stddev}; + auto gen_func = [&]() { return dist(gen); }; + + std::generate(a.begin() + start, a.begin() + end, gen_func); + std::generate(b.begin() + start, b.begin() + end, gen_func); + std::generate(c.begin() + start, c.begin() + end, gen_func); + }); + } + + for (auto& w : workers) { + w.join(); + } +#endif + + check_error(hipMemcpy(d_a, a.data(), sizeof(T) * array_size, hipMemcpyHostToDevice)); + check_error(hipMemcpy(d_b, b.data(), sizeof(T) * array_size, hipMemcpyHostToDevice)); + check_error(hipMemcpy(d_c, c.data(), sizeof(T) * array_size, hipMemcpyHostToDevice)); + + } else { + + rvs::lp::Log("WARNING: Using GPU based NORMAL Distribution Initialization\n" + "CPU based NORMAL Distribution Initialization is RECOMMENDED when validating", + rvs::loginfo); + + hiprand_cpp::mt19937_engine engine; + hiprand_cpp::normal_distribution dist{mean, stddev}; + + try { dist(engine, d_a, array_size); } + catch (const std::exception& e) { + std::string err = std::string("hipRAND ERROR: ") + e.what(); + rvs::lp::Log(err, rvs::logerror); + std::exit(EXIT_FAILURE); + } + + try { dist(engine, d_b, array_size); } + catch (const std::exception& e) { + std::string err = std::string("hipRAND ERROR: ") + e.what(); + rvs::lp::Log(err, rvs::logerror); + std::exit(EXIT_FAILURE); + } + + try { dist(engine, d_c, array_size); } + catch (const std::exception& e) { + std::string err = std::string("hipRAND ERROR: ") + e.what(); + rvs::lp::Log(err, rvs::logerror); + std::exit(EXIT_FAILURE); + } + + check_error(hipDeviceSynchronize()); + } +} + template void HIPStream::read_arrays(std::vector& a, std::vector& b, std::vector& c) { @@ -207,18 +302,37 @@ void HIPStream::read_arrays(std::vector& a, std::vector& b, std::vector check_error(hipMemcpy(c.data(), d_c, c.size()*sizeof(T), hipMemcpyDeviceToHost)); } +// Non-temporal load/store control: +// NONTEMPORAL == 1 : NT load + NT store (default) +// NONTEMPORAL_WRITE == 1 : normal load + NT store +// NONTEMPORAL_READ == 1 : NT load + normal store +// (none of the above) : normal load + normal store +#if NONTEMPORAL == 1 +template +__device__ __forceinline__ T load(const T& ref) { + return __builtin_nontemporal_load(&ref); +} -// turn on non-temporal by default -#ifndef NONTEMPORAL -#define NONTEMPORAL 1 -#endif - -#if NONTEMPORAL == 0 +template +__device__ __forceinline__ void store(const T& value, T& ref) { + __builtin_nontemporal_store(value, &ref); +} +#elif NONTEMPORAL_WRITE == 1 template __device__ __forceinline__ T load(const T& ref) { return ref; } +template +__device__ __forceinline__ void store(const T& value, T& ref) { + __builtin_nontemporal_store(value, &ref); +} +#elif NONTEMPORAL_READ == 1 +template +__device__ __forceinline__ T load(const T& ref) { + return __builtin_nontemporal_load(&ref); +} + template __device__ __forceinline__ void store(const T& value, T& ref) { ref = value; @@ -226,12 +340,12 @@ __device__ __forceinline__ void store(const T& value, T& ref) { #else template __device__ __forceinline__ T load(const T& ref) { - return __builtin_nontemporal_load(&ref); + return ref; } template __device__ __forceinline__ void store(const T& value, T& ref) { - __builtin_nontemporal_store(value, &ref); + ref = value; } #endif diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index bb6da2bec..58c3fcf8c 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -40,38 +40,41 @@ void check_solution(const unsigned int ntimes, std::vector& a, std::vector template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init); template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test); + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init); void parseArguments(int argc, char *argv[]); bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) { + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init) { bool result = false; switch(test_type) { case FLOAT_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test); + json, action, test, data_init); break; case DOUBLE_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test); + json, action, test, data_init); break; case TRAID_FLOAT: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test); + json, action, test, data_init); break; case TRIAD_DOUBLE: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test); + json, action, test, data_init); break; default: @@ -84,7 +87,8 @@ bool run_babel(std::pair device, int num_times, int array_size, b template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init) { std::string msg; std::streamsize ss = std::cout.precision(); @@ -145,12 +149,18 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, // Result of the Dot kernel T sum; - Stream *stream; - // Use the HIP implementation - stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); - - stream->init_arrays(startA, startB, startC); + HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); + + if (data_init == "gpu_norm_dist") { + stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), true, a, b, c); + } else if (data_init == "cpu_norm_dist") { + stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), false, a, b, c); + } else if (data_init == "zero_init") { + stream->init_arrays(T{0}, T{0}, T{0}); + } else { + stream->init_arrays(startA, startB, startC); + } // List of times std::vector> timings(total_babel_subtests); @@ -328,7 +338,8 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, - uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test) + uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, + const std::string& data_init) { std::string msg; auto desc = action_descriptor{action, module_name, device.second}; @@ -382,12 +393,18 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b std::vector b(ARRAY_SIZE); std::vector c(ARRAY_SIZE); - Stream *stream; - // Use the HIP implementation - stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); - - stream->init_arrays(startA, startB, startC); + HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); + + if (data_init == "gpu_norm_dist") { + stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), true, a, b, c); + } else if (data_init == "cpu_norm_dist") { + stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), false, a, b, c); + } else if (data_init == "zero_init") { + stream->init_arrays(T{0}, T{0}, T{0}); + } else { + stream->init_arrays(startA, startB, startC); + } // Declare timers std::chrono::high_resolution_clock::time_point t1, t2; From e937550228935de943f434badb5016edbc888641 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 31 Mar 2026 02:13:23 -0700 Subject: [PATCH 062/275] update pulse tests to use gemms instead of simple handwritten kernels, and integrate to RVS --- CMakeLists.txt | 3 + pulse.so/CMakeLists.txt | 187 +++++++++++ pulse.so/include/action.h | 121 +++++++ pulse.so/include/pulse_worker.h | 241 +++++++++++++ pulse.so/include/rvs_module.h | 30 ++ pulse.so/src/action.cpp | 575 ++++++++++++++++++++++++++++++++ pulse.so/src/pulse_worker.cpp | 514 ++++++++++++++++++++++++++++ pulse.so/src/rvs_module.cpp | 103 ++++++ rvs/.rvsmodules.config | 1 + rvs/conf/pulse_single.conf | 77 +++++ 10 files changed, 1852 insertions(+) create mode 100644 pulse.so/CMakeLists.txt create mode 100644 pulse.so/include/action.h create mode 100644 pulse.so/include/pulse_worker.h create mode 100644 pulse.so/include/rvs_module.h create mode 100644 pulse.so/src/action.cpp create mode 100644 pulse.so/src/pulse_worker.cpp create mode 100644 pulse.so/src/rvs_module.cpp create mode 100644 rvs/conf/pulse_single.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index b8f6c8316..56adcf315 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,6 +657,7 @@ add_subdirectory(mem.so) add_subdirectory(babel.so) add_subdirectory(perf.so) add_subdirectory(tst.so) +add_subdirectory(pulse.so) if (RVS_BUILD_TESTS) add_subdirectory(testif.so) @@ -666,12 +667,14 @@ add_dependencies(pesm rvslib) if(RVS_ROCMSMI EQUAL 1) add_dependencies(gm rvs_smi_target) add_dependencies(iet rvs_smi_target) + add_dependencies(pulse rvs_smi_target) endif() if(RVS_ROCBLAS EQUAL 1) add_dependencies(rvslib rvs_rblas_target) add_dependencies(gst rvs_rblas_target) add_dependencies(iet rvs_rblas_target) + add_dependencies(pulse rvs_rblas_target) endif() add_custom_target(rvs_bin_folder ALL diff --git a/pulse.so/CMakeLists.txt b/pulse.so/CMakeLists.txt new file mode 100644 index 000000000..5433635f5 --- /dev/null +++ b/pulse.so/CMakeLists.txt @@ -0,0 +1,187 @@ +################################################################################ +## +## Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +## +## MIT LICENSE: +## Permission is hereby granted, free of charge, to any person obtaining a copy of +## this software and associated documentation files (the "Software"), to deal in +## the Software without restriction, including without limitation the rights to +## use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +## of the Software, and to permit persons to whom the Software is furnished to do +## so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in all +## copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +## SOFTWARE. +## +################################################################################ + +cmake_minimum_required ( VERSION 3.5.0 ) +if ( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) + message(FATAL "In-source build is not allowed") +endif () +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") + +set ( RVS "pulse" ) +set ( RVS_PACKAGE "rvs-roct" ) +set ( RVS_COMPONENT "lib${RVS}" ) +set ( RVS_TARGET "${RVS}" ) + +project ( ${RVS_TARGET} ) + +message(STATUS "MODULE: ${RVS}") + +add_compile_options(-Wall) +if (RVS_COVERAGE) + add_compile_options(-o0 -fprofile-arcs -ftest-coverage) + set(CMAKE_EXE_LINKER_FLAGS "--coverage") + set(CMAKE_SHARED_LINKER_FLAGS "--coverage") +endif() + +## Set default module path if not already set +if ( NOT DEFINED CMAKE_MODULE_PATH ) + set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/" ) +endif () + +## Include common cmake modules +include ( utils ) + +## Setup the package version. +get_version ( "0.0.0" ) + +set ( BUILD_VERSION_MAJOR ${VERSION_MAJOR} ) +set ( BUILD_VERSION_MINOR ${VERSION_MINOR} ) +set ( BUILD_VERSION_PATCH ${VERSION_PATCH} ) +set ( LIB_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" ) + +if ( DEFINED VERSION_BUILD AND NOT ${VERSION_BUILD} STREQUAL "" ) + set ( BUILD_VERSION_PATCH "${BUILD_VERSION_PATCH}-${VERSION_BUILD}" ) +endif () +set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" ) + +## make version numbers visible to C code +add_compile_options(-DBUILD_VERSION_MAJOR=${VERSION_MAJOR}) +add_compile_options(-DBUILD_VERSION_MINOR=${VERSION_MINOR}) +add_compile_options(-DBUILD_VERSION_PATCH=${VERSION_PATCH}) +add_compile_options(-DLIB_VERSION_STRING="${LIB_VERSION_STRING}") +add_compile_options(-DBUILD_VERSION_STRING="${BUILD_VERSION_STRING}") + +set(ROCBLAS_LIB "rocblas") +set(HIP_HCC_LIB "amdhip64") + +#ROCBLAS VERSION CHECK FLAGS TO CHECK REORG VERSION 2.44.0 +add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT}) + +# Determine HSA_PATH +if(NOT DEFINED HIPCC_PATH) + if(NOT DEFINED ENV{HIPCC_PATH}) + set(HIPCC_PATH "${ROCM_PATH}" CACHE PATH "Path to which hipcc runtime has been installed") + else() + set(HIPCC_PATH $ENV{HIPCC_PATH} CACHE PATH "Path to which hipcc runtime has been installed") + endif() +endif() + +# Add HIP_VERSION to CMAKE__FLAGS +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") + +set(HIP_HCC_BUILD_FLAGS) +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") + + +# Set compiler and compiler flags +set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") +set(CMAKE_C_COMPILER "${HIPCC_PATH}/bin/hipcc") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_HCC_BUILD_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ASAN_LD_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ASAN_LD_FLAGS}") + +if(BUILD_ADDRESS_SANITIZER) + execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.asan-x86_64.so + OUTPUT_VARIABLE ASAN_LIB_FULL_PATH) + get_filename_component(ASAN_LIB_PATH ${ASAN_LIB_FULL_PATH} DIRECTORY) +else() + set(ASAN_LIB_PATH "$ENV{LD_LIBRARY_PATH}") +endif() + +# Determine Roc Runtime header files are accessible +if(NOT EXISTS ${HIP_INC_DIR}/hip/hip_runtime.h) + message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) + RETURN() +endif() + +if(NOT EXISTS ${HIP_INC_DIR}/hip/hip_runtime_api.h) + message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) + RETURN() +endif() + +# Determine Roc Runtime header files are accessible +if(DEFINED RVS_ROCMSMI) + if(NOT RVS_ROCMSMI EQUAL 1) + if(NOT EXISTS ${ROCBLAS_INC_DIR}/${ROCBLAS_MODULE_NM_PREFIX}rocblas.h) + message("ERROR: rocBLAS headers can't be found under specified path. Please set ROCBLAS_INC_DIR path. Current value is : " ${ROCBLAS_INC_DIR}) + RETURN() + endif() + + if(NOT EXISTS "${ROCBLAS_LIB_DIR}/lib${ROCBLAS_LIB}.so") + message("ERROR: rocBLAS library can't be found under specified path. Please set ROCBLAS_LIB_DIR path. Current value is : " ${ROCBLAS_LIB_DIR}) + RETURN() + endif() + endif() +endif() + +if(NOT EXISTS "${HIP_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) + RETURN() +endif() + +if(DEFINED RVS_AMDSMI) + if(NOT RVS_AMDSMI EQUAL 1) + if(NOT EXISTS "${AMD_SMI_LIB_DIR}/lib${AMD_SMI_LIB}.so") + message("ERROR: ${AMD_SMI_LIB} amd_smi library can't be found!...") + RETURN() + endif() + endif() +endif() + +## define include directories +include_directories(./ ../ ${AMD_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLASLT_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) +# Add directories to look for library files to link +link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${AMD_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) +## additional libraries +set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) + +set(SOURCES src/rvs_module.cpp src/action.cpp src/pulse_worker.cpp ) + +## define target +add_library( ${RVS_TARGET} SHARED ${SOURCES}) +set_target_properties(${RVS_TARGET} PROPERTIES + SUFFIX .so.${LIB_VERSION_STRING} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${AMD_SMI_LIB}) +add_dependencies(${RVS_TARGET} rvslib) + +add_custom_command(TARGET ${RVS_TARGET} POST_BUILD +COMMAND ln -fs ./lib${RVS}.so.${LIB_VERSION_STRING} lib${RVS}.so.${VERSION_MAJOR} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} +COMMAND ln -fs ./lib${RVS}.so.${VERSION_MAJOR} lib${RVS}.so WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} +) + +install(TARGETS ${RVS_TARGET} LIBRARY DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs COMPONENT rvsmodule) +install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${RVS}.so.${VERSION_MAJOR}" + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs COMPONENT rvsmodule) +install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${RVS}.so" + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs COMPONENT rvsmodule) + +# TEST SECTION +if (RVS_BUILD_TESTS) + add_custom_command(TARGET ${RVS_TARGET} POST_BUILD + COMMAND ln -fs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${RVS}.so.${VERSION_MAJOR} ${RVS_BINTEST_FOLDER}/lib${RVS}.so WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + ) +endif() diff --git a/pulse.so/include/action.h b/pulse.so/include/action.h new file mode 100644 index 000000000..578baa13e --- /dev/null +++ b/pulse.so/include/action.h @@ -0,0 +1,121 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#ifndef PULSE_SO_INCLUDE_ACTION_H_ +#define PULSE_SO_INCLUDE_ACTION_H_ + +#ifdef __cplusplus +extern "C" { +#endif +#include +#ifdef __cplusplus +} +#endif + +#include +#include +#include + +#include "include/rvsactionbase.h" +#include "amd_smi/amdsmi.h" + +using std::vector; +using std::string; + +class PulseWorker; + +/** + * @class pulse_action + * @ingroup PULSE + * + * @brief Pulse test action implementation class + * + * Derives from rvs::actionbase and implements the GPU power pulse + * stress test in its run() method. + */ +class pulse_action: public rvs::actionbase { + public: + pulse_action(); + virtual ~pulse_action(); + virtual int run(void); + + protected: + //! pulse cycle rate in Hz + int pulse_rate; + //! fraction of each cycle spent in high-power phase (0.0-1.0) + float high_phase_ratio; + //! GEMM operation type (sgemm, dgemm, hgemm, etc.) + std::string pulse_ops_type; + //! GEMM data type + std::string pulse_data_type; + //! GEMM output data type + std::string pulse_out_data_type; + //! matrix size for GEMM K dimension + uint64_t pulse_matrix_size; + //! GEMM alpha scalar + float pulse_alpha_val; + //! GEMM beta scalar + float pulse_beta_val; + //! transpose A setting + int pulse_trans_a; + //! transpose B setting + int pulse_trans_b; + //! leading dimension offsets + int pulse_lda_offset; + int pulse_ldb_offset; + int pulse_ldc_offset; + int pulse_ldd_offset; + //! matrix initialization method + std::string pulse_matrix_init; + //! power tolerance percentage + float pulse_tolerance; + //! sampling rate for power readings (ms) + uint64_t pulse_sample_interval; + //! kernel calls between health checks + int pulse_workload_iterations; + //! stop immediately on first error + bool pulse_halt_on_error; + //! cross-GPU sync timeout (ms) + int pulse_gpu_sync_wait; + //! compute verification mode: "crc" or "diff" + std::string pulse_verify_mode; + //! hot calls for BLAS warmup + uint64_t pulse_hot_calls; + //! blas backend source library + std::string pulse_blas_source; + //! gemm compute type + std::string pulse_compute_type; + + friend class PulseWorker; + + std::map hip_to_smi_idxs; + void hip_to_smi_indices(); + bool get_all_pulse_config_keys(void); + int get_num_amd_gpu_devices(void); + int get_all_selected_gpus(void); + bool do_pulse_test(std::map pulse_gpus_device_index, + std::vector& mcm_type); +}; + +#endif // PULSE_SO_INCLUDE_ACTION_H_ diff --git a/pulse.so/include/pulse_worker.h b/pulse.so/include/pulse_worker.h new file mode 100644 index 000000000..6073f7236 --- /dev/null +++ b/pulse.so/include/pulse_worker.h @@ -0,0 +1,241 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#ifndef PULSE_SO_INCLUDE_PULSE_WORKER_H_ +#define PULSE_SO_INCLUDE_PULSE_WORKER_H_ + +#include +#include +#include +#include +#include +#include + +#include "include/rvsthreadbase.h" +#include "include/rvs_blas.h" +#include "include/rvs_util.h" +#include "include/rvsactionbase.h" +#include "include/action.h" + +/** + * @class PulseWorker + * @ingroup PULSE + * + * @brief PulseWorker action implementation class + * + * Derives from rvs::ThreadBase and implements the per-GPU pulse + * stress workload including cross-GPU synchronized avalanche release. + */ +class PulseWorker : public rvs::ThreadBase { + public: + PulseWorker(); + virtual ~PulseWorker(); + + void set_name(const std::string& name) { action_name = name; } + void set_action(const pulse_action& _action) { action = _action; } + const std::string& get_name(void) { return action_name; } + + void set_gpu_id(uint16_t _gpu_id) { gpu_id = _gpu_id; } + uint16_t get_gpu_id(void) { return gpu_id; } + + void set_gpu_device_index(int _gpu_device_index) { + gpu_device_index = _gpu_device_index; + } + int get_gpu_device_index(void) { return gpu_device_index; } + + void set_smi_device_handle(amdsmi_processor_handle _handle) { + smi_device_handle = _handle; + } + amdsmi_processor_handle get_smi_device_handle(void) { + return smi_device_handle; + } + + void set_run_duration_ms(uint64_t _run_duration_ms) { + run_duration_ms = _run_duration_ms; + } + + void set_sample_interval(uint64_t _sample_interval) { + sample_interval = _sample_interval; + } + + void set_log_interval(uint64_t _log_interval) { + log_interval = _log_interval; + } + + void set_pulse_rate(int _pulse_rate) { + pulse_rate = _pulse_rate; + } + + void set_high_phase_ratio(float _ratio) { + high_phase_ratio = _ratio; + } + + void set_tolerance(float _tolerance) { + tolerance = _tolerance; + } + + void set_matrix_size(uint64_t _matrix_size) { + matrix_size = _matrix_size; + } + + void set_ops_type(std::string _ops_type) { + pulse_ops_type = _ops_type; + } + + void set_data_type(std::string _data_type) { + pulse_data_type = _data_type; + } + + void set_out_data_type(std::string _out_data_type) { + pulse_out_data_type = _out_data_type; + } + + void set_matrix_transpose_a(int transa) { pulse_trans_a = transa; } + void set_matrix_transpose_b(int transb) { pulse_trans_b = transb; } + void set_alpha_val(float alpha) { pulse_alpha_val = alpha; } + void set_beta_val(float beta) { pulse_beta_val = beta; } + void set_lda_offset(int lda) { pulse_lda_offset = lda; } + void set_ldb_offset(int ldb) { pulse_ldb_offset = ldb; } + void set_ldc_offset(int ldc) { pulse_ldc_offset = ldc; } + void set_ldd_offset(int ldd) { pulse_ldd_offset = ldd; } + + void set_workload_iterations(int _iters) { + workload_iterations = _iters; + } + + void set_halt_on_error(bool _halt) { + halt_on_error = _halt; + } + + void set_verify_mode(std::string _mode) { + verify_mode = _mode; + } + + void set_hot_calls(uint64_t _hot_calls) { + pulse_hot_calls = _hot_calls; + } + + void set_matrix_init(std::string _init) { + matrix_init = _init; + } + + void set_blas_source(std::string _source) { + blas_source = _source; + } + + void set_compute_type(std::string _type) { + compute_type = _type; + } + + void set_mcm_type(mcm_type_t _mcm_type) { + mcm_type = _mcm_type; + } + + void set_num_gpus(int _num_gpus) { + num_gpus = _num_gpus; + } + + void set_worker_index(int _idx) { + worker_index = _idx; + } + + void set_sync_resources(std::barrier<>* _cpu_barrier, + int32_t* _gpu_arrival_count, + int32_t* _gpu_release_flag) { + cpu_barrier = _cpu_barrier; + gpu_arrival_count = _gpu_arrival_count; + gpu_release_flag = _gpu_release_flag; + } + + static void set_use_json(bool _bjson) { bjson = _bjson; } + static bool get_use_json(void) { return bjson; } + bool get_result(void) { return result; } + + protected: + virtual void run(void); + bool do_pulse_stress(void); + bool setup_blas(void); + float read_power(void); + float read_temperature(void); + + bool discover_valid_clock_levels(void); + bool set_highest_clocks(void); + bool restore_clocks(void); + + void gpu_barrier_sync(void); + + protected: + std::unique_ptr gpu_blas; + + std::string action_name; + pulse_action action; + int gpu_device_index; + amdsmi_processor_handle smi_device_handle; + uint16_t gpu_id; + + uint64_t run_duration_ms; + uint64_t sample_interval; + uint64_t log_interval; + int pulse_rate; + float high_phase_ratio; + float tolerance; + uint64_t matrix_size; + + std::string pulse_ops_type; + std::string pulse_data_type; + std::string pulse_out_data_type; + int pulse_trans_a; + int pulse_trans_b; + float pulse_alpha_val; + float pulse_beta_val; + int pulse_lda_offset; + int pulse_ldb_offset; + int pulse_ldc_offset; + int pulse_ldd_offset; + + int workload_iterations; + bool halt_on_error; + std::string verify_mode; + uint64_t pulse_hot_calls; + std::string matrix_init; + std::string blas_source; + std::string compute_type; + mcm_type_t mcm_type; + int num_gpus; + int worker_index; + + //! Cross-GPU synchronization (set by action when parallel + multi-GPU) + std::barrier<>* cpu_barrier; + int32_t* gpu_arrival_count; + int32_t* gpu_release_flag; + + //! Valid clock levels discovered via AMDSMI + std::vector valid_gfx_levels; + std::vector valid_mem_levels; + + static bool bjson; + bool result; +}; + +#endif // PULSE_SO_INCLUDE_PULSE_WORKER_H_ diff --git a/pulse.so/include/rvs_module.h b/pulse.so/include/rvs_module.h new file mode 100644 index 000000000..4d880b21f --- /dev/null +++ b/pulse.so/include/rvs_module.h @@ -0,0 +1,30 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#ifndef PULSE_SO_INCLUDE_RVS_MODULE_H_ +#define PULSE_SO_INCLUDE_RVS_MODULE_H_ + +#include "include/rvsliblog.h" + +#endif // PULSE_SO_INCLUDE_RVS_MODULE_H_ diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp new file mode 100644 index 000000000..9a9a73b01 --- /dev/null +++ b/pulse.so/src/action.cpp @@ -0,0 +1,575 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#include "include/action.h" + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +#include +#ifdef __cplusplus +} +#endif + +#define __HIP_PLATFORM_HCC__ +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" + +#include "include/rvs_key_def.h" +#include "include/pulse_worker.h" +#include "include/gpu_util.h" +#include "include/rvs_util.h" +#include "include/rvs_module.h" +#include "include/rvsactionbase.h" +#include "include/rvsloglp.h" +#include "include/rsmi_util.h" + +using std::string; +using std::vector; +using std::map; + +#define RVS_CONF_PULSE_RATE_KEY "pulse_rate" +#define RVS_CONF_HIGH_PHASE_RATIO_KEY "high_phase_ratio" +#define RVS_CONF_TOLERANCE_KEY "tolerance" +#define RVS_CONF_MATRIX_SIZE_KEY "matrix_size" +#define RVS_CONF_OPS_TYPE_KEY "ops_type" +#define RVS_CONF_DATA_TYPE_KEY "data_type" +#define RVS_CONF_OUT_DATA_TYPE_KEY "out_data_type" +#define RVS_CONF_TRANS_A_KEY "transa" +#define RVS_CONF_TRANS_B_KEY "transb" +#define RVS_CONF_ALPHA_VAL_KEY "alpha" +#define RVS_CONF_BETA_VAL_KEY "beta" +#define RVS_CONF_LDA_OFFSET_KEY "lda" +#define RVS_CONF_LDB_OFFSET_KEY "ldb" +#define RVS_CONF_LDC_OFFSET_KEY "ldc" +#define RVS_CONF_LDD_OFFSET_KEY "ldd" +#define RVS_CONF_WORKLOAD_ITERS_KEY "workload_iterations" +#define RVS_CONF_HALT_ON_ERROR_KEY "halt_on_error" +#define RVS_CONF_GPU_SYNC_WAIT_KEY "gpu_sync_wait" +#define RVS_CONF_VERIFY_MODE_KEY "verify_mode" +#define RVS_CONF_HOT_CALLS_KEY "hot_calls" +#define RVS_CONF_MATRIX_INIT_KEY "matrix_init" +#define RVS_CONF_BLAS_SOURCE_KEY "blas_source" +#define RVS_CONF_COMPUTE_TYPE_KEY "compute_type" + +#define PULSE_DEFAULT_RATE 22000 +#define PULSE_DEFAULT_HIGH_PHASE_RATIO 0.5f +#define PULSE_DEFAULT_TOLERANCE 10.0f +#define PULSE_DEFAULT_MATRIX_SIZE 4096 +#define PULSE_DEFAULT_OPS_TYPE "sgemm" +#define PULSE_DEFAULT_DATA_TYPE "" +#define PULSE_DEFAULT_OUT_DATA_TYPE "" +#define PULSE_DEFAULT_TRANS_A 0 +#define PULSE_DEFAULT_TRANS_B 1 +#define PULSE_DEFAULT_ALPHA_VAL 2.0f +#define PULSE_DEFAULT_BETA_VAL -1.0f +#define PULSE_DEFAULT_LDA_OFFSET 0 +#define PULSE_DEFAULT_LDB_OFFSET 0 +#define PULSE_DEFAULT_LDC_OFFSET 0 +#define PULSE_DEFAULT_LDD_OFFSET 0 +#define PULSE_DEFAULT_WORKLOAD_ITERS 1024 +#define PULSE_DEFAULT_HALT_ON_ERROR false +#define PULSE_DEFAULT_GPU_SYNC_WAIT 10000 +#define PULSE_DEFAULT_VERIFY_MODE "diff" +#define PULSE_DEFAULT_SAMPLE_INTERVAL 100 +#define PULSE_DEFAULT_HOT_CALLS 1 +#define PULSE_DEFAULT_MATRIX_INIT "default" +#define PULSE_DEFAULT_BLAS_SOURCE "rocblas" +#define PULSE_DEFAULT_COMPUTE_TYPE "fp32_r" + +#define PULSE_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" +#define JSON_CREATE_NODE_ERROR "JSON cannot create node" + +static constexpr auto MODULE_NAME = "pulse"; +static constexpr auto MODULE_NAME_CAPS = "PULSE"; + +pulse_action::pulse_action() { + module_name = MODULE_NAME; +} + +pulse_action::~pulse_action() { + property.clear(); +} + +bool pulse_action::get_all_pulse_config_keys(void) { + int error; + string msg; + bool bsts = true; + + if (property_get_int(RVS_CONF_PULSE_RATE_KEY, + &pulse_rate, PULSE_DEFAULT_RATE)) { + msg = "invalid '" + std::string(RVS_CONF_PULSE_RATE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_HIGH_PHASE_RATIO_KEY, + &high_phase_ratio, PULSE_DEFAULT_HIGH_PHASE_RATIO)) { + msg = "invalid '" + std::string(RVS_CONF_HIGH_PHASE_RATIO_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_TOLERANCE_KEY, + &pulse_tolerance, PULSE_DEFAULT_TOLERANCE)) { + msg = "invalid '" + std::string(RVS_CONF_TOLERANCE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get_int(RVS_CONF_MATRIX_SIZE_KEY, + &pulse_matrix_size, (uint64_t)PULSE_DEFAULT_MATRIX_SIZE)) { + msg = "invalid '" + std::string(RVS_CONF_MATRIX_SIZE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_OPS_TYPE_KEY, + &pulse_ops_type, std::string(PULSE_DEFAULT_OPS_TYPE))) { + msg = "invalid '" + std::string(RVS_CONF_OPS_TYPE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_DATA_TYPE_KEY, + &pulse_data_type, std::string(PULSE_DEFAULT_DATA_TYPE))) { + msg = "invalid '" + std::string(RVS_CONF_DATA_TYPE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_OUT_DATA_TYPE_KEY, + &pulse_out_data_type, std::string(PULSE_DEFAULT_OUT_DATA_TYPE))) { + msg = "invalid '" + std::string(RVS_CONF_OUT_DATA_TYPE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_TRANS_A_KEY, + &pulse_trans_a, PULSE_DEFAULT_TRANS_A); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_TRANS_A_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_TRANS_B_KEY, + &pulse_trans_b, PULSE_DEFAULT_TRANS_B); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_TRANS_B_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get(RVS_CONF_ALPHA_VAL_KEY, + &pulse_alpha_val, PULSE_DEFAULT_ALPHA_VAL); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_ALPHA_VAL_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get(RVS_CONF_BETA_VAL_KEY, + &pulse_beta_val, PULSE_DEFAULT_BETA_VAL); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_BETA_VAL_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_LDA_OFFSET_KEY, + &pulse_lda_offset, PULSE_DEFAULT_LDA_OFFSET); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_LDA_OFFSET_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_LDB_OFFSET_KEY, + &pulse_ldb_offset, PULSE_DEFAULT_LDB_OFFSET); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_LDB_OFFSET_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_LDC_OFFSET_KEY, + &pulse_ldc_offset, PULSE_DEFAULT_LDC_OFFSET); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_LDC_OFFSET_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_LDD_OFFSET_KEY, + &pulse_ldd_offset, PULSE_DEFAULT_LDD_OFFSET); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_LDD_OFFSET_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get_int(RVS_CONF_WORKLOAD_ITERS_KEY, + &pulse_workload_iterations, PULSE_DEFAULT_WORKLOAD_ITERS)) { + msg = "invalid '" + std::string(RVS_CONF_WORKLOAD_ITERS_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get(RVS_CONF_HALT_ON_ERROR_KEY, + &pulse_halt_on_error, PULSE_DEFAULT_HALT_ON_ERROR); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_HALT_ON_ERROR_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get_int(RVS_CONF_GPU_SYNC_WAIT_KEY, + &pulse_gpu_sync_wait, PULSE_DEFAULT_GPU_SYNC_WAIT)) { + msg = "invalid '" + std::string(RVS_CONF_GPU_SYNC_WAIT_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_VERIFY_MODE_KEY, + &pulse_verify_mode, std::string(PULSE_DEFAULT_VERIFY_MODE))) { + msg = "invalid '" + std::string(RVS_CONF_VERIFY_MODE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get_int(RVS_CONF_SAMPLE_INTERVAL_KEY, + &pulse_sample_interval, (uint64_t)PULSE_DEFAULT_SAMPLE_INTERVAL)) { + msg = "invalid '" + std::string(RVS_CONF_SAMPLE_INTERVAL_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get_int(RVS_CONF_HOT_CALLS_KEY, + &pulse_hot_calls, (uint64_t)PULSE_DEFAULT_HOT_CALLS)) { + msg = "invalid '" + std::string(RVS_CONF_HOT_CALLS_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_MATRIX_INIT_KEY, + &pulse_matrix_init, std::string(PULSE_DEFAULT_MATRIX_INIT))) { + msg = "invalid '" + std::string(RVS_CONF_MATRIX_INIT_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_BLAS_SOURCE_KEY, + &pulse_blas_source, std::string(PULSE_DEFAULT_BLAS_SOURCE))) { + msg = "invalid '" + std::string(RVS_CONF_BLAS_SOURCE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (property_get(RVS_CONF_COMPUTE_TYPE_KEY, + &pulse_compute_type, std::string(PULSE_DEFAULT_COMPUTE_TYPE))) { + msg = "invalid '" + std::string(RVS_CONF_COMPUTE_TYPE_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (high_phase_ratio < 0.0f || high_phase_ratio > 1.0f) { + msg = "'" + std::string(RVS_CONF_HIGH_PHASE_RATIO_KEY) + + "' must be between 0.0 and 1.0"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (pulse_rate <= 0) { + msg = "'" + std::string(RVS_CONF_PULSE_RATE_KEY) + + "' must be positive"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + if (pulse_sample_interval < 50) { + pulse_sample_interval = 50; + } + + return bsts; +} + +void pulse_action::hip_to_smi_indices(void) { + int hip_num_gpu_devices; + hipGetDeviceCount(&hip_num_gpu_devices); + + std::map smi_map; + smi_map = rvs::get_smi_pci_map(); + + for (int i = 0; i < hip_num_gpu_devices; i++) { + unsigned int pDom, pBus, pDev, pFun; + getBDF(i, pDom, pBus, pDev, pFun); + uint64_t hip_dev_location_id = ( ( ((uint64_t)pDom & 0xffff ) << 32) | + (((uint64_t) pBus & 0xff ) << 8) | (((uint64_t)pDev & 0x1f ) << 3)| ((uint64_t)pFun ) ); + + if(smi_map.find(hip_dev_location_id) != smi_map.end()){ + hip_to_smi_idxs.insert({i, smi_map[hip_dev_location_id]}); + } + } +} + +bool pulse_action::do_pulse_test(map pulse_gpus_device_index, + std::vector& mcm_type) { + std::string msg; + unsigned int i = 0; + int gpuId = 0; + + int num_gpus = static_cast(pulse_gpus_device_index.size()); + vector workers(num_gpus); + + // Allocate fine-grained coherent system memory for GPU-side barrier + int32_t* gpu_arrival_count = nullptr; + int32_t* gpu_release_flag = nullptr; + + if (property_parallel && num_gpus > 1) { + if (hipHostMalloc(&gpu_arrival_count, sizeof(int32_t), + hipHostMallocCoherent) != hipSuccess) { + msg = "Failed to allocate fine-grained memory for GPU sync barrier"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + return false; + } + if (hipHostMalloc(&gpu_release_flag, sizeof(int32_t), + hipHostMallocCoherent) != hipSuccess) { + msg = "Failed to allocate fine-grained memory for GPU sync barrier"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + hipHostFree(gpu_arrival_count); + return false; + } + *gpu_arrival_count = 0; + *gpu_release_flag = 0; + } + + // CPU-side barrier for host thread alignment (C++20) + std::barrier cpu_barrier(num_gpus); + + for (;;) { + map::iterator it; + + if (property_wait != 0) + sleep(property_wait); + + hip_to_smi_indices(); + + PulseWorker::set_use_json(bjson); + + i = 0; + for (it = pulse_gpus_device_index.begin(); + it != pulse_gpus_device_index.end(); ++it) { + if(hip_to_smi_idxs.find(it->first) != hip_to_smi_idxs.end()){ + workers[i].set_smi_device_handle(hip_to_smi_idxs[it->first]); + } else { + workers[i].set_smi_device_handle(nullptr); + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(i) + " has no SMI handle"; + rvs::lp::Log(msg, rvs::logerror); + } + gpuId = it->second; + + workers[i].set_name(action_name); + workers[i].set_action(*this); + workers[i].set_gpu_id(it->second); + workers[i].set_gpu_device_index(it->first); + workers[i].set_run_duration_ms(property_duration); + workers[i].set_sample_interval(pulse_sample_interval); + workers[i].set_log_interval(property_log_interval); + workers[i].set_pulse_rate(pulse_rate); + workers[i].set_high_phase_ratio(high_phase_ratio); + workers[i].set_tolerance(pulse_tolerance); + workers[i].set_matrix_size(pulse_matrix_size); + workers[i].set_ops_type(pulse_ops_type); + workers[i].set_data_type(pulse_data_type); + workers[i].set_out_data_type(pulse_out_data_type); + workers[i].set_matrix_transpose_a(pulse_trans_a); + workers[i].set_matrix_transpose_b(pulse_trans_b); + workers[i].set_alpha_val(pulse_alpha_val); + workers[i].set_beta_val(pulse_beta_val); + workers[i].set_lda_offset(pulse_lda_offset); + workers[i].set_ldb_offset(pulse_ldb_offset); + workers[i].set_ldc_offset(pulse_ldc_offset); + workers[i].set_ldd_offset(pulse_ldd_offset); + workers[i].set_workload_iterations(pulse_workload_iterations); + workers[i].set_halt_on_error(pulse_halt_on_error); + workers[i].set_verify_mode(pulse_verify_mode); + workers[i].set_hot_calls(pulse_hot_calls); + workers[i].set_matrix_init(pulse_matrix_init); + workers[i].set_blas_source(pulse_blas_source); + workers[i].set_compute_type(pulse_compute_type); + workers[i].set_mcm_type(mcm_type[i]); + workers[i].set_num_gpus(num_gpus); + workers[i].set_worker_index(i); + + if (property_parallel && num_gpus > 1) { + workers[i].set_sync_resources(&cpu_barrier, + gpu_arrival_count, gpu_release_flag); + } + + i++; + } + + if (property_parallel) { + for (i = 0; i < pulse_gpus_device_index.size(); i++) + workers[i].start(); + for (i = 0; i < pulse_gpus_device_index.size(); i++) + workers[i].join(); + } else { + for (i = 0; i < pulse_gpus_device_index.size(); i++) { + workers[i].start(); + workers[i].join(); + if (rvs::lp::Stopping()) { + if (gpu_arrival_count) hipHostFree(gpu_arrival_count); + if (gpu_release_flag) hipHostFree(gpu_release_flag); + return false; + } + } + } + + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpuId) + " Completed pulse cycle"; + rvs::lp::Log(msg, rvs::loginfo); + + if (rvs::lp::Stopping()) { + if (gpu_arrival_count) hipHostFree(gpu_arrival_count); + if (gpu_release_flag) hipHostFree(gpu_release_flag); + return false; + } + + // single iteration for pulse test + break; + } + + if (gpu_arrival_count) hipHostFree(gpu_arrival_count); + if (gpu_release_flag) hipHostFree(gpu_release_flag); + + for (i = 0; i < pulse_gpus_device_index.size(); i++) { + if(false == workers[i].get_result()) + return false; + } + + return true; +} + +int pulse_action::get_num_amd_gpu_devices(void) { + int hip_num_gpu_devices; + hipGetDeviceCount(&hip_num_gpu_devices); + return hip_num_gpu_devices; +} + +int pulse_action::get_all_selected_gpus(void) { + int hip_num_gpu_devices; + bool amd_gpus_found = false; + map pulse_gpus_device_index; + std::string msg; + std::vector mcm_type; + + hipGetDeviceCount(&hip_num_gpu_devices); + if (hip_num_gpu_devices < 1) + return -1; + + amd_gpus_found = fetch_gpu_list(hip_num_gpu_devices, + pulse_gpus_device_index, + property_device, property_device_id, property_device_all, + property_device_index, property_device_index_all, true, &mcm_type); + if(!amd_gpus_found){ + msg = "No devices match criteria from the test configuration."; + rvs::lp::Log(msg, rvs::logerror); + if (bjson) { + unsigned int sec; + unsigned int usec; + rvs::lp::get_ticks(&sec, &usec); + void *json_root_node = rvs::lp::LogRecordCreate(MODULE_NAME, + action_name.c_str(), rvs::logerror, sec, usec, true); + if (!json_root_node) { + string emsg = std::string(JSON_CREATE_NODE_ERROR); + rvs::lp::Err(emsg, MODULE_NAME_CAPS, action_name); + return -1; + } + rvs::lp::AddString(json_root_node, "ERROR", + "No AMD compatible GPU found!"); + rvs::lp::LogRecordFlush(json_root_node, rvs::logerror); + } + return -1; + } + + int res = 0; + if(do_pulse_test(pulse_gpus_device_index, mcm_type)) + res = 0; + else + res = -1; + return res; +} + +int pulse_action::run(void) { + string msg; + rvs::action_result_t action_result; + + if (!get_all_common_config_keys()) + return -1; + + if (!get_all_pulse_config_keys()) + return -1; + + if(bjson){ + json_add_primary_fields(std::string(MODULE_NAME), action_name); + } + + auto res = get_all_selected_gpus(); + if(bjson){ + rvs::lp::JsonActionEndNodeCreate(); + } + + action_result.state = rvs::actionstate::ACTION_COMPLETED; + action_result.status = (!res) ? rvs::actionstatus::ACTION_SUCCESS + : rvs::actionstatus::ACTION_FAILED; + action_result.output = "PULSE Module action " + action_name + " completed"; + action_callback(&action_result); + + return res; +} diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp new file mode 100644 index 000000000..4f172d4fb --- /dev/null +++ b/pulse.so/src/pulse_worker.cpp @@ -0,0 +1,514 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" +#include "include/rvs_module.h" +#include "include/rvsloglp.h" +#include "include/pulse_worker.h" + +#define MODULE_NAME "pulse" +#define PULSE_PASS_KEY "pass" +#define PULSE_RESULT_PASS "TRUE" +#define PULSE_RESULT_FAIL "FALSE" +#define PULSE_JSON_LOG_GPU_ID_KEY "gpu_id" +#define PULSE_JSON_POWER_HIGH_KEY "power_high" +#define PULSE_JSON_POWER_LOW_KEY "power_low" + +using std::string; + +bool PulseWorker::bjson = false; + +static uint64_t time_diff( + std::chrono::time_point t_end, + std::chrono::time_point t_start) { + auto milliseconds = std::chrono::duration_cast( + t_end - t_start); + return milliseconds.count(); +} + +// GPU-side barrier kernel for synchronized avalanche release. +// Uses fine-grained coherent system memory allocated via hipHostMallocCoherent. +// All GPUs atomically signal arrival, then spin until the last GPU releases. +__global__ void gpu_sync_barrier_kernel(int32_t* arrival_count, + int32_t* release_flag, + int32_t target_count) { + int32_t arrived = atomicAdd_system(arrival_count, 1) + 1; + + if (arrived == target_count) { + __atomic_store_n(release_flag, 1, __ATOMIC_RELEASE); + } else { + while (__atomic_load_n(release_flag, __ATOMIC_ACQUIRE) == 0) { + // tight spin on GPU hardware — nanosecond resolution + } + } +} + +PulseWorker::PulseWorker() + : gpu_device_index(-1), + smi_device_handle(nullptr), + gpu_id(0), + run_duration_ms(0), + sample_interval(100), + log_interval(1000), + pulse_rate(22000), + high_phase_ratio(0.5f), + tolerance(10.0f), + matrix_size(4096), + pulse_trans_a(0), + pulse_trans_b(1), + pulse_alpha_val(2.0f), + pulse_beta_val(-1.0f), + pulse_lda_offset(0), + pulse_ldb_offset(0), + pulse_ldc_offset(0), + pulse_ldd_offset(0), + workload_iterations(1024), + halt_on_error(false), + pulse_hot_calls(1), + num_gpus(1), + worker_index(0), + cpu_barrier(nullptr), + gpu_arrival_count(nullptr), + gpu_release_flag(nullptr), + result(false) { +} + +PulseWorker::~PulseWorker() { +} + +float PulseWorker::read_power(void) { + amdsmi_power_info_t pwr_info; + amdsmi_status_t stat = amdsmi_get_power_info(smi_device_handle, &pwr_info); + if (stat == AMDSMI_STATUS_SUCCESS) { + return static_cast(pwr_info.socket_power); + } + return -1.0f; +} + +float PulseWorker::read_temperature(void) { + int64_t temp = 0; + amdsmi_status_t stat = amdsmi_get_temp_metric(smi_device_handle, + AMDSMI_TEMPERATURE_TYPE_JUNCTION, AMDSMI_TEMP_CURRENT, &temp); + if (stat != AMDSMI_STATUS_SUCCESS) { + stat = amdsmi_get_temp_metric(smi_device_handle, + AMDSMI_TEMPERATURE_TYPE_EDGE, AMDSMI_TEMP_CURRENT, &temp); + } + if (stat == AMDSMI_STATUS_SUCCESS) { + return static_cast(temp) / 1000.0f; + } + return -1.0f; +} + +bool PulseWorker::discover_valid_clock_levels(void) { + amdsmi_frequencies_t freqs{}; + string msg; + + // Discover GFX clock levels + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, &freqs) + == AMDSMI_STATUS_SUCCESS) { + for (uint32_t level = 0; level < freqs.num_supported; ++level) { + uint64_t test_mask = (1ULL << level); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, + test_mask) == AMDSMI_STATUS_SUCCESS) { + valid_gfx_levels.push_back(level); + } else { + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + } + // Restore all valid levels after probing + if (!valid_gfx_levels.empty()) { + uint64_t restore = 0; + for (auto lvl : valid_gfx_levels) restore |= (1ULL << lvl); + amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, restore); + } + } + + // Discover MEM clock levels + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, &freqs) + == AMDSMI_STATUS_SUCCESS) { + for (uint32_t level = 0; level < freqs.num_supported; ++level) { + uint64_t test_mask = (1ULL << level); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, + test_mask) == AMDSMI_STATUS_SUCCESS) { + valid_mem_levels.push_back(level); + } else { + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + } + if (!valid_mem_levels.empty()) { + uint64_t restore = 0; + for (auto lvl : valid_mem_levels) restore |= (1ULL << lvl); + amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, restore); + } + } + + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " discovered " + + std::to_string(valid_gfx_levels.size()) + " GFX levels, " + + std::to_string(valid_mem_levels.size()) + " MEM levels"; + rvs::lp::Log(msg, rvs::loginfo); + + return !valid_gfx_levels.empty(); +} + +bool PulseWorker::set_highest_clocks(void) { + bool ok = true; + amdsmi_frequencies_t freqs{}; + + if (!valid_gfx_levels.empty()) { + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, &freqs) + == AMDSMI_STATUS_SUCCESS) { + uint32_t max_idx = valid_gfx_levels[0]; + for (auto level : valid_gfx_levels) { + if (freqs.frequency[level] > freqs.frequency[max_idx]) + max_idx = level; + } + uint64_t mask = (1ULL << max_idx); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + } + + if (!valid_mem_levels.empty()) { + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, &freqs) + == AMDSMI_STATUS_SUCCESS) { + uint32_t max_idx = valid_mem_levels[0]; + for (auto level : valid_mem_levels) { + if (freqs.frequency[level] > freqs.frequency[max_idx]) + max_idx = level; + } + uint64_t mask = (1ULL << max_idx); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + } + + return ok; +} + +bool PulseWorker::restore_clocks(void) { + bool ok = true; + + if (!valid_gfx_levels.empty()) { + uint64_t mask = 0; + for (auto lvl : valid_gfx_levels) mask |= (1ULL << lvl); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + + if (!valid_mem_levels.empty()) { + uint64_t mask = 0; + for (auto lvl : valid_mem_levels) mask |= (1ULL << lvl); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + + return ok; +} + +bool PulseWorker::setup_blas(void) { + int m = static_cast(matrix_size); + int n = static_cast(matrix_size); + int k = static_cast(matrix_size); + + gpu_blas = std::unique_ptr(new rvs_blas( + gpu_device_index, + m, n, k, + matrix_init, + pulse_trans_a, pulse_trans_b, + pulse_alpha_val, pulse_beta_val, + pulse_lda_offset, pulse_ldb_offset, + pulse_ldc_offset, pulse_ldd_offset, + pulse_ops_type, pulse_data_type, + "", 0, + 0, 0, 0, 0, + blas_source, compute_type, + pulse_out_data_type, + "", "", 0, + pulse_hot_calls)); + + gpu_blas->generate_random_matrix_data(); + if (!gpu_blas->copy_data_to_gpu()) { + return false; + } + return true; +} + +void PulseWorker::gpu_barrier_sync(void) { + if (!cpu_barrier || !gpu_arrival_count || !gpu_release_flag) + return; + + // Level 1: CPU barrier — align host threads to microsecond precision + cpu_barrier->arrive_and_wait(); + + // Reset sync counters (first worker resets, others wait) + if (worker_index == 0) { + __atomic_store_n(gpu_arrival_count, 0, __ATOMIC_RELEASE); + __atomic_store_n(gpu_release_flag, 0, __ATOMIC_RELEASE); + } + cpu_barrier->arrive_and_wait(); + + // Level 2: GPU barrier — launch tiny kernel that spins until all GPUs arrive + gpu_sync_barrier_kernel<<<1, 1>>>( + gpu_arrival_count, gpu_release_flag, num_gpus); +} + +bool PulseWorker::do_pulse_stress(void) { + std::chrono::time_point test_start, phase_start, + now, last_log_time; + string msg; + char gpuid_buff[12]; + rvs::action_result_t action_result; + auto desc = action_descriptor{action_name, MODULE_NAME, gpu_id}; + + snprintf(gpuid_buff, sizeof(gpuid_buff), "%5d", gpu_id); + + // Setup BLAS for GEMM workload + if (!setup_blas()) { + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " BLAS setup failed"; + rvs::lp::Err(msg, "PULSE", action_name); + result = false; + return false; + } + + // Discover and probe valid clock levels + discover_valid_clock_levels(); + + float max_power_high = 0.0f; + float min_power_low = 999999.0f; + float total_power_high = 0.0f; + float total_power_low = 0.0f; + int high_samples = 0; + int low_samples = 0; + int pulse_count = 0; + bool test_passed = true; + + // Compute phase durations from pulse_rate and high_phase_ratio. + // For very high frequencies (kHz), the period is microseconds — GEMM + // iterations within a single phase provide the sustained load envelope + // while the alternation pattern creates the current transients. + double period_us = 1.0e6 / static_cast(pulse_rate); + double high_phase_us = period_us * high_phase_ratio; + double low_phase_us = period_us * (1.0 - high_phase_ratio); + + // Clamp to practical minimums (GEMM dispatch takes ~microseconds) + double high_phase_ms = std::max(high_phase_us / 1000.0, 1.0); + double low_phase_ms = std::max(low_phase_us / 1000.0, 0.5); + + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " pulse_rate=" + std::to_string(pulse_rate) + + "Hz high_phase=" + std::to_string(high_phase_ms) + + "ms low_phase=" + std::to_string(low_phase_ms) + "ms"; + rvs::lp::Log(msg, rvs::loginfo); + + test_start = std::chrono::system_clock::now(); + last_log_time = test_start; + + while (!rvs::lp::Stopping()) { + now = std::chrono::system_clock::now(); + uint64_t elapsed_ms = time_diff(now, test_start); + + if (run_duration_ms > 0 && elapsed_ms >= run_duration_ms) + break; + + // ─── Cross-GPU synchronized avalanche release ─── + if (cpu_barrier && num_gpus > 1) { + gpu_barrier_sync(); + } + + // ═══ HIGH PHASE: Pin clocks + GEMM workload ═══ + set_highest_clocks(); + + phase_start = std::chrono::system_clock::now(); + while (true) { + now = std::chrono::system_clock::now(); + double phase_elapsed = std::chrono::duration( + now - phase_start).count(); + if (phase_elapsed >= high_phase_ms) + break; + + for (int iter = 0; iter < workload_iterations && !rvs::lp::Stopping(); + ++iter) { + if (!gpu_blas->run_blas_gemm(true)) { + test_passed = false; + if (halt_on_error) goto done; + break; + } + if (!gpu_blas->is_gemm_op_complete()) { + test_passed = false; + if (halt_on_error) goto done; + break; + } + } + + float power = read_power(); + if (power > 0) { + total_power_high += power; + high_samples++; + if (power > max_power_high) max_power_high = power; + } + + // Check temperature during high phase + float temp = read_temperature(); + if (temp > 105.0f) { + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " thermal violation: " + + std::to_string(temp) + "C"; + rvs::lp::Log(msg, rvs::logerror); + test_passed = false; + if (halt_on_error) goto done; + } + + now = std::chrono::system_clock::now(); + phase_elapsed = std::chrono::duration( + now - phase_start).count(); + if (phase_elapsed >= high_phase_ms) + break; + } + + // ═══ LOW PHASE: Restore clocks, minimal work ═══ + restore_clocks(); + std::this_thread::sleep_for( + std::chrono::microseconds(static_cast(low_phase_us))); + + float power_low = read_power(); + if (power_low > 0) { + total_power_low += power_low; + low_samples++; + if (power_low < min_power_low) min_power_low = power_low; + } + + pulse_count++; + + // Periodic logging + now = std::chrono::system_clock::now(); + if (time_diff(now, last_log_time) >= log_interval) { + float avg_high = (high_samples > 0) + ? total_power_high / high_samples : 0.0f; + float avg_low = (low_samples > 0) + ? total_power_low / low_samples : 0.0f; + msg = "[" + action_name + "] [GPU:: " + gpuid_buff + "] " + + "pulse #" + std::to_string(pulse_count) + + " avg_high=" + std::to_string(avg_high) + "W" + + " avg_low=" + std::to_string(avg_low) + "W" + + " max_high=" + std::to_string(max_power_high) + "W"; + rvs::lp::Log(msg, rvs::logresults); + last_log_time = now; + } + + if (rvs::lp::Stopping()) + break; + } + +done: + // Restore clocks to original state + restore_clocks(); + + float avg_power_high = (high_samples > 0) + ? total_power_high / high_samples : 0.0f; + float avg_power_low = (low_samples > 0) + ? total_power_low / low_samples : 0.0f; + float power_delta = avg_power_high - avg_power_low; + + msg = "[" + action_name + "] [GPU:: " + gpuid_buff + "] " + + "completed " + std::to_string(pulse_count) + " pulses" + + " avg_high=" + std::to_string(avg_power_high) + "W" + + " avg_low=" + std::to_string(avg_power_low) + "W" + + " delta=" + std::to_string(power_delta) + "W" + + " max_high=" + std::to_string(max_power_high) + "W"; + rvs::lp::Log(msg, rvs::logresults); + + // For secondary MCM dies, there is no power reporting + if (mcm_type == mcm_type_t::SECONDARY) { + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + + " secondary MCM, considering pass by default"; + rvs::lp::Log(msg, rvs::loginfo); + result = true; + } else { + result = test_passed && (pulse_count > 0); + } + + if (PulseWorker::bjson) { + log_to_json(desc, rvs::logresults, + PULSE_JSON_POWER_HIGH_KEY, std::to_string(avg_power_high), + PULSE_JSON_POWER_LOW_KEY, std::to_string(avg_power_low), + "pulse_count", std::to_string(pulse_count), + PULSE_PASS_KEY, result ? "true" : "false"); + } + + action_result.state = rvs::actionstate::ACTION_RUNNING; + action_result.status = result + ? rvs::actionstatus::ACTION_SUCCESS + : rvs::actionstatus::ACTION_FAILED; + action_result.output = msg; + action.action_callback(&action_result); + + return result; +} + +void PulseWorker::run() { + string msg; + char gpuid_buff[12]; + + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " start pulse_rate=" + + std::to_string(pulse_rate); + rvs::lp::Log(msg, rvs::loginfo); + + bool pass = do_pulse_stress(); + + if (rvs::lp::Stopping()) + return; + + snprintf(gpuid_buff, sizeof(gpuid_buff), "%5d", gpu_id); + msg = "[" + action_name + "] [GPU:: " + gpuid_buff + "] " + + PULSE_PASS_KEY + ": " + + (pass ? PULSE_RESULT_PASS : PULSE_RESULT_FAIL); + rvs::lp::Log(msg, rvs::logresults); + + sleep(2); +} diff --git a/pulse.so/src/rvs_module.cpp b/pulse.so/src/rvs_module.cpp new file mode 100644 index 000000000..f906d60ea --- /dev/null +++ b/pulse.so/src/rvs_module.cpp @@ -0,0 +1,103 @@ +/******************************************************************************** + * + * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#include "include/rvs_module.h" +#include "include/action.h" +#include "include/rvsloglp.h" +#include "include/gpu_util.h" + +/** + * @defgroup PULSE PULSE Module + * + * @brief GPU Power Pulse Stress Test + * + * The Pulse Test fluctuates GPU power usage by alternating between + * high-compute and idle phases at configurable rates, creating rapid + * current spikes that stress the power supply and voltage regulators. + * Work across GPUs is synchronized via a two-level barrier (CPU + GPU + * fine-grained atomics) to create maximum aggregate current transients. + * + */ + +extern "C" int rvs_module_has_interface(int iid) { + int sts = 0; + switch (iid) { + case 0: + case 1: + sts = 1; + } + return sts; +} + +extern "C" const char* rvs_module_get_description(void) { + return "GPU Power Pulse Stress Test - creates rapid power fluctuations " + "to stress the GPU power supply and voltage regulators."; +} + +extern "C" const char* rvs_module_get_config(void) { + return "pulse_rate (int), high_phase_ratio (float), " + "matrix_size (int), ops_type (string), " + "tolerance (float), sample_interval (int), " + "workload_iterations (int), halt_on_error (bool), " + "gpu_sync_wait (int), verify_mode (string)"; +} + +extern "C" const char* rvs_module_get_output(void) { + return "pass (bool)"; +} + +extern "C" int rvs_module_init(void* pMi) { + rvs::lp::Initialize(static_cast(pMi)); + rvs::gpulist::Initialize(); + return 0; +} + +extern "C" int rvs_module_terminate(void) { + amdsmi_shut_down(); + return 0; +} + +extern "C" void* rvs_module_action_create(void) { + return static_cast(new pulse_action); +} + +extern "C" int rvs_module_action_destroy(void* pAction) { + delete static_cast(pAction); + return 0; +} + +extern "C" int rvs_module_action_property_set(void* pAction, const char* Key, + const char* Val) { + return static_cast(pAction)->property_set(Key, Val); +} + +extern "C" int rvs_module_action_callback_set(void* pAction, + rvs::callback_t callback, + void * user_param) { + return static_cast(pAction)->callback_set(callback, user_param); +} + +extern "C" int rvs_module_action_run(void* pAction) { + return static_cast(pAction)->run(); +} diff --git a/rvs/.rvsmodules.config b/rvs/.rvsmodules.config index ba753ec99..bbfe1057d 100644 --- a/rvs/.rvsmodules.config +++ b/rvs/.rvsmodules.config @@ -13,3 +13,4 @@ mem: libmem.so babel: libbabel.so perf: libperf.so tst: libtst.so +pulse: libpulse.so diff --git a/rvs/conf/pulse_single.conf b/rvs/conf/pulse_single.conf new file mode 100644 index 000000000..c8a669799 --- /dev/null +++ b/rvs/conf/pulse_single.conf @@ -0,0 +1,77 @@ +# GPU Power Pulse Stress Test Configuration +# +# This test creates rapid power fluctuations by alternating between +# high-compute (GEMM) and idle phases at a configurable rate. +# When running in parallel on multiple GPUs, a two-level barrier +# (CPU + GPU fine-grained atomics) synchronizes all GPUs so they +# spike current simultaneously, maximizing stress on the PSU. +# +# Failure conditions: +# - Thermal violations (junction temperature > 105 C) +# - GEMM compute errors (data corruption) +# - Power supply unable to handle transient spikes +# +# Prerequisites: +# - Sufficient permissions for clock manipulation via AMD SMI +# - rocBLAS installed and accessible + +actions: +- name: pulse_stress_basic + device: all + module: pulse + parallel: true + duration: 60000 + sample_interval: 100 + log_interval: 5000 + pulse_rate: 100 + high_phase_ratio: 0.6 + ops_type: sgemm + matrix_size: 4096 + alpha: 2.0 + beta: -1.0 + tolerance: 10.0 + workload_iterations: 64 + halt_on_error: false + gpu_sync_wait: 10000 + verify_mode: diff + blas_source: rocblas + +- name: pulse_stress_aggressive + device: all + module: pulse + parallel: true + duration: 120000 + sample_interval: 50 + log_interval: 5000 + pulse_rate: 500 + high_phase_ratio: 0.7 + ops_type: sgemm + matrix_size: 8192 + alpha: 2.0 + beta: -1.0 + tolerance: 10.0 + workload_iterations: 128 + halt_on_error: true + gpu_sync_wait: 10000 + verify_mode: diff + blas_source: rocblas + +- name: pulse_stress_dgemm + device: all + module: pulse + parallel: true + duration: 60000 + sample_interval: 100 + log_interval: 5000 + pulse_rate: 50 + high_phase_ratio: 0.5 + ops_type: dgemm + matrix_size: 4096 + alpha: 2.0 + beta: -1.0 + tolerance: 10.0 + workload_iterations: 32 + halt_on_error: false + gpu_sync_wait: 10000 + verify_mode: diff + blas_source: rocblas From 93206757653c913e6fd7fd64f780a9bbfcf5e5ef Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 31 Mar 2026 04:16:40 -0700 Subject: [PATCH 063/275] fix timing deadlock and short phases --- pulse.so/include/pulse_worker.h | 9 +- pulse.so/src/action.cpp | 11 ++- pulse.so/src/pulse_worker.cpp | 145 ++++++++++++++++++++++---------- rvs/conf/pulse_single.conf | 36 +++++--- 4 files changed, 141 insertions(+), 60 deletions(-) diff --git a/pulse.so/include/pulse_worker.h b/pulse.so/include/pulse_worker.h index 6073f7236..91c10946f 100644 --- a/pulse.so/include/pulse_worker.h +++ b/pulse.so/include/pulse_worker.h @@ -31,6 +31,7 @@ #include #include #include +#include #include "include/rvsthreadbase.h" #include "include/rvs_blas.h" @@ -162,10 +163,12 @@ class PulseWorker : public rvs::ThreadBase { void set_sync_resources(std::barrier<>* _cpu_barrier, int32_t* _gpu_arrival_count, - int32_t* _gpu_release_flag) { + int32_t* _gpu_release_flag, + std::atomic* _done_flag) { cpu_barrier = _cpu_barrier; gpu_arrival_count = _gpu_arrival_count; gpu_release_flag = _gpu_release_flag; + done_flag = _done_flag; } static void set_use_json(bool _bjson) { bjson = _bjson; } @@ -181,9 +184,10 @@ class PulseWorker : public rvs::ThreadBase { bool discover_valid_clock_levels(void); bool set_highest_clocks(void); + bool set_lowest_clocks(void); bool restore_clocks(void); - void gpu_barrier_sync(void); + bool gpu_barrier_sync(bool time_up); protected: std::unique_ptr gpu_blas; @@ -229,6 +233,7 @@ class PulseWorker : public rvs::ThreadBase { std::barrier<>* cpu_barrier; int32_t* gpu_arrival_count; int32_t* gpu_release_flag; + std::atomic* done_flag; //! Valid clock levels discovered via AMDSMI std::vector valid_gfx_levels; diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp index 9a9a73b01..4e8108891 100644 --- a/pulse.so/src/action.cpp +++ b/pulse.so/src/action.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -79,7 +80,7 @@ using std::map; #define RVS_CONF_BLAS_SOURCE_KEY "blas_source" #define RVS_CONF_COMPUTE_TYPE_KEY "compute_type" -#define PULSE_DEFAULT_RATE 22000 +#define PULSE_DEFAULT_RATE 2 #define PULSE_DEFAULT_HIGH_PHASE_RATIO 0.5f #define PULSE_DEFAULT_TOLERANCE 10.0f #define PULSE_DEFAULT_MATRIX_SIZE 4096 @@ -94,7 +95,7 @@ using std::map; #define PULSE_DEFAULT_LDB_OFFSET 0 #define PULSE_DEFAULT_LDC_OFFSET 0 #define PULSE_DEFAULT_LDD_OFFSET 0 -#define PULSE_DEFAULT_WORKLOAD_ITERS 1024 +#define PULSE_DEFAULT_WORKLOAD_ITERS 128 #define PULSE_DEFAULT_HALT_ON_ERROR false #define PULSE_DEFAULT_GPU_SYNC_WAIT 10000 #define PULSE_DEFAULT_VERIFY_MODE "diff" @@ -365,6 +366,10 @@ bool pulse_action::do_pulse_test(map pulse_gpus_device_index, int num_gpus = static_cast(pulse_gpus_device_index.size()); vector workers(num_gpus); + // Shared flag: when any GPU's duration expires, it sets this before + // arriving at the barrier so all GPUs see it and exit together. + std::atomic done_flag{false}; + // Allocate fine-grained coherent system memory for GPU-side barrier int32_t* gpu_arrival_count = nullptr; int32_t* gpu_release_flag = nullptr; @@ -448,7 +453,7 @@ bool pulse_action::do_pulse_test(map pulse_gpus_device_index, if (property_parallel && num_gpus > 1) { workers[i].set_sync_resources(&cpu_barrier, - gpu_arrival_count, gpu_release_flag); + gpu_arrival_count, gpu_release_flag, &done_flag); } i++; diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp index 4f172d4fb..3c433254a 100644 --- a/pulse.so/src/pulse_worker.cpp +++ b/pulse.so/src/pulse_worker.cpp @@ -82,7 +82,7 @@ PulseWorker::PulseWorker() run_duration_ms(0), sample_interval(100), log_interval(1000), - pulse_rate(22000), + pulse_rate(2), high_phase_ratio(0.5f), tolerance(10.0f), matrix_size(4096), @@ -94,7 +94,7 @@ PulseWorker::PulseWorker() pulse_ldb_offset(0), pulse_ldc_offset(0), pulse_ldd_offset(0), - workload_iterations(1024), + workload_iterations(128), halt_on_error(false), pulse_hot_calls(1), num_gpus(1), @@ -102,6 +102,7 @@ PulseWorker::PulseWorker() cpu_barrier(nullptr), gpu_arrival_count(nullptr), gpu_release_flag(nullptr), + done_flag(nullptr), result(false) { } @@ -224,6 +225,45 @@ bool PulseWorker::set_highest_clocks(void) { return ok; } +bool PulseWorker::set_lowest_clocks(void) { + bool ok = true; + amdsmi_frequencies_t freqs{}; + + if (!valid_gfx_levels.empty()) { + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, &freqs) + == AMDSMI_STATUS_SUCCESS) { + uint32_t min_idx = valid_gfx_levels[0]; + for (auto level : valid_gfx_levels) { + if (freqs.frequency[level] < freqs.frequency[min_idx]) + min_idx = level; + } + uint64_t mask = (1ULL << min_idx); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + } + + if (!valid_mem_levels.empty()) { + if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, &freqs) + == AMDSMI_STATUS_SUCCESS) { + uint32_t min_idx = valid_mem_levels[0]; + for (auto level : valid_mem_levels) { + if (freqs.frequency[level] < freqs.frequency[min_idx]) + min_idx = level; + } + uint64_t mask = (1ULL << min_idx); + if (amdsmi_set_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_MEM, mask) + != AMDSMI_STATUS_SUCCESS) { + ok = false; + } + } + } + + return ok; +} + bool PulseWorker::restore_clocks(void) { bool ok = true; @@ -276,13 +316,22 @@ bool PulseWorker::setup_blas(void) { return true; } -void PulseWorker::gpu_barrier_sync(void) { +bool PulseWorker::gpu_barrier_sync(bool time_up) { if (!cpu_barrier || !gpu_arrival_count || !gpu_release_flag) - return; + return !time_up; + + // Signal done BEFORE barrier so all threads see it atomically + if (time_up && done_flag) + done_flag->store(true, std::memory_order_release); - // Level 1: CPU barrier — align host threads to microsecond precision + // Level 1: CPU barrier — all threads MUST arrive even if done, + // otherwise the remaining threads deadlock here forever. cpu_barrier->arrive_and_wait(); + // After barrier, if any thread signaled done, all exit together + if (done_flag && done_flag->load(std::memory_order_acquire)) + return false; + // Reset sync counters (first worker resets, others wait) if (worker_index == 0) { __atomic_store_n(gpu_arrival_count, 0, __ATOMIC_RELEASE); @@ -293,6 +342,7 @@ void PulseWorker::gpu_barrier_sync(void) { // Level 2: GPU barrier — launch tiny kernel that spins until all GPUs arrive gpu_sync_barrier_kernel<<<1, 1>>>( gpu_arrival_count, gpu_release_flag, num_gpus); + return true; } bool PulseWorker::do_pulse_stress(void) { @@ -305,7 +355,6 @@ bool PulseWorker::do_pulse_stress(void) { snprintf(gpuid_buff, sizeof(gpuid_buff), "%5d", gpu_id); - // Setup BLAS for GEMM workload if (!setup_blas()) { msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + " BLAS setup failed"; @@ -314,7 +363,6 @@ bool PulseWorker::do_pulse_stress(void) { return false; } - // Discover and probe valid clock levels discover_valid_clock_levels(); float max_power_high = 0.0f; @@ -326,22 +374,22 @@ bool PulseWorker::do_pulse_stress(void) { int pulse_count = 0; bool test_passed = true; - // Compute phase durations from pulse_rate and high_phase_ratio. - // For very high frequencies (kHz), the period is microseconds — GEMM - // iterations within a single phase provide the sustained load envelope - // while the alternation pattern creates the current transients. - double period_us = 1.0e6 / static_cast(pulse_rate); - double high_phase_us = period_us * high_phase_ratio; - double low_phase_us = period_us * (1.0 - high_phase_ratio); + // Phase durations in milliseconds. + // For visible power deltas use pulse_rate 1-10 Hz (100ms-1s phases). + // Sub-10ms phases are too fast for real GPU power state transitions + // and the SMI reporting window (~100ms averaging). + double period_ms = 1000.0 / static_cast(pulse_rate); + double high_phase_ms = period_ms * high_phase_ratio; + double low_phase_ms = period_ms * (1.0 - high_phase_ratio); - // Clamp to practical minimums (GEMM dispatch takes ~microseconds) - double high_phase_ms = std::max(high_phase_us / 1000.0, 1.0); - double low_phase_ms = std::max(low_phase_us / 1000.0, 0.5); + high_phase_ms = std::max(high_phase_ms, 10.0); + low_phase_ms = std::max(low_phase_ms, 10.0); msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + " pulse_rate=" + std::to_string(pulse_rate) + - "Hz high_phase=" + std::to_string(high_phase_ms) + - "ms low_phase=" + std::to_string(low_phase_ms) + "ms"; + "Hz period=" + std::to_string(period_ms) + + "ms high=" + std::to_string(high_phase_ms) + + "ms low=" + std::to_string(low_phase_ms) + "ms"; rvs::lp::Log(msg, rvs::loginfo); test_start = std::chrono::system_clock::now(); @@ -350,16 +398,20 @@ bool PulseWorker::do_pulse_stress(void) { while (!rvs::lp::Stopping()) { now = std::chrono::system_clock::now(); uint64_t elapsed_ms = time_diff(now, test_start); + bool time_up = (run_duration_ms > 0 && elapsed_ms >= run_duration_ms); - if (run_duration_ms > 0 && elapsed_ms >= run_duration_ms) - break; - - // ─── Cross-GPU synchronized avalanche release ─── + // Coordinated shutdown: when using multi-GPU barrier, all GPUs must + // arrive at the barrier even if their timer expired — otherwise the + // remaining GPUs deadlock. After the barrier, if ANY GPU signaled + // done, ALL GPUs exit together. if (cpu_barrier && num_gpus > 1) { - gpu_barrier_sync(); + if (!gpu_barrier_sync(time_up)) + break; + } else if (time_up) { + break; } - // ═══ HIGH PHASE: Pin clocks + GEMM workload ═══ + // ═══ HIGH PHASE: Pin clocks to max + sustained GEMM load ═══ set_highest_clocks(); phase_start = std::chrono::system_clock::now(); @@ -391,7 +443,6 @@ bool PulseWorker::do_pulse_stress(void) { if (power > max_power_high) max_power_high = power; } - // Check temperature during high phase float temp = read_temperature(); if (temp > 105.0f) { msg = "[" + action_name + "] " + MODULE_NAME + " " + @@ -401,29 +452,36 @@ bool PulseWorker::do_pulse_stress(void) { test_passed = false; if (halt_on_error) goto done; } + } + + // Drain the GPU pipeline so all GEMM work finishes before the + // low phase — without this, kernels still in flight keep power + // elevated and the "low" reading is indistinguishable from "high". + hipDeviceSynchronize(); + + // ═══ LOW PHASE: Pin clocks to minimum + idle with sampling ═══ + set_lowest_clocks(); + phase_start = std::chrono::system_clock::now(); + while (true) { now = std::chrono::system_clock::now(); - phase_elapsed = std::chrono::duration( + double phase_elapsed = std::chrono::duration( now - phase_start).count(); - if (phase_elapsed >= high_phase_ms) + if (phase_elapsed >= low_phase_ms) break; - } - // ═══ LOW PHASE: Restore clocks, minimal work ═══ - restore_clocks(); - std::this_thread::sleep_for( - std::chrono::microseconds(static_cast(low_phase_us))); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); - float power_low = read_power(); - if (power_low > 0) { - total_power_low += power_low; - low_samples++; - if (power_low < min_power_low) min_power_low = power_low; + float power_low = read_power(); + if (power_low > 0) { + total_power_low += power_low; + low_samples++; + if (power_low < min_power_low) min_power_low = power_low; + } } pulse_count++; - // Periodic logging now = std::chrono::system_clock::now(); if (time_diff(now, last_log_time) >= log_interval) { float avg_high = (high_samples > 0) @@ -434,7 +492,9 @@ bool PulseWorker::do_pulse_stress(void) { "pulse #" + std::to_string(pulse_count) + " avg_high=" + std::to_string(avg_high) + "W" + " avg_low=" + std::to_string(avg_low) + "W" + - " max_high=" + std::to_string(max_power_high) + "W"; + " max_high=" + std::to_string(max_power_high) + "W" + + " min_low=" + std::to_string(min_power_low) + "W" + + " delta=" + std::to_string(avg_high - avg_low) + "W"; rvs::lp::Log(msg, rvs::logresults); last_log_time = now; } @@ -444,7 +504,6 @@ bool PulseWorker::do_pulse_stress(void) { } done: - // Restore clocks to original state restore_clocks(); float avg_power_high = (high_samples > 0) @@ -458,10 +517,10 @@ bool PulseWorker::do_pulse_stress(void) { " avg_high=" + std::to_string(avg_power_high) + "W" + " avg_low=" + std::to_string(avg_power_low) + "W" + " delta=" + std::to_string(power_delta) + "W" + - " max_high=" + std::to_string(max_power_high) + "W"; + " max_high=" + std::to_string(max_power_high) + "W" + + " min_low=" + std::to_string(min_power_low) + "W"; rvs::lp::Log(msg, rvs::logresults); - // For secondary MCM dies, there is no power reporting if (mcm_type == mcm_type_t::SECONDARY) { msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + diff --git a/rvs/conf/pulse_single.conf b/rvs/conf/pulse_single.conf index c8a669799..4c1141108 100644 --- a/rvs/conf/pulse_single.conf +++ b/rvs/conf/pulse_single.conf @@ -1,11 +1,23 @@ # GPU Power Pulse Stress Test Configuration # -# This test creates rapid power fluctuations by alternating between +# This test creates power fluctuations by alternating between # high-compute (GEMM) and idle phases at a configurable rate. # When running in parallel on multiple GPUs, a two-level barrier # (CPU + GPU fine-grained atomics) synchronizes all GPUs so they # spike current simultaneously, maximizing stress on the PSU. # +# TUNING GUIDANCE: +# pulse_rate - Hz. Use 1-5 Hz for visible power deltas. +# Higher rates (>50 Hz) produce phases shorter +# than the GPU power state transition time and +# the SMI power reporting window (~100ms), so +# the high/low readings converge. +# high_phase_ratio - fraction of the period spent under load. +# 0.5 = equal high/low. Lower values give the +# GPU more time to idle and drop power. +# matrix_size - larger matrices draw more power. 8192+ +# recommended for GPUs with >500W TDP. +# # Failure conditions: # - Thermal violations (junction temperature > 105 C) # - GEMM compute errors (data corruption) @@ -23,14 +35,14 @@ actions: duration: 60000 sample_interval: 100 log_interval: 5000 - pulse_rate: 100 - high_phase_ratio: 0.6 + pulse_rate: 2 + high_phase_ratio: 0.5 ops_type: sgemm - matrix_size: 4096 + matrix_size: 8192 alpha: 2.0 beta: -1.0 tolerance: 10.0 - workload_iterations: 64 + workload_iterations: 128 halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff @@ -43,14 +55,14 @@ actions: duration: 120000 sample_interval: 50 log_interval: 5000 - pulse_rate: 500 - high_phase_ratio: 0.7 + pulse_rate: 1 + high_phase_ratio: 0.6 ops_type: sgemm - matrix_size: 8192 + matrix_size: 16384 alpha: 2.0 beta: -1.0 tolerance: 10.0 - workload_iterations: 128 + workload_iterations: 256 halt_on_error: true gpu_sync_wait: 10000 verify_mode: diff @@ -63,14 +75,14 @@ actions: duration: 60000 sample_interval: 100 log_interval: 5000 - pulse_rate: 50 + pulse_rate: 2 high_phase_ratio: 0.5 ops_type: dgemm - matrix_size: 4096 + matrix_size: 8192 alpha: 2.0 beta: -1.0 tolerance: 10.0 - workload_iterations: 32 + workload_iterations: 64 halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff From 1b1c83e4f0e81a9f6fddca99db578fdcb9d1cccf Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 2 Apr 2026 00:44:37 -0700 Subject: [PATCH 064/275] add to duration_mods and have a per iter check --- pulse.so/src/pulse_worker.cpp | 4 ++++ src/rvsactionbase.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp index 3c433254a..589b95190 100644 --- a/pulse.so/src/pulse_worker.cpp +++ b/pulse.so/src/pulse_worker.cpp @@ -434,6 +434,10 @@ bool PulseWorker::do_pulse_stress(void) { if (halt_on_error) goto done; break; } + now = std::chrono::system_clock::now(); + if (std::chrono::duration( + now - phase_start).count() >= high_phase_ms) + break; } float power = read_power(); diff --git a/src/rvsactionbase.cpp b/src/rvsactionbase.cpp index bd2c954e7..c98e2b055 100644 --- a/src/rvsactionbase.cpp +++ b/src/rvsactionbase.cpp @@ -41,7 +41,7 @@ #define FLOATING_POINT_REGEX "^[0-9]*\\.?[0-9]+$" // only thse modules have a target and duration based test approach -static const std::set duration_mods {"gst", "iet", "tst", "pebb", "pbqt", "gm"}; +static const std::set duration_mods {"gst", "iet", "tst", "pebb", "pbqt", "gm", "pulse"}; using std::cout; using std::endl; using std::string; From 928f61b455cf48f892c85fade8837c5c5216f239 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 2 Apr 2026 04:44:12 -0400 Subject: [PATCH 065/275] cmake min version update --- CMakeGtestDownload.cmake | 2 +- CMakeLists.txt.yaml | 2 +- CMakeMXDataGeneratorDownload.cmake | 2 +- CMakeRBLASDownload.cmake | 2 +- CMakeRSMIDownload.cmake | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeGtestDownload.cmake b/CMakeGtestDownload.cmake index d772419d6..94ca03963 100644 --- a/CMakeGtestDownload.cmake +++ b/CMakeGtestDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(googletest-download NONE) diff --git a/CMakeLists.txt.yaml b/CMakeLists.txt.yaml index d0d6575fb..4eb534249 100644 --- a/CMakeLists.txt.yaml +++ b/CMakeLists.txt.yaml @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(yaml-download NONE) diff --git a/CMakeMXDataGeneratorDownload.cmake b/CMakeMXDataGeneratorDownload.cmake index 0b9f9f8b5..8013ea648 100644 --- a/CMakeMXDataGeneratorDownload.cmake +++ b/CMakeMXDataGeneratorDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(mxDataGenerator-download NONE) diff --git a/CMakeRBLASDownload.cmake b/CMakeRBLASDownload.cmake index cfa2baf1f..305326897 100644 --- a/CMakeRBLASDownload.cmake +++ b/CMakeRBLASDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(rvs_rblas-download NONE) diff --git a/CMakeRSMIDownload.cmake b/CMakeRSMIDownload.cmake index d105d6531..7f0460b34 100644 --- a/CMakeRSMIDownload.cmake +++ b/CMakeRSMIDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(rvs_smi-download NONE) From 448a1680c37dfba8c71af39075efe413f50c08e8 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Wed, 28 Jan 2026 23:15:47 +0900 Subject: [PATCH 066/275] chore: pwd does not take non-option parameters --- regression/multi_run_and_check_json.py | 2 +- regression/run_and_check_test.py | 2 +- regression/run_regression.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/regression/multi_run_and_check_json.py b/regression/multi_run_and_check_json.py index 4d21e4de7..6e60f2fbd 100755 --- a/regression/multi_run_and_check_json.py +++ b/regression/multi_run_and_check_json.py @@ -39,7 +39,7 @@ # ./multi_run_and_check_json.py /work/igorhdl/ROCm2/build/bin /work/igorhdl/ROCm2/ROCmValidationSuite /work/igorhdl/ROCm2/ROCmValidationSuite/rvs/conf/rand_pbqt0.conf 5 3 # get current location -curr_location = subprocess.check_output(["pwd", ""]) +curr_location = subprocess.check_output(["pwd"]) curr_location_size = len(curr_location) curr_location = curr_location[0:curr_location_size-1] print curr_location diff --git a/regression/run_and_check_test.py b/regression/run_and_check_test.py index dbb086709..5eb22b868 100755 --- a/regression/run_and_check_test.py +++ b/regression/run_and_check_test.py @@ -61,7 +61,7 @@ # ./run_single_test /work/igorhdl/ROCm2/build/bin /work/igorhdl/ROCm2/ROCmValidationSuite/rvs/conf/rand_pbqt0.conf 3 tmp_output_file.txt true tmp_console_file.txt # get current location -curr_location = subprocess.check_output(["pwd", ""]) +curr_location = subprocess.check_output(["pwd"]) curr_location_size = len(curr_location) curr_location = curr_location[0:curr_location_size-1] print curr_location diff --git a/regression/run_regression.py b/regression/run_regression.py index 2e3a1de6f..ea7558ee7 100755 --- a/regression/run_regression.py +++ b/regression/run_regression.py @@ -7,7 +7,7 @@ from shutil import copyfile -curr_location = subprocess.check_output(["pwd", ""]) +curr_location = subprocess.check_output(["pwd"]) curr_location_size = len(curr_location) curr_location = curr_location[0:curr_location_size-1] print('curr_location',curr_location) From 12088b466e38e4b1003e3de1e7162fa4ff6d5ea8 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 5 Apr 2026 21:52:06 -0700 Subject: [PATCH 067/275] json logging update --- pulse.so/src/pulse_worker.cpp | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp index 589b95190..67963af7a 100644 --- a/pulse.so/src/pulse_worker.cpp +++ b/pulse.so/src/pulse_worker.cpp @@ -411,6 +411,11 @@ bool PulseWorker::do_pulse_stress(void) { break; } + float pulse_peak_high = 0.0f; + float pulse_trough_low = 999999.0f; + float pulse_temp = -1.0f; + int pulse_gemm_count = 0; + // ═══ HIGH PHASE: Pin clocks to max + sustained GEMM load ═══ set_highest_clocks(); @@ -434,6 +439,7 @@ bool PulseWorker::do_pulse_stress(void) { if (halt_on_error) goto done; break; } + pulse_gemm_count++; now = std::chrono::system_clock::now(); if (std::chrono::duration( now - phase_start).count() >= high_phase_ms) @@ -445,9 +451,11 @@ bool PulseWorker::do_pulse_stress(void) { total_power_high += power; high_samples++; if (power > max_power_high) max_power_high = power; + if (power > pulse_peak_high) pulse_peak_high = power; } float temp = read_temperature(); + if (temp > 0) pulse_temp = temp; if (temp > 105.0f) { msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + " thermal violation: " + @@ -462,6 +470,9 @@ bool PulseWorker::do_pulse_stress(void) { // low phase — without this, kernels still in flight keep power // elevated and the "low" reading is indistinguishable from "high". hipDeviceSynchronize(); + now = std::chrono::system_clock::now(); + double actual_high_ms = std::chrono::duration( + now - phase_start).count(); // ═══ LOW PHASE: Pin clocks to minimum + idle with sampling ═══ set_lowest_clocks(); @@ -481,12 +492,33 @@ bool PulseWorker::do_pulse_stress(void) { total_power_low += power_low; low_samples++; if (power_low < min_power_low) min_power_low = power_low; + if (power_low < pulse_trough_low) pulse_trough_low = power_low; } } + now = std::chrono::system_clock::now(); + double actual_low_ms = std::chrono::duration( + now - phase_start).count(); + pulse_count++; - now = std::chrono::system_clock::now(); + if (PulseWorker::bjson) { + uint64_t pulse_elapsed_ms = time_diff(now, test_start); + log_to_json(desc, rvs::logresults, + "record_type", "pulse", + "pulse_num", std::to_string(pulse_count), + "elapsed_ms", std::to_string(pulse_elapsed_ms), + "power_high_w", std::to_string(pulse_peak_high), + "power_low_w", std::to_string( + pulse_trough_low < 999999.0f ? pulse_trough_low : 0.0f), + "power_delta_w", std::to_string( + pulse_peak_high - (pulse_trough_low < 999999.0f + ? pulse_trough_low : 0.0f)), + "high_duration_ms", std::to_string(actual_high_ms), + "low_duration_ms", std::to_string(actual_low_ms), + "temp_c", std::to_string(pulse_temp), + "gemm_count", std::to_string(pulse_gemm_count)); + } if (time_diff(now, last_log_time) >= log_interval) { float avg_high = (high_samples > 0) ? total_power_high / high_samples : 0.0f; @@ -537,9 +569,17 @@ bool PulseWorker::do_pulse_stress(void) { if (PulseWorker::bjson) { log_to_json(desc, rvs::logresults, - PULSE_JSON_POWER_HIGH_KEY, std::to_string(avg_power_high), - PULSE_JSON_POWER_LOW_KEY, std::to_string(avg_power_low), + "record_type", "summary", "pulse_count", std::to_string(pulse_count), + "avg_power_high_w", std::to_string(avg_power_high), + "avg_power_low_w", std::to_string(avg_power_low), + "avg_delta_w", std::to_string(power_delta), + "max_power_high_w", std::to_string(max_power_high), + "min_power_low_w", std::to_string(min_power_low), + "duration_ms", std::to_string(run_duration_ms), + "pulse_rate_hz", std::to_string(pulse_rate), + "ops_type", pulse_ops_type, + "matrix_size", std::to_string(matrix_size), PULSE_PASS_KEY, result ? "true" : "false"); } From 2416aed25d60fc856e7a4e2a5633db70f2fe614b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 6 Apr 2026 17:13:25 -0500 Subject: [PATCH 068/275] Add TransferBench support to PEBB and PBQT --- CMakeLists.txt | 26 +- CMakeTransferBenchDownload.cmake | 40 +++ build_packages_local.sh | 81 +++++- gm.so/tests.cmake | 4 +- gpup.so/tests.cmake | 4 +- include/gpu_util.h | 3 +- include/rvs_key_def.h | 24 +- pbqt.so/CMakeLists.txt | 4 +- pbqt.so/include/action.h | 295 ++++++++++++---------- pbqt.so/include/worker.h | 76 +++++- pbqt.so/src/action.cpp | 417 +++++++++++++++++++++++++------ pbqt.so/src/action_run.cpp | 60 +++-- pbqt.so/src/worker.cpp | 223 +++++++++++++++-- pebb.so/CMakeLists.txt | 5 +- pebb.so/include/action.h | 29 ++- pebb.so/include/worker.h | 28 ++- pebb.so/src/action.cpp | 61 ++++- pebb.so/src/action_run.cpp | 50 ++-- pebb.so/src/worker.cpp | 167 ++++++++++--- pesm.so/tests.cmake | 4 +- rvs/CMakeLists.txt | 4 +- rvs/conf/MI350X/pbqt_single.conf | 66 ++++- rvs/conf/MI350X/pebb_single.conf | 82 +++++- rvs/conf/MI355X/pbqt_single.conf | 62 ++++- rvs/conf/MI355X/pebb_single.conf | 82 +++++- rvs/tests.cmake | 6 +- rvslib/CMakeLists.txt | 5 +- smqt.so/tests.cmake | 4 +- src/gpu_util.cpp | 78 +++++- 29 files changed, 1606 insertions(+), 384 deletions(-) create mode 100644 CMakeTransferBenchDownload.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index b8f6c8316..dc43b3ee6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################ ## -## Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. +## Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. ## ## MIT LICENSE: ## Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -494,6 +494,30 @@ if (NOT DEFINED MXDATAGENERATOR_INC_DIR) endif () ################################################################################ +################################################################################ +# TransferBench Download +configure_file(CMakeTransferBenchDownload.cmake TransferBench-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/TransferBench-download ) +if(result) + message(FATAL_ERROR "CMake step for TransferBench failed: ${result}") +endif() + +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/TransferBench-download ) +if(result) + message(FATAL_ERROR "Build step for TransferBench failed: ${result}") +endif() + +if (NOT DEFINED TRANSFERBENCH_INC_DIR) + set (TRANSFERBENCH_INC_DIR "${CMAKE_BINARY_DIR}/TransferBench-src/src/header") + message ("TRANSFERBENCH_INC_DIR ${TRANSFERBENCH_INC_DIR}") +endif () +################################################################################ + ## rocBLAS if(RVS_ROCBLAS EQUAL 1) diff --git a/CMakeTransferBenchDownload.cmake b/CMakeTransferBenchDownload.cmake new file mode 100644 index 000000000..ec26da326 --- /dev/null +++ b/CMakeTransferBenchDownload.cmake @@ -0,0 +1,40 @@ +################################################################################ +## +## Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +## +## MIT LICENSE: +## Permission is hereby granted, free of charge, to any person obtaining a copy of +## this software and associated documentation files (the "Software"), to deal in +## the Software without restriction, including without limitation the rights to +## use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +## of the Software, and to permit persons to whom the Software is furnished to do +## so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in all +## copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +## SOFTWARE. +## +################################################################################ + +cmake_minimum_required(VERSION 3.5.0) + +project(TransferBench-download NONE) + +include(ExternalProject) +ExternalProject_Add(TransferBench + GIT_REPOSITORY https://github.com/ROCm/TransferBench.git + GIT_TAG c78c4aec95e5e8317ddecdf6e224443f63473312 #TransferBench v1.66.02 + SOURCE_DIR "${CMAKE_BINARY_DIR}/TransferBench-src" + BINARY_DIR "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) diff --git a/build_packages_local.sh b/build_packages_local.sh index 42bb6732d..77f6d1bca 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -92,12 +92,14 @@ check_and_install_dependencies() { # Check for Ubuntu/Debian library headers [ -f /usr/include/pci/pci.h ] || MISSING_LIBS+=("libpci-dev") [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("libyaml-cpp-dev") + [ -f /usr/include/numa.h ] || MISSING_LIBS+=("libnuma-dev") command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm") command -v unzip >/dev/null 2>&1 || MISSING_LIBS+=("unzip") elif [[ "$OS" =~ ^(centos|rhel|rocky|almalinux|amzn)$ ]]; then # Check for CentOS/RHEL/Rocky/AlmaLinux library headers [ -f /usr/include/pci/pci.h ] || MISSING_LIBS+=("pciutils-devel") [ -f /usr/include/yaml-cpp/yaml.h ] || MISSING_LIBS+=("yaml-cpp-devel") + [ -f /usr/include/numa.h ] || MISSING_LIBS+=("numactl-devel") command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm-build") fi @@ -124,7 +126,8 @@ check_and_install_dependencies() { unzip \ libyaml-cpp-dev \ rpm \ - python3 + python3 \ + libnuma-dev elif [[ "$OS" =~ ^(centos|rhel|rocky|almalinux|amzn)$ ]]; then print_info "Installing dependencies for CentOS/RHEL/Rocky/AlmaLinux..." @@ -168,8 +171,39 @@ check_and_install_dependencies() { doxygen \ rpm-build \ python3 \ + numactl-devel\ || print_warning "Some packages may already be installed" + # Install a gcc-toolset with C++20 support (requires GCC >= 11) + # Try highest available first for best C++20/C++23 support, fall back to minimum viable + # RHEL/AlmaLinux/Rocky 8+ use gcc-toolset-{ver}, CentOS 7 uses devtoolset-{ver} + if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then + GCC_TOOLSET_INSTALLED="" + for ver in 14 13 12 11; do + if yum list available gcc-toolset-${ver} &>/dev/null; then + print_info "Found gcc-toolset-${ver} - installing for C++20 support..." + if yum install -y gcc-toolset-${ver}; then + GCC_TOOLSET_INSTALLED="gcc-toolset-${ver}" + print_success "Installed gcc-toolset-${ver} (C++20 supported)" + break + fi + fi + done + # Fallback to devtoolset (CentOS 7) - only devtoolset-11 has + if [ -z "$GCC_TOOLSET_INSTALLED" ]; then + if yum list available devtoolset-11 &>/dev/null; then + print_info "Found devtoolset-11 - installing for C++20 support (CentOS 7)..." + if yum install -y devtoolset-11; then + GCC_TOOLSET_INSTALLED="devtoolset-11" + print_success "Installed devtoolset-11 (C++20 supported)" + fi + fi + fi + if [ -z "$GCC_TOOLSET_INSTALLED" ]; then + print_warning "No gcc-toolset (11-14) or devtoolset-11 available - C++20 headers like may be missing" + fi + fi + # Install cmake and yaml-cpp separately as they may need special handling print_info "Installing cmake..." yum install -y cmake3 || yum install -y cmake || print_warning "cmake installation may have failed" @@ -194,6 +228,7 @@ check_and_install_dependencies() { echo "Development Libraries:" echo " - libpci-dev (or pciutils-devel)" echo " - libyaml-cpp-dev (or yaml-cpp-devel)" + echo " - libnuma-dev (or numactl-devel)" echo " - rpm-build tools" exit 1 fi @@ -360,27 +395,40 @@ else print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" fi -# TODO: Currently hipcc and cmake3 are only set for AlmaLinux (manylinux_2_28) -# Ubuntu works fine without these settings. Need to verify later if these -# should be applied universally for all OS or kept OS-specific. +if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then + # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like + # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ + GCC_TOOLSET_ENABLED="" + for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do + ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) + if [ -n "$ENABLE_SCRIPT" ] && [ -f "$ENABLE_SCRIPT" ]; then + TOOLSET_ROOT=$(dirname "$ENABLE_SCRIPT") + source "$ENABLE_SCRIPT" + export GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" + GCC_TOOLSET_ENABLED="$pkg" + print_success "Enabled ${pkg} from ${TOOLSET_ROOT} (GCC $(gcc -dumpversion))" + break + fi + done + if [ -z "$GCC_TOOLSET_ENABLED" ]; then + print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers may be missing" + fi -# AlmaLinux-specific settings for manylinux_2_28 -if [[ "$OS" == "almalinux" ]]; then - # Set C++ compiler to hipcc from ROCm for AlmaLinux + # Set C++ compiler to hipcc from ROCm if [ -x "$ROCM_PATH/bin/hipcc" ]; then export CMAKE_CXX_COMPILER="$ROCM_PATH/bin/hipcc" - print_success "Set CMAKE_CXX_COMPILER to hipcc (AlmaLinux)" + print_success "Set CMAKE_CXX_COMPILER to hipcc (CentOS/RHEL/AlmaLinux/Rocky)" else print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi - # Use cmake3 for AlmaLinux + # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" - print_info "Using cmake3 (AlmaLinux/Manylinux)" + print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" else - # Ubuntu: use defaults (system compiler and cmake) + # Ubuntu and others: use defaults (system compiler and cmake) export CMAKE_COMMAND="cmake" - print_info "Using cmake (Ubuntu)" + print_info "Using cmake (Ubuntu/other)" fi print_info "Environment variables set:" @@ -398,6 +446,9 @@ fi if [ -n "$CMAKE_CXX_COMPILER" ]; then echo " CMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER" fi +if [ -n "$GCC_TOOLCHAIN" ]; then + echo " GCC_TOOLCHAIN=$GCC_TOOLCHAIN" +fi echo " CMAKE_COMMAND=$CMAKE_COMMAND" # Verify ROCm installation @@ -445,6 +496,12 @@ if [ -n "$CMAKE_CXX_COMPILER" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") fi +# Point hipcc at the GCC toolchain for C++20 standard library headers +if [ -n "$GCC_TOOLCHAIN" ]; then + CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="--gcc-toolchain=$GCC_TOOLCHAIN") + print_success "Set --gcc-toolchain=$GCC_TOOLCHAIN for hipcc" +fi + $CMAKE_COMMAND "${CMAKE_ARGS[@]}" if [ $? -eq 0 ]; then diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake index 0a620828b..8a89a7159 100644 --- a/gm.so/tests.cmake +++ b/gm.so/tests.cmake @@ -29,9 +29,7 @@ set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -find_package(OpenMP) - -set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX +set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} -fopenmp ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_TARGET} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) diff --git a/gpup.so/tests.cmake b/gpup.so/tests.cmake index 3204b87f0..f24797012 100644 --- a/gpup.so/tests.cmake +++ b/gpup.so/tests.cmake @@ -29,9 +29,7 @@ set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -find_package(OpenMP) - -set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB} OpenMP::OpenMP_CXX +set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB} -fopenmp ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) # Add directories to look for library files to link diff --git a/include/gpu_util.h b/include/gpu_util.h index 27dc7154f..0ede856f0 100644 --- a/include/gpu_util.h +++ b/include/gpu_util.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -44,6 +44,7 @@ extern void gpu_get_all_domain_id(std::vector* pgpus_domain_id, std::map , uint16_t>& pgpus_dom_loc_map); extern bool gpu_check_if_mcm_die (int idx); extern int gpu_hip_to_smi_hdl(int hip_index, amdsmi_processor_handle* smi_index); +extern int gpu_hip_to_node(int hip_index, int* node); extern void gpu_get_all_pci_bdf(std::vector& ppci_bdf); extern bool gpu_check_if_gpu_indexes (const std::vector &idx); extern std::string gpu_get_platform_name (void); diff --git a/include/rvs_key_def.h b/include/rvs_key_def.h index 8e272e2a2..ec28ebf80 100644 --- a/include/rvs_key_def.h +++ b/include/rvs_key_def.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -45,6 +45,16 @@ #define RVS_CONF_HOT_CALLS_KEY "hot_calls" #define RVS_CONF_WARM_CALLS_KEY "warm_calls" #define RVS_CONF_B2B_KEY "b2b" +#define RVS_CONF_EXECUTOR_KEY "executor" +#define RVS_CONF_SUBEXECUTOR_KEY "subexecutor" +#define RVS_CONF_TRANSFER_METHOD_KEY "transfer_method" +#define RVS_CONF_TRANSFERBENCH_TEST_KEY "transferbench_test" +#define RVS_CONF_A2A_MODE_KEY "a2a_mode" +#define RVS_CONF_A2A_DIRECT_KEY "a2a_direct" +#define RVS_CONF_A2A_LOCAL_KEY "a2a_local" +#define RVS_CONF_A2A_NUM_GPUS_KEY "a2a_num_gpus" +#define RVS_CONF_USE_REMOTE_READ_KEY "use_remote_read" +#define RVS_CONF_GFX_UNROLL_KEY "gfx_unroll" #define DEFAULT_LOG_INTERVAL (1000u) #define DEFAULT_DURATION (10000u) @@ -53,6 +63,18 @@ #define DEFAULT_HOT_CALLS (1u) #define DEFAULT_WARM_CALLS (1u) #define DEFAULT_B2B false +#define DEFAULT_TRANSFER_METHOD "native" +#define DEFAULT_TRANSFERBENCH_TEST "p2p" +#define DEFAULT_EXECUTOR "gfx" +#define DEFAULT_SUBEXECUTOR (1u) +#define DEFAULT_A2A_MODE (0u) +#define DEFAULT_A2A_DIRECT (1u) +#define DEFAULT_A2A_LOCAL (0u) +#define DEFAULT_A2A_NUM_GPUS (0u) +#define DEFAULT_USE_REMOTE_READ (0u) +#define DEFAULT_GFX_UNROLL (4u) +#define DEFAULT_SRC_MEMORY "null" +#define DEFAULT_DST_MEMORY "null" #define YAML_DEVICE_PROPERTY_ERROR "Error while parsing property" #define YAML_DEVICEID_PROPERTY_ERROR "Error while parsing "\ diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt index ccaea42cb..afae4e735 100644 --- a/pbqt.so/CMakeLists.txt +++ b/pbqt.so/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################ ## -## Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. +## Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. ## ## MIT LICENSE: ## Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -133,7 +133,7 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) endif() ## define include directories -include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) +include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${TRANSFERBENCH_INC_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries diff --git a/pbqt.so/include/action.h b/pbqt.so/include/action.h index a30af3270..5f55d1fc5 100644 --- a/pbqt.so/include/action.h +++ b/pbqt.so/include/action.h @@ -1,133 +1,162 @@ -/******************************************************************************** - * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. - * - * MIT LICENSE: - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - *******************************************************************************/ -#ifndef PBQT_SO_INCLUDE_ACTION_H_ -#define PBQT_SO_INCLUDE_ACTION_H_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "hsa/hsa.h" -#include "hsa/hsa_ext_amd.h" - -#include "include/rvsactionbase.h" - -using namespace std::chrono; - - -class pbqtworker; - -enum class pbqt_json_data_t { - PBQT_THROUGHPUT = 0, - PBQT_LINK_TYPE = 1 -}; - -/** - * @class pbqt_action - * @ingroup PBQT - * - * @brief PBQT action implementation class - * - * Derives from rvs::actionbase and implements actual action functionality - * in its run() method. - * - */ -class pbqt_action : public rvs::actionbase { - public: - pbqt_action(); - virtual ~pbqt_action(); - - virtual int run(void); - - protected: - bool get_all_pbqt_config_keys(void); - - // PBQT specific config keys - bool property_get_peers(int *error); - void property_get_test_bandwidth(int *error); -// void property_get_log_interval(int *error); - void property_get_bidirectional(int *error); - - //! 'true' if "all" is found under "peer" key for this action - bool prop_peer_device_all_selected; - //! array of peer GPU IDs to be used in data trasfers - std::vector prop_peers; - //! deviceid of peer GPUs - uint32_t prop_peer_deviceid; - //! 'true' if bandwidth test is to be executed for verified peers - bool prop_test_bandwidth; - //! 'true' if bidirectional data transfer is required - bool prop_bidirectional; - //! list of test block sizes - std::vector block_size; - //! set to 'true' if the default block sizes are to be used - bool b_block_size_all; - //! test block size for back-to-back transfers - uint32_t b2b_block_size; - //! link type - int link_type; - - std::string link_type_string; - - protected: - int is_peer(uint16_t Src, uint16_t Dst); - int create_threads(); - int destroy_threads(); - - int run_single(); - int run_parallel(); - - int print_running_average(); - int print_running_average(pbqtworker* pWorker); - - int print_final_average(); - - //! 'true' for the duration of test - bool brun; - - - void* json_base_node(int log_level); - void json_add_kv(void *json_node, const std::string &key, const std::string &value); - void json_to_file(void *json_node,int log_level); - void log_json_data(std::string srcnode, std::string dstnode, - int log_level, std::string conn, std::string throughput); - - private: - void do_running_average(void); - void do_final_average(void); - - std::vector test_array; -}; - -#endif // PBQT_SO_INCLUDE_ACTION_H_ +/******************************************************************************** + * + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. + * + * MIT LICENSE: + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + *******************************************************************************/ +#ifndef PBQT_SO_INCLUDE_ACTION_H_ +#define PBQT_SO_INCLUDE_ACTION_H_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "hsa/hsa.h" +#include "hsa/hsa_ext_amd.h" + +#include "include/rvsactionbase.h" + +using namespace std::chrono; + + +class pbqtworker; + +enum class pbqt_json_data_t { + PBQT_THROUGHPUT = 0, + PBQT_LINK_TYPE = 1 +}; + +/** + * @class pbqt_action + * @ingroup PBQT + * + * @brief PBQT action implementation class + * + * Derives from rvs::actionbase and implements actual action functionality + * in its run() method. + * + */ +class pbqt_action : public rvs::actionbase { + public: + pbqt_action(); + virtual ~pbqt_action(); + + virtual int run(void); + + protected: + bool get_all_pbqt_config_keys(void); + + // PBQT specific config keys + bool property_get_peers(int *error); + void property_get_test_bandwidth(int *error); +// void property_get_log_interval(int *error); + void property_get_bidirectional(int *error); + + //! 'true' if "all" is found under "peer" key for this action + bool prop_peer_device_all_selected; + //! array of peer GPU IDs to be used in data trasfers + std::vector prop_peers; + //! deviceid of peer GPUs + uint32_t prop_peer_deviceid; + //! 'true' if bandwidth test is to be executed for verified peers + bool prop_test_bandwidth; + //! 'true' if bidirectional data transfer is required + bool prop_bidirectional; + //! list of test block sizes + std::vector block_size; + //! set to 'true' if the default block sizes are to be used + bool b_block_size_all; + //! test block size for back-to-back transfers + uint32_t b2b_block_size; + //! link type + int link_type; + + std::string link_type_string; + //! Number of warm calls (transfer iterations) before bandwidth calculation (hot calls) + //! to ignore few intial transfers for the bandwidth to settle + uint32_t warm_calls; + //! Number of hot calls (transfer iterations) for bandwidth calculation after warm calls + uint32_t hot_calls; + //! 'true' if back-to-back transfers enabled + bool b2b; + + //! transfer method - TransferBench or Native + std::string transfer_method; + //! transferbench test type - p2p or alltoall + std::string transferbench_test; + //! transfer executor to use - GPU or SDMA + std::string executor; + //! No. of subexecutors + uint32_t subexecutor; + + //! alltoall mode: 0=copy, 1=read-only, 2=write-only + uint32_t a2a_mode; + //! alltoall direct-only: 1=only direct XGMI links, 0=full all-to-all + uint32_t a2a_direct; + //! alltoall local: 1=include self-transfers, 0=exclude + uint32_t a2a_local; + //! number of GPUs for alltoall (0=all detected) + uint32_t a2a_num_gpus; + //! remote read: 1=use DST as executor, 0=use SRC + uint32_t use_remote_read; + //! GFX kernel unroll factor + uint32_t gfx_unroll; + + protected: + int is_peer(uint16_t Src, uint16_t Dst); + int create_threads(); + int destroy_threads(); + + int run_single(); + int run_parallel(); + + int print_running_average(); + int print_running_average(pbqtworker* pWorker); + + int print_final_average(); + + //! 'true' for the duration of test + bool brun; + + + void* json_base_node(int log_level); + void json_add_kv(void *json_node, const std::string &key, const std::string &value); + void json_to_file(void *json_node,int log_level); + void log_json_data(std::string srcnode, std::string dstnode, + int log_level, std::string conn, std::string throughput); + + private: + void do_running_average(void); + void do_final_average(void); + + std::vector test_array; +}; + +#endif // PBQT_SO_INCLUDE_ACTION_H_ diff --git a/pbqt.so/include/worker.h b/pbqt.so/include/worker.h index 1338c54c0..b5fd53f25 100644 --- a/pbqt.so/include/worker.h +++ b/pbqt.so/include/worker.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -43,6 +43,20 @@ * */ +struct peer_pair_t { + uint16_t srcnode; + uint16_t dstnode; + std::string conn_type; +}; + +struct gpu_pair_bw_t { + int srcGpu; + int dstGpu; + int srcNode; + int dstNode; + double avgBandwidthGbPerSec; +}; + namespace rvs { class hsa; } @@ -87,6 +101,33 @@ class pbqtworker : public rvs::ThreadBase { const std::string& get_conn_type(){ return conn_type; } + void set_hot_calls(uint32_t _hot_calls) { hot_calls = _hot_calls; } + //! Set warm calls + void set_warm_calls(uint32_t _warm_calls) { warm_calls = _warm_calls; } + //! Set b2b + void set_b2b(bool _b2b) { b2b = _b2b; } + //! Set transfer method + void set_transfer_method(std::string _transfer_method) { transfer_method = _transfer_method; } + //! Set executor + void set_executor(std::string _executor) { executor = _executor; } + //! Set subexecutor + void set_subexecutor(uint32_t _subexecutor) { subexecutor = _subexecutor; } + //! Set transferbench test type (p2p or alltoall) + void set_transferbench_test(std::string _test) { transferbench_test = _test; } + //! Set alltoall mode (0=copy, 1=read-only, 2=write-only) + void set_a2a_mode(uint32_t val) { a2a_mode = val; } + //! Set alltoall direct-only flag (1=only direct XGMI links) + void set_a2a_direct(uint32_t val) { a2a_direct = val; } + //! Set alltoall local flag (1=include self-transfers) + void set_a2a_local(uint32_t val) { a2a_local = val; } + //! Set number of GPUs for alltoall (0=all detected) + void set_a2a_num_gpus(uint32_t val) { a2a_num_gpus = val; } + //! Set remote read flag (1=use DST as executor instead of SRC) + void set_use_remote_read(uint32_t val) { use_remote_read = val; } + //! Set GFX kernel unroll factor + void set_gfx_unroll(uint32_t val) { gfx_unroll = val; } + //! Get per GPU-pair bandwidth results from alltoall + const std::vector& get_gpu_pair_bw() const { return gpu_pair_bw; } protected: virtual void run(void); @@ -127,9 +168,42 @@ class pbqtworker : public rvs::ThreadBase { //! total number of transfers uint16_t transfer_num; + //! hot calls + uint32_t hot_calls; + //! warm calls + uint32_t warm_calls; + //! 'true' if back-to-back transfers enabled + bool b2b; + + //! transfer method - TransferBench or Native + std::string transfer_method; + //! transferbench test type - p2p or alltoall + std::string transferbench_test; + //! transfer executor to use - GPU or SDMA + std::string executor; + //! No. of subexecutors + uint32_t subexecutor; + //! list of test block sizes std::vector block_size; std::string conn_type; + + //! alltoall mode: 0=copy, 1=read-only, 2=write-only + uint32_t a2a_mode; + //! alltoall direct-only: 1=only direct XGMI links, 0=full all-to-all + uint32_t a2a_direct; + //! alltoall local: 1=include self-transfers, 0=exclude + uint32_t a2a_local; + //! number of GPUs for alltoall (0=all detected) + uint32_t a2a_num_gpus; + //! remote read: 1=use DST as executor, 0=use SRC + uint32_t use_remote_read; + //! GFX kernel unroll factor + uint32_t gfx_unroll; + + //! per GPU-pair bandwidth results from alltoall + std::vector gpu_pair_bw; + //! synchronization mutex std::mutex cntmutex; }; diff --git a/pbqt.so/src/action.cpp b/pbqt.so/src/action.cpp index 465fcd8f7..3d8b9f458 100644 --- a/pbqt.so/src/action.cpp +++ b/pbqt.so/src/action.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -36,6 +36,8 @@ extern "C" { #include #include #include +#include +#include #include "include/rvs_key_def.h" #include "include/pci_caps.h" @@ -223,6 +225,104 @@ bool pbqt_action::get_all_pbqt_config_keys(void) { link_type_string = "XGMI"; } + if (property_get(RVS_CONF_B2B_KEY, &b2b, DEFAULT_B2B)) { + msg = "invalid '" + std::string(RVS_CONF_B2B_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_HOT_CALLS_KEY, &hot_calls, DEFAULT_HOT_CALLS); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_HOT_CALLS_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_WARM_CALLS_KEY, &warm_calls, DEFAULT_WARM_CALLS); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_WARM_CALLS_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get(RVS_CONF_TRANSFER_METHOD_KEY, &transfer_method, DEFAULT_TRANSFER_METHOD); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_TRANSFER_METHOD_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get(RVS_CONF_TRANSFERBENCH_TEST_KEY, &transferbench_test, DEFAULT_TRANSFERBENCH_TEST); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_TRANSFERBENCH_TEST_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get(RVS_CONF_EXECUTOR_KEY, &executor, DEFAULT_EXECUTOR); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_EXECUTOR_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_SUBEXECUTOR_KEY, &subexecutor, DEFAULT_SUBEXECUTOR); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_SUBEXECUTOR_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_A2A_MODE_KEY, &a2a_mode, DEFAULT_A2A_MODE); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_A2A_MODE_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_A2A_DIRECT_KEY, &a2a_direct, DEFAULT_A2A_DIRECT); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_A2A_DIRECT_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_A2A_LOCAL_KEY, &a2a_local, DEFAULT_A2A_LOCAL); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_A2A_LOCAL_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_A2A_NUM_GPUS_KEY, &a2a_num_gpus, DEFAULT_A2A_NUM_GPUS); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_A2A_NUM_GPUS_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_USE_REMOTE_READ_KEY, &use_remote_read, DEFAULT_USE_REMOTE_READ); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_USE_REMOTE_READ_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + error = property_get_int(RVS_CONF_GFX_UNROLL_KEY, &gfx_unroll, DEFAULT_GFX_UNROLL); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_GFX_UNROLL_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + res = false; + } + + if(!hot_calls) { + hot_calls = DEFAULT_HOT_CALLS; + } + + if(!warm_calls) { + warm_calls = DEFAULT_WARM_CALLS; + } + return res; } @@ -288,14 +388,18 @@ int pbqt_action::create_threads() { std::vector gpu_id; std::vector gpu_idx; std::vector gpu_device_id; - uint16_t transfer_ix = 0; bool bmatch_found = false; char srcgpuid_buff[12]; char dstgpuid_buff[12]; - std::string pbconn; gpu_get_all_gpu_id(&gpu_id); gpu_get_all_gpu_idx(&gpu_idx); gpu_get_all_device_id(&gpu_device_id); + + std::vector valid_pairs; + + // --------------------------------------------------------------- + // Loop 1: Discover all valid srcnode-dstnode peer pairs + // --------------------------------------------------------------- for (size_t i = 0; i < gpu_id.size(); i++) { // all possible sources // filter out by source device id @@ -353,7 +457,7 @@ int pbqt_action::create_threads() { } RVSTRACE_ - // signal that at lease one matching src-dst combination + // signal that at least one matching src-dst combination // has been found: bmatch_found = true; @@ -361,7 +465,7 @@ int pbqt_action::create_threads() { // get NUMA nodes uint16_t srcnode; if (rvs::gpulist::gpu2node(gpu_id[i], &srcnode)) { - msg + "no node found for GPU ID " + std::to_string(gpu_id[i]); + msg = "no node found for GPU ID " + std::to_string(gpu_id[i]); rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); return -1; } @@ -427,39 +531,16 @@ int pbqt_action::create_threads() { if(distance == rvs::hsa::NO_CONN) { continue; // no point if no connection } + + std::string pbconn; if (0 != arr_linkinfo.size()) { - /* Log link type */ pbconn = arr_linkinfo[0].strtype; - //log_json_data(std::to_string(srcnode), std::to_string(gpu_id[j]), rvs::logresults, - // pbqt_json_data_t::PBQT_LINK_TYPE, arr_linkinfo[0].strtype); - /* Note: Assuming link type for all hops between GPUs are the same */ } RVSTRACE_ - // GPUs are peers, create transaction for them if (prop_test_bandwidth) { - RVSTRACE_ - pbqtworker* p = nullptr; - - transfer_ix += 1; - - p = new pbqtworker; - if (p == nullptr) { - RVSTRACE_ - msg = "internal error"; - rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); - return -1; - } - p->initialize(srcnode, dstnode, prop_bidirectional); - RVSTRACE_ - p->set_name(action_name); - p->set_stop_name(action_name); - p->set_transfer_ix(transfer_ix); - p->set_block_sizes(block_size); - p->set_conn_type(pbconn); - test_array.push_back(p); - }else{ - // no need to run bandwidth, just log interface info + valid_pairs.push_back({srcnode, dstnode, pbconn}); + } else { log_json_data(std::to_string(gpu_id[srcnode]), std::to_string(gpu_id[j]), rvs::logresults, pbconn, "NA" ); } @@ -492,8 +573,11 @@ int pbqt_action::create_threads() { } } + // --------------------------------------------------------------- + // Loop 2: Create pbqtworker for each valid srcnode-dstnode pair + // --------------------------------------------------------------- RVSTRACE_ - if (prop_test_bandwidth && test_array.size() < 1) { + if (prop_test_bandwidth && valid_pairs.empty()) { RVSTRACE_ std::string diag; if (bmatch_found) { @@ -525,6 +609,50 @@ int pbqt_action::create_threads() { return 0; } + uint16_t transfer_ix = 0; + bool alltoall_single = (transfer_method == "transferbench" && + transferbench_test == "alltoall"); + + for (const auto& pair : valid_pairs) { + RVSTRACE_ + pbqtworker* p = nullptr; + + transfer_ix += 1; + + p = new pbqtworker; + if (p == nullptr) { + RVSTRACE_ + msg = "internal error"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + return -1; + } + p->initialize(pair.srcnode, pair.dstnode, prop_bidirectional); + RVSTRACE_ + p->set_name(action_name); + p->set_stop_name(action_name); + p->set_transfer_ix(transfer_ix); + p->set_block_sizes(block_size); + p->set_conn_type(pair.conn_type); + p->set_b2b(b2b); + p->set_hot_calls(hot_calls); + p->set_warm_calls(warm_calls); + p->set_transfer_method(transfer_method); + p->set_transferbench_test(transferbench_test); + p->set_executor(executor); + p->set_subexecutor(subexecutor); + p->set_a2a_mode(a2a_mode); + p->set_a2a_direct(a2a_direct); + p->set_a2a_local(a2a_local); + p->set_a2a_num_gpus(a2a_num_gpus); + p->set_use_remote_read(use_remote_read); + p->set_gfx_unroll(gfx_unroll); + + test_array.push_back(p); + + if (alltoall_single) + break; + } + RVSTRACE_ for (auto it = test_array.begin(); it != test_array.end(); ++it) { RVSTRACE_ @@ -739,79 +867,202 @@ int pbqt_action::print_final_average() { rvs::action_result_t result; for (auto it = test_array.begin(); it != test_array.end(); ++it) { - (*it)->get_final_data(&src_node, &dst_node, &bidir, - ¤t_size, &duration); - if (duration) { - bandwidth = current_size/duration/1000 / 1000 / 1000; - if (bidir) { - bandwidth *=2; + if (transferbench_test != "alltoall") { + (*it)->get_final_data(&src_node, &dst_node, &bidir, + ¤t_size, &duration); + + if (duration) { + bandwidth = current_size/duration/1000 / 1000 / 1000; + if (bidir) { + bandwidth *=2; + } + snprintf( buff, sizeof(buff), "%.3f GBps", bandwidth); + } else { + snprintf( buff, sizeof(buff), "(not measured)"); } - snprintf( buff, sizeof(buff), "%.3f GBps", bandwidth); - } else { - snprintf( buff, sizeof(buff), "(not measured)"); - } - RVSTRACE_ - if (rvs::gpulist::node2gpu(src_node, &src_id)) { + + RVSTRACE_ + if (rvs::gpulist::node2gpu(src_node, &src_id)) { + RVSTRACE_ + std::string msg = "could not find GPU id for node " + + std::to_string(src_node); + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + return -1; + } + RVSTRACE_ + if (rvs::gpulist::node2gpu(dst_node, &dst_id)) { + RVSTRACE_ + std::string msg = "could not find GPU id for node " + + std::to_string(dst_node); + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + return -1; + } + + std::string src_pci_bdf; + if (rvs::gpulist::node2bdf(src_node, src_pci_bdf)) { RVSTRACE_ - std::string msg = "could not find GPU id for node " + + std::string msg = "could not find PCI BDF for node " + std::to_string(src_node); rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); return -1; } - RVSTRACE_ - if (rvs::gpulist::node2gpu(dst_node, &dst_id)) { + + std::string dst_pci_bdf; + if (rvs::gpulist::node2bdf(dst_node, dst_pci_bdf)) { RVSTRACE_ - std::string msg = "could not find GPU id for node " + + std::string msg = "could not find PCI BDF for node " + std::to_string(dst_node); rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); return -1; } - std::string src_pci_bdf; - if (rvs::gpulist::node2bdf(src_node, src_pci_bdf)) { - RVSTRACE_ - std::string msg = "could not find PCI BDF for node " + - std::to_string(src_node); - rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); - return -1; - } + transfer_ix = (*it)->get_transfer_ix(); + transfer_num = (*it)->get_transfer_num(); - std::string dst_pci_bdf; - if (rvs::gpulist::node2bdf(dst_node, dst_pci_bdf)) { - RVSTRACE_ - std::string msg = "could not find PCI BDF for node " + - std::to_string(dst_node); - rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); - return -1; + snprintf(transfer_buff, sizeof(transfer_buff), "%2d", transfer_ix); + snprintf(srcgpuid_buff, sizeof(srcgpuid_buff), "%5d", src_id); + snprintf(dstgpuid_buff, sizeof(dstgpuid_buff), "%5d", dst_id); + + msg = "[" + action_name + "] p2p-bandwidth[" + + transfer_buff + "/" + std::to_string(transfer_num) + "]" + + " [GPU:: " + std::to_string(src_node) + " - " + srcgpuid_buff + " - " + src_pci_bdf + "]" + + " [GPU:: " + std::to_string(dst_node) + " - " + dstgpuid_buff + " - " + dst_pci_bdf + "]" + + " bidirectional: " + std::string(bidir ? "true" : "false") + + " " + buff + " duration: " + std::to_string(duration) + " secs"; + + rvs::lp::Log(msg, rvs::logresults); + + result.state = rvs::actionstate::ACTION_RUNNING; + result.status = rvs::actionstatus::ACTION_SUCCESS; + result.output = msg.c_str(); + action_callback(&result); + + log_json_data(std::to_string(src_id), std::to_string(dst_id), rvs::logresults, + (*it)->get_conn_type(), buff); + + sleep(1); } + else { - transfer_ix = (*it)->get_transfer_ix(); - transfer_num = (*it)->get_transfer_num(); + /* AlltoAll final results */ - snprintf(transfer_buff, sizeof(transfer_buff), "%2d", transfer_ix); - snprintf(srcgpuid_buff, sizeof(srcgpuid_buff), "%5d", src_id); - snprintf(dstgpuid_buff, sizeof(dstgpuid_buff), "%5d", dst_id); + const auto& pair_bw = (*it)->get_gpu_pair_bw(); + std::map gpuAggregateBw; + std::set uniqueGpus; + double a2a_total_bandwidth = 0.0; - msg = "[" + action_name + "] p2p-bandwidth[" - + transfer_buff + "/" + std::to_string(transfer_num) + "]" - + " [GPU:: " + std::to_string(src_node) + " - " + srcgpuid_buff + " - " + src_pci_bdf + "]" - + " [GPU:: " + std::to_string(dst_node) + " - " + dstgpuid_buff + " - " + dst_pci_bdf + "]" - + " bidirectional: " + std::string(bidir ? "true" : "false") - + " " + buff + " duration: " + std::to_string(duration) + " secs"; + for (size_t p = 0; p < pair_bw.size(); p++) { + const auto& pb = pair_bw[p]; + + gpuAggregateBw[pb.srcGpu] += pb.avgBandwidthGbPerSec; + uniqueGpus.insert(pb.srcGpu); + uniqueGpus.insert(pb.dstGpu); + a2a_total_bandwidth += pb.avgBandwidthGbPerSec; + + uint16_t pb_src_id = 0, pb_dst_id = 0; + if (rvs::gpulist::node2gpu(pb.srcNode, &pb_src_id)) { + std::string errmsg = "could not find GPU id for node " + + std::to_string(pb.srcNode); + rvs::lp::Err(errmsg, MODULE_NAME_CAPS, action_name); + continue; + } + if (rvs::gpulist::node2gpu(pb.dstNode, &pb_dst_id)) { + std::string errmsg = "could not find GPU id for node " + + std::to_string(pb.dstNode); + rvs::lp::Err(errmsg, MODULE_NAME_CAPS, action_name); + continue; + } + + std::string pb_src_bdf; + if (rvs::gpulist::node2bdf(pb.srcNode, pb_src_bdf)) { + std::string errmsg = "could not find PCI BDF for node " + + std::to_string(pb.srcNode); + rvs::lp::Err(errmsg, MODULE_NAME_CAPS, action_name); + continue; + } + + std::string pb_dst_bdf; + if (rvs::gpulist::node2bdf(pb.dstNode, pb_dst_bdf)) { + std::string errmsg = "could not find PCI BDF for node " + + std::to_string(pb.dstNode); + rvs::lp::Err(errmsg, MODULE_NAME_CAPS, action_name); + continue; + } + + char pb_transfer_buff[8]; + char pb_srcgpuid_buff[12]; + char pb_dstgpuid_buff[12]; + char pb_bw_buff[128]; + + snprintf(pb_transfer_buff, sizeof(pb_transfer_buff), "%2zu", p + 1); + snprintf(pb_srcgpuid_buff, sizeof(pb_srcgpuid_buff), "%5d", pb_src_id); + snprintf(pb_dstgpuid_buff, sizeof(pb_dstgpuid_buff), "%5d", pb_dst_id); + snprintf(pb_bw_buff, sizeof(pb_bw_buff), "%.3f GBps", pb.avgBandwidthGbPerSec); + + msg = "[" + action_name + "] a2a-p2p-bandwidth[" + + pb_transfer_buff + "/" + std::to_string(pair_bw.size()) + "]" + + " [GPU:: " + std::to_string(pb.srcNode) + " - " + pb_srcgpuid_buff + " - " + pb_src_bdf + "]" + + " [GPU:: " + std::to_string(pb.dstNode) + " - " + pb_dstgpuid_buff + " - " + pb_dst_bdf + "]" + + " " + pb_bw_buff; + + rvs::lp::Log(msg, rvs::logresults); + + result.state = rvs::actionstate::ACTION_RUNNING; + result.status = rvs::actionstatus::ACTION_SUCCESS; + result.output = msg.c_str(); + action_callback(&result); + + log_json_data(std::to_string(pb_src_id), std::to_string(pb_dst_id), + rvs::logresults, (*it)->get_conn_type(), pb_bw_buff); + } + + if (!gpuAggregateBw.empty()) { - rvs::lp::Log(msg, rvs::logresults); + for (const auto& entry : gpuAggregateBw) { + int gpuNode = -1; + gpu_hip_to_node(entry.first, &gpuNode); - result.state = rvs::actionstate::ACTION_RUNNING; - result.status = rvs::actionstatus::ACTION_SUCCESS; - result.output = msg.c_str(); - action_callback(&result); + uint16_t gpu_id_val = 0; + std::string gpu_bdf; + rvs::gpulist::node2gpu(gpuNode, &gpu_id_val); + rvs::gpulist::node2bdf(gpuNode, gpu_bdf); - log_json_data(std::to_string(src_id), std::to_string(dst_id), rvs::logresults, - (*it)->get_conn_type(), buff); + char aggr_gpuid_buff[12]; + char aggr_bw_buff[128]; + snprintf(aggr_gpuid_buff, sizeof(aggr_gpuid_buff), "%5d", gpu_id_val); + snprintf(aggr_bw_buff, sizeof(aggr_bw_buff), "%.3f GBps", entry.second); - sleep(1); + msg = "[" + action_name + "] a2a-gpu-bandwidth" + + " [GPU:: " + std::to_string(gpuNode) + " - " + aggr_gpuid_buff + " - " + gpu_bdf + "]" + + " Aggregate peer bandwidth: " + aggr_bw_buff; + + rvs::lp::Log(msg, rvs::logresults); + + result.state = rvs::actionstate::ACTION_RUNNING; + result.status = rvs::actionstatus::ACTION_SUCCESS; + result.output = msg.c_str(); + action_callback(&result); + } + + char total_bw_buff[128]; + snprintf(total_bw_buff, sizeof(total_bw_buff), "%.3f GBps", + a2a_total_bandwidth); + + msg = "[" + action_name + "] a2a-bandwidth " + + "[" + std::to_string(uniqueGpus.size()) + " GPUs]" + + "[" + std::to_string(pair_bw.size()) + " p2p transfers]" + + " Aggregate bandwidth: " + total_bw_buff; + + rvs::lp::Log(msg, rvs::logresults); + + result.state = rvs::actionstate::ACTION_RUNNING; + result.status = rvs::actionstatus::ACTION_SUCCESS; + result.output = msg.c_str(); + action_callback(&result); + } + } } return 0; diff --git a/pbqt.so/src/action_run.cpp b/pbqt.so/src/action_run.cpp index 9094314d8..b63d0aee0 100644 --- a/pbqt.so/src/action_run.cpp +++ b/pbqt.so/src/action_run.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -167,34 +167,44 @@ int pbqt_action::run() { // start timers if (property_duration) { RVSTRACE_ - timer_final.start(property_duration, true); // ticks only once - } + timer_final.start(property_duration, true); // ticks only once - if (property_log_interval) { - RVSTRACE_ - timer_running.start(property_log_interval); // ticks continuously - } + if (property_log_interval) { + RVSTRACE_ + timer_running.start(property_log_interval); // ticks continuously + } - pbqt_start_time = std::chrono::system_clock::now(); + pbqt_start_time = std::chrono::system_clock::now(); - RVSTRACE_ - do { - if (property_parallel) { - sts = run_parallel(); - } else { - sts = run_single(); - } - pbqt_end_time = std::chrono::system_clock::now(); - uint64_t test_time = time_diff(pbqt_end_time, pbqt_start_time) ; - if(test_time >= property_duration) { - pbqt_action::do_final_average(); - break; - } - } while (brun); + RVSTRACE_ + do { + if (property_parallel) { + sts = run_parallel(); + } else { + sts = run_single(); + } + pbqt_end_time = std::chrono::system_clock::now(); + uint64_t test_time = time_diff(pbqt_end_time, pbqt_start_time); + if((test_time >= property_duration) || ((transfer_method == "transferbench") && (transferbench_test == "alltoall"))) { + pbqt_action::do_final_average(); + break; + } + } while (brun); - RVSTRACE_ - timer_running.stop(); - timer_final.stop(); + RVSTRACE_ + timer_running.stop(); + timer_final.stop(); + + } + else { + + if (property_parallel) { + sts = run_parallel(); + } else { + sts = run_single(); + } + pbqt_action::do_final_average(); + } iter -= step; diff --git a/pbqt.so/src/worker.cpp b/pbqt.so/src/worker.cpp index d90f11d28..a395f33c7 100644 --- a/pbqt.so/src/worker.cpp +++ b/pbqt.so/src/worker.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -45,6 +45,7 @@ extern "C" { #include "include/gpu_util.h" #include "include/rvsloglp.h" #include "include/rvshsa.h" +#include "TransferBench.hpp" #define MODULE_NAME "PBQT" @@ -52,6 +53,11 @@ pbqtworker::pbqtworker() { // set to 'true' so that do_transfer() will also work // when parallel: false brun = true; + a2a_mode = 0; + a2a_direct = 1; + a2a_local = 0; + a2a_num_gpus = 0; + use_remote_read = 0; } pbqtworker::~pbqtworker() {} @@ -154,38 +160,209 @@ int pbqtworker::do_transfer() { unsigned int endusec; std::string msg; - uint32_t warm_calls = 1; - uint32_t hot_calls = 1; - bool b2b = false; - msg = "[" + action_name + "] pbqt transfer " + std::to_string(src_node) + " " - + std::to_string(dst_node) + " "; + + std::to_string(dst_node) + " "; rvs::lp::get_ticks(&startsec, &startusec); - if (block_size.size() == 0) { - block_size = pHsa->size_list; - } - for (size_t i = 0; brun && i < block_size.size(); i++) { - current_size = block_size[i]; - sts = pHsa->SendTraffic(src_node, dst_node, current_size, - bidirect, b2b, warm_calls, hot_calls, &duration); - - if (sts) { - msg = "internal error, src: " + std::to_string(src_node) - + " dst: " + std::to_string(dst_node) - + " current size: " + std::to_string(current_size); + if (transfer_method == "transferbench") { + + size_t transfer_block_size = 0; + if(block_size.size() > 0) { + transfer_block_size = block_size[0]; + } + else { + msg = "Transfer block size not set !"; rvs::lp::Err(msg, MODULE_NAME, action_name); - return sts; + return -1; } - { - std::lock_guard lk(cntmutex); - running_size += current_size; - running_duration += duration; + if (transferbench_test == "p2p") { + + // Configure TransferBench parameters + TransferBench::ConfigOptions cfg; + + cfg.general.numIterations = hot_calls; + cfg.general.numWarmups = warm_calls; + + TransferBench::MemType src_mem = TransferBench::MEM_GPU; + TransferBench::MemType dst_mem = TransferBench::MEM_GPU; + + std::vector transfers(bidirect? 2 : 1); + + transfers[0].numBytes = transfer_block_size; + + transfers[0].srcs.push_back({src_mem, + src_mem == TransferBench::MEM_GPU ? src_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : src_node}); + transfers[0].dsts.push_back({dst_mem, + dst_mem == TransferBench::MEM_GPU ? dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : dst_node}); + + transfers[0].exeDevice = {executor == "gfx" ? TransferBench::EXE_GPU_GFX : TransferBench::EXE_GPU_DMA, + src_mem == TransferBench::MEM_GPU ? src_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : src_node}; + + transfers[0].exeSubIndex = -1; + + transfers[0].numSubExecs = subexecutor; + + if (bidirect) { + transfers[1].numBytes = transfer_block_size; + + transfers[1].srcs.push_back({dst_mem, + dst_mem == TransferBench::MEM_GPU ? dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : dst_node}); + transfers[1].dsts.push_back({src_mem, + src_mem == TransferBench::MEM_GPU ? src_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : src_node}); + + transfers[1].exeDevice = {executor == "gfx" ? TransferBench::EXE_GPU_GFX : TransferBench::EXE_GPU_DMA, + dst_mem == TransferBench::MEM_GPU ? dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : dst_node}; + + transfers[1].exeSubIndex = -1; + + transfers[1].numSubExecs = subexecutor; + } + + TransferBench::TestResults results; + + if (!TransferBench::RunTransfers(cfg, transfers, results)) { + for (auto const& err : results.errResults) { + msg = "Transferbench error: " + err.errMsg; + rvs::lp::Err(msg, MODULE_NAME, action_name); + return -1; + } + } + + { + std::lock_guard lk(cntmutex); + + for (size_t t = 0; t < results.tfrResults.size(); t++) { + const auto& res = results.tfrResults[t]; + running_size += results.numTimedIterations * res.numBytes; + running_duration += (res.avgDurationMsec/1000) * results.numTimedIterations; + } + } + + } else if (transferbench_test == "alltoall") { + + int numDetectedGpus = TransferBench::GetNumExecutors(TransferBench::EXE_GPU_GFX); + int numGpus = (a2a_num_gpus > 0 && static_cast(a2a_num_gpus) <= numDetectedGpus) + ? static_cast(a2a_num_gpus) : numDetectedGpus; + + if (numGpus < 2) { + msg += "alltoall requires at least 2 GPUs, detected: " + std::to_string(numDetectedGpus); + rvs::lp::Err(msg, MODULE_NAME, action_name); + return -1; + } + + int numSrcs, numDsts; + switch (a2a_mode) { + case 1: numSrcs = 1; numDsts = 0; break; + case 2: numSrcs = 0; numDsts = 1; break; + default: numSrcs = 1; numDsts = 1; break; + } + + TransferBench::ExeType exeType = (executor == "dma") + ? TransferBench::EXE_GPU_DMA : TransferBench::EXE_GPU_GFX; + TransferBench::MemType memType = TransferBench::MEM_GPU_UNCACHED; + + std::vector transfers; + std::vector> localGpuPairs; + + for (int i = 0; i < numGpus; i++) { + for (int j = 0; j < numGpus; j++) { + + if (i == j) { + if (!a2a_local) continue; + } else if (a2a_direct) { + uint32_t linkType, hopCount; + hipError_t hip_err = hipExtGetLinkTypeAndHopCount(i, j, &linkType, &hopCount); + if (hip_err != hipSuccess || hopCount != 1) continue; + } + + TransferBench::Transfer transfer; + transfer.numBytes = transfer_block_size; + for (int x = 0; x < numSrcs; x++) + transfer.srcs.push_back({memType, i}); + if (numDsts) + transfer.dsts.push_back({memType, j}); + for (int x = 1; x < numDsts; x++) + transfer.dsts.push_back({memType, i}); + + transfer.exeDevice = {exeType, (use_remote_read ? j : i)}; + transfer.exeSubIndex = -1; + transfer.numSubExecs = subexecutor; + + transfers.push_back(transfer); + localGpuPairs.push_back({i, j}); + } + } + + if (transfers.empty()) { + msg += "alltoall: no valid GPU pairs found"; + rvs::lp::Err(msg, MODULE_NAME, action_name); + return -1; + } + + TransferBench::ConfigOptions cfg; + cfg.general.numIterations = hot_calls; + cfg.general.numWarmups = warm_calls; + cfg.gfx.unrollFactor = gfx_unroll; + + TransferBench::TestResults results; + + if (!TransferBench::RunTransfers(cfg, transfers, results)) { + for (auto const& err : results.errResults) { + std::string errmsg = "[" + action_name + "] alltoall error: " + err.errMsg; + rvs::lp::Err(errmsg, MODULE_NAME, action_name); + } + return -1; + } + + gpu_pair_bw.clear(); + for (size_t t = 0; t < results.tfrResults.size(); t++) { + const auto& res = results.tfrResults[t]; + int srcGpu = localGpuPairs[t].first; + int dstGpu = localGpuPairs[t].second; + + int srcNode = -1, dstNode = -1; + gpu_hip_to_node(srcGpu, &srcNode); + gpu_hip_to_node(dstGpu, &dstNode); + + gpu_pair_bw.push_back({srcGpu, dstGpu, srcNode, dstNode, + res.avgBandwidthGbPerSec}); + + } + + } else { + msg += "unknown transferbench_test: " + transferbench_test; + rvs::lp::Err(msg, MODULE_NAME, action_name); + return -1; } } + else { + if (block_size.size() == 0) { + block_size = pHsa->size_list; + } + + for (size_t i = 0; brun && i < block_size.size(); i++) { + current_size = block_size[i]; + sts = pHsa->SendTraffic(src_node, dst_node, current_size, + bidirect, b2b, warm_calls, hot_calls, &duration); + + if (sts) { + msg = "internal error, src: " + std::to_string(src_node) + + " dst: " + std::to_string(dst_node) + + " current size: " + std::to_string(current_size); + rvs::lp::Err(msg, MODULE_NAME, action_name); + return sts; + } + + { + std::lock_guard lk(cntmutex); + running_size += current_size; + running_duration += duration; + } + } + } rvs::lp::get_ticks(&endsec, &endusec); rvs::lp::Log(msg + "start", rvs::logdebug, startsec, startusec); rvs::lp::Log(msg + "finish", rvs::logdebug, endsec, endusec); diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt index 7f624fd24..669d0977a 100644 --- a/pebb.so/CMakeLists.txt +++ b/pebb.so/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################ ## -## Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. +## Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. ## ## MIT LICENSE: ## Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -49,7 +49,6 @@ add_definitions(-DLITTLEENDIAN_CPU=1) add_definitions(-DHSA_LARGE_MODEL=) add_definitions(-DHSA_DEPRECATED=) -add_compile_options(-std=c++11) add_compile_options(-pthread) add_compile_options(-Wall ) if (RVS_COVERAGE) @@ -135,7 +134,7 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) endif() ## define include directories -include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) +include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${TRANSFERBENCH_INC_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries diff --git a/pebb.so/include/action.h b/pebb.so/include/action.h index afcb305fb..55b59752e 100644 --- a/pebb.so/include/action.h +++ b/pebb.so/include/action.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -93,13 +93,26 @@ class pebb_action : public rvs::actionbase { int link_type; std::string link_type_string; - //! Number of warm calls (transfer iterations) before bandwidth calculation (hot calls) - //! to ignore few intial transfers for the bandwidth to settle - uint32_t warm_calls; - //! Number of hot calls (transfer iterations) for bandwidth calculation after warm calls - uint32_t hot_calls; - //! set to true for back-to-back transfers (resource allocation only once for entire transfer iterations) - bool b2b; + //! Number of warm calls (transfer iterations) before bandwidth calculation (hot calls) + //! to ignore few intial transfers for the bandwidth to settle + uint32_t warm_calls; + //! Number of hot calls (transfer iterations) for bandwidth calculation after warm calls + uint32_t hot_calls; + //! set to true for back-to-back transfers (resource allocation only once for entire transfer iterations) + bool b2b; + + //! transfer method - TransferBench or Native + std::string transfer_method; + //! transfer executor to use - GPU or SDMA + std::string executor; + //! No. of subexecutors + uint32_t subexecutor; + //! source memory type (e.g., cpu, gpu, null) + std::string source_memory; + //! destination memory type (e.g., cpu, gpu, null) + std::string destination_memory; + //! GFX kernel unroll factor + uint32_t gfx_unroll; protected: int create_threads(); diff --git a/pebb.so/include/worker.h b/pebb.so/include/worker.h index 5a960a8ad..886a4370b 100644 --- a/pebb.so/include/worker.h +++ b/pebb.so/include/worker.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -92,6 +92,19 @@ class pebbworker : public rvs::ThreadBase { //! Set b2b void set_b2b(bool _b2b) { b2b = _b2b; } + //! Set transfer method + void set_transfer_method(std::string _transfer_method) { transfer_method = _transfer_method; } + //! Set executor + void set_executor(std::string _executor) { executor = _executor; } + //! Set subexecutor + void set_subexecutor(uint32_t _subexecutor) { subexecutor = _subexecutor; } + //! Set source memory type + void set_source_memory(const std::string& val) { source_memory = val; } + //! Set GFX kernel unroll factor + void set_gfx_unroll(uint32_t val) { gfx_unroll = val; } + //! Set destination memory type + void set_destination_memory(const std::string& val) { destination_memory = val; } + protected: virtual void run(void); @@ -145,6 +158,19 @@ class pebbworker : public rvs::ThreadBase { //! 'true' if back-to-back transfers enabled bool b2b; + //! transfer method - TransferBench or Native + std::string transfer_method; + //! transfer executor to use - GPU or SDMA + std::string executor; + //! No. of subexecutors + uint32_t subexecutor; + //! source memory type (cpu, gpu, null) + std::string source_memory; + //! destination memory type (cpu, gpu, null) + std::string destination_memory; + //! GFX kernel unroll factor + uint32_t gfx_unroll; + //! list of test block sizes std::vector block_size; diff --git a/pebb.so/src/action.cpp b/pebb.so/src/action.cpp index f7a5ce0d2..2a88a8ddf 100644 --- a/pebb.so/src/action.cpp +++ b/pebb.so/src/action.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -138,6 +138,48 @@ bool pebb_action::get_all_pebb_config_keys(void) { bsts = false; } + error = property_get(RVS_CONF_TRANSFER_METHOD_KEY, &transfer_method, DEFAULT_TRANSFER_METHOD); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_TRANSFER_METHOD_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get(RVS_CONF_EXECUTOR_KEY, &executor, DEFAULT_EXECUTOR); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_EXECUTOR_KEY) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_SUBEXECUTOR_KEY, &subexecutor, DEFAULT_SUBEXECUTOR); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_SUBEXECUTOR_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get("source_memory", &source_memory, DEFAULT_SRC_MEMORY); + if (error == 1) { + msg = "invalid 'source_memory' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get("destination_memory", &destination_memory, DEFAULT_DST_MEMORY); + if (error == 1) { + msg = "invalid 'destination_memory' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + error = property_get_int(RVS_CONF_GFX_UNROLL_KEY, &gfx_unroll, DEFAULT_GFX_UNROLL); + if (error == 1) { + msg = "invalid '" + std::string(RVS_CONF_GFX_UNROLL_KEY) + "' key"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + if(!hot_calls) { hot_calls = DEFAULT_HOT_CALLS; } @@ -151,6 +193,14 @@ bool pebb_action::get_all_pebb_config_keys(void) { else if(link_type == 4) link_type_string = "XGMI"; + if(transfer_method == "transferbench") { + if((source_memory == "null") && (destination_memory == "null")) { + msg = "Set proper values for source and destination memory."; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + } + return bsts; } @@ -291,7 +341,7 @@ int pebb_action::create_threads() { p->initialize(srcnode, dstnode, prop_h2d, prop_d2h); } RVSTRACE_ - p->set_name(action_name); + p->set_name(action_name); p->set_stop_name(action_name); p->set_transfer_ix(transfer_ix); p->set_block_sizes(block_size); @@ -299,6 +349,13 @@ int pebb_action::create_threads() { p->set_warm_calls(warm_calls); p->set_b2b(b2b); p->set_loglevel(property_log_level); + p->set_transfer_method(transfer_method); + p->set_executor(executor); + p->set_subexecutor(subexecutor); + p->set_source_memory(source_memory); + p->set_destination_memory(destination_memory); + p->set_gfx_unroll(gfx_unroll); + test_array.push_back(p); } } diff --git a/pebb.so/src/action_run.cpp b/pebb.so/src/action_run.cpp index 958f3444f..d668c728d 100644 --- a/pebb.so/src/action_run.cpp +++ b/pebb.so/src/action_run.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -149,35 +149,45 @@ int pebb_action::run() { // start timers if (property_duration) { RVSTRACE_ - timer_final.start(property_duration, true); // ticks only once - } + timer_final.start(property_duration, true); // ticks only once + + if (property_log_interval) { + RVSTRACE_ + timer_running.start(property_log_interval); // ticks continuously + } - if (property_log_interval) { RVSTRACE_ - timer_running.start(property_log_interval); // ticks continuously - } + pebb_start_time = std::chrono::system_clock::now(); + + do { + if (property_parallel) { + sts = run_parallel(); + } else { + sts = run_single(); + } + + pebb_end_time = std::chrono::system_clock::now(); + uint64_t test_time = time_diff(pebb_end_time, pebb_start_time) ; + if(test_time >= property_duration) { + pebb_action::do_final_average(); + break; + } + } while(brun); - RVSTRACE_ - pebb_start_time = std::chrono::system_clock::now(); + RVSTRACE_ + timer_running.stop(); + timer_final.stop(); + } + else { - do { if (property_parallel) { sts = run_parallel(); } else { sts = run_single(); } - pebb_end_time = std::chrono::system_clock::now(); - uint64_t test_time = time_diff(pebb_end_time, pebb_start_time) ; - if(test_time >= property_duration) { - pebb_action::do_final_average(); - break; - } - } while(brun); - - RVSTRACE_ - timer_running.stop(); - timer_final.stop(); + pebb_action::do_final_average(); + } iter -= step; diff --git a/pebb.so/src/worker.cpp b/pebb.so/src/worker.cpp index f878aab8b..60e21ebc9 100644 --- a/pebb.so/src/worker.cpp +++ b/pebb.so/src/worker.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -46,6 +46,9 @@ extern "C" { #include "include/rvsloglp.h" #include "include/rvshsa.h" +#include +#include "TransferBench.hpp" + #define MODULE_NAME "PEBB" using std::string; @@ -156,12 +159,14 @@ int pebbworker::initialize(uint16_t Src, uint16_t Dst, bool h2d, bool d2h) { * * */ int pebbworker::do_transfer() { + double duration; int sts = -1; unsigned int startsec; unsigned int startusec; unsigned int endsec; unsigned int endusec; + std::string msg; RVSTRACE_ @@ -169,45 +174,149 @@ int pebbworker::do_transfer() { if (loglevel >= rvs::logdebug) rvs::lp::get_ticks(&startsec, &startusec); - if (block_size.size() == 0) { - RVSTRACE_ - block_size = pHsa->size_list; - } + if (transfer_method == "transferbench") { - for (size_t i = 0; brun && i < block_size.size(); i++) { - RVSTRACE_ - current_size = block_size[i]; - - if (rvs::lp::Stopping()) { - RVSTRACE_ + size_t transfer_block_size = 0; + if(block_size.size() > 0) { + transfer_block_size = block_size[0]; + } + else { + msg = "Transfer block size not set !"; + rvs::lp::Err(msg, MODULE_NAME, action_name); return -1; } - // Check if unidirectional device(GPU) to host (CPU) - // if so, swap source and destination node + // Configure TransferBench parameters + TransferBench::ConfigOptions cfg; + + cfg.general.numIterations = hot_calls; + cfg.general.numWarmups = warm_calls; + cfg.gfx.unrollFactor = gfx_unroll; + + // Set Memory types + auto str_to_memtype = [](const std::string& mem) -> TransferBench::MemType { + if (mem == "cpu") return TransferBench::MEM_CPU; + if (mem == "gpu") return TransferBench::MEM_GPU; + if (mem == "null") return TransferBench::MEM_NULL; + return TransferBench::MEM_NULL; + }; + + TransferBench::MemType src_mem = str_to_memtype(source_memory); + TransferBench::MemType dst_mem = str_to_memtype(destination_memory); + + std::vector transfers(bidirect? 2 : 1); + + transfers[0].numBytes = transfer_block_size; + + uint16_t _src_node; + uint16_t _dst_node; + if (!prop_h2d && prop_d2h) { - RVSTRACE_ - sts = pHsa->SendTraffic(dst_node, src_node, current_size, - bidirect, b2b, warm_calls, hot_calls, &duration); + _src_node = dst_node; + _dst_node = src_node; } else { - RVSTRACE_ - sts = pHsa->SendTraffic(src_node, dst_node, current_size, - bidirect, b2b, warm_calls, hot_calls, &duration); + _src_node = src_node; + _dst_node = dst_node; } - if (sts) { - std::string msg = "internal error, src: " + std::to_string(src_node) - + " dst: " + std::to_string(dst_node) - + " current size: " + std::to_string(current_size) - + " status "+ std::to_string(sts); - rvs::lp::Err(msg, MODULE_NAME, action_name); - return sts; + + if(src_mem != TransferBench::MEM_NULL) { + transfers[0].srcs.push_back({src_mem, + src_mem == TransferBench::MEM_GPU ? _src_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : _src_node}); } + if(dst_mem != TransferBench::MEM_NULL) { + transfers[0].dsts.push_back({dst_mem, + dst_mem == TransferBench::MEM_GPU ? _dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : _dst_node}); + } + + transfers[0].exeDevice = {executor == "gfx" ? TransferBench::EXE_GPU_GFX : TransferBench::EXE_GPU_DMA, + dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU)}; + + transfers[0].exeSubIndex = -1; + transfers[0].numSubExecs = subexecutor; + + if (bidirect) { + transfers[1].numBytes = transfer_block_size; + + if(dst_mem != TransferBench::MEM_NULL) { + transfers[1].srcs.push_back({dst_mem, + dst_mem == TransferBench::MEM_GPU ? _dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : _dst_node}); + } + + if(src_mem != TransferBench::MEM_NULL) { + transfers[1].dsts.push_back({src_mem, + src_mem == TransferBench::MEM_GPU ? _src_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU) : _src_node}); + } + + transfers[1].exeDevice = {executor == "gfx" ? TransferBench::EXE_GPU_GFX : TransferBench::EXE_GPU_DMA, + dst_node - TransferBench::GetNumExecutors(TransferBench::EXE_CPU)}; + + transfers[1].exeSubIndex = -1; + transfers[1].numSubExecs = subexecutor; + } + + TransferBench::TestResults results; + + // Initiate TransferBench transfer + if (!TransferBench::RunTransfers(cfg, transfers, results)) { + for (auto const& err : results.errResults) { + msg = "Transferbench error: " + err.errMsg; + rvs::lp::Err(msg, MODULE_NAME, action_name); + return -1; + } + } + + // Update running totals { - RVSTRACE_ std::lock_guard lk(cntmutex); - running_size += current_size * hot_calls; - running_duration += duration; + const auto& res = results.tfrResults[0]; + + running_size += results.numTimedIterations * res.numBytes; + running_duration += (res.avgDurationMsec/1000) * results.numTimedIterations; + } + } + else { + + if (block_size.size() == 0) { + RVSTRACE_ + block_size = pHsa->size_list; + } + + for (size_t i = 0; brun && i < block_size.size(); i++) { + RVSTRACE_ + current_size = block_size[i]; + + if (rvs::lp::Stopping()) { + RVSTRACE_ + return -1; + } + + // Check if unidirectional device(GPU) to host (CPU) + // if so, swap source and destination node + if (!prop_h2d && prop_d2h) { + RVSTRACE_ + sts = pHsa->SendTraffic(dst_node, src_node, current_size, + bidirect, b2b, warm_calls, hot_calls, &duration); + } else { + RVSTRACE_ + sts = pHsa->SendTraffic(src_node, dst_node, current_size, + bidirect, b2b, warm_calls, hot_calls, &duration); + } + if (sts) { + std::string msg = "internal error, src: " + std::to_string(src_node) + + " dst: " + std::to_string(dst_node) + + " current size: " + std::to_string(current_size) + + " status "+ std::to_string(sts); + rvs::lp::Err(msg, MODULE_NAME, action_name); + return sts; + } + + { + RVSTRACE_ + std::lock_guard lk(cntmutex); + running_size += current_size * hot_calls; + running_duration += duration; + } } } diff --git a/pesm.so/tests.cmake b/pesm.so/tests.cmake index 072fb98f5..f1dca5ee6 100644 --- a/pesm.so/tests.cmake +++ b/pesm.so/tests.cmake @@ -29,9 +29,7 @@ set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -find_package(OpenMP) - -set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX +set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} -fopenmp ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 3f6b55429..870dd0c1b 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -43,7 +43,7 @@ add_compile_options(-pthread) add_compile_options(-Wall) add_compile_options(-DRVS_OS_TYPE_NUM=${RVS_OS_TYPE_NUM}) -find_package(OpenMP) + if (RVS_COVERAGE) add_compile_options(-o0 -fprofile-arcs -ftest-coverage) @@ -128,7 +128,7 @@ set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_TARGET}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) -target_link_libraries(${RVS_TARGET} rvslib OpenMP::OpenMP_CXX +target_link_libraries(${RVS_TARGET} rvslib -fopenmp ${ROCBLAS_LIB} ${AMD_SMI_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) add_dependencies(${RVS_TARGET} rvslib) diff --git a/rvs/conf/MI350X/pbqt_single.conf b/rvs/conf/MI350X/pbqt_single.conf index 71f4c2398..d950c4301 100644 --- a/rvs/conf/MI350X/pbqt_single.conf +++ b/rvs/conf/MI350X/pbqt_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -24,8 +24,9 @@ # ############################################################################### actions: -# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test via xgmi link. -- name: xgmi_d2d_unidir_bandwidth +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using RVS native method via SDMA +- name: xgmi_d2d_unidir_bandwidth device: all module: pbqt log_interval: 5000 @@ -37,8 +38,9 @@ actions: block_size: 1073741824 device_id: all -# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test via xgmi link. -- name: xgmi_d2d_bidir_bandwidth +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test +# using RVS native method via SDMA +- name: xgmi_d2d_bidir_bandwidth device: all module: pbqt log_interval: 5000 @@ -50,3 +52,57 @@ actions: block_size: 1073741824 device_id: all +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via SDMA +- name: xgmi_d2d_unidir_tb_dma + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 2 + hot_calls: 5 + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_gfx + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: gfx + subexecutor: 16 + warm_calls: 2 + hot_calls: 5 + +# All-to-All bandwidth test using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_a2a + device: all + module: pbqt + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 268435456 + device_id: all + transfer_method: transferbench + transferbench_test: alltoall + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + gfx_unroll: 2 + diff --git a/rvs/conf/MI350X/pebb_single.conf b/rvs/conf/MI350X/pebb_single.conf index d8a920d7c..6497399f0 100644 --- a/rvs/conf/MI350X/pebb_single.conf +++ b/rvs/conf/MI350X/pebb_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -24,7 +24,18 @@ # ############################################################################### actions: -# Device-to-Host/CPU-to-GPU bidirectional bandwidth test via pcie link. +# Host-to-Device/CPU-to-GPU bandwidth test using RVS native method via SDMA +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +# Device-to-Host/GPU-to-CPU bandwidth test using RVS native method via SDMA - name: pcie_d2h_bandwidth device: all module: pebb @@ -35,14 +46,75 @@ actions: block_size: 1073741824 link_type: 2 -# Host-to-Device/CPU-to-GPU bidirectional bandwidth test via pcie link. -- name: pcie_h2d_bandwidth +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via SDMA +- name: pcie_h2d_bandwidth_tb_dma device: all module: pebb - duration: 30000 + duration: 0 device_to_host: false host_to_device: true parallel: false block_size: 1073741824 link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: gpu +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via SDMA +- name: pcie_d2h_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: gpu + destination_memory: cpu + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via GFX +- name: pcie_h2d_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: null + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX +- name: pcie_d2h_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: null + destination_memory: cpu + diff --git a/rvs/conf/MI355X/pbqt_single.conf b/rvs/conf/MI355X/pbqt_single.conf index 71f4c2398..a63588804 100644 --- a/rvs/conf/MI355X/pbqt_single.conf +++ b/rvs/conf/MI355X/pbqt_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -24,7 +24,8 @@ # ############################################################################### actions: -# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test via xgmi link. +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using RVS native method via SDMA - name: xgmi_d2d_unidir_bandwidth device: all module: pbqt @@ -37,7 +38,8 @@ actions: block_size: 1073741824 device_id: all -# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test via xgmi link. +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test +# using RVS native method via SDMA - name: xgmi_d2d_bidir_bandwidth device: all module: pbqt @@ -50,3 +52,57 @@ actions: block_size: 1073741824 device_id: all +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via SDMA +- name: xgmi_d2d_unidir_tb_dma + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 2 + hot_calls: 5 + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_gfx + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: gfx + subexecutor: 16 + warm_calls: 2 + hot_calls: 5 + +# All-to-All bandwidth test using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_a2a + device: all + module: pbqt + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 268435456 + device_id: all + transfer_method: transferbench + transferbench_test: alltoall + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + gfx_unroll: 2 + diff --git a/rvs/conf/MI355X/pebb_single.conf b/rvs/conf/MI355X/pebb_single.conf index d8a920d7c..6497399f0 100644 --- a/rvs/conf/MI355X/pebb_single.conf +++ b/rvs/conf/MI355X/pebb_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -24,7 +24,18 @@ # ############################################################################### actions: -# Device-to-Host/CPU-to-GPU bidirectional bandwidth test via pcie link. +# Host-to-Device/CPU-to-GPU bandwidth test using RVS native method via SDMA +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +# Device-to-Host/GPU-to-CPU bandwidth test using RVS native method via SDMA - name: pcie_d2h_bandwidth device: all module: pebb @@ -35,14 +46,75 @@ actions: block_size: 1073741824 link_type: 2 -# Host-to-Device/CPU-to-GPU bidirectional bandwidth test via pcie link. -- name: pcie_h2d_bandwidth +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via SDMA +- name: pcie_h2d_bandwidth_tb_dma device: all module: pebb - duration: 30000 + duration: 0 device_to_host: false host_to_device: true parallel: false block_size: 1073741824 link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: gpu +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via SDMA +- name: pcie_d2h_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: gpu + destination_memory: cpu + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via GFX +- name: pcie_h2d_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: null + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX +- name: pcie_d2h_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: null + destination_memory: cpu + diff --git a/rvs/tests.cmake b/rvs/tests.cmake index dbfa79cd0..6c9041e2a 100644 --- a/rvs/tests.cmake +++ b/rvs/tests.cmake @@ -36,14 +36,12 @@ set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -find_package(OpenMP) - ## define lib directories link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR}) ## define target for "test-to-fail" add_executable(${RVS_TARGET}fail src/rvs.cpp) -target_link_libraries(${RVS_TARGET}fail rvslib rvslibut ${PROJECT_LINK_LIBS} OpenMP::OpenMP_CXX +target_link_libraries(${RVS_TARGET}fail rvslib rvslibut ${PROJECT_LINK_LIBS} -fopenmp ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROCM_CORE} ${CORE_RUNTIME_TARGET} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) target_compile_definitions(${RVS_TARGET}fail PRIVATE RVS_INVERT_RETURN_STATUS) @@ -212,7 +210,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES}) target_link_libraries(${TEST_NAME} ${PROJECT_LINK_LIBS} ${PROJECT_TEST_LINK_LIBS} - rvslib rvslibut gtest_main gtest pthread OpenMP::OpenMP_CXX + rvslib rvslibut gtest_main gtest pthread -fopenmp ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) add_dependencies(${TEST_NAME} rvs_gtest_target) diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt index 79b1bc20b..ca4ffac6b 100644 --- a/rvslib/CMakeLists.txt +++ b/rvslib/CMakeLists.txt @@ -43,7 +43,7 @@ add_compile_options(-Wall ) add_compile_options(-fPIC) add_compile_options(-DRVS_OS_TYPE_NUM=${RVS_OS_TYPE_NUM}) -find_package(OpenMP) + if (RVS_COVERAGE) add_compile_options(-o0 -fprofile-arcs -ftest-coverage) @@ -173,7 +173,8 @@ target_compile_definitions(${RVS_TARGET} PRIVATE ROCM_USE_FLOAT16) set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -target_link_libraries(${RVS_TARGET} ${AMD_SMI_LIB}) +target_compile_options(${RVS_TARGET} PRIVATE -fopenmp) +target_link_libraries(${RVS_TARGET} ${AMD_SMI_LIB} -fopenmp) ## Install shared library librvslib.so add_custom_command(TARGET ${RVS_TARGET} POST_BUILD COMMAND ln -fs ./lib${RVS}.so.${LIB_VERSION_STRING} lib${RVS}.so.${VERSION_MAJOR} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} diff --git a/smqt.so/tests.cmake b/smqt.so/tests.cmake index 1c58c789c..0c4144e57 100644 --- a/smqt.so/tests.cmake +++ b/smqt.so/tests.cmake @@ -29,9 +29,7 @@ set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -find_package(OpenMP) - -set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} OpenMP::OpenMP_CXX +set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so ${AMD_SMI_LIB} -fopenmp ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index df45b6fba..d50f09bf4 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -505,6 +505,82 @@ int gpu_hip_to_smi_hdl(int hip_index, amdsmi_processor_handle* smi_hdl) { return -1; } +/** + * @brief Get node from hip index. + * @param hip_index GPU hip index + * @param node node id + * @return 0 if successful, -1 otherwise + **/ +int gpu_hip_to_node(int hip_index, int* node) { + int hip_num_gpu_devices = 0; + hipGetDeviceCount(&hip_num_gpu_devices); + if (hip_index >= hip_num_gpu_devices) { + return -1; + } + + char pciString[256] = {0}; + if (hipDeviceGetPCIBusId(pciString, 256, hip_index) != hipSuccess) { + return -1; + } + + uint64_t pDom = 0, pBus = 0, pDev = 0, pFun = 0; + if (sscanf(pciString, "%04x:%02x:%02x.%01x", + reinterpret_cast(&pDom), + reinterpret_cast(&pBus), + reinterpret_cast(&pDev), + reinterpret_cast(&pFun)) != 4) { + return -1; + } + + uint64_t hip_bdf_id = + ((((pDom) & 0x00000000ffffffff) << 32) | + (((pBus) & 0x00000000000000ff) << 8) | + (((pDev) & 0x000000000000001f) << 3) | + ((pFun) & 0x0000000000000007)); + + ifstream f_id, f_prop; + char path[KFD_PATH_MAX_LENGTH]; + int gpu_id; + std::string prop_name; + int num_nodes = gpu_num_subdirs(KFD_SYS_PATH_NODES, ""); + + for (int node_id = 0; node_id < num_nodes; node_id++) { + snprintf(path, KFD_PATH_MAX_LENGTH, "%s/%d/gpu_id", + KFD_SYS_PATH_NODES, node_id); + f_id.open(path); + f_id >> gpu_id; + f_id.close(); + + if (gpu_id == 0) continue; + + snprintf(path, KFD_PATH_MAX_LENGTH, "%s/%d/properties", + KFD_SYS_PATH_NODES, node_id); + f_prop.open(path); + + uint32_t domain_val = 0, location_val = 0; + while (f_prop >> prop_name) { + if (prop_name == "domain") { + f_prop >> domain_val; + } else if (prop_name == "location_id") { + f_prop >> location_val; + } else { + std::string dummy; + f_prop >> dummy; + } + } + f_prop.close(); + + uint64_t kfd_bdf_id = (((uint64_t)domain_val) << 32) | location_val; + + if (hip_bdf_id == kfd_bdf_id) { + *node = node_id; + return 0; + } + } + + return -1; +} + /** * @brief Initialize gpulist helper class * @return 0 if successful, -1 otherwise From e718b72084df553114e1c4708045b2539b936839 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 6 Apr 2026 18:28:45 -0500 Subject: [PATCH 069/275] Configurable Non-Temporal support --- babel.so/CMakeLists.txt | 2 +- babel.so/include/HIPStream.h | 6 +- babel.so/include/action.h | 4 + babel.so/include/rvs_memworker.h | 9 + babel.so/src/action.cpp | 17 + babel.so/src/rvs_memworker.cpp | 4 +- babel.so/src/rvs_stream.cpp | 528 ++++++++++--------------------- babel.so/src/rvs_stress.cpp | 22 +- 8 files changed, 222 insertions(+), 370 deletions(-) diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt index 4f7289744..aa4b34ea7 100644 --- a/babel.so/CMakeLists.txt +++ b/babel.so/CMakeLists.txt @@ -60,7 +60,7 @@ set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSIO set(HIP_HCC_BUILD_FLAGS) set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") -set(HIP_STREAM_BUILD_FLAGS "-DNONTEMPORAL=1 -O3 -std=c++17") +set(HIP_STREAM_BUILD_FLAGS "-O3 -std=c++17") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") diff --git a/babel.so/include/HIPStream.h b/babel.so/include/HIPStream.h index 70fb47bac..5b50ffa58 100644 --- a/babel.so/include/HIPStream.h +++ b/babel.so/include/HIPStream.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "Stream.h" @@ -48,9 +49,12 @@ class HIPStream : public Stream T *d_b; T *d_c; + int nt_mode = 1; // NT_ALL + public: HIPStream(const unsigned int, const bool, const int, - const unsigned int, const unsigned int, const unsigned int); + const unsigned int, const unsigned int, const unsigned int, + const std::string& nontemporal = "all"); ~HIPStream(); virtual float read() override; diff --git a/babel.so/include/action.h b/babel.so/include/action.h index c30949a37..be733e823 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -63,6 +63,7 @@ using std::map; #define RVS_CONF_DOT "dot" #define RVS_CONF_TRIAD "triad" #define RVS_CONF_DATA_INIT "data_init" +#define RVS_CONF_NONTEMPORAL "nontemporal" #define MEM_DEFAULT_ARRAY_SIZE 33554432 // 32 MB #define MEM_DEFAULT_NUM_ITER 100 @@ -74,6 +75,7 @@ using std::map; #define MEM_DEFAULT_TB_SIZE 1024 #define MEM_DEFAULT_TEST_ENABLE false #define MEM_DEFAULT_DATA_INIT "default" +#define MEM_DEFAULT_NONTEMPORAL "all" #define MEM_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" #define FLOATING_POINT_REGEX "^[0-9]*\\.?[0-9]+$" @@ -132,6 +134,8 @@ class mem_action: public rvs::actionbase { uint16_t tb_size; //! data initialization mode ("gpu_norm_dist", "cpu_norm_dist", "zero_init" or "default") std::string data_init; + //! non-temporal access mode ("none", "all", "read" or "write") + std::string nontemporal; // configuration properties getters bool get_all_mem_config_keys(void); diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index 409430835..8a9fd866d 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -262,6 +262,13 @@ class MemWorker : public rvs::ThreadBase { //! returns data initialization mode const std::string& get_data_init(void) { return data_init; } + //! sets non-temporal access mode + void set_nontemporal(const std::string& _nontemporal) { + nontemporal = _nontemporal; + } + //! returns non-temporal access mode + const std::string& get_nontemporal(void) { return nontemporal; } + static void set_use_json(bool _bjson) { bjson = _bjson; } //! returns the JSON flag static bool get_use_json(void) { return bjson; } @@ -304,6 +311,8 @@ class MemWorker : public rvs::ThreadBase { uint16_t tb_size; //! data initialization mode std::string data_init; + //! non-temporal access mode + std::string nontemporal; //! TRUE if JSON output is required static bool bjson; diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index a6ab2cea7..dcf3021c4 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -112,6 +112,7 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { workers[i].set_chunks_per_block(chunks_per_block); workers[i].set_tb_size(tb_size); workers[i].set_data_init(data_init); + workers[i].set_nontemporal(nontemporal); i++; } @@ -309,6 +310,22 @@ bool mem_action::get_all_mem_config_keys(void) { bsts = false; } + it = property.find(RVS_CONF_NONTEMPORAL); + if (it != property.end()) { + nontemporal = it->second; + } else { + nontemporal = MEM_DEFAULT_NONTEMPORAL; + } + + if (nontemporal != "none" && nontemporal != "all" && + nontemporal != "read" && nontemporal != "write") { + msg = "invalid '" + std::string(RVS_CONF_NONTEMPORAL) + + "' key value '" + nontemporal + + "'. Must be 'none', 'all', 'read' or 'write'"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + return bsts; } diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index f990a88db..ac321269b 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -41,7 +41,7 @@ bool MemWorker::bjson = false; extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init); + const std::string& data_init, const std::string& nontemporal); #define FLOAT_TEST 1 #define DOUBLE_TEST 2 @@ -86,6 +86,6 @@ void MemWorker::run() { result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, dwords_per_lane, chunks_per_block, tb_size, - MemWorker::bjson, action_name, &test, data_init); + MemWorker::bjson, action_name, &test, data_init, nontemporal); } diff --git a/babel.so/src/rvs_stream.cpp b/babel.so/src/rvs_stream.cpp index a4a4db610..0879d8752 100644 --- a/babel.so/src/rvs_stream.cpp +++ b/babel.so/src/rvs_stream.cpp @@ -62,6 +62,49 @@ __device__ __forceinline__ constexpr T scalar(const T scalar) { } \ } while(0) +// Non-temporal load/store control +// NT_ALL (1) : NT load + NT store (default) +// NT_READ (2) : NT load + normal store +// NT_WRITE(3) : normal load + NT store +// NT_NONE (0) : normal load + normal store +enum NTMode { NT_NONE = 0, NT_ALL = 1, NT_READ = 2, NT_WRITE = 3 }; + +#define NT_KERNEL_LAUNCH_EVENTS(kernel, epl, cpb, T, grid, block, smem, start, stop, ...) \ + switch (nt_mode) { \ + case NT_NONE: hipLaunchKernelWithEvents((kernel), \ + grid, block, smem, start, stop, __VA_ARGS__); break; \ + case NT_READ: hipLaunchKernelWithEvents((kernel), \ + grid, block, smem, start, stop, __VA_ARGS__); break; \ + case NT_WRITE: hipLaunchKernelWithEvents((kernel), \ + grid, block, smem, start, stop, __VA_ARGS__); break; \ + default: hipLaunchKernelWithEvents((kernel), \ + grid, block, smem, start, stop, __VA_ARGS__); break; \ + } + +#define NT_KERNEL_LAUNCH_SYNC(kernel, epl, cpb, T, grid, block, smem, stop, ...) \ + switch (nt_mode) { \ + case NT_NONE: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + case NT_READ: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + case NT_WRITE: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + default: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + } + +#define NT_KERNEL_LAUNCH_DOT_SYNC(kernel, epl, cpb, T, tbs, grid, block, smem, stop, ...) \ + switch (nt_mode) { \ + case NT_NONE: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + case NT_READ: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + case NT_WRITE: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + default: hipLaunchKernelSynchronous((kernel), \ + grid, block, smem, stop, __VA_ARGS__); break; \ + } + template static void hipLaunchKernelWithEvents(F kernel, const dim3& numBlocks, const dim3& dimBlocks, hipStream_t stream, @@ -97,12 +140,19 @@ static void hipLaunchKernelSynchronous(F kernel, const dim3& numBlocks, template HIPStream::HIPStream(const unsigned int ARRAY_SIZE, const bool event_timing, const int device_index, const unsigned int _dwords_per_lane, const unsigned int _chunks_per_block, - const unsigned int _threads_per_block) + const unsigned int _threads_per_block, const std::string& nontemporal) : array_size{ARRAY_SIZE}, evt_timing(event_timing), dwords_per_lane(_dwords_per_lane), chunks_per_block(_chunks_per_block), tb_size(_threads_per_block) { + std::string msg; + // Set Non-temporal mode + if (nontemporal == "none") nt_mode = 0; // NT_NONE + else if (nontemporal == "read") nt_mode = 2; // NT_READ + else if (nontemporal == "write") nt_mode = 3; // NT_WRITE + else nt_mode = 1; // NT_ALL + // make sure that either: // DWORDS_PER_LANE is less than sizeof(T), in which case we default to 1 element // or @@ -302,54 +352,23 @@ void HIPStream::read_arrays(std::vector& a, std::vector& b, std::vector check_error(hipMemcpy(c.data(), d_c, c.size()*sizeof(T), hipMemcpyDeviceToHost)); } -// Non-temporal load/store control: -// NONTEMPORAL == 1 : NT load + NT store (default) -// NONTEMPORAL_WRITE == 1 : normal load + NT store -// NONTEMPORAL_READ == 1 : NT load + normal store -// (none of the above) : normal load + normal store -#if NONTEMPORAL == 1 -template -__device__ __forceinline__ T load(const T& ref) { - return __builtin_nontemporal_load(&ref); -} - -template -__device__ __forceinline__ void store(const T& value, T& ref) { - __builtin_nontemporal_store(value, &ref); -} -#elif NONTEMPORAL_WRITE == 1 -template +template __device__ __forceinline__ T load(const T& ref) { - return ref; -} - -template -__device__ __forceinline__ void store(const T& value, T& ref) { - __builtin_nontemporal_store(value, &ref); -} -#elif NONTEMPORAL_READ == 1 -template -__device__ __forceinline__ T load(const T& ref) { - return __builtin_nontemporal_load(&ref); -} - -template -__device__ __forceinline__ void store(const T& value, T& ref) { - ref = value; -} -#else -template -__device__ __forceinline__ T load(const T& ref) { - return ref; + if constexpr (nt_mode == NT_ALL || nt_mode == NT_READ) + return __builtin_nontemporal_load(&ref); + else + return ref; } -template +template __device__ __forceinline__ void store(const T& value, T& ref) { - ref = value; + if constexpr (nt_mode == NT_ALL || nt_mode == NT_WRITE) + __builtin_nontemporal_store(value, &ref); + else + ref = value; } -#endif -template +template __launch_bounds__(TBSIZE) __global__ void read_kernel(const T * __restrict a, T * __restrict c) @@ -362,7 +381,7 @@ void read_kernel(const T * __restrict a, T * __restrict c) { for (auto j = 0u; j != elements_per_lane; ++j) { - tmp += load(a[gidx + i * dx + j]); + tmp += load(a[gidx + i * dx + j]); } } @@ -379,35 +398,20 @@ float HIPStream::read() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(read_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(read_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(read_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(read_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(read_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(read_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else - hipLaunchKernelWithEvents(read_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -415,38 +419,24 @@ float HIPStream::read() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(read_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(read_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(read_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(read_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(read_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(read_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else - hipLaunchKernelSynchronous(read_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) } return kernel_time; } -template +template __launch_bounds__(TBSIZE) __global__ void write_kernel(T * __restrict c) @@ -458,7 +448,7 @@ void write_kernel(T * __restrict c) { for (auto j = 0u; j != elements_per_lane; ++j) { - store(scalar(startC), c[gidx + i * dx + j]); + store(scalar(startC), c[gidx + i * dx + j]); } } } @@ -469,35 +459,20 @@ float HIPStream::write() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(write_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(write_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(write_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(write_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(write_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(write_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) else - hipLaunchKernelWithEvents(write_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_c); + NT_KERNEL_LAUNCH_EVENTS(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -505,38 +480,24 @@ float HIPStream::write() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(write_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(write_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(write_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(write_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(write_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(write_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) else - hipLaunchKernelSynchronous(write_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_c); + NT_KERNEL_LAUNCH_SYNC(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_c) } return kernel_time; } -template +template __launch_bounds__(TBSIZE) __global__ void copy_kernel(const T * __restrict a, T * __restrict c) @@ -548,7 +509,7 @@ void copy_kernel(const T * __restrict a, T * __restrict c) { for (auto j = 0u; j != elements_per_lane; ++j) { - store(load(a[gidx + i * dx + j]), c[gidx + i * dx + j]); + store(load(a[gidx + i * dx + j]), c[gidx + i * dx + j]); } } } @@ -559,35 +520,20 @@ float HIPStream::copy() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(copy_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(copy_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(copy_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(copy_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(copy_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(copy_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) else - hipLaunchKernelWithEvents(copy_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_c); + NT_KERNEL_LAUNCH_EVENTS(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -595,38 +541,24 @@ float HIPStream::copy() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(copy_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(copy_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(copy_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(copy_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(copy_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(copy_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) else - hipLaunchKernelSynchronous(copy_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_c); + NT_KERNEL_LAUNCH_SYNC(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_c) } return kernel_time; } -template +template __launch_bounds__(TBSIZE) __global__ void mul_kernel(T * __restrict b, const T * __restrict c) @@ -638,7 +570,7 @@ void mul_kernel(T * __restrict b, const T * __restrict c) { for (auto j = 0u; j != elements_per_lane; ++j) { - store(scalar(startScalar) * load(c[gidx + i * dx + j]), b[gidx + i * dx + j]); + store(scalar(startScalar) * load(c[gidx + i * dx + j]), b[gidx + i * dx + j]); } } } @@ -649,35 +581,20 @@ float HIPStream::mul() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(mul_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(mul_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(mul_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(mul_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(mul_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(mul_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) else - hipLaunchKernelWithEvents(mul_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_b, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -685,38 +602,24 @@ float HIPStream::mul() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(mul_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(mul_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(mul_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(mul_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(mul_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(mul_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) else - hipLaunchKernelSynchronous(mul_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_b, d_c) } return kernel_time; } -template +template __launch_bounds__(TBSIZE) __global__ void add_kernel(const T * __restrict a, const T * __restrict b, @@ -729,7 +632,7 @@ void add_kernel(const T * __restrict a, const T * __restrict b, { for (auto j = 0u; j != elements_per_lane; ++j) { - store(load(a[gidx + i * dx + j]) + load(b[gidx + i * dx + j]), c[gidx + i * dx + j]); + store(load(a[gidx + i * dx + j]) + load(b[gidx + i * dx + j]), c[gidx + i * dx + j]); } } } @@ -740,35 +643,20 @@ float HIPStream::add() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(add_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(add_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(add_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(add_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(add_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(add_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else - hipLaunchKernelWithEvents(add_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -776,38 +664,24 @@ float HIPStream::add() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(add_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(add_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(add_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(add_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(add_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(add_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else - hipLaunchKernelSynchronous(add_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) } return kernel_time; } -template +template __launch_bounds__(TBSIZE) __global__ void triad_kernel(T * __restrict a, const T * __restrict b, @@ -820,7 +694,7 @@ void triad_kernel(T * __restrict a, const T * __restrict b, { for (auto j = 0u; j != elements_per_lane; ++j) { - store(load(b[gidx + i * dx + j]) + scalar(startScalar) * load(c[gidx + i * dx + j]), + store(load(b[gidx + i * dx + j]) + scalar(startScalar) * load(c[gidx + i * dx + j]), a[gidx + i * dx + j]); } } @@ -832,35 +706,20 @@ float HIPStream::triad() float kernel_time = 0.; if (evt_timing) { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelWithEvents(triad_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelWithEvents(triad_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelWithEvents(triad_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelWithEvents(triad_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelWithEvents(triad_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelWithEvents(triad_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) else - hipLaunchKernelWithEvents(triad_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, start_ev, - stop_ev, d_a, d_b, d_c); + NT_KERNEL_LAUNCH_EVENTS(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, start_ev, stop_ev, d_a, d_b, d_c) check_error(hipEventSynchronize(stop_ev)); check_error(hipEventElapsedTime(&kernel_time, start_ev, stop_ev)); @@ -868,33 +727,19 @@ float HIPStream::triad() else { if(elements_per_lane == 4 && chunks_per_block == 1) - hipLaunchKernelSynchronous(triad_kernel<4, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 1) - hipLaunchKernelSynchronous(triad_kernel<2, 1, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 2) - hipLaunchKernelSynchronous(triad_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 2) - hipLaunchKernelSynchronous(triad_kernel<2, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 4 && chunks_per_block == 4) - hipLaunchKernelSynchronous(triad_kernel<4, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else if(elements_per_lane == 2 && chunks_per_block == 4) - hipLaunchKernelSynchronous(triad_kernel<2, 4, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) else - hipLaunchKernelSynchronous(triad_kernel<4, 2, T>, - dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, - d_a, d_b, d_c); + NT_KERNEL_LAUNCH_SYNC(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), nullptr, stop_ev, d_a, d_b, d_c) } return kernel_time; } @@ -931,7 +776,7 @@ struct Reducer<1u> { {} }; -template +template __launch_bounds__(TBSIZE) __global__ void dot_kernel(const T * __restrict a, const T * __restrict b, @@ -945,7 +790,7 @@ void dot_kernel(const T * __restrict a, const T * __restrict b, { for (auto j = 0u; j != elements_per_lane; ++j) { - tmp += load(a[gidx + i * dx + j]) * load(b[gidx + i * dx + j]); + tmp += load(a[gidx + i * dx + j]) * load(b[gidx + i * dx + j]); } } @@ -960,89 +805,62 @@ void dot_kernel(const T * __restrict a, const T * __restrict b, { return; } - store(tb_sum[0], sum[blockIdx.x]); + store(tb_sum[0], sum[blockIdx.x]); } template T HIPStream::dot() { - // Support for dwords_per_lane = 4 & chunks_per_block = 1/2/4 if(elements_per_lane == 4 && chunks_per_block == 1) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<4, 1, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 1, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<4, 1, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 1, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else if(elements_per_lane == 2 && chunks_per_block == 1) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<2, 1, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 1, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<2, 1, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 1, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else if(elements_per_lane == 4 && chunks_per_block == 2) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<4, 2, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 2, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<4, 2, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 2, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else if(elements_per_lane == 2 && chunks_per_block == 2) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<2, 2, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 2, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<2, 2, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 2, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else if(elements_per_lane == 4 && chunks_per_block == 4) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<4, 4, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 4, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<4, 4, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 4, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else if(elements_per_lane == 2 && chunks_per_block == 4) { if(tb_size == 1024) { - hipLaunchKernelSynchronous(dot_kernel<2, 4, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 4, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } else if(tb_size == 512) { - hipLaunchKernelSynchronous(dot_kernel<2, 4, T, 512>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 2, 4, T, 512, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) } } else - hipLaunchKernelSynchronous(dot_kernel<4, 2, T, 1024>, - dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, - d_a, d_b, sums); + NT_KERNEL_LAUNCH_DOT_SYNC(dot_kernel, 4, 2, T, 1024, dim3(block_cnt), dim3(tb_size), nullptr, coherent_ev, d_a, d_b, sums) T sum{0}; for (auto i = 0u; i != block_cnt; ++i) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 58c3fcf8c..5002ce263 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -41,40 +41,40 @@ void check_solution(const unsigned int ntimes, std::vector& a, std::vector template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init); + const std::string& data_init, const std::string& nontemporal); template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init); + const std::string& data_init, const std::string& nontemporal); void parseArguments(int argc, char *argv[]); bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init) { + const std::string& data_init, const std::string& nontemporal) { bool result = false; switch(test_type) { case FLOAT_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init); + json, action, test, data_init, nontemporal); break; case DOUBLE_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init); + json, action, test, data_init, nontemporal); break; case TRAID_FLOAT: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init); + json, action, test, data_init, nontemporal); break; case TRIAD_DOUBLE: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init); + json, action, test, data_init, nontemporal); break; default: @@ -88,7 +88,7 @@ bool run_babel(std::pair device, int num_times, int array_size, b template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init) + const std::string& data_init, const std::string& nontemporal) { std::string msg; std::streamsize ss = std::cout.precision(); @@ -150,7 +150,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, T sum; // Use the HIP implementation - HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); + HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size, nontemporal); if (data_init == "gpu_norm_dist") { stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), true, a, b, c); @@ -339,7 +339,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init) + const std::string& data_init, const std::string& nontemporal) { std::string msg; auto desc = action_descriptor{action, module_name, device.second}; @@ -394,7 +394,7 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b std::vector c(ARRAY_SIZE); // Use the HIP implementation - HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size); + HIPStream *stream = new HIPStream(ARRAY_SIZE, event_timing, device.first, dwords_per_lane, chunks_per_block, tb_size, nontemporal); if (data_init == "gpu_norm_dist") { stream->init_arrays_normdist(static_cast(0.0), static_cast(1.0), true, a, b, c); From db126d27671e650f48791626f7d0530354904135 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 6 Apr 2026 22:50:49 -0700 Subject: [PATCH 070/275] ensure right c++20 headers available in case of alma --- build_packages_local.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build_packages_local.sh b/build_packages_local.sh index 42bb6732d..2de65ca2b 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -374,6 +374,21 @@ if [[ "$OS" == "almalinux" ]]; then print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi + # hipcc (clang) auto-detects the system GCC 8.5 whose libstdc++ lacks + # C++20 headers like . Point it at the gcc-toolset instead. + GCC_TOOLCHAIN_FLAG="" + for ts_ver in 14 13 12; do + ts_root="/opt/rh/gcc-toolset-${ts_ver}/root/usr" + if [ -d "${ts_root}/include/c++" ]; then + GCC_TOOLCHAIN_FLAG="--gcc-toolchain=${ts_root}" + print_success "Using gcc-toolset-${ts_ver} for C++20 stdlib (${ts_root})" + break + fi + done + if [ -z "$GCC_TOOLCHAIN_FLAG" ]; then + print_warning "No gcc-toolset found; C++20 headers like may be missing" + fi + # Use cmake3 for AlmaLinux export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (AlmaLinux/Manylinux)" @@ -445,6 +460,11 @@ if [ -n "$CMAKE_CXX_COMPILER" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") fi +# Add GCC toolchain flag so hipcc/clang finds C++20 libstdc++ headers +if [ -n "$GCC_TOOLCHAIN_FLAG" ]; then + CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="$GCC_TOOLCHAIN_FLAG") +fi + $CMAKE_COMMAND "${CMAKE_ARGS[@]}" if [ $? -eq 0 ]; then From 1acd21091139f1806803f97b8f70d7c84bf96170 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 6 Apr 2026 23:03:30 -0700 Subject: [PATCH 071/275] GCC_TOOLCHAIN set correctly always --- build_packages_local.sh | 51 +++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index b6e2c5a1f..b63f1d49d 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -171,7 +171,7 @@ check_and_install_dependencies() { doxygen \ rpm-build \ python3 \ - numactl-devel\ + numactl-devel \ || print_warning "Some packages may already be installed" # Install a gcc-toolset with C++20 support (requires GCC >= 11) @@ -396,22 +396,40 @@ else fi if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then - # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like - # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ - GCC_TOOLSET_ENABLED="" + # hipcc (clang) auto-detects the system GCC 8.5 whose libstdc++ lacks + # C++20 headers like . Find a gcc-toolset with C++20 support + # and point hipcc at it via --gcc-toolchain. + GCC_TOOLCHAIN="" + + # Try rpm-based detection first (most reliable when toolset was yum-installed) for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) if [ -n "$ENABLE_SCRIPT" ] && [ -f "$ENABLE_SCRIPT" ]; then TOOLSET_ROOT=$(dirname "$ENABLE_SCRIPT") source "$ENABLE_SCRIPT" - export GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" - GCC_TOOLSET_ENABLED="$pkg" + GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" print_success "Enabled ${pkg} from ${TOOLSET_ROOT} (GCC $(gcc -dumpversion))" break fi done - if [ -z "$GCC_TOOLSET_ENABLED" ]; then - print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers may be missing" + + # Fallback: probe /opt/rh/ directly (e.g. manylinux images with pre-installed toolsets) + if [ -z "$GCC_TOOLCHAIN" ]; then + for ts_ver in 14 13 12 11; do + ts_root="/opt/rh/gcc-toolset-${ts_ver}/root/usr" + if [ -d "${ts_root}/include/c++" ]; then + GCC_TOOLCHAIN="${ts_root}" + if [ -f "/opt/rh/gcc-toolset-${ts_ver}/enable" ]; then + source "/opt/rh/gcc-toolset-${ts_ver}/enable" + fi + print_success "Using gcc-toolset-${ts_ver} for C++20 stdlib (${ts_root})" + break + fi + done + fi + + if [ -z "$GCC_TOOLCHAIN" ]; then + print_warning "No gcc-toolset (11-14) found; C++20 headers like may be missing" fi # Set C++ compiler to hipcc from ROCm @@ -421,23 +439,7 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then else print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi - - # hipcc (clang) auto-detects the system GCC 8.5 whose libstdc++ lacks - # C++20 headers like . Point it at the gcc-toolset instead. - GCC_TOOLCHAIN_FLAG="" - for ts_ver in 14 13 12; do - ts_root="/opt/rh/gcc-toolset-${ts_ver}/root/usr" - if [ -d "${ts_root}/include/c++" ]; then - GCC_TOOLCHAIN_FLAG="--gcc-toolchain=${ts_root}" - print_success "Using gcc-toolset-${ts_ver} for C++20 stdlib (${ts_root})" - break - fi - done - if [ -z "$GCC_TOOLCHAIN_FLAG" ]; then - print_warning "No gcc-toolset found; C++20 headers like may be missing" - fi - # Use cmake3 for AlmaLinux # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" @@ -574,7 +576,6 @@ if command -v rpm >/dev/null 2>&1; then print_info "Creating RPM package..." cd "$BUILD_DIR" cpack -G RPM --verbose - if [ $? -eq 0 ]; then RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) From b5f0ef7904ca031e23d6ba9b175d20ac443e8551 Mon Sep 17 00:00:00 2001 From: Krishna Yenumula Date: Tue, 7 Apr 2026 14:50:49 +0530 Subject: [PATCH 072/275] Fix segfault in fetch_gpu_list due to null mcm_type pointer The fetch_gpu_list() function accepts an optional mcm_type pointer (default nullptr), but dereferences it without null checks when mcm_check is true. This causes a segfault on any non-gfx90a GPU (e.g. MI325X/gfx942) when the TST module calls fetch_gpu_list with mcm_check=true but no mcm_type argument. Add null checks before all three mcm_type->push_back() calls. Fixes: TST module segfault on MI325X (ROCm 7.12.0) --- src/rvs_util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index 629fbfad4..6c4a6961d 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -192,13 +192,13 @@ bool fetch_gpu_list(int hip_num_gpu_devices, map& gpus_device_ind rvs::lp::Log(msg_stream.str(), rvs::logresults); amd_mcm_gpu_found = true; - mcm_type->push_back(mcm_type_t::SECONDARY); + if (mcm_type) mcm_type->push_back(mcm_type_t::SECONDARY); } else { - mcm_type->push_back(mcm_type_t::PRIMARY); + if (mcm_type) mcm_type->push_back(mcm_type_t::PRIMARY); } } else { - if(mcm_check) + if(mcm_check && mcm_type) mcm_type->push_back(mcm_type_t::PRIMARY); } From a26111c0cccc644324354f26aa816b42e829b109 Mon Sep 17 00:00:00 2001 From: Krishna Yenumula Date: Tue, 7 Apr 2026 15:10:16 +0530 Subject: [PATCH 073/275] Fix incorrect min leading dimension calculation in rvs_blas The min_lda/min_ldb calculations compared raw integer transA/transB (0 or 1) against rocblas_operation_none (enum value 111), causing the comparison to always evaluate false. This resulted in incorrect minimum leading dimensions when lda/ldb are not explicitly set in the config (auto-corrected from default 0). For non-square matrices where k != n (e.g. gst_ext.conf with m=4096, n=4096, k=8192), min_ldb was set to n=4096 instead of k=8192, causing rocblas_gemm_ex() to fail with an invalid argument error. Fix: use transa/transb (rocblas_operation enum) instead of transA/transB (raw int) for the comparisons. Also fix the same issue in strided_batched stride calculations. Fixes: gst_ext.conf bf16 failures on MI300X and MI325X --- src/rvs_blas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 50ebc13d0..61ddb6ff8 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -136,8 +136,8 @@ rvs_blas::rvs_blas(int _gpu_device_index, int _m, int _n, int _k, std::string _m transb = (transB == 0) ? rocblas_operation_none : rocblas_operation_transpose; // minimum leading dimensions - rocblas_int min_lda = transA == rocblas_operation_none ? m : k; - rocblas_int min_ldb = transB == rocblas_operation_none ? k : n; + rocblas_int min_lda = transa == rocblas_operation_none ? m : k; + rocblas_int min_ldb = transb == rocblas_operation_none ? k : n; rocblas_int min_ldc = m; rocblas_int min_ldd = m; @@ -160,10 +160,10 @@ rvs_blas::rvs_blas(int _gpu_device_index, int _m, int _n, int _k, std::string _m if(gemm_mode == "strided_batched") { if(stride_a == 0) - stride_a = (transA == rocblas_operation_none) ? blas_lda_offset * k : blas_lda_offset * m; + stride_a = (transa == rocblas_operation_none) ? blas_lda_offset * k : blas_lda_offset * m; if(stride_b == 0) - stride_b = (transB == rocblas_operation_none) ? blas_ldb_offset * n : blas_ldb_offset * k; + stride_b = (transb == rocblas_operation_none) ? blas_ldb_offset * n : blas_ldb_offset * k; if(stride_c == 0) stride_c = blas_ldc_offset * n; From b57ee0ad4bd223430efdce81fac7494fd6b27694 Mon Sep 17 00:00:00 2001 From: Krishna Yenumula Date: Tue, 7 Apr 2026 17:27:58 +0530 Subject: [PATCH 074/275] Revert "Fix incorrect min leading dimension calculation in rvs_blas" This reverts commit a26111c0cccc644324354f26aa816b42e829b109. --- src/rvs_blas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 61ddb6ff8..50ebc13d0 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -136,8 +136,8 @@ rvs_blas::rvs_blas(int _gpu_device_index, int _m, int _n, int _k, std::string _m transb = (transB == 0) ? rocblas_operation_none : rocblas_operation_transpose; // minimum leading dimensions - rocblas_int min_lda = transa == rocblas_operation_none ? m : k; - rocblas_int min_ldb = transb == rocblas_operation_none ? k : n; + rocblas_int min_lda = transA == rocblas_operation_none ? m : k; + rocblas_int min_ldb = transB == rocblas_operation_none ? k : n; rocblas_int min_ldc = m; rocblas_int min_ldd = m; @@ -160,10 +160,10 @@ rvs_blas::rvs_blas(int _gpu_device_index, int _m, int _n, int _k, std::string _m if(gemm_mode == "strided_batched") { if(stride_a == 0) - stride_a = (transa == rocblas_operation_none) ? blas_lda_offset * k : blas_lda_offset * m; + stride_a = (transA == rocblas_operation_none) ? blas_lda_offset * k : blas_lda_offset * m; if(stride_b == 0) - stride_b = (transb == rocblas_operation_none) ? blas_ldb_offset * n : blas_ldb_offset * k; + stride_b = (transB == rocblas_operation_none) ? blas_ldb_offset * n : blas_ldb_offset * k; if(stride_c == 0) stride_c = blas_ldc_offset * n; From 30da5b8a7badc784cea1366731c2fd802ac957d3 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Wed, 28 Jan 2026 08:29:45 +0900 Subject: [PATCH 075/275] refactor!: migrate to python3 fix #1081 --- regression/check_json_file.py | 20 ++++----- regression/make_ctest_conf.py | 3 -- regression/make_ctest_conf_logging.py | 3 -- regression/make_ctest_conf_testif.py | 3 -- regression/make_pbqt_conf.py | 3 -- regression/multi_run_and_check_json.py | 24 +++++------ regression/pbqt_create_conf.py | 4 +- regression/run_and_check_test.py | 56 +++++++++++++------------- 8 files changed, 52 insertions(+), 64 deletions(-) diff --git a/regression/check_json_file.py b/regression/check_json_file.py index 64a7e8354..5dac05560 100755 --- a/regression/check_json_file.py +++ b/regression/check_json_file.py @@ -5,8 +5,8 @@ import sys import json -#print "Number of arguments: ", len(sys.argv) -#print "The arguments are: " , str(sys.argv) +#print("Number of arguments: ", len(sys.argv)) +#print("The arguments are: " , str(sys.argv)) # -------------------- # passed arguments: @@ -23,36 +23,36 @@ if os.path.isfile(json_log_path): f = open(json_log_path) # validate json format - print "check json format" + print("check json format") try: data = json.load(f) json_has_res_err = False for d in data: json_line = d['loglevelname'] - print json_line + print(json_line) if json_line == 'RESULT': - print "JSON Found RESULT" + print("JSON Found RESULT") json_has_res_err = True break if json_line == 'ERROR ': - print "JSON Found ERROR" + print("JSON Found ERROR") json_has_res_err = True break if json_has_res_err == False: - print "JSON No found RESULT/ERROR" + print("JSON No found RESULT/ERROR") test_result = False except ValueError as e: print('Invalid json: %s' % e) test_result = False f.close() else: - print "No file found" + print("No file found") test_result = False # return result if test_result == True: - print json_log_path + " - PASS" + print(json_log_path + " - PASS") sys.exit(0) else: - print json_log_path + " - FAIL" + print(json_log_path + " - FAIL") sys.exit(1) diff --git a/regression/make_ctest_conf.py b/regression/make_ctest_conf.py index b9947a6b1..cf5f22627 100755 --- a/regression/make_ctest_conf.py +++ b/regression/make_ctest_conf.py @@ -26,9 +26,6 @@ ################################################################################### """ -# This script only creates valid combinations, invalid ones will be created as special cases -from __future__ import print_function - import os, fnmatch import itertools import sys diff --git a/regression/make_ctest_conf_logging.py b/regression/make_ctest_conf_logging.py index 8075ce4b8..b4a476245 100755 --- a/regression/make_ctest_conf_logging.py +++ b/regression/make_ctest_conf_logging.py @@ -26,9 +26,6 @@ ################################################################################### """ -# This script only creates valid combinations, invalid ones will be created as special cases -from __future__ import print_function - import os, fnmatch import itertools import sys diff --git a/regression/make_ctest_conf_testif.py b/regression/make_ctest_conf_testif.py index cd626e749..606cdd8bc 100755 --- a/regression/make_ctest_conf_testif.py +++ b/regression/make_ctest_conf_testif.py @@ -26,9 +26,6 @@ ################################################################################### """ -# This script only creates valid combinations, invalid ones will be created as special cases -from __future__ import print_function - import os, fnmatch import itertools import sys diff --git a/regression/make_pbqt_conf.py b/regression/make_pbqt_conf.py index 275930dd9..b17dc9145 100755 --- a/regression/make_pbqt_conf.py +++ b/regression/make_pbqt_conf.py @@ -1,8 +1,5 @@ #!/usr/bin/env python3 -# This script only creates valid combinations, invalid ones will be created as special cases -from __future__ import print_function - import os import itertools import sys diff --git a/regression/multi_run_and_check_json.py b/regression/multi_run_and_check_json.py index 4d21e4de7..f272a941f 100755 --- a/regression/multi_run_and_check_json.py +++ b/regression/multi_run_and_check_json.py @@ -8,8 +8,8 @@ # global variables test_output_file_name = "tmp_log_result.txt" -#print "Number of arguments: ", len(sys.argv) -#print "The arguments are: " , str(sys.argv) +#print("Number of arguments: ", len(sys.argv)) +#print("The arguments are: " , str(sys.argv)) # -------------------- # passed arguments: @@ -29,11 +29,11 @@ # check input values if num_runs < 2: - print "number of runs (argument 4) should be at least 2" + print("number of runs (argument 4) should be at least 2") sys.exit(1) if not debug_level in ['0', '1', '2', '3', '4', '5']: - print "debug_level (argument 5) should be inside true /false" + print("debug_level (argument 5) should be inside true /false") sys.exit(1) # ./multi_run_and_check_json.py /work/igorhdl/ROCm2/build/bin /work/igorhdl/ROCm2/ROCmValidationSuite /work/igorhdl/ROCm2/ROCmValidationSuite/rvs/conf/rand_pbqt0.conf 5 3 @@ -42,7 +42,7 @@ curr_location = subprocess.check_output(["pwd", ""]) curr_location_size = len(curr_location) curr_location = curr_location[0:curr_location_size-1] -print curr_location +print(curr_location) # run test commands result_json = bin_path + "/" + test_output_file_name @@ -54,16 +54,16 @@ os.chdir(rvs_path + "/regression") for i in range(0, num_runs): - print "Iteration %d" % (i) + print("Iteration %d" % (i)) if i == 0: tst_result = os.system(test_cmd_init) else: tst_result = os.system(test_cmd) # also check test result - print "Test result is : %s" % (tst_result) + print("Test result is : %s" % (tst_result)) if tst_result > 0: - print "Test is expected to pass with value 0, but return value is %s" %(tst_result) - print conf_name + " - FAIL" + print("Test is expected to pass with value 0, but return value is %s" %(tst_result)) + print(conf_name + " - FAIL") sys.exit(1) os.chdir(curr_location) @@ -73,13 +73,13 @@ json_result = os.system("./check_json_file.py " + result_json) if json_result == 1: - print "Json file is invalid" + print("Json file is invalid") test_result = False # return result if test_result == True: - print conf_name + " - PASS" + print(conf_name + " - PASS") sys.exit(0) else: - print conf_name + " - FAIL" + print(conf_name + " - FAIL") sys.exit(1) diff --git a/regression/pbqt_create_conf.py b/regression/pbqt_create_conf.py index 1251fca4c..9c958e6c0 100755 --- a/regression/pbqt_create_conf.py +++ b/regression/pbqt_create_conf.py @@ -29,7 +29,7 @@ counter = 0 total_iterations = (len(gpu_ids) + 1) * len(log_interval) * len(duration) * len(test_bandwidth) * len(bidirectional) * len(parralel) * len(device_id) -print "Total number of combinations (including invalid) is " + str(total_iterations) +print("Total number of combinations (including invalid) is " + str(total_iterations)) gpu_ids_size = len(gpu_ids) @@ -49,7 +49,7 @@ # for each combination create the conf file filename = conf_location + module_name + str(counter) + ".conf" - print 'Iteration is %d' % (counter) + ", working on conf file " + filename + print('Iteration is %d' % (counter) + ", working on conf file " + filename) f = open(filename, "w") counter = counter + 1 diff --git a/regression/run_and_check_test.py b/regression/run_and_check_test.py index dbb086709..e8c05c103 100755 --- a/regression/run_and_check_test.py +++ b/regression/run_and_check_test.py @@ -9,8 +9,8 @@ test_console_file_name = "tmp_console_result.txt" test_output_file_name = "tmp_log_result.txt" -#print "Number of arguments: ", len(sys.argv) -#print "The arguments are: " , str(sys.argv) +#print("Number of arguments: ", len(sys.argv)) +#print("The arguments are: " , str(sys.argv)) # -------------------- # passed arguments: @@ -36,23 +36,23 @@ # check input values if not console_usage in ['true', 'false']: - print "console_usage (argument 4) should be inside true /false" + print("console_usage (argument 4) should be inside true /false") sys.exit(1) if not log_usage in ['true', 'false']: - print "log_usage (argument 5) should be inside true /false" + print("log_usage (argument 5) should be inside true /false") sys.exit(1) if not json_usage in ['true', 'false']: - print "json_usage (argument 6) should be inside true /false" + print("json_usage (argument 6) should be inside true /false") sys.exit(1) if not test_pass_fail in ['ttp', 'ttf']: - print "test_pass_fail (argument 7) should be inside true /false" + print("test_pass_fail (argument 7) should be inside true /false") sys.exit(1) if not debug_level in ['0', '1', '2', '3', '4', '5']: - print "debug_level (argument 8) should be inside true /false" + print("debug_level (argument 8) should be inside true /false") sys.exit(1) # ./run_and_check_test.py /work/igorhdl/ROCm2/build/bin /work/igorhdl/ROCm2/ROCmValidationSuite /work/igorhdl/ROCm2/ROCmValidationSuite/rvs/conf/rand_pbqt0.conf true true true ttp 3 @@ -64,7 +64,7 @@ curr_location = subprocess.check_output(["pwd", ""]) curr_location_size = len(curr_location) curr_location = curr_location[0:curr_location_size-1] -print curr_location +print(curr_location) # run test command if log_usage == 'true': @@ -76,23 +76,23 @@ os.chdir(rvs_path + "/regression") tst_result = os.system(test_cmd) -print "Test result is : %s" % (tst_result) +print("Test result is : %s" % (tst_result)) os.chdir(curr_location) # check test to pass/fail first if test_pass_fail == 'ttp' and tst_result > 0: - print "Test is expected to pass with value 0, but return value is %s" %(tst_result) - print conf_name + " - FAIL" + print("Test is expected to pass with value 0, but return value is %s" %(tst_result)) + print(conf_name + " - FAIL") sys.exit(1) if test_pass_fail == 'ttf': if tst_result == 0: - print "Test is expected to fail with value different than 0, but return value is %s" %(tst_result) - print conf_name + " - FAIL" + print("Test is expected to fail with value different than 0, but return value is %s" %(tst_result)) + print(conf_name + " - FAIL") sys.exit(1) else: - print "Test is expected to fail and return value is non 0" - print conf_name + " - PASS" + print("Test is expected to fail and return value is non 0") + print(conf_name + " - PASS") sys.exit(0) # result test pass/fail @@ -100,57 +100,57 @@ # check console output if console_usage == 'true': - print "console_usage is True" + print("console_usage is True") result_log = bin_path + "/" + test_console_file_name if os.path.isfile(result_log): if os.path.getsize(result_log) > 0: f = open(result_log) s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) - if s.find('RESULT') == -1 and s.find('ERROR') == -1: - print "No found RESULT/ERROR" + if s.find(b'RESULT') == -1 and s.find(b'ERROR') == -1: + print("No found RESULT/ERROR") test_result = False f.close() else: - print "Empty file" + print("Empty file") test_result = False else: - print "No file found" + print("No file found") test_result = False # check json output file if json_usage == 'true' and log_usage == 'true': - print "json_usage is True and log_usage is True" + print("json_usage is True and log_usage is True") result_json = bin_path + "/" + test_output_file_name json_result = os.system("./check_json_file.py " + result_json) if json_result == 1: - print "Json file is invalid" + print("Json file is invalid") test_result = False # check console output file else: if log_usage == 'true': - print "log_usage is True" + print("log_usage is True") result_log = bin_path + "/" + test_output_file_name if os.path.isfile(result_log): if os.path.getsize(result_log) > 0: f = open(result_log) s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) if s.find('RESULT') == -1 and s.find('ERROR') == -1: - print "No found RESULT/ERROR" + print("No found RESULT/ERROR") test_result = False f.close() else: - print "Empty file" + print("Empty file") test_result = False else: - print "No file found" + print("No file found") test_result = False # return result if test_result == True: - print conf_name + " - PASS" + print(conf_name + " - PASS") sys.exit(0) else: - print conf_name + " - FAIL" + print(conf_name + " - FAIL") sys.exit(1) From ebb0ac3b4527a559fa5e363bb502c935bf54bc29 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Wed, 28 Jan 2026 07:07:59 +0900 Subject: [PATCH 076/275] build: bump cmake_minimum_required to 3.5.0 fix #1080 --- CMakeGtestDownload.cmake | 2 +- CMakeLists.txt.yaml | 2 +- CMakeMXDataGeneratorDownload.cmake | 2 +- CMakeRBLASDownload.cmake | 2 +- CMakeRSMIDownload.cmake | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeGtestDownload.cmake b/CMakeGtestDownload.cmake index d772419d6..94ca03963 100644 --- a/CMakeGtestDownload.cmake +++ b/CMakeGtestDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(googletest-download NONE) diff --git a/CMakeLists.txt.yaml b/CMakeLists.txt.yaml index d0d6575fb..4eb534249 100644 --- a/CMakeLists.txt.yaml +++ b/CMakeLists.txt.yaml @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(yaml-download NONE) diff --git a/CMakeMXDataGeneratorDownload.cmake b/CMakeMXDataGeneratorDownload.cmake index 0b9f9f8b5..8013ea648 100644 --- a/CMakeMXDataGeneratorDownload.cmake +++ b/CMakeMXDataGeneratorDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(mxDataGenerator-download NONE) diff --git a/CMakeRBLASDownload.cmake b/CMakeRBLASDownload.cmake index cfa2baf1f..305326897 100644 --- a/CMakeRBLASDownload.cmake +++ b/CMakeRBLASDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(rvs_rblas-download NONE) diff --git a/CMakeRSMIDownload.cmake b/CMakeRSMIDownload.cmake index d105d6531..7f0460b34 100644 --- a/CMakeRSMIDownload.cmake +++ b/CMakeRSMIDownload.cmake @@ -23,7 +23,7 @@ ## ################################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5.0) project(rvs_smi-download NONE) From f97353341889ca6041d0be1de74cb7b86c003002 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 9 Apr 2026 16:28:32 -0500 Subject: [PATCH 077/275] Add action select (-s) cli. option. --- docs/ug1main.md | 5 +++ rvs/src/rvscli.cpp | 4 ++ rvs/src/rvsexec.cpp | 4 ++ rvs/src/rvsexec_do_yaml.cpp | 87 ++++++++++++++++++++++++++++++++++++- 4 files changed, 98 insertions(+), 2 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index d808202d2..e595e3e59 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -264,6 +264,11 @@ This overrides the device/device_index parameter values specified for eve configuration file, including the all value. + + + + diff --git a/rvs/src/rvscli.cpp b/rvs/src/rvscli.cpp index 3f6cd0706..0ab6c014c 100644 --- a/rvs/src/rvscli.cpp +++ b/rvs/src/rvscli.cpp @@ -171,6 +171,10 @@ void rvs::cli::init_grammar() { grammar.insert(gpair("-p", sp)); grammar.insert(gpair("--parallel", sp)); + sp = std::make_shared("-m", command, value); + grammar.insert(gpair("-m", sp)); + grammar.insert(gpair("--module", sp)); + sp = std::make_shared("-r", command, value); grammar.insert(gpair("-r", sp)); grammar.insert(gpair("--run", sp)); diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index 9b24b3f91..146f873bc 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -168,7 +168,86 @@ int rvs::exec::run() { } } - if (!rvs::options::has_option("-r", &val)) { + // check -m option + string module; + if (rvs::options::has_option("-m", &module)) { + + std::map module_config_map = { + {"babel", "babel.conf"}, + {"gpup", "gpup_single.conf"}, + {"gst", "gst_single.conf"}, + {"iet", "iet_stress.conf"}, + {"mem", "mem.conf"}, + {"pebb", "pebb_single.conf"}, + {"peqt", "peqt_single.conf"}, + {"pbqt", "pbqt_single.conf"}, + {"rcqt", "rcqt_single.conf"}, + {"tst", "tst_single.conf"} + }; + + auto itr = module_config_map.find(module); + if (itr == module_config_map.end()) { + char buff[1024]; + snprintf(buff, sizeof(buff), + "Invalid module name: %s", module.c_str()); + rvs::logger::Err(buff, MODULE_NAME_CAPS); + return -1; + } + + std::string platform_name = get_gpu_name(); + if (platform_name.empty()) { + rvs::logger::Err("No platform support for the detected GPU or no GPU detected !", MODULE_NAME_CAPS); + return -1; + } + + std::vector confs = {itr->second}; + if (module == "iet") { + confs.push_back("iet_single.conf"); + } + + bool found = false; + for (const auto& conf : confs) { + + /* Plaform specific module conf. from RVS installation path */ + config_file = "../share/rocm-validation-suite/conf/" + platform_name + "/" + conf; + + std::ifstream file(path + config_file); + if (!file.good()) { + /* Plaform specific module conf. from RVS local build path */ + config_file = "conf/" + platform_name + "/" + conf; + } + file.close(); + config_file = path + config_file; + + file.open(config_file); + if (file.good()) { + file.close(); + found = true; + break; + } + else { + /* Try default module conf. */ + config_file = path + "conf/" + conf; + file.open(config_file); + if (file.good()) { + file.close(); + found = true; + break; + } + } + file.close(); + } + + if (!found) { + char buff[1024]; + snprintf(buff, sizeof(buff), + "%s file is missing.", config_file.c_str()); + rvs::logger::Err(buff, MODULE_NAME_CAPS); + return -1; + } + } + + if (!rvs::options::has_option("-r", &val) && !rvs::options::has_option("-m")) { // check -c option if (rvs::options::has_option("-c", &val)) { @@ -511,7 +590,10 @@ void rvs::exec::do_help() { cout << " else a file created in /var/tmp/ with timestamp in name.\n\n"; cout << "-l --debugLogFile Generate log file with output and debug information.\n\n"; - + + cout << "-m --module Specify a module name to run the corresponding platform-specific\n"; + cout << " (MI-series GPUs) module configuration file. Valid modules: babel, gpup, gst, iet,\n"; + cout << " mem, pebb, peqt, pbqt, rcqt.\n\n"; cout << "-t --listTests List the test modules present in RVS.\n\n"; diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index df45b6fba..d2df650d1 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -49,13 +49,13 @@ std::map , uint16_t> rvs::gpulist::domain_loc_map; std::vector rvs::gpulist::pci_bdf; const std::map gpu_dev_map = { - {0x74a1, "MI300X"}, // MI300X Bare Metal - {0x74a9, "MI300X-HF"}, // MI300-HF Bare Metal - {0x74a2, "MI308X"}, // MI308X Bare Metal - {0x74a8, "MI308X-HF"}, // MI308X-HF Bare Metal - {0x74a5, "MI325X"}, // MI325X Bare Metal - {0x75a0, "MI350X"}, // MI350X AC Bare Metal - {0x75a3, "MI355X"} // MI355X LC Bare Metal + {0x74a1, "MI300X"}, // MI300X + {0x74a9, "MI300X-HF"}, // MI300-HF + {0x74a2, "MI308X"}, // MI308X + {0x74a8, "MI308X-HF"}, // MI308X-HF + {0x74a5, "MI325X"}, // MI325X + {0x75a0, "MI350X"}, // MI350X AC + {0x75a3, "MI355X"} // MI355X LC }; using std::vector; From adc15dc5dbaeab1297cee18a5e465aff3dbf3e89 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 22 Apr 2026 15:53:04 -0500 Subject: [PATCH 104/275] Update RVS version (1.4.0) and change logs. --- CHANGELOG.md | 19 +++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5567aec..93768a54a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.4.0 + +### Added + +- TransferBench support to PEBB and PBQT. +- IET power stress test for MI250X. +- Babel support for normal distribution–based data initialization. +- Configurable Non-Temporal support in Babel. +- Support for action selection using the `-s` option. +- Support for module-based test execution using the `-m` option. +- Support for time‑duration based Babel test execution. + +## RVS 1.3.0 for ROCm 7.2 + +### Added + +- Babel subtest configurability + + ## RVS 1.3.0 for ROCm 7.1.1 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 84171df85..9bade34df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ set( COMP_TYPE "applications" ) set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) project ("rocm-validation-suite" - VERSION 1.3.0) + VERSION 1.4.0) # Default libdir to "lib", this skips GNUInstallDirs from trying to take a guess if it's unset: set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") From 2af3c2db9b8a9554dba0033495c207c8b099b6a2 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 12:20:26 -0700 Subject: [PATCH 105/275] update workflow for pkg name/version change With the new proposal packages generated by RVS need to stick to a new standard to match with compatible ROCm Core version.Install location also changes to /opt/rocm/extras-. Inside the install location file layout remain same as before. Within a major release only in-place upgrade with compatibility contract to older and newer ROCm minor releases. Side-by-side install across major version releases. --- .github/workflows/README_BUILD_PACKAGES.md | 107 +++++++++--------- .../workflows/build-relocatable-packages.yml | 48 ++++---- CMakeLists.txt | 51 ++++++--- build_packages_local.sh | 76 +++++++------ 4 files changed, 156 insertions(+), 126 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 10addf54e..15cdeccde 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -68,11 +68,12 @@ GitHub Actions Workflow │ -DROCM_PATH=$ROCM_PATH \ │ -DHIP_PLATFORM=amd \ │ -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER (if set) \ - │ -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ - │ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ + │ -DROCM_MAJOR_VERSION=$ROCM_MAJOR \ + │ -DCMAKE_INSTALL_PREFIX=/opt/rocm/extras-$ROCM_MAJOR \ + │ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/extras-$ROCM_MAJOR \ │ -DCMAKE_SKIP_RPATH=FALSE \ │ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ - │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" \ + │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-$ROCM_MAJOR/lib" \ │ -DCMAKE_VERBOSE_MAKEFILE=1 \ │ -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ├── 5. Build RVS @@ -87,10 +88,10 @@ GitHub Actions Workflow **Relocatable RPATH**: The `$ORIGIN` relative RPATH ensures binaries can find their libraries regardless of installation location: ```bash -CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs" +CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-/lib" ``` -**Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. +**Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. The **patch version** is auto-computed at CMake configure time: `git describe --tags --match "v..*"` counts commits since the last matching `v` tag. For example, if the tag is `v1.3.0` and there have been 15 commits since, the package version becomes `1.3.15`. If no matching tag exists or git is unavailable, the patch defaults to `0` from `CMakeLists.txt`. This works for both CI builds and direct local `cmake` invocations. **HIP Device Libraries**: Automatically located and exported as `HIP_DEVICE_LIB_PATH` for clang device library discovery. @@ -154,9 +155,9 @@ To use a self-hosted runner, set the variable to your runner's label (e.g., `sel | Trigger | Path | Contents | |--------|------|----------| -| **`release/*` branch** (`push` or `workflow_dispatch`) | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). Only PR merges into release branches or manual dispatch on release branches write here. | -| **Scheduled**, **push to `master`/`main`**, or **`workflow_dispatch` on non-release branch** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | Same split by type. All non-release builds go to nightly. | -| **Pull request** (same-repo) | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). One-off path, no repo metadata generated. | +| **`release/*` branch** (`push` or `workflow_dispatch`) | `release/rvs/deb/`, `release/rvs/rpm/`, `release/rvs/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). Only PR merges into release branches or manual dispatch on release branches write here. | +| **Scheduled**, **push to `master`/`main`**, or **`workflow_dispatch` on non-release branch** | `nightly/rvs/deb/`, `nightly/rvs/rpm/`, `nightly/rvs/tar/` | Same split by type. All non-release builds go to nightly. | +| **Pull request** (same-repo) | `rvs///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). One-off path, no repo metadata generated. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). @@ -179,36 +180,36 @@ For **scheduled**, **push**, and **manual** (`workflow_dispatch`) builds, the wo **S3 directory layout after metadata generation:** ``` -s3:///nightly/rocm-validation-suite/ +s3:///nightly/rvs/ ├── deb/ -│ ├── rocm-validation-suite_1.0.0_amd64.deb +│ ├── amdrocm7-rvs_1.3.15_amd64.deb │ ├── Packages │ ├── Packages.gz │ └── Release ├── rpm/ -│ ├── rocm-validation-suite-1.0.0.x86_64.rpm +│ ├── amdrocm7-rvs-1.3.15.x86_64.rpm │ └── repodata/ │ ├── repomd.xml │ ├── primary.xml.gz │ ├── filelists.xml.gz │ └── other.xml.gz └── tar/ - └── rocm-validation-suite-1.0.0-Linux.tar.gz + └── amdrocm7-rvs-1.3.15-Linux.tar.gz ``` **Using the S3 repo with apt (Ubuntu/Debian):** ```bash # Add the nightly repo (replace with the actual S3 bucket name) -echo "deb [trusted=yes] https://.s3.amazonaws.com/nightly/rocm-validation-suite/deb/ ./" \ +echo "deb [trusted=yes] https://.s3.amazonaws.com/nightly/rvs/deb/ ./" \ | sudo tee /etc/apt/sources.list.d/rvs-nightly.list # Or the release repo -echo "deb [trusted=yes] https://.s3.amazonaws.com/release/rocm-validation-suite/deb/ ./" \ +echo "deb [trusted=yes] https://.s3.amazonaws.com/release/rvs/deb/ ./" \ | sudo tee /etc/apt/sources.list.d/rvs-release.list sudo apt update -sudo apt install rocm-validation-suite +sudo apt install amdrocm7-rvs # Replace 7 with your ROCm major version ``` **Using the S3 repo with yum/dnf (CentOS/RHEL/Rocky):** @@ -218,7 +219,7 @@ sudo apt install rocm-validation-suite cat <<'EOF' | sudo tee /etc/yum.repos.d/rvs-nightly.repo [rvs-nightly] name=RVS Nightly Packages -baseurl=https://.s3.amazonaws.com/nightly/rocm-validation-suite/rpm/ +baseurl=https://.s3.amazonaws.com/nightly/rvs/rpm/ enabled=1 gpgcheck=0 EOF @@ -227,13 +228,13 @@ EOF cat <<'EOF' | sudo tee /etc/yum.repos.d/rvs-release.repo [rvs-release] name=RVS Release Packages -baseurl=https://.s3.amazonaws.com/release/rocm-validation-suite/rpm/ +baseurl=https://.s3.amazonaws.com/release/rvs/rpm/ enabled=1 gpgcheck=0 EOF -sudo yum install rocm-validation-suite -# or: sudo dnf install rocm-validation-suite +sudo yum install amdrocm7-rvs # Replace 7 with your ROCm major version +# or: sudo dnf install amdrocm7-rvs ``` > **Note:** `[trusted=yes]` (apt) and `gpgcheck=0` (yum) disable GPG verification. For production use, sign the packages and metadata with a GPG key and distribute the public key to users. Repository metadata is generated for **scheduled**, **push**, and **manual** builds; PR builds upload raw packages to ref-specific paths without metadata. @@ -304,18 +305,20 @@ The workflow builds packages for: Packages are named automatically by CPack using the RVS version from `CMakeLists.txt`: -- **DEB**: `rocm-validation-suite_${RVS_VERSION}_amd64.deb` -- **RPM**: `rocm-validation-suite-${RVS_VERSION}.x86_64.rpm` -- **TGZ**: `rocm-validation-suite-${RVS_VERSION}-Linux.tar.gz` +- **DEB**: `amdrocm-rvs_${RVS_VERSION}_amd64.deb` +- **RPM**: `amdrocm-rvs-${RVS_VERSION}.x86_64.rpm` +- **TGZ**: `amdrocm-rvs-${RVS_VERSION}-Linux.tar.gz` -Example (if RVS version is 1.0.0): +The **patch version** in `RVS_VERSION` is automatically computed from the number of commits since the last `v..*` git tag. For example, with tag `v1.3.0` and 15 commits since: ``` -rocm-validation-suite_1.0.0_amd64.deb -rocm-validation-suite-1.0.0.x86_64.rpm -rocm-validation-suite-1.0.0-Linux.tar.gz +amdrocm7-rvs_1.3.15_amd64.deb +amdrocm7-rvs-1.3.15.x86_64.rpm +amdrocm7-rvs-1.3.15-Linux.tar.gz ``` -**Important**: Package filenames match the internal package metadata, ensuring compliance with Debian and RPM standards. The version is sourced directly from `CMakeLists.txt` via CMake's `project(VERSION)` command. +If no matching `v` tag is found, the patch defaults to `0` from `project(VERSION)` in `CMakeLists.txt`. + +**Important**: Package filenames match the internal package metadata, ensuring compliance with Debian and RPM standards. The version major and minor are sourced from `CMakeLists.txt` via CMake's `project(VERSION)` command, while the patch is auto-computed from git history at configure time. ## Installing Generated Packages @@ -323,36 +326,31 @@ rocm-validation-suite-1.0.0-Linux.tar.gz ```bash # Download the package from S3 (or use the apt repo described above) -sudo dpkg -i rocm-validation-suite_*.deb +sudo dpkg -i amdrocm7-rvs_*.deb # Run RVS -/opt/rocm/rvs/bin/rvs --help +/opt/rocm/extras-7/bin/rvs --help ``` ### CentOS/RHEL/Rocky Linux (RPM) ```bash # Download the package from S3 (or use the yum/dnf repo described above) -sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm +sudo rpm -i --replacefiles --nodeps amdrocm7-rvs-*.rpm # Run RVS -/opt/rocm/rvs/bin/rvs --help +/opt/rocm/extras-7/bin/rvs --help ``` ### Any Linux Distribution (TGZ - Relocatable) ```bash -# Extract to /opt (or any location) -sudo mkdir -p /opt/rocm -sudo tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ - -# Or extract to custom location -mkdir -p ~/myrocm -tar -xzf rocm-validation-suite-*.tar.gz -C ~/myrocm/ +# Extract to the extras directory +sudo tar -xzf amdrocm7-rvs-*.tar.gz -C /opt/rocm/extras-7 # Setup environment -export PATH=/opt/rocm/rvs/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH +export PATH=/opt/rocm/extras-7/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$LD_LIBRARY_PATH # Run RVS rvs --help @@ -365,16 +363,16 @@ The workflow automatically verifies package contents: ### DEB Package Verification ```bash -dpkg-deb -I rocm-validation-suite_*.deb # Package info -dpkg-deb -c rocm-validation-suite_*.deb # Package contents +dpkg-deb -I amdrocm*-rvs_*.deb # Package info +dpkg-deb -c amdrocm*-rvs_*.deb # Package contents ``` ### RPM Package Verification ```bash -rpm -qip rocm-validation-suite-*.rpm # Package info -rpm -qlp rocm-validation-suite-*.rpm # Package contents -rpm -qRp rocm-validation-suite-*.rpm # Package dependencies +rpm -qip amdrocm*-rvs-*.rpm # Package info +rpm -qlp amdrocm*-rvs-*.rpm # Package contents +rpm -qRp amdrocm*-rvs-*.rpm # Package dependencies ``` ## Accessing Build Packages @@ -476,11 +474,12 @@ cmake -B "$BUILD_DIR" \ -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ -DROCM_PATH="$ROCM_PATH" \ -DHIP_PLATFORM=amd \ - -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs \ - -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs \ + -DROCM_MAJOR_VERSION="$ROCM_MAJOR" \ + -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" \ + -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" \ -DCMAKE_SKIP_RPATH=FALSE \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" \ + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" \ -DRPATH_MODE=OFF \ -DCMAKE_VERBOSE_MAKEFILE=1 \ -DFETCH_ROCMPATH_FROM_ROCMCORE=ON \ @@ -507,10 +506,10 @@ cmake -B "$BUILD_DIR" \ If binaries can't find libraries: ```bash -# Check RPATH settings -readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH +# Check RPATH settings (replace 7 with your ROCm major version) +readelf -d /opt/rocm/extras-7/bin/rvs | grep RPATH -# Should show: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs +# Should show: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-7/lib ``` ### Missing Dependencies @@ -518,8 +517,8 @@ readelf -d /opt/rocm/rvs/bin/rvs | grep RPATH If the package reports missing dependencies: ```bash -# Check what libraries are needed -ldd /opt/rocm/rvs/bin/rvs +# Check what libraries are needed (replace 7 with your ROCm major version) +ldd /opt/rocm/extras-7/bin/rvs # Install missing ROCm components if needed ``` @@ -541,7 +540,7 @@ export BUILD_TYPE=Release sudo -E ./build_packages_local.sh # Check generated packages -ls -lh build/rocm-validation-suite* +ls -lh build/amdrocm*-rvs* ``` ## References diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 3f23e5603..f134550f9 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -65,6 +65,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Set ROCm Version and GPU Family run: | @@ -97,7 +98,7 @@ jobs: - name: Verify DEB Package run: | cd ./build - DEB_FILE=$(ls rocm-validation-suite*.deb | head -1) + DEB_FILE=$(ls amdrocm*-rvs*.deb | head -1) if [ -n "$DEB_FILE" ]; then echo "=== DEB Package Info ===" dpkg-deb -I "$DEB_FILE" @@ -142,17 +143,17 @@ jobs: echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." exit 0 fi - BASE="rocm-validation-suite" + BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then - echo "Release branch build: uploading to release/rocm-validation-suite/deb" - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + echo "Release branch build: uploading to release/rvs/deb" + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/deb/" aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|release/${BASE}/deb" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "Nightly/push build: uploading to nightly/rocm-validation-suite/deb" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + echo "Nightly/push build: uploading to nightly/rvs/deb" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT @@ -160,7 +161,7 @@ jobs: else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT @@ -179,7 +180,7 @@ jobs: sudo apt-get update && sudo apt-get install -y dpkg-dev apt-utils - BASE="rocm-validation-suite" + BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then DEB_PREFIX="release/${BASE}/deb" else @@ -193,7 +194,7 @@ jobs: --exclude "Packages*" --exclude "Release*" --exclude "InRelease" \ --no-progress || true - cp ./build/rocm-validation-suite*.deb "$STAGING/" 2>/dev/null || true + cp ./build/amdrocm*-rvs*.deb "$STAGING/" 2>/dev/null || true cd "$STAGING" dpkg-scanpackages --multiversion . /dev/null > Packages @@ -226,6 +227,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Set ROCm Version and GPU Family run: | @@ -253,7 +255,7 @@ jobs: - name: Verify RPM Package run: | cd ./build - RPM_FILE=$(ls rocm-validation-suite*.rpm | head -1) + RPM_FILE=$(ls amdrocm*-rvs*.rpm | head -1) if [ -n "$RPM_FILE" ]; then echo "=== RPM Package Info ===" rpm -qip "$RPM_FILE" @@ -302,11 +304,11 @@ jobs: echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." exit 0 fi - BASE="rocm-validation-suite" + BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then - echo "Release branch build: uploading to release/rocm-validation-suite/rpm and release/rocm-validation-suite/tar" - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Release branch build: uploading to release/rvs/rpm and release/rvs/tar" + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/rpm/" aws s3 ls "s3://${BUCKET}/release/${BASE}/rpm/" --human-readable echo "Listing s3://${BUCKET}/release/${BASE}/tar/" @@ -314,9 +316,9 @@ jobs: echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "Nightly/push build: uploading to nightly/rocm-validation-suite/rpm and nightly/rocm-validation-suite/tar" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Nightly/push build: uploading to nightly/rvs/rpm and nightly/rvs/tar" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" @@ -326,7 +328,7 @@ jobs: else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT @@ -345,7 +347,7 @@ jobs: yum install -y createrepo_c || yum install -y createrepo - BASE="rocm-validation-suite" + BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then RPM_PREFIX="release/${BASE}/rpm" else @@ -358,7 +360,7 @@ jobs: aws s3 sync "s3://${BUCKET}/${RPM_PREFIX}/" "$STAGING/" \ --exclude "repodata/*" --no-progress || true - cp ./build/rocm-validation-suite*.rpm "$STAGING/" 2>/dev/null || true + cp ./build/amdrocm*-rvs*.rpm "$STAGING/" 2>/dev/null || true createrepo_c "$STAGING" || createrepo "$STAGING" @@ -389,17 +391,17 @@ jobs: ### Ubuntu/Debian ```bash - sudo dpkg -i rocm-validation-suite_*.deb + sudo dpkg -i amdrocm*-rvs_*.deb ``` ### CentOS/RHEL ```bash - sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm + sudo rpm -i --replacefiles --nodeps amdrocm*-rvs-*.rpm ``` ### Relocatable TGZ (Any Linux Distribution) ```bash - tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ + tar -xzf amdrocm*-rvs-*.tar.gz -C /opt/rocm/ export PATH=/opt/rocm/rvs/bin:$PATH export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH ``` diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bade34df..076302302 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,12 +145,40 @@ else() #If hipblas-common not found message(FATAL_ERROR "hipblas-common not found !!! Install hipblas-common to proceed ...") endif(hipblas-common_FOUND) +# ROCm major version for package naming and install paths (per RFC0012) +set(ROCM_MAJOR_VERSION "0" CACHE STRING "ROCm major version (e.g. 7 for ROCm 7.x)") + +# Auto-compute patch version: count commits since last v..* tag +find_program(GIT_EXECUTABLE git) +if(GIT_EXECUTABLE) + set(_TAG_PATTERN "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.*") + execute_process( + COMMAND ${GIT_EXECUTABLE} describe --tags --match "${_TAG_PATTERN}" --long + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE _GIT_DESCRIBE_OUTPUT + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE _GIT_DESCRIBE_RESULT + ERROR_QUIET + ) + if(_GIT_DESCRIBE_RESULT EQUAL 0) + string(REGEX MATCH "-([0-9]+)-g[0-9a-f]+$" _MATCH "${_GIT_DESCRIBE_OUTPUT}") + set(RVS_PATCH_FROM_TAG "${CMAKE_MATCH_1}") + message(STATUS "RVS patch from tag: ${RVS_PATCH_FROM_TAG} (${_GIT_DESCRIBE_OUTPUT})") + else() + set(RVS_PATCH_FROM_TAG "0") + message(STATUS "No matching v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.* tag found, patch defaults to 0") + endif() +else() + set(RVS_PATCH_FROM_TAG "0") + message(STATUS "git not found, patch version defaults to 0") +endif() + # Making ROCM_PATH, CMAKE_INSTALL_PREFIX, CPACK_PACKAGING_INSTALL_PREFIX as CACHE # variables since we will pass them as cmake params appropriately, and # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path") -set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory") -set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages") +set(CMAKE_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "CMAKE installation directory") +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "Prefix used in built packages") list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") add_definitions(-DROCM_PATH="${ROCM_PATH}") @@ -225,12 +253,16 @@ get_version ( ${RVS_VERSION} ) # Package Generator ####################################################### set(PKG_MAINTAINER_NM "ROCM Validation Suite Support") set(PKG_MAINTAINER_EMAIL "rocm-validation-suite.support@amd.com") -set(CPACK_PACKAGE_NAME "rocm-validation-suite") +set(CPACK_PACKAGE_NAME "amdrocm${ROCM_MAJOR_VERSION}-rvs") set(CPACK_PACKAGE_DESCRIPTION "ROCm Validation Suite") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tool for validating AMD GPU functionality, performance, reliability in ROCm.") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +if(RVS_PATCH_FROM_TAG GREATER "0") + set(CPACK_PACKAGE_VERSION_PATCH "${RVS_PATCH_FROM_TAG}") +else() + set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +endif() set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices Inc.") set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") @@ -246,14 +278,6 @@ endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_COMPONENTS_ALL applications rvsmodule) -# Set default ROCm version for package naming -set(ROCM_VERSION_FOR_PACKAGE "99999") - -# Update ROCm version for package naming -if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) - set(ROCM_VERSION_FOR_PACKAGE $ENV{ROCM_LIBPATCH_VERSION}) -endif() - # debian related changes if (DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) @@ -274,8 +298,7 @@ if(CPACK_RPM_PACKAGE_RELEASE) set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) endif() -# Complete RVS package version naming -set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.${ROCM_VERSION_FOR_PACKAGE}") +set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") diff --git a/build_packages_local.sh b/build_packages_local.sh index 01bacd3d2..28ebd5968 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -426,35 +426,38 @@ ROCM_MINOR=$(echo "$ROCM_VERSION_MAJOR_MINOR" | cut -d'.' -f2) ROCM_LIBPATCH_VERSION=$(printf "%02d%02d" "$ROCM_MAJOR" "$ROCM_MINOR") export ROCM_LIBPATCH_VERSION -print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION (from $ROCM_VERSION_MAJOR_MINOR)" - -# Set CPACK package release based on branch type -# - Non-release branches (not starting with "rel"): use branch.commit format -# - Release branches (starting with "rel"): use GitHub run number -GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown") -GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") +export ROCM_MAJOR +print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION, ROCM_MAJOR=$ROCM_MAJOR (from $ROCM_VERSION_MAJOR_MINOR)" + +# Set CPACK package release based on event/branch type +# - Scheduled builds: yyyymmdd date stamp +# - Release branches (starting with "rel"): GitHub run number +# - Dev/PR builds: branch.commit (same for DEB and RPM) +# Prefer GITHUB_REF_NAME / GITHUB_SHA (always available in Actions, unaffected +# by sudo safe.directory restrictions); fall back to git for local builds. +GIT_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" +if [ -n "$GITHUB_SHA" ]; then + GIT_COMMIT_SHORT="${GITHUB_SHA:0:7}" +else + GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") +fi -if [[ "$GIT_BRANCH" =~ ^rel ]]; then - # Release branch: use GitHub run number (fallback to 1 for local builds) +if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then + PACKAGE_RELEASE="$(date +%Y%m%d)" + print_success "Set CPACK package release: $PACKAGE_RELEASE (scheduled build)" +elif [[ "$GIT_BRANCH" =~ ^rel ]]; then GITHUB_RUN_NUMBER="${GITHUB_RUN_NUMBER:-1}" PACKAGE_RELEASE="$GITHUB_RUN_NUMBER" - - export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" - export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" - print_success "Set CPACK package release: $PACKAGE_RELEASE (release branch: $GIT_BRANCH, run: $GITHUB_RUN_NUMBER)" else - # Development branch: use branch name and commit - # Sanitize branch name: replace / and other special chars with - SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g') PACKAGE_RELEASE="${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" - - export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" - export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" - print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" fi +export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" +export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" + if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ @@ -536,16 +539,18 @@ if [ -d "$BUILD_DIR" ]; then fi # Build cmake command with optional CXX compiler +# TODO: May be cleanup RPATH later with lesser options. CMAKE_ARGS=( -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DROCM_PATH="$ROCM_PATH" -DHIP_PLATFORM=amd - -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs - -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs + -DROCM_MAJOR_VERSION="$ROCM_MAJOR" + -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" + -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCMAKE_SKIP_RPATH=FALSE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" -DRPATH_MODE=OFF -DCMAKE_VERBOSE_MAKEFILE=1 -DFETCH_ROCMPATH_FROM_ROCMCORE=ON @@ -597,7 +602,7 @@ if command -v dpkg >/dev/null 2>&1; then cpack -G DEB --verbose if [ $? -eq 0 ]; then - DEB_FILE=$(ls rocm-validation-suite*.deb 2>/dev/null | head -1) + DEB_FILE=$(ls amdrocm*-rvs*.deb 2>/dev/null | head -1) if [ -n "$DEB_FILE" ]; then print_success "Created DEB package: $DEB_FILE" DEB_SIZE=$(du -h "$DEB_FILE" | cut -f1) @@ -621,7 +626,7 @@ if command -v rpm >/dev/null 2>&1; then if [ $? -eq 0 ]; then - RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) + RPM_FILE=$(ls amdrocm*-rvs*.rpm 2>/dev/null | head -1) if [ -n "$RPM_FILE" ]; then print_success "Created RPM package: $RPM_FILE" RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1) @@ -645,7 +650,7 @@ cd "$BUILD_DIR" cpack -G TGZ --verbose if [ $? -eq 0 ]; then - TGZ_FILE=$(ls rocm-validation-suite*.tar.gz 2>/dev/null | head -1) + TGZ_FILE=$(ls amdrocm*-rvs*.tar.gz 2>/dev/null | head -1) if [ -n "$TGZ_FILE" ]; then print_success "Created TGZ package: $TGZ_FILE" TGZ_SIZE=$(du -h "$TGZ_FILE" | cut -f1) @@ -664,18 +669,19 @@ if [ -n "$UPLOAD_TARGET" ]; then # Build organized upload subpath: // if [ -z "$UPLOAD_REPO" ]; then - UPLOAD_REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*/||; s|\.git$||') + UPLOAD_REPO="${GITHUB_REPOSITORY##*/}" + [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*/||; s|\.git$||') [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null) [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO="unknown" fi - UPLOAD_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's|[^a-zA-Z0-9._-]|-|g') - [ -z "$UPLOAD_BRANCH" ] && UPLOAD_BRANCH="unknown" + UPLOAD_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" + UPLOAD_BRANCH=$(echo "$UPLOAD_BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') UPLOAD_DATE=$(date +%Y-%m-%d) UPLOAD_SUBPATH="${UPLOAD_REPO}/${UPLOAD_BRANCH}/${UPLOAD_DATE}" print_info "Upload path: .../${UPLOAD_SUBPATH}/" - PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) + PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'amdrocm*-rvs*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) if [ -z "$PKGS" ]; then print_error "No packages found to upload" else @@ -764,7 +770,7 @@ echo "========================================================================== print_info "Generated packages are in: $BUILD_DIR" echo "" # List only package types that were actually generated (DEB on Ubuntu, RPM on CentOS/RHEL, TGZ on all) -PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) +PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'amdrocm*-rvs*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) if [ -n "$PKGS" ]; then echo "$PKGS" | xargs ls -lh else @@ -778,15 +784,15 @@ echo " Installation Instructions" echo "================================================================================" echo "" echo "Ubuntu/Debian (DEB):" -echo " sudo dpkg -i $BUILD_DIR/rocm-validation-suite_*.deb" +echo " sudo dpkg -i $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs_*.deb" echo "" echo "CentOS/RHEL (RPM):" -echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/rocm-validation-suite-*.rpm" +echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.rpm" echo "" echo "Any Linux (TGZ - Relocatable):" -echo " sudo tar -xzf $BUILD_DIR/rocm-validation-suite-*.tar.gz -C /" -echo " export PATH=/opt/rocm/rvs/bin:\$PATH" -echo " export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:\$LD_LIBRARY_PATH" +echo " sudo tar -xzf $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.tar.gz -C /opt/rocm/extras-${ROCM_MAJOR}" +echo " export PATH=/opt/rocm/extras-${ROCM_MAJOR}/bin:\$PATH" +echo " export LD_LIBRARY_PATH=/opt/rocm/extras-${ROCM_MAJOR}/lib:\$LD_LIBRARY_PATH" echo "" echo "================================================================================" From 67203ff8efc996a6daf9e9f57305c69e156bf598 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 15:53:57 -0700 Subject: [PATCH 106/275] fix version string as per verison spec Ubuntu job need to set directory as safe to fetch tag and count for patch count --- CMakeLists.txt | 15 +++++++++++++++ build_packages_local.sh | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 076302302..00ecfe2c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,21 @@ set(ROCM_MAJOR_VERSION "0" CACHE STRING "ROCm major version (e.g. 7 for ROCm 7.x # Auto-compute patch version: count commits since last v..* tag find_program(GIT_EXECUTABLE git) if(GIT_EXECUTABLE) + # When cmake runs under sudo (e.g. Ubuntu CI), git refuses to operate in a + # directory owned by a different user. Mark the source dir as safe. + execute_process( + COMMAND ${GIT_EXECUTABLE} config --global --get-all safe.directory + OUTPUT_VARIABLE _SAFE_DIRS + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + string(FIND "${_SAFE_DIRS}" "${CMAKE_SOURCE_DIR}" _SAFE_DIR_IDX) + if(_SAFE_DIR_IDX EQUAL -1) + execute_process( + COMMAND ${GIT_EXECUTABLE} config --global --add safe.directory "${CMAKE_SOURCE_DIR}" + ERROR_QUIET + ) + endif() set(_TAG_PATTERN "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.*") execute_process( COMMAND ${GIT_EXECUTABLE} describe --tags --match "${_TAG_PATTERN}" --long diff --git a/build_packages_local.sh b/build_packages_local.sh index 28ebd5968..b56f88d1a 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -450,7 +450,7 @@ elif [[ "$GIT_BRANCH" =~ ^rel ]]; then PACKAGE_RELEASE="$GITHUB_RUN_NUMBER" print_success "Set CPACK package release: $PACKAGE_RELEASE (release branch: $GIT_BRANCH, run: $GITHUB_RUN_NUMBER)" else - SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g') + SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^A-Za-z0-9.+~]/./g') PACKAGE_RELEASE="${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" fi From a07bc1bf32400fad232ee1e2168430a008a07488 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 18:03:07 -0700 Subject: [PATCH 107/275] flow change on how package is named Keep the old name for when triggered directly from CMake and use build_package_local file to control the naming in build workflow --- CMakeLists.txt | 2 +- build_packages_local.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00ecfe2c2..16a6a7852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,7 +268,7 @@ get_version ( ${RVS_VERSION} ) # Package Generator ####################################################### set(PKG_MAINTAINER_NM "ROCM Validation Suite Support") set(PKG_MAINTAINER_EMAIL "rocm-validation-suite.support@amd.com") -set(CPACK_PACKAGE_NAME "amdrocm${ROCM_MAJOR_VERSION}-rvs") +set(CPACK_PACKAGE_NAME "rocm-validation-suite" CACHE STRING "Package name for CPack") set(CPACK_PACKAGE_DESCRIPTION "ROCm Validation Suite") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tool for validating AMD GPU functionality, performance, reliability in ROCm.") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") diff --git a/build_packages_local.sh b/build_packages_local.sh index b56f88d1a..64bffa764 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -546,6 +546,7 @@ CMAKE_ARGS=( -DROCM_PATH="$ROCM_PATH" -DHIP_PLATFORM=amd -DROCM_MAJOR_VERSION="$ROCM_MAJOR" + -DCPACK_PACKAGE_NAME="amdrocm${ROCM_MAJOR}-rvs" -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCMAKE_SKIP_RPATH=FALSE From 22d40ac5142e5ed3a85c79f9b2b0443afbfb7c69 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 21:13:37 -0700 Subject: [PATCH 108/275] fix tarball install file layout File layout should be flat with FHS spec inside install dir https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html --- .github/workflows/README_BUILD_PACKAGES.md | 1 + build_packages_local.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 15cdeccde..80090d8bc 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -346,6 +346,7 @@ sudo rpm -i --replacefiles --nodeps amdrocm7-rvs-*.rpm ```bash # Extract to the extras directory +sudo mkdir -p /opt/rocm/extras-7 sudo tar -xzf amdrocm7-rvs-*.tar.gz -C /opt/rocm/extras-7 # Setup environment diff --git a/build_packages_local.sh b/build_packages_local.sh index 64bffa764..0ccafb82b 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -645,7 +645,7 @@ fi # Create TGZ package print_info "Creating TGZ package..." -CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX="") +CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX="" -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" cd "$BUILD_DIR" cpack -G TGZ --verbose @@ -791,6 +791,7 @@ echo "CentOS/RHEL (RPM):" echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.rpm" echo "" echo "Any Linux (TGZ - Relocatable):" +echo " sudo mkdir -p /opt/rocm/extras-${ROCM_MAJOR}" echo " sudo tar -xzf $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.tar.gz -C /opt/rocm/extras-${ROCM_MAJOR}" echo " export PATH=/opt/rocm/extras-${ROCM_MAJOR}/bin:\$PATH" echo " export LD_LIBRARY_PATH=/opt/rocm/extras-${ROCM_MAJOR}/lib:\$LD_LIBRARY_PATH" From 9ceeb29963eb12c0e1d899e6b9a0e94cd0e6f7b3 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 23:06:01 -0700 Subject: [PATCH 109/275] update data install directory and remove empty dir Keep RVS command backward combatible with old version config files need to be in same place as before, share/rocm-validation-suite. Same time copyright need to be share/package-name. In .tgz pkg empty dirs present and need to be removed. --- CMakeLists.txt | 7 ++++--- build_packages_local.sh | 2 +- rvs/CMakeLists.txt | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16a6a7852..5fa780cf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,6 +269,7 @@ get_version ( ${RVS_VERSION} ) set(PKG_MAINTAINER_NM "ROCM Validation Suite Support") set(PKG_MAINTAINER_EMAIL "rocm-validation-suite.support@amd.com") set(CPACK_PACKAGE_NAME "rocm-validation-suite" CACHE STRING "Package name for CPack") +set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${CPACK_PACKAGE_NAME}" CACHE PATH "Documentation install directory" FORCE) set(CPACK_PACKAGE_DESCRIPTION "ROCm Validation Suite") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tool for validating AMD GPU functionality, performance, reliability in ROCm.") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") @@ -802,7 +803,7 @@ install(DIRECTORY "${CMAKE_BINARY_DIR}/doc/man/man1/" ) install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/userguide/html - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}/userguide + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/userguide COMPONENT applications ) @@ -815,11 +816,11 @@ configure_file(${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh.in ${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh @ONLY) install(FILES ${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}/conf/ + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/conf/ COMPONENT rvsmodule ) install(DIRECTORY ${CMAKE_SOURCE_DIR}/testscripts/ - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}/testscripts + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/testscripts COMPONENT rvsmodule ) diff --git a/build_packages_local.sh b/build_packages_local.sh index 0ccafb82b..3856ac0ec 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -645,7 +645,7 @@ fi # Create TGZ package print_info "Creating TGZ package..." -CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX="" -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) +CMAKE_ARGS+=(-DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX:PATH=/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" cd "$BUILD_DIR" cpack -G TGZ --verbose diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 870dd0c1b..01043b5fd 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -139,13 +139,13 @@ install(TARGETS ${RVS_TARGET} ) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/conf - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}/ + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/ COMPONENT applications FILES_MATCHING PATTERN "*.conf" ) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/.rvsmodules.config" - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}/conf + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/conf COMPONENT applications ) From a1d60000e31fcb662c363f40ab2966aefec44620 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 23 Apr 2026 00:07:14 -0700 Subject: [PATCH 110/275] use CMAKE_PROJECT_NAME instead project_name subfolder cmake files have differen project(name). This overrides expected behaviour of installing files. Bring back CPACK_SET_DESTDIR=ON, this is needed to create tgz file --- CMakeLists.txt | 6 +++--- build_packages_local.sh | 2 +- rvs/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fa780cf6..8d48d719a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -803,7 +803,7 @@ install(DIRECTORY "${CMAKE_BINARY_DIR}/doc/man/man1/" ) install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/userguide/html - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/userguide + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/userguide COMPONENT applications ) @@ -816,11 +816,11 @@ configure_file(${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh.in ${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh @ONLY) install(FILES ${CMAKE_SOURCE_DIR}/rvs/conf/deviceid.sh - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/conf/ + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/conf/ COMPONENT rvsmodule ) install(DIRECTORY ${CMAKE_SOURCE_DIR}/testscripts/ - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/testscripts + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/testscripts COMPONENT rvsmodule ) diff --git a/build_packages_local.sh b/build_packages_local.sh index 3856ac0ec..08348c515 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -645,7 +645,7 @@ fi # Create TGZ package print_info "Creating TGZ package..." -CMAKE_ARGS+=(-DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX:PATH=/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) +CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX:PATH=/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" cd "$BUILD_DIR" cpack -G TGZ --verbose diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 01043b5fd..8cf750224 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -139,13 +139,13 @@ install(TARGETS ${RVS_TARGET} ) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/conf - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/ + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/ COMPONENT applications FILES_MATCHING PATTERN "*.conf" ) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/.rvsmodules.config" - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/conf + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/conf COMPONENT applications ) From 5d573a3e1be8a061d34b66cc667a29ea71ee0d20 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 23 Apr 2026 00:49:37 -0700 Subject: [PATCH 111/275] tgz file creation need proper path for flat file Need to get rid of empty extras folder and ensure no double slash --- build_packages_local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 08348c515..b31786f07 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -645,7 +645,7 @@ fi # Create TGZ package print_info "Creating TGZ package..." -CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX:PATH=/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) +CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON "-DCPACK_PACKAGING_INSTALL_PREFIX:PATH=" -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" cd "$BUILD_DIR" cpack -G TGZ --verbose From 731f634af1ae14b6410d3bbd94f75a92d83c5d26 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 23 Apr 2026 06:18:22 -0400 Subject: [PATCH 112/275] build changes already in place because of transfer bench changes. so keep in sync with master. --- CHANGELOG.md | 21 ++++++++ build_packages_local.sh | 114 ++++++++++++++++++---------------------- 2 files changed, 73 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5567aec..a1e3b4ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,27 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.4.0 + +### Added + +- TransferBench support to PEBB and PBQT. +- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. +- IET power stress test for MI250X. +- Babel support for normal distribution–based data initialization. +- Configurable Non-Temporal support in Babel. +- Support for action selection using the `-s` option. +- Support for module-based test execution using the `-m` option. +- Support for time‑duration based Babel test execution. + + +## RVS 1.3.0 for ROCm 7.2 + +### Added + +- Babel subtest configurability + + ## RVS 1.3.0 for ROCm 7.1.1 ### Added diff --git a/build_packages_local.sh b/build_packages_local.sh index 3b7e3a62b..b31786f07 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -426,71 +426,56 @@ ROCM_MINOR=$(echo "$ROCM_VERSION_MAJOR_MINOR" | cut -d'.' -f2) ROCM_LIBPATCH_VERSION=$(printf "%02d%02d" "$ROCM_MAJOR" "$ROCM_MINOR") export ROCM_LIBPATCH_VERSION -print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION (from $ROCM_VERSION_MAJOR_MINOR)" - -# Set CPACK package release based on branch type -# - Non-release branches (not starting with "rel"): use branch.commit format -# - Release branches (starting with "rel"): use GitHub run number -GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown") -GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") +export ROCM_MAJOR +print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION, ROCM_MAJOR=$ROCM_MAJOR (from $ROCM_VERSION_MAJOR_MINOR)" + +# Set CPACK package release based on event/branch type +# - Scheduled builds: yyyymmdd date stamp +# - Release branches (starting with "rel"): GitHub run number +# - Dev/PR builds: branch.commit (same for DEB and RPM) +# Prefer GITHUB_REF_NAME / GITHUB_SHA (always available in Actions, unaffected +# by sudo safe.directory restrictions); fall back to git for local builds. +GIT_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" +if [ -n "$GITHUB_SHA" ]; then + GIT_COMMIT_SHORT="${GITHUB_SHA:0:7}" +else + GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") +fi -if [[ "$GIT_BRANCH" =~ ^rel ]]; then - # Release branch: use GitHub run number (fallback to 1 for local builds) +if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then + PACKAGE_RELEASE="$(date +%Y%m%d)" + print_success "Set CPACK package release: $PACKAGE_RELEASE (scheduled build)" +elif [[ "$GIT_BRANCH" =~ ^rel ]]; then GITHUB_RUN_NUMBER="${GITHUB_RUN_NUMBER:-1}" PACKAGE_RELEASE="$GITHUB_RUN_NUMBER" - - export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" - export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" - print_success "Set CPACK package release: $PACKAGE_RELEASE (release branch: $GIT_BRANCH, run: $GITHUB_RUN_NUMBER)" else - # Development branch: use branch name and commit - # Sanitize branch name: replace / and other special chars with - - SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g') + SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^A-Za-z0-9.+~]/./g') PACKAGE_RELEASE="${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" - - export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" - export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" - print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" fi +export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" +export CPACK_RPM_PACKAGE_RELEASE="$PACKAGE_RELEASE" + if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ - GCC_TOOLCHAIN="" + + GCC_TOOLSET_ENABLED="" for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do - ENABLE_SCRIPT=$(rpm -ql "${pkg}-runtime" 2>/dev/null | grep '/enable$' | head -1) + ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) if [ -n "$ENABLE_SCRIPT" ] && [ -f "$ENABLE_SCRIPT" ]; then TOOLSET_ROOT=$(dirname "$ENABLE_SCRIPT") - # shellcheck source=/dev/null source "$ENABLE_SCRIPT" - GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" - export GCC_TOOLCHAIN + export GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" + GCC_TOOLSET_ENABLED="$pkg" print_success "Enabled ${pkg} from ${TOOLSET_ROOT} (GCC $(gcc -dumpversion))" break fi done - - # Fallback: manylinux / images with toolsets under /opt/rh/ without rpm -ql match - if [ -z "$GCC_TOOLCHAIN" ]; then - for ts_ver in 14 13 12 11; do - ts_root="/opt/rh/gcc-toolset-${ts_ver}/root/usr" - if [ -d "${ts_root}/include/c++" ]; then - GCC_TOOLCHAIN="${ts_root}" - if [ -f "/opt/rh/gcc-toolset-${ts_ver}/enable" ]; then - # shellcheck source=/dev/null - source "/opt/rh/gcc-toolset-${ts_ver}/enable" - fi - export GCC_TOOLCHAIN - print_success "Using gcc-toolset-${ts_ver} for C++20 stdlib (${ts_root})" - break - fi - done - fi - - if [ -z "$GCC_TOOLCHAIN" ]; then - print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers like may be missing" + if [ -z "$GCC_TOOLSET_ENABLED" ]; then + print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers may be missing" fi if [ -x "$ROCM_PATH/bin/hipcc" ]; then @@ -554,16 +539,19 @@ if [ -d "$BUILD_DIR" ]; then fi # Build cmake command with optional CXX compiler +# TODO: May be cleanup RPATH later with lesser options. CMAKE_ARGS=( -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DROCM_PATH="$ROCM_PATH" -DHIP_PLATFORM=amd - -DCMAKE_INSTALL_PREFIX=/opt/rocm/rvs - -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rvs + -DROCM_MAJOR_VERSION="$ROCM_MAJOR" + -DCPACK_PACKAGE_NAME="amdrocm${ROCM_MAJOR}-rvs" + -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" + -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCMAKE_SKIP_RPATH=FALSE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs" + -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" -DRPATH_MODE=OFF -DCMAKE_VERBOSE_MAKEFILE=1 -DFETCH_ROCMPATH_FROM_ROCMCORE=ON @@ -615,7 +603,7 @@ if command -v dpkg >/dev/null 2>&1; then cpack -G DEB --verbose if [ $? -eq 0 ]; then - DEB_FILE=$(ls rocm-validation-suite*.deb 2>/dev/null | head -1) + DEB_FILE=$(ls amdrocm*-rvs*.deb 2>/dev/null | head -1) if [ -n "$DEB_FILE" ]; then print_success "Created DEB package: $DEB_FILE" DEB_SIZE=$(du -h "$DEB_FILE" | cut -f1) @@ -639,7 +627,7 @@ if command -v rpm >/dev/null 2>&1; then if [ $? -eq 0 ]; then - RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) + RPM_FILE=$(ls amdrocm*-rvs*.rpm 2>/dev/null | head -1) if [ -n "$RPM_FILE" ]; then print_success "Created RPM package: $RPM_FILE" RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1) @@ -657,13 +645,13 @@ fi # Create TGZ package print_info "Creating TGZ package..." -CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON -DCPACK_PACKAGING_INSTALL_PREFIX="") +CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON "-DCPACK_PACKAGING_INSTALL_PREFIX:PATH=" -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" cd "$BUILD_DIR" cpack -G TGZ --verbose if [ $? -eq 0 ]; then - TGZ_FILE=$(ls rocm-validation-suite*.tar.gz 2>/dev/null | head -1) + TGZ_FILE=$(ls amdrocm*-rvs*.tar.gz 2>/dev/null | head -1) if [ -n "$TGZ_FILE" ]; then print_success "Created TGZ package: $TGZ_FILE" TGZ_SIZE=$(du -h "$TGZ_FILE" | cut -f1) @@ -682,18 +670,19 @@ if [ -n "$UPLOAD_TARGET" ]; then # Build organized upload subpath: // if [ -z "$UPLOAD_REPO" ]; then - UPLOAD_REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*/||; s|\.git$||') + UPLOAD_REPO="${GITHUB_REPOSITORY##*/}" + [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*/||; s|\.git$||') [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null) [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO="unknown" fi - UPLOAD_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's|[^a-zA-Z0-9._-]|-|g') - [ -z "$UPLOAD_BRANCH" ] && UPLOAD_BRANCH="unknown" + UPLOAD_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" + UPLOAD_BRANCH=$(echo "$UPLOAD_BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') UPLOAD_DATE=$(date +%Y-%m-%d) UPLOAD_SUBPATH="${UPLOAD_REPO}/${UPLOAD_BRANCH}/${UPLOAD_DATE}" print_info "Upload path: .../${UPLOAD_SUBPATH}/" - PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) + PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'amdrocm*-rvs*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) if [ -z "$PKGS" ]; then print_error "No packages found to upload" else @@ -782,7 +771,7 @@ echo "========================================================================== print_info "Generated packages are in: $BUILD_DIR" echo "" # List only package types that were actually generated (DEB on Ubuntu, RPM on CentOS/RHEL, TGZ on all) -PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) +PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'amdrocm*-rvs*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) if [ -n "$PKGS" ]; then echo "$PKGS" | xargs ls -lh else @@ -796,15 +785,16 @@ echo " Installation Instructions" echo "================================================================================" echo "" echo "Ubuntu/Debian (DEB):" -echo " sudo dpkg -i $BUILD_DIR/rocm-validation-suite_*.deb" +echo " sudo dpkg -i $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs_*.deb" echo "" echo "CentOS/RHEL (RPM):" -echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/rocm-validation-suite-*.rpm" +echo " sudo rpm -i --replacefiles --nodeps $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.rpm" echo "" echo "Any Linux (TGZ - Relocatable):" -echo " sudo tar -xzf $BUILD_DIR/rocm-validation-suite-*.tar.gz -C /" -echo " export PATH=/opt/rocm/rvs/bin:\$PATH" -echo " export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:\$LD_LIBRARY_PATH" +echo " sudo mkdir -p /opt/rocm/extras-${ROCM_MAJOR}" +echo " sudo tar -xzf $BUILD_DIR/amdrocm${ROCM_MAJOR}-rvs-*.tar.gz -C /opt/rocm/extras-${ROCM_MAJOR}" +echo " export PATH=/opt/rocm/extras-${ROCM_MAJOR}/bin:\$PATH" +echo " export LD_LIBRARY_PATH=/opt/rocm/extras-${ROCM_MAJOR}/lib:\$LD_LIBRARY_PATH" echo "" echo "================================================================================" From da66be0ee03aa4402835dd27bf7f5bbc9faf3766 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 23 Apr 2026 11:11:33 -0700 Subject: [PATCH 113/275] update release version string Add version string that are incrementing and meaningful to explain the image rel* branch: Ver: rvs--buildnumber master branch: Merge,Daily build Ver: rvs-.r.yyyymmdd PR build: Ver.branch.commit --- .github/workflows/README_BUILD_PACKAGES.md | 8 +++--- build_packages_local.sh | 33 +++++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 80090d8bc..189d1152d 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -58,8 +58,8 @@ GitHub Actions Workflow │ ├── export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" │ ├── export HIP_DEVICE_LIB_PATH (auto-detected amdgcn/bitcode path) │ ├── export ROCM_LIBPATCH_VERSION (major.minor in xxyy format, e.g., 0711) - │ ├── export CPACK_DEBIAN_PACKAGE_RELEASE (dev: branch.commit, rel: run number) - │ ├── export CPACK_RPM_PACKAGE_RELEASE (dev: branch.commit, rel: run number) + │ ├── export CPACK_DEBIAN_PACKAGE_RELEASE (see env table: r.date, PRs add .branch.commit) + │ ├── export CPACK_RPM_PACKAGE_RELEASE (same as DEB) │ ├── export CMAKE_CXX_COMPILER=hipcc (AlmaLinux only) │ └── export CMAKE_COMMAND=cmake3 (AlmaLinux) or cmake (Ubuntu) ├── 4. Configure CMake with Relocatable RPATH @@ -288,8 +288,8 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | | `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `8.0` → `0800`) - used for RVS version tagging | -| `CPACK_DEBIAN_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | -| `CPACK_RPM_PACKAGE_RELEASE` | Auto-generated from git | Package release string. **Dev branches**: `branch.commit` (e.g., `master.a1b2c3d`). **Release branches** (starting with "rel"): `GITHUB_RUN_NUMBER` (fallback: `1`) | +| `CPACK_DEBIAN_PACKAGE_RELEASE` | Auto-generated | **Default** (`schedule`, `push`, `workflow_dispatch`, local): `r.` (e.g. `r0711.20260423` where `0711` = ROCm 7.11 from `ROCM_VERSION`). **Pull requests**: `r...`. **Release branches** (name starts with `rel`, non-PR): `GITHUB_RUN_NUMBER` (fallback: `1`). | +| `CPACK_RPM_PACKAGE_RELEASE` | same as `CPACK_DEBIAN_PACKAGE_RELEASE` | Identical to DEB. | | `GITHUB_RUN_NUMBER` | `1` (local) | GitHub Actions run number - automatically set in CI, defaults to `1` for local builds | ## Build Matrix diff --git a/build_packages_local.sh b/build_packages_local.sh index b31786f07..51a0ff31a 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -430,29 +430,36 @@ export ROCM_MAJOR print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION, ROCM_MAJOR=$ROCM_MAJOR (from $ROCM_VERSION_MAJOR_MINOR)" # Set CPACK package release based on event/branch type -# - Scheduled builds: yyyymmdd date stamp -# - Release branches (starting with "rel"): GitHub run number -# - Dev/PR builds: branch.commit (same for DEB and RPM) -# Prefer GITHUB_REF_NAME / GITHUB_SHA (always available in Actions, unaffected -# by sudo safe.directory restrictions); fall back to git for local builds. -GIT_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" +# - Base (schedule, push, workflow_dispatch, local): r.yyyymmdd +# (ROCM_LIBPATCH_VERSION is major+minor as xxyy, e.g. 0711 for ROCm 7.11) +# - pull_request: same base + .branch.commit (source branch from GITHUB_HEAD_REF) +# - Release branches (starting with "rel"): GITHUB run number +# Prefer GITHUB_REF_NAME / GITHUB_HEAD_REF / GITHUB_SHA in Actions; fall back to git locally. +RELEASE_DATE="$(date +%Y%m%d)" +BASE_PACKAGE_RELEASE="r${ROCM_LIBPATCH_VERSION}.${RELEASE_DATE}" + +if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ -n "${GITHUB_HEAD_REF:-}" ]; then + GIT_BRANCH="${GITHUB_HEAD_REF}" +else + GIT_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" +fi if [ -n "$GITHUB_SHA" ]; then GIT_COMMIT_SHORT="${GITHUB_SHA:0:7}" else GIT_COMMIT_SHORT=$(git rev-parse --short HEAD 2>/dev/null || echo "0000000") fi +SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^A-Za-z0-9.+~]/./g') -if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then - PACKAGE_RELEASE="$(date +%Y%m%d)" - print_success "Set CPACK package release: $PACKAGE_RELEASE (scheduled build)" -elif [[ "$GIT_BRANCH" =~ ^rel ]]; then +if [ "${GITHUB_EVENT_NAME}" != "pull_request" ] && [[ "$GIT_BRANCH" =~ ^rel ]]; then GITHUB_RUN_NUMBER="${GITHUB_RUN_NUMBER:-1}" PACKAGE_RELEASE="$GITHUB_RUN_NUMBER" print_success "Set CPACK package release: $PACKAGE_RELEASE (release branch: $GIT_BRANCH, run: $GITHUB_RUN_NUMBER)" +elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then + PACKAGE_RELEASE="${BASE_PACKAGE_RELEASE}.${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" + print_success "Set CPACK package release: $PACKAGE_RELEASE (PR: $BASE_PACKAGE_RELEASE + $GIT_BRANCH + $GIT_COMMIT_SHORT)" else - SANITIZED_BRANCH=$(echo "$GIT_BRANCH" | sed 's/[^A-Za-z0-9.+~]/./g') - PACKAGE_RELEASE="${SANITIZED_BRANCH}.${GIT_COMMIT_SHORT}" - print_success "Set CPACK package release: $PACKAGE_RELEASE (dev branch: $GIT_BRANCH, commit: $GIT_COMMIT_SHORT)" + PACKAGE_RELEASE="$BASE_PACKAGE_RELEASE" + print_success "Set CPACK package release: $PACKAGE_RELEASE (r.date: ${BASE_PACKAGE_RELEASE}, event: ${GITHUB_EVENT_NAME:-local})" fi export CPACK_DEBIAN_PACKAGE_RELEASE="$PACKAGE_RELEASE" From 6b9eda6c189ace7b273931541f3722e2e90c72b1 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 23 Apr 2026 12:34:45 -0700 Subject: [PATCH 114/275] update version string for TGZ file TGZ file did not have any release version string.It is good to keep all format having same version format as well. --- .github/workflows/README_BUILD_PACKAGES.md | 18 ++++++++++-------- CMakeLists.txt | 4 ++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 189d1152d..85436fac1 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -182,19 +182,19 @@ For **scheduled**, **push**, and **manual** (`workflow_dispatch`) builds, the wo ``` s3:///nightly/rvs/ ├── deb/ -│ ├── amdrocm7-rvs_1.3.15_amd64.deb +│ ├── amdrocm7-rvs_1.3.15-r0711.20260423_amd64.deb │ ├── Packages │ ├── Packages.gz │ └── Release ├── rpm/ -│ ├── amdrocm7-rvs-1.3.15.x86_64.rpm +│ ├── amdrocm7-rvs-1.3.15-r0711.20260423.x86_64.rpm │ └── repodata/ │ ├── repomd.xml │ ├── primary.xml.gz │ ├── filelists.xml.gz │ └── other.xml.gz └── tar/ - └── amdrocm7-rvs-1.3.15-Linux.tar.gz + └── amdrocm7-rvs-1.3.15-r0711.20260423-Linux.tar.gz ``` **Using the S3 repo with apt (Ubuntu/Debian):** @@ -307,15 +307,17 @@ Packages are named automatically by CPack using the RVS version from `CMakeLists - **DEB**: `amdrocm-rvs_${RVS_VERSION}_amd64.deb` - **RPM**: `amdrocm-rvs-${RVS_VERSION}.x86_64.rpm` -- **TGZ**: `amdrocm-rvs-${RVS_VERSION}-Linux.tar.gz` +- **TGZ**: `amdrocm-rvs---Linux.tar.gz` (CPack: same **release** suffix as DEB/RPM, e.g. `r0711.20260423` from `ROCM_LIBPATCH_VERSION` and date, or a PR-specific suffix) -The **patch version** in `RVS_VERSION` is automatically computed from the number of commits since the last `v..*` git tag. For example, with tag `v1.3.0` and 15 commits since: +The **patch version** in `RVS_VERSION` is automatically computed from the number of commits since the last `v..*` git tag. For example, with tag `v1.3.0` and 15 commits since, and a release of `r0711.20260423`: ``` -amdrocm7-rvs_1.3.15_amd64.deb -amdrocm7-rvs-1.3.15.x86_64.rpm -amdrocm7-rvs-1.3.15-Linux.tar.gz +amdrocm7-rvs_1.3.15-r0711.20260423_amd64.deb +amdrocm7-rvs-1.3.15-r0711.20260423.el8.x86_64.rpm +amdrocm7-rvs-1.3.15-r0711.20260423-Linux.tar.gz ``` +`CPACK_PACKAGE_FILE_NAME` in CMake is set to include the same **release** as DEB/RPM (from `CPACK_RPM_PACKAGE_RELEASE` in the build environment). + If no matching `v` tag is found, the patch defaults to `0` from `project(VERSION)` in `CMakeLists.txt`. **Important**: Package filenames match the internal package metadata, ensuring compliance with Debian and RPM standards. The version major and minor are sourced from `CMakeLists.txt` via CMake's `project(VERSION)` command, while the patch is auto-computed from git history at configure time. diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d48d719a..303d34f87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,6 +319,10 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") +# TGZ (STGZ): same version + release scheme as DEB/RPM — ---Linux.tar.gz +# CPACK_RPM_PACKAGE_RELEASE is set from the build script (e.g. r0711.20260423 or PR suffix) +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-Linux" CACHE STRING "STGZ/CPack output file stem" FORCE) + # Set and Install license file set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/doc/${CPACK_PACKAGE_NAME}) From 47c70237c7e4421e6ae24d1cdb2b6e9f5057f0c7 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 24 Apr 2026 05:46:44 -0400 Subject: [PATCH 115/275] add warning header for beta , til we make pass criteria better --- CHANGELOG.md | 2 +- FEATURES.md | 2 ++ docs/ug1main.md | 4 ++++ pulse.so/src/action.cpp | 15 +++++++++++++++ rvs/conf/pulse_single.conf | 6 ++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f33e0aab9..c7ac7b662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added - TransferBench support to PEBB and PBQT. -- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. +- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** - IET power stress test for MI250X. - Babel support for normal distribution–based data initialization. - Configurable Non-Temporal support in Babel. diff --git a/FEATURES.md b/FEATURES.md index 7e4034e41..be8b1674c 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -61,3 +61,5 @@ The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temper ## Pulse Stress Test- Pulse module The Pulse Stress Test creates power fluctuations by alternating between high-compute (GEMM) and idle phases at a configurable rate. Two-level barrier synchronizes all GPUs so they spike current simultaneously, maximizing stress on the PSU. + +**PS: Beta version — not intended for production use. Pass/fail criteria are still being tuned.** diff --git a/docs/ug1main.md b/docs/ug1main.md index 35f9fc300..7a0575702 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -129,6 +129,8 @@ The Input EDPp Test runs GEMM workloads to stress the GPU power (that is, TGP). #### GPU Power Pulse Test - PULSE module The Pulse test drives repeating **high-power** (GEMM compute) and **low-power** (idle, minimum clocks) phases at a configurable rate so that GPU power swings over time. That pattern stresses the power supply and voltage regulators with transients rather than a single sustained power level. With **parallel: true** on multiple GPUs, the module uses a CPU-side barrier and a GPU-side fine-grained barrier so that devices tend to enter the heavy phase together, increasing aggregate current steps. Power and temperature are read through **AMD SMI**. GEMM execution uses the same **rvs_blas** stack as GST/IET (**rocBLAS** or **hipBLASLt**). +**PS: Beta version — not intended for production use. Pass/fail criteria are still being tuned.** + #### Memory Test - MEM module The Memory module tests the GPU memory for hardware errors and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests [Algorithm, data pattern] @@ -2576,6 +2578,8 @@ The output for such a configuration file may look like this: ## Pulse Module +> **PS: Beta version.** This module is in beta and is **not intended for production use**. Pass/fail criteria (especially around power-delta enforcement, clock-pinning verification, and throttle detection) are still being tuned and may change between releases. + The **Pulse** module is intended for **time-varying** GPU power stress: it alternates **high** phases (maximum clocks plus continuous GEMM) and **low** phases (minimum clocks plus idle/sleep), repeating for the action **duration**. That produces periodic power swings useful for exercising PSU transient response and platform power delivery, complementing **IET** (which targets a sustained power level). GEMM type, matrix size, and BLAS backend follow the same concepts as **GST** / **IET** (see those sections and `rvs_blas`). Sample reference configuration: `rvs/conf/pulse_single.conf`. diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp index 36f836b0a..e7889f6b2 100644 --- a/pulse.so/src/action.cpp +++ b/pulse.so/src/action.cpp @@ -113,6 +113,19 @@ using std::map; static constexpr auto MODULE_NAME = "pulse"; static constexpr auto MODULE_NAME_CAPS = "PULSE"; +// Beta banner shown once at the start of every pulse action invocation. +// Plain ASCII so it survives non-UTF-8 terminals, log scrapers, and CI capture. +static const char* kPulseBetaBanner = +"\n" +"##############################################################################\n" +"# #\n" +"# *** PULSE STRESS TEST - BETA VERSION *** #\n" +"# #\n" +"# This pulse test is a BETA version and is NOT to be used in #\n" +"# production environments. Pass/fail criteria are still being tuned. #\n" +"# #\n" +"##############################################################################\n"; + pulse_action::pulse_action() { module_name = MODULE_NAME; pulse_max_temp_c = PULSE_DEFAULT_MAX_TEMP_C; @@ -603,6 +616,8 @@ int pulse_action::run(void) { string msg; rvs::action_result_t action_result; + rvs::lp::Log(std::string(kPulseBetaBanner), rvs::logresults); + if (!get_all_common_config_keys()) return -1; diff --git a/rvs/conf/pulse_single.conf b/rvs/conf/pulse_single.conf index 50e82f231..6f59d39b9 100644 --- a/rvs/conf/pulse_single.conf +++ b/rvs/conf/pulse_single.conf @@ -1,3 +1,9 @@ +# ===================================================================== +# PS: BETA VERSION - Not intended for production use. +# Pass/fail criteria are still being tuned and may change between +# releases. Use only for evaluation, bring-up, and lab testing. +# ===================================================================== +# # GPU Power Pulse Stress Test Configuration # # This test creates power fluctuations by alternating between From 8aa2e5df2cbea04b1bbc399e1352abd9115e1f30 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 24 Apr 2026 08:33:31 -0700 Subject: [PATCH 116/275] rvs version print should match package version Patch version was not taken into account for printed version. --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 303d34f87..104c55866 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,9 +261,12 @@ endif() ## Include common cmake modules include ( utils ) -## Update RVS version -set ( RVS_VERSION "${PROJECT_VERSION}" ) -get_version ( ${RVS_VERSION} ) +# get_version() in cmake_modules/utils.cmake: +# - Takes ONE string argument: a baseline semver (here: project(VERSION), e.g. "1.4.0"). +# - Runs parse_version() and sets VERSION_MAJOR/MINOR/PATCH (and related) for legacy uses +# (doxygen RVSVER, etc.). It does NOT set RVS_VERSION and does not know about git tag distance. +# - May override VERSION_PATCH from env ROCM_LIBPATCH_VERSION (ROCm xxyy encoding) — unrelated to RVS display semver. +get_version(${PROJECT_VERSION}) # Package Generator ####################################################### set(PKG_MAINTAINER_NM "ROCM Validation Suite Support") @@ -272,6 +275,8 @@ set(CPACK_PACKAGE_NAME "rocm-validation-suite" CACHE STRING "Package name for CP set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${CPACK_PACKAGE_NAME}" CACHE PATH "Documentation install directory" FORCE) set(CPACK_PACKAGE_DESCRIPTION "ROCm Validation Suite") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tool for validating AMD GPU functionality, performance, reliability in ROCm.") + +# CPack + "rvs -v" string: major/minor from project(), patch from git describe (RVS_PATCH_FROM_TAG) when > 0. set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") if(RVS_PATCH_FROM_TAG GREATER "0") @@ -279,6 +284,9 @@ if(RVS_PATCH_FROM_TAG GREATER "0") else() set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") endif() +set(RVS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +message(STATUS "RVS_VERSION (rvs -v / CPack, not get_version input): ${RVS_VERSION}") + set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices Inc.") set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") From 5394b52a025a3919b5596ccdd85394650adabc4a Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 24 Apr 2026 12:45:58 -0700 Subject: [PATCH 117/275] fetch path and version relative to install RVS prints ROCm varsion it links/loads.Undate the version fetch using API provided by ROCm.If that option is turned OFF fallback to ROCM_PATH environment variable. For all the module/config reading inside RVS, use self discovery of RVS location(linux only) and use path relative to executable This is to ensure relocation of RVS possible. For both ROCm path & RVS path last choice will be to use compile time backed in path. --- CMakeLists.txt | 24 ++++--- include/rvs_util.h | 18 +++++ rvs/src/rvsexec.cpp | 41 ++---------- rvs/src/rvsexec_do_yaml.cpp | 35 +++++++++- rvs/src/rvsmodule.cpp | 30 +-------- rvslib/CMakeLists.txt | 6 +- src/rvs_util.cpp | 130 ++++++++++++++++++++++++++++++++++++ 7 files changed, 208 insertions(+), 76 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 104c55866..5ca6fe381 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,12 @@ if ( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) message(FATAL "In-source build is not allowed") endif () enable_testing() -# In future use the api provided by rocm-core library to get ROCm Install path -# For backward compatibility use ROCM_PATH provided by build arguments. -# Using the api option is turned OFF by default +# When ON, link rocm-core: getROCmInstallPath for the ROCm install path, and +# getROCmVersion (rocm_version.h) for the YAML system-overview ROCm string — no +# .info file read for that path. When OFF, use ROCM_PATH and the version file +# under that prefix only. option(FETCH_ROCMPATH_FROM_ROCMCORE - "Use the api provided by rocm-core library to get ROCM_PATH" OFF) + "Use rocm-core C API for ROCm path and YAML system-overview ROCm version" OFF) # Prerequisite - Check if rocblas was already installed find_package (rocblas) @@ -196,20 +197,21 @@ set(CMAKE_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "CM set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "Prefix used in built packages") list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") +# Compile-time default used by rvs_get_rocm_install_path_string() after +# getROCmInstallPath (if FETCH_*) and $ROCM_PATH env are considered. add_definitions(-DROCM_PATH="${ROCM_PATH}") if(FETCH_ROCMPATH_FROM_ROCMCORE) add_compile_options(-DFETCH_ROCMPATH_FROM_ROCMCORE=${FETCH_ROCMPATH_FROM_ROCMCORE}) - # rocm-core library will provide the ROCM_PATH during runtime - # Link the library as required set(ROCM_CORE "rocm-core") - # The absolute library path will be ${ROCM_PATH}/${RVS_LIB_PATH} - # Usage is ROCM_PATH will be fetched from rocm-core and append ${RVS_LIB_PATH} - add_definitions(-DRVS_LIB_PATH="${CMAKE_INSTALL_LIBDIR}/rvs") else() - add_definitions(-DRVS_LIB_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs") - # Set ROCM_CORE to empty, so no linking to rocm-core library/package set(ROCM_CORE "") endif() +# RVS module .so and shared data (conf) live under the RVS install prefix, not under ROCm. +add_definitions(-DRVS_LIB_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs") +add_definitions(-DRVS_DATA_ROOT="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") +# Suffixes relative to that prefix for runtime resolution from the rvs binary path. +add_definitions(-DRVS_RELPATH_DATA_DIR="${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") +add_definitions(-DRVS_RELPATH_MODULE_LIB_DIR="${CMAKE_INSTALL_LIBDIR}/rvs") # # If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their # definition and dump it in the cache along with proper documentation, diff --git a/include/rvs_util.h b/include/rvs_util.h index 56b1c88c3..dbe833371 100644 --- a/include/rvs_util.h +++ b/include/rvs_util.h @@ -59,6 +59,24 @@ extern bool is_positive_integer(const std::string& str_val); extern std::vector str_split(const std::string& str_val, const std::string& delimiter); +/** + * ROCm install **root** for runtime: if built with FETCH_ROCMPATH_FROM_ROCMCORE, + * tries getROCmInstallPath (rocm-core) first, then the ROCM_PATH environment + * variable, then the build-time ROCM_PATH string. Otherwise: getenv(ROCM_PATH) + * first, then the build-time macro. Use this to resolve relocatable or + * non-default ROCm locations instead of relying on the prebuilt #define alone. + */ +std::string rvs_get_rocm_install_path_string(void); + +/** + * RVS data root .../share/.../rocm-validation-suite: RVS_PREFIX env, else path + * derived from the running rvs process (*/bin/rvs -> install prefix) on Linux, + * else the build-time RVS_DATA_ROOT macro. + */ +std::string rvs_get_rvs_data_root_string(void); +/** RVS module lib directory .../lib/rvs — same resolution order. */ +std::string rvs_get_rvs_modules_lib_dir_string(void); + /** * Convert array of strings into array of signed integers of type T * @param sArr input string diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index 70159089a..eb4b58ccd 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -38,9 +38,7 @@ #include "include/rvsliblogger.h" #include "include/rvsoptions.h" #include "include/rvstrace.h" -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE -#include "rocm-core/rocm_getpath.h" -#endif +#include "include/rvs_util.h" #define MODULE_NAME_CAPS "CLI" @@ -397,24 +395,6 @@ int rvs::exec::run(std::map& opt) { string module; string config; yaml_data_type_t data_type; -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE - char *installPath = nullptr; - unsigned int installPathLen = 0; - string rocmPath; - PathErrors_t retVal = PathSuccess; - // Get ROCM install path - retVal = getROCmInstallPath( &installPath, &installPathLen ); - if(retVal == PathSuccess){ - rocmPath = installPath; - } - else { - std::cout << "Failed to get ROCm Install Path: " << retVal <<"\nSet ROCM_PATH in env" << std::endl; - } - // free allocated memory - if(installPath != nullptr) { - free(installPath); - } -#endif options::has_option("pwd", &path); logger::log_level(rvs::logerror); @@ -466,13 +446,9 @@ int rvs::exec::run(std::map& opt) { config = "conf/" + module_config_file[module_index]; std::ifstream file(path + config); if (!file.good()) { - // configuration file exist in ROCM path ? -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE - path = rocmPath; -#else - path = ROCM_PATH; -#endif - config = "/share/rocm-validation-suite/conf/" + module_config_file[module_index]; + // RVS data dir: from rvs binary, $RVS_PREFIX, or build-time RVS_DATA_ROOT + path = rvs_get_rvs_data_root_string(); + config = "/conf/" + module_config_file[module_index]; } file.close(); } @@ -508,13 +484,8 @@ int rvs::exec::run(std::map& opt) { val = path + ".rvsmodules.config"; std::ifstream conf_file(val); if (!conf_file.good()) { - // Modules config. file exist in ROCM path ? -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE - path = rocmPath; -#else - path = ROCM_PATH; -#endif - val = path + "/share/rocm-validation-suite/conf/.rvsmodules.config"; + path = rvs_get_rvs_data_root_string(); + val = path + "/conf/.rvsmodules.config"; } } conf_file.close(); diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index 08cd3cb10..aaef9614d 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -45,8 +45,29 @@ #include "include/rvs_util.h" #include "include/gpu_util.h" +#ifdef FETCH_ROCMPATH_FROM_ROCMCORE +#include "rocm-core/rocm_version.h" +#endif + #define MODULE_NAME_CAPS "CLI" +#ifdef FETCH_ROCMPATH_FROM_ROCMCORE +/** + * C API getROCmVersion (rocm_version.h) must be called from a function declared + * before the C++ getROCmVersion in this file so the name does not self-resolve. + */ +static bool rvsGetROCmVersionStringFromRcmcore(std::string* out) { + unsigned int mj = 0, mn = 0, p = 0; + if (getROCmVersion(&mj, &mn, &p) != VerSuccess) { + return false; + } + std::ostringstream oss; + oss << mj << "." << mn << "." << p; + *out = oss.str(); + return true; +} +#endif + /*** Example rvs.conf file structure actions: @@ -248,14 +269,24 @@ void rvs::exec::in_progress_thread(exec_action action_info) { std::string getROCmVersion(void) { std::string line = "N/A"; - std::ifstream inputFile("/opt/rocm/.info/version-rocm"); +#ifdef FETCH_ROCMPATH_FROM_ROCMCORE + if (rvsGetROCmVersionStringFromRcmcore(&line)) { + return line; + } + return "N/A"; +#else + const std::string vfile = rvs_get_rocm_install_path_string() + "/.info/version-rocm"; + std::ifstream inputFile(vfile); if (!inputFile) { return line; } std::getline(inputFile, line); inputFile.close(); - + if (line.empty()) { + line = "N/A"; + } return line; +#endif } /** diff --git a/rvs/src/rvsmodule.cpp b/rvs/src/rvsmodule.cpp index 3d4bf1644..40caf4dcf 100644 --- a/rvs/src/rvsmodule.cpp +++ b/rvs/src/rvsmodule.cpp @@ -40,9 +40,7 @@ #include "include/rvsaction.h" #include "include/rvsliblog.h" #include "include/rvsoptions.h" -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE -#include "rocm-core/rocm_getpath.h" -#endif +#include "include/rvs_util.h" #define MODULE_NAME_CAPS "CLI" @@ -180,30 +178,8 @@ rvs::module* rvs::module::find_create_module(const char* name) { psolib = dlopen(sofullname.c_str(), RTLD_NOW); // error? if (!psolib) { - //Search libraries in RVS install path -#ifdef FETCH_ROCMPATH_FROM_ROCMCORE - char *installPath = nullptr; - unsigned int installPathLen = 0; - string rocmPath; - PathErrors_t retVal = PathSuccess; - // Get the ROCm install path - retVal = getROCmInstallPath( &installPath, &installPathLen ); - if(retVal == PathSuccess){ - rocmPath = installPath; - } - else { - std::cout << "Failed to get ROCm Install Path: " << retVal <<"\nSet ROCM_PATH in env" << std::endl; - } - // free allocated memory - if(installPath != nullptr) { - free(installPath); - } - libpath = rocmPath; - libpath += "/"; - libpath += RVS_LIB_PATH; -#else - libpath = RVS_LIB_PATH; -#endif + // RVS module lib dir: from rvs binary, $RVS_PREFIX, or build-time RVS_LIB_PATH + libpath = rvs_get_rvs_modules_lib_dir_string(); libpath += "/"; string sofullname(libpath + it->second); psolib = dlopen(sofullname.c_str(), RTLD_NOW); diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt index ca4ffac6b..8b7349eb2 100644 --- a/rvslib/CMakeLists.txt +++ b/rvslib/CMakeLists.txt @@ -174,7 +174,11 @@ set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) target_compile_options(${RVS_TARGET} PRIVATE -fopenmp) -target_link_libraries(${RVS_TARGET} ${AMD_SMI_LIB} -fopenmp) +if(FETCH_ROCMPATH_FROM_ROCMCORE) + target_link_libraries(${RVS_TARGET} ${AMD_SMI_LIB} ${ROCM_CORE} -fopenmp) +else() + target_link_libraries(${RVS_TARGET} ${AMD_SMI_LIB} -fopenmp) +endif() ## Install shared library librvslib.so add_custom_command(TARGET ${RVS_TARGET} POST_BUILD COMMAND ln -fs ./lib${RVS}.so.${LIB_VERSION_STRING} lib${RVS}.so.${VERSION_MAJOR} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} diff --git a/src/rvs_util.cpp b/src/rvs_util.cpp index 6c4a6961d..e1da9b096 100644 --- a/src/rvs_util.cpp +++ b/src/rvs_util.cpp @@ -25,9 +25,17 @@ #include "include/rvs_util.h" #include #include +#include +#include #include +#if defined(__linux__) +#include +#endif #include #include +#ifdef FETCH_ROCMPATH_FROM_ROCMCORE +#include "rocm-core/rocm_getpath.h" +#endif #include "hip/hip_runtime.h" #include "hip/hip_runtime_api.h" #include "amd_smi/amdsmi.h" @@ -337,3 +345,125 @@ std::string get_gpu_name (void) { return rvs::gpulist::gpu_get_platform_name () ; } +std::string rvs_get_rocm_install_path_string(void) { +#ifdef FETCH_ROCMPATH_FROM_ROCMCORE + char* installPath = nullptr; + unsigned int installPathLen = 0; + PathErrors_t perr = getROCmInstallPath(&installPath, &installPathLen); + if (perr == PathSuccess && installPath != nullptr) { + std::string s(installPath); + free(installPath); + if (!s.empty()) { + return s; + } + } else if (installPath != nullptr) { + free(installPath); + } +#endif + if (const char* env = std::getenv("ROCM_PATH")) { + if (env[0] != '\0') { + return std::string(env); + } + } + return std::string(ROCM_PATH); +} + +namespace { + +std::string rvs_strip_trailing_slashes(std::string s) { + while (s.size() > 1 && s.back() == '/') { + s.pop_back(); + } + return s; +} + +std::string rvs_path_dirname(const std::string& path) { + if (path.empty()) { + return path; + } + size_t end = path.size(); + while (end > 1 && path[end - 1] == '/') { + --end; + } + const size_t pos = path.rfind('/', end - 1); + if (pos == std::string::npos) { + return "."; + } + if (pos == 0) { + return std::string("/"); + } + return path.substr(0, pos); +} + +std::string rvs_path_basename(const std::string& path) { + if (path.empty()) { + return path; + } + size_t end = path.size(); + while (end > 0 && path[end - 1] == '/') { + --end; + } + if (end == 0) { + return std::string(); + } + const size_t start = path.rfind('/', end - 1); + if (start == std::string::npos) { + return path.substr(0, end); + } + return path.substr(start + 1, end - start - 1); +} + +#if defined(__linux__) +std::string rvs_linux_resolved_exe_path() { + char linkbuf[4096] = {0}; + const ssize_t n = readlink("/proc/self/exe", linkbuf, sizeof(linkbuf) - 1); + if (n <= 0) { + return std::string(); + } + linkbuf[n] = '\0'; + char resolved[4096] = {0}; + if (realpath(linkbuf, resolved) != nullptr) { + return std::string(resolved); + } + return std::string(linkbuf); +} +#endif + +std::string rvs_rvs_prefix_from_rvs_process() { + if (const char* pfx = std::getenv("RVS_PREFIX")) { + if (pfx[0] != '\0') { + return rvs_strip_trailing_slashes(std::string(pfx)); + } + } +#if defined(__linux__) + const std::string exe = rvs_linux_resolved_exe_path(); + if (exe.empty() || rvs_path_basename(exe) != "rvs") { + return std::string(); + } + const std::string bindir = rvs_path_dirname(exe); + const std::string binname = rvs_path_basename(bindir); + if (binname == "bin" || binname == "sbin") { + return rvs_path_dirname(bindir); + } +#endif + return std::string(); +} + +} // namespace + +std::string rvs_get_rvs_data_root_string(void) { + const std::string pfx = rvs_rvs_prefix_from_rvs_process(); + if (!pfx.empty()) { + return pfx + std::string("/") + RVS_RELPATH_DATA_DIR; + } + return std::string(RVS_DATA_ROOT); +} + +std::string rvs_get_rvs_modules_lib_dir_string(void) { + const std::string pfx = rvs_rvs_prefix_from_rvs_process(); + if (!pfx.empty()) { + return pfx + std::string("/") + RVS_RELPATH_MODULE_LIB_DIR; + } + return std::string(RVS_LIB_PATH); +} + From cf47b04632380ca4c475f5eaf7bf283500b846a2 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 24 Apr 2026 13:31:48 -0700 Subject: [PATCH 118/275] fix typo on comment that trucated comments section */bin/rvs sequence was breaking the comment section. --- include/rvs_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rvs_util.h b/include/rvs_util.h index dbe833371..bfddf1bb1 100644 --- a/include/rvs_util.h +++ b/include/rvs_util.h @@ -70,8 +70,8 @@ std::string rvs_get_rocm_install_path_string(void); /** * RVS data root .../share/.../rocm-validation-suite: RVS_PREFIX env, else path - * derived from the running rvs process (*/bin/rvs -> install prefix) on Linux, - * else the build-time RVS_DATA_ROOT macro. + * derived from the running rvs process (e.g. prefix/bin/rvs) on Linux, + * else the build-time RVS_DATA_ROOT macro. Install prefix is the parent of bin/. */ std::string rvs_get_rvs_data_root_string(void); /** RVS module lib directory .../lib/rvs — same resolution order. */ From 5d8ab821ec9b3b02e4c0b5897ff9ae5bc7c92b40 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 27 Apr 2026 02:49:42 -0700 Subject: [PATCH 119/275] Containerise Ubuntu build job (ubuntu:22.04 docker) Run the Ubuntu workflow inside an `ubuntu:22.04` container so the build is reproducible regardless of host (GitHub-hosted ubuntu-22.04, self-hosted 20.04, etc.). Internal hosts pinned to the same image stay byte-identical. .github/workflows/build-relocatable-packages.yml: * Add `container: image: ubuntu:${{ matrix.ubuntu_version }}` and a job-level `env: DEBIAN_FRONTEND=noninteractive, TZ=Etc/UTC` so apt never prompts. * Replace the bare-metal "Clean workspace" step with a "Bootstrap container" step that installs git/curl/dpkg-dev/apt-utils/python3/python3-pip - the bare ubuntu:22.04 image has none of them. * Drop `sudo -E` from the build invocation, `sudo` from `apt-get install awscli`, and the `apt-get install dpkg-dev apt-utils` from the metadata step - container runs as root and the tools are bootstrapped. * Remove the now-unneeded "Fix file ownership" step. * Append `|| true` to every `aws s3 ls --human-readable` listing so an empty prefix or transient S3 hiccup never fails an otherwise-green job. build_packages_local.sh (additive, no master features touched): * `ensure_recent_cmake_ubuntu()`: ROCm hipblaslt-config.cmake calls block(), added in CMake 3.25; Ubuntu 22.04 ships 3.22. Try Kitware APT repo first, fall back to pip; gated by `RVS_SKIP_KITWARE_REPO` for air-gapped runners. * Mark `$GITHUB_WORKSPACE` as `safe.directory` - container UID differs from the checkout owner so git rev-parse otherwise yields "0000000". * In the Ubuntu/Debian branch, point `CMAKE_CXX_COMPILER` at hipcc and set `GCC_TOOLCHAIN=/usr` when /usr/include/c++/*/barrier exists, mirroring the `--gcc-toolchain` plumbing already used for RHEL/AlmaLinux. Without this hipcc (clang) cannot find C++20 against the system libstdc++. Made-with: Cursor --- .../workflows/build-relocatable-packages.yml | 56 ++++++---- build_packages_local.sh | 104 +++++++++++++++++- 2 files changed, 136 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index f134550f9..479879289 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -48,18 +48,36 @@ jobs: build-ubuntu: name: Build Ubuntu Packages runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} + container: + image: ubuntu:${{ matrix.ubuntu_version }} strategy: matrix: ubuntu_version: ['22.04'] + # Apply to every step in the job so apt never drops into an interactive + # frontend (tzdata, libssl, etc.) — each Actions step runs in a fresh + # shell, so an `export` inside one step does not propagate to the next. + env: + DEBIAN_FRONTEND: noninteractive + TZ: Etc/UTC outputs: s3_bucket_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.bucket }} s3_paths_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.paths }} steps: - - name: Clean workspace + # Bootstrap the bare ubuntu:* image so actions/checkout and downstream steps + # (dpkg-deb verify, apt-ftparchive, awscli) work without needing sudo on bare metal. + - name: Bootstrap container (git, curl, packaging tools) run: | - sudo rm -rf "${{ github.workspace }}/build" || true - sudo chown -R $(id -u):$(id -g) "${{ github.workspace }}" || true + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + git \ + dpkg-dev \ + apt-utils \ + python3 \ + python3-pip - name: Checkout Repository uses: actions/checkout@v4 @@ -82,19 +100,13 @@ jobs: - name: Build and Package RVS run: | chmod +x build_packages_local.sh - # Run build script with sudo (Ubuntu runner needs sudo for apt-get) - sudo -E ROCM_VERSION=${{ env.ROCM_VERSION }} \ + ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ ./build_packages_local.sh - - name: Fix file ownership - if: always() - run: | - sudo chown -R $(id -u):$(id -g) "${{ github.workspace }}" || true - - name: Verify DEB Package run: | cd ./build @@ -112,7 +124,7 @@ jobs: # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) - name: Install AWS CLI if: github.repository == 'ROCm/ROCmValidationSuite' - run: sudo apt-get update && sudo apt-get install -y awscli + run: apt-get update && apt-get install -y awscli - name: Configure AWS credentials if: github.repository == 'ROCm/ROCmValidationSuite' @@ -148,14 +160,14 @@ jobs: echo "Release branch build: uploading to release/rvs/deb" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/deb/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable + aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|release/${BASE}/deb" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then echo "Nightly/push build: uploading to nightly/rvs/deb" aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT else @@ -163,7 +175,7 @@ jobs: echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|${PREFIX}" >> $GITHUB_OUTPUT fi @@ -178,7 +190,7 @@ jobs: BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 - sudo apt-get update && sudo apt-get install -y dpkg-dev apt-utils + # dpkg-dev and apt-utils were installed in the Bootstrap container step. BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then @@ -204,7 +216,7 @@ jobs: aws s3 sync "$STAGING/" "s3://${BUCKET}/${DEB_PREFIX}/" --no-progress echo "=== DEB repo metadata uploaded to s3://${BUCKET}/${DEB_PREFIX}/ ===" - aws s3 ls "s3://${BUCKET}/${DEB_PREFIX}/" --human-readable + aws s3 ls "s3://${BUCKET}/${DEB_PREFIX}/" --human-readable || true build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) @@ -310,9 +322,9 @@ jobs: aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/rpm/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/rpm/" --human-readable + aws s3 ls "s3://${BUCKET}/release/${BASE}/rpm/" --human-readable || true echo "Listing s3://${BUCKET}/release/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable + aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then @@ -320,9 +332,9 @@ jobs: aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable || true echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT else @@ -330,7 +342,7 @@ jobs: echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable || true echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL packages|${PREFIX}" >> $GITHUB_OUTPUT fi @@ -367,7 +379,7 @@ jobs: aws s3 sync "$STAGING/" "s3://${BUCKET}/${RPM_PREFIX}/" --no-progress echo "=== RPM repodata uploaded to s3://${BUCKET}/${RPM_PREFIX}/repodata/ ===" - aws s3 ls "s3://${BUCKET}/${RPM_PREFIX}/repodata/" --human-readable + aws s3 ls "s3://${BUCKET}/${RPM_PREFIX}/repodata/" --human-readable || true create-release: name: Create Release Summary diff --git a/build_packages_local.sh b/build_packages_local.sh index 51a0ff31a..baa4d3820 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -95,6 +95,81 @@ fetch_latest_rocm_version() { return 0 } +# ROCm SDK CMake configs (e.g. hipblaslt-config.cmake) call block(), which was added +# in CMake 3.25. Ubuntu 22.04 ships cmake 3.22 — too old. +# Try Kitware's APT repo first (clean apt integration); fall back to pip for restricted +# networks. Set RVS_SKIP_KITWARE_REPO=1 to skip the Kitware step (e.g. air-gapped runners). +ensure_recent_cmake_ubuntu() { + [ -f /etc/os-release ] || return 0 + # shellcheck source=/dev/null + . /etc/os-release + case "${ID:-}" in + ubuntu|debian) ;; + *) return 0 ;; + esac + command -v apt-get >/dev/null 2>&1 || return 0 + + local need_major=3 need_minor=25 + local cur_major=0 cur_minor=0 v="" + if command -v cmake >/dev/null 2>&1; then + v="$(cmake --version 2>/dev/null | head -1 | awk '{print $3}')" + cur_major="${v%%.*}" + local _rest="${v#*.}" + cur_minor="${_rest%%.*}" + cur_major="${cur_major:-0}" + cur_minor="${cur_minor:-0}" + if { [ "$cur_major" -gt "$need_major" ] 2>/dev/null; } \ + || { [ "$cur_major" -eq "$need_major" ] 2>/dev/null && [ "$cur_minor" -ge "$need_minor" ] 2>/dev/null; }; then + print_success "cmake $v is recent enough (>= ${need_major}.${need_minor})" + return 0 + fi + print_info "cmake $v is older than ${need_major}.${need_minor}; upgrading (ROCm hipblaslt-config uses block())" + else + print_info "cmake not installed; installing recent version (>= ${need_major}.${need_minor})" + fi + + # Try Kitware APT repo first + if [ -n "${VERSION_CODENAME:-}" ] && [ "${RVS_SKIP_KITWARE_REPO:-}" != "1" ]; then + print_info "Trying Kitware APT repo for cmake (codename: ${VERSION_CODENAME})..." + apt-get install -y --no-install-recommends ca-certificates gnupg wget >/dev/null 2>&1 || true + if wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ + | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg 2>/dev/null \ + && [ -s /usr/share/keyrings/kitware-archive-keyring.gpg ]; then + echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${VERSION_CODENAME} main" \ + > /etc/apt/sources.list.d/kitware.list + if apt-get update >/dev/null 2>&1 && apt-get install -y --no-install-recommends cmake; then + hash -r + local v_new + v_new="$(cmake --version 2>/dev/null | head -1 | awk '{print $3}')" + print_success "Installed cmake $v_new from Kitware APT repo" + return 0 + fi + print_warning "Kitware APT install failed; falling back to pip" + else + print_warning "Could not reach apt.kitware.com; falling back to pip (set RVS_SKIP_KITWARE_REPO=1 to silence this)" + fi + fi + + # pip fallback: works regardless of distro repo state, needs PyPI access. + if ! command -v pip3 >/dev/null 2>&1; then + apt-get install -y --no-install-recommends python3-pip >/dev/null 2>&1 || true + fi + if command -v pip3 >/dev/null 2>&1; then + if pip3 install --break-system-packages --upgrade cmake 2>/dev/null \ + || pip3 install --upgrade cmake; then + hash -r + local v_new + v_new="$(cmake --version 2>/dev/null | head -1 | awk '{print $3}')" + print_success "Installed cmake $v_new via pip" + return 0 + fi + fi + + print_error "Could not install cmake >= ${need_major}.${need_minor}; ROCm hipblaslt configure will fail." + print_error "Either expose apt.kitware.com / PyPI to this runner, or pre-install cmake>=3.25 in the image." + return 1 +} + # Function to check and install dependencies check_and_install_dependencies() { print_info "Checking for required build dependencies..." @@ -292,6 +367,7 @@ check_and_install_dependencies() { # Check and install dependencies (installs wget, etc. - required before fetch_latest_rocm_version) check_and_install_dependencies +ensure_recent_cmake_ubuntu # Determine ROCm version: use environment variable or fetch latest (wget is now available) if [ -n "$ROCM_VERSION" ]; then @@ -429,6 +505,13 @@ export ROCM_LIBPATCH_VERSION export ROCM_MAJOR print_success "Set ROCM_LIBPATCH_VERSION=$ROCM_LIBPATCH_VERSION, ROCM_MAJOR=$ROCM_MAJOR (from $ROCM_VERSION_MAJOR_MINOR)" +# Git 2.35+ refuses commands in container workspaces owned by a different UID than the +# checkout (Actions mounts ${{ github.workspace }} into the container as root). Mark the +# workspace as safe so subsequent git rev-parse calls below don't return "0000000". +if [ -n "${GITHUB_WORKSPACE:-}" ] && command -v git >/dev/null 2>&1; then + git config --global --add safe.directory "$GITHUB_WORKSPACE" 2>/dev/null || true +fi + # Set CPACK package release based on event/branch type # - Base (schedule, push, workflow_dispatch, local): r.yyyymmdd # (ROCM_LIBPATCH_VERSION is major+minor as xxyy, e.g. 0711 for ROCm 7.11) @@ -496,9 +579,26 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" else - # Ubuntu and others: use defaults (system compiler and cmake) + # Ubuntu/Debian: modules (pebb/pbqt) compile with hipcc, which is Clang-based and does not + # bundle libstdc++ C++20 headers such as . Pass the system GCC tree to hipcc via + # CMAKE_CXX_FLAGS --gcc-toolchain (same mechanism as GCC_TOOLCHAIN on RHEL). export CMAKE_COMMAND="cmake" - print_info "Using cmake (Ubuntu/other)" + print_info "Using cmake (Ubuntu/Debian/other)" + + if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then + if [ -x "$ROCM_PATH/bin/hipcc" ]; then + export CMAKE_CXX_COMPILER="$ROCM_PATH/bin/hipcc" + print_success "Set CMAKE_CXX_COMPILER to hipcc (Ubuntu/Debian)" + else + print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using CMake default C++ compiler" + fi + if compgen -G "/usr/include/c++/*/barrier" >/dev/null 2>&1; then + export GCC_TOOLCHAIN="/usr" + print_success "Set GCC_TOOLCHAIN=/usr so hipcc finds system libstdc++ (C++20 )" + else + print_warning "No /usr/include/c++/.../barrier found; install g++ 11+ (e.g. apt install g++-11 build-essential)" + fi + fi fi print_info "Environment variables set:" From 63a9a6e807c373087791d49af5a057edae5cc160 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 27 Apr 2026 16:40:41 -0500 Subject: [PATCH 120/275] mxfp8 gemm support in gst. --- include/rvs_blas.h | 4 ++-- src/rvs_blas.cpp | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/rvs_blas.h b/include/rvs_blas.h index b2e83a2ce..25621d4af 100644 --- a/include/rvs_blas.h +++ b/include/rvs_blas.h @@ -339,8 +339,8 @@ class rvs_blas { (datatype == "fp6_e2m3_r") ? HIP_R_6F_E2M3 : (datatype == "i8_r") ? HIP_R_8I : (datatype == "fp8_r") ? HIP_R_8F_E4M3_FNUZ : // FP8-FNUZ - (datatype == "fp8_e4m3_r") ? HIP_R_8F_E4M3 : // FP8-OCP E4M3 - (datatype == "fp8_e5m2_r") ? HIP_R_8F_E5M2 : // FP8-OCP E5M2 + (datatype == "fp8_e4m3_r" || datatype == "mxfp8_e4m3_r") ? HIP_R_8F_E4M3 : // FP8-OCP E4M3 + (datatype == "fp8_e5m2_r" || datatype == "mxfp8_e5m2_r") ? HIP_R_8F_E5M2 : // FP8-OCP E5M2 (datatype == "bf16_r") ? HIP_R_16BF : (datatype == "fp16_r") ? HIP_R_16F : (datatype == "fp32_r") ? HIP_R_32F : diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 50ebc13d0..83f6a8b98 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -552,7 +552,9 @@ bool rvs_blas::copy_data_to_gpu(void) { return copy_data_to_gpu(); } - if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r") { + if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r" || + data_type == "mxfp8_e4m3_r" || data_type == "mxfp8_e5m2_r") { + if (blas_source == "hipblaslt") { return copy_data_to_gpu(); } @@ -656,7 +658,9 @@ bool rvs_blas::allocate_gpu_matrix_mem(void) { return allocate_gpu_matrix_mem(); } - if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r") { + if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r" || + data_type == "mxfp8_e4m3_r" || data_type == "mxfp8_e5m2_r") { + if (blas_source == "hipblaslt") { return allocate_gpu_matrix_mem(); } @@ -818,7 +822,8 @@ bool rvs_blas::allocate_host_matrix_mem(void) { hc = new rocblas_half[size_c]; } - if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r") { + if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r" || + data_type == "mxfp8_e4m3_r" || data_type == "mxfp8_e5m2_r") { if (blas_source == "hipblaslt") { ha = new uint8_t[size_a * block_count]; @@ -1386,7 +1391,8 @@ void rvs_blas::generate_random_matrix_data(void) { } } - if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r") { + if(data_type == "fp4_r" || data_type == "fp6_e3m2_r" || data_type == "fp6_e2m3_r" || + data_type == "mxfp8_e4m3_r" || data_type == "mxfp8_e5m2_r") { generateMXInput(hbl_datatype, ha, From 80aea6e8c2948c0639c20d7a35c4cc424b82fed3 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 28 Apr 2026 17:11:18 -0500 Subject: [PATCH 121/275] Iterations (hot calls) based GST execution. --- gst.so/src/gst_worker.cpp | 81 ++++++++++----------------------------- 1 file changed, 21 insertions(+), 60 deletions(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 1776bb806..5275c2b56 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -202,10 +202,10 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { // make sure that the ramp_interval & duration are not less than // NMAX_MS_GPU_RUN_PEAK_PERFORMANCE (e.g.: 1000) - if (run_duration_ms < NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + if (run_duration_ms > 0 && run_duration_ms < NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) run_duration_ms += NMAX_MS_GPU_RUN_PEAK_PERFORMANCE; - if (ramp_interval < NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + if (ramp_interval > 0 && ramp_interval < NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) ramp_interval += NMAX_MS_GPU_RUN_PEAK_PERFORMANCE; // stage 1. setup rvs blas @@ -498,7 +498,7 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { log_interval_milliseconds = time_diff(gst_end_time, gst_log_interval_time); - if (log_interval_milliseconds >= log_interval && num_gemm_ops > 0) { + if ((log_interval_milliseconds >= log_interval || 0 == run_duration_ms) && num_gemm_ops > 0) { seconds_elapsed = static_cast (log_interval_milliseconds) / 1000; @@ -559,7 +559,7 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { " run_duration_ms :" + std::to_string(run_duration_ms); rvs::lp::Log(msg, rvs::logtrace); - if (total_milliseconds >= run_duration_ms) + if (0 == run_duration_ms || total_milliseconds >= run_duration_ms) break; } @@ -621,71 +621,34 @@ void GSTWorker::run() { std::to_string(gpu_id) + " " + " GST ramp completed for interval :" + " " + std::to_string(ramp_interval); rvs::lp::Log(msg, rvs::loginfo); - if (run_duration_ms > 0) { - gst_test_passed = do_gst_stress_test(&error, &err_description); - // check if stop signal was received - if (rvs::lp::Stopping()) - return; - if (error) { - // GPU didn't complete the test (HIP/rocBlas error(s) occurred) - string msg = "[" + action_name + "] " + MODULE_NAME + " " + - std::to_string(gpu_id) + " " + err_description; - rvs::lp::Log(msg, rvs::logerror); - if (bjson) - log_to_json(desc, rvs::logerror,"err", err_description); + gst_test_passed = do_gst_stress_test(&error, &err_description); + // check if stop signal was received + if (rvs::lp::Stopping()) + return; - action_result.state = rvs::actionstate::ACTION_COMPLETED; - action_result.status = rvs::actionstatus::ACTION_FAILED; - action_result.output = msg.c_str(); - action.action_callback(&action_result); + if (error) { + // GPU didn't complete the test (HIP/rocBlas error(s) occurred) + string msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " " + err_description; + rvs::lp::Log(msg, rvs::logerror); + if (bjson) + log_to_json(desc, rvs::logerror,"err", err_description); - return; - } + action_result.state = rvs::actionstate::ACTION_COMPLETED; + action_result.status = rvs::actionstatus::ACTION_FAILED; + action_result.output = msg.c_str(); + action.action_callback(&action_result); + + return; } - log_interval_gflops(max_gflops); check_target_stress(max_gflops); } void GSTWorker::log_gst_test_result(bool gst_test_passed) { } -/** - * @brief logs the GST test result - * @param gst_test_passed true if test succeeded, false otherwise - -void GSTWorker::log_gst_test_result(bool gst_test_passed) { - string msg; - double flops_per_op = (2 * (static_cast(gpu_blas->get_m())/1000) * - (static_cast(gpu_blas->get_n())/1000) * - (static_cast(gpu_blas->get_k())/1000)); - msg = "[" + action_name + "] " + MODULE_NAME + " " + - std::to_string(gpu_id) + " " + GST_MAX_GFLOPS_OUTPUT_KEY + ": " + - std::to_string(max_gflops) + " " + GST_FLOPS_PER_OP_OUTPUT_KEY + ": " + - std::to_string(flops_per_op) + "x1e9" + " " + - GST_BYTES_COPIED_PER_OP_OUTPUT_KEY + ": " + - std::to_string(gpu_blas->get_bytes_copied_per_op()) + - " " + GST_TRY_OPS_PER_SEC_OUTPUT_KEY + ": "+ - std::to_string(target_stress / gpu_blas->gemm_gflop_count()) + - " " ; - rvs::lp::Log(msg, rvs::logresults); - - log_to_json(GST_MAX_GFLOPS_OUTPUT_KEY, std::to_string(max_gflops), - rvs::loginfo); - log_to_json(GST_FLOPS_PER_OP_OUTPUT_KEY, std::to_string(flops_per_op) + - "x1e9", rvs::loginfo); - log_to_json(GST_BYTES_COPIED_PER_OP_OUTPUT_KEY, - std::to_string(gpu_blas->get_bytes_copied_per_op()), - rvs::loginfo); - log_to_json(GST_TRY_OPS_PER_SEC_OUTPUT_KEY, - std::to_string(target_stress / gpu_blas->gemm_gflop_count()), - rvs::loginfo); - log_to_json(GST_PASS_KEY, (gst_test_passed ? - GST_RESULT_PASS_MESSAGE : GST_RESULT_FAIL_MESSAGE), - rvs::logresults); -} -*/ /** * @brief computes the difference (in milliseconds) between 2 points in time * @param t_end second point in time @@ -700,8 +663,6 @@ uint64_t GSTWorker::time_diff( return milliseconds.count(); } - - /** * @brief extends the usleep for more than 1000000us * @param microseconds us to sleep From ab8bfe367f709cd31f1663cc19cda9488274906f Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 27 Apr 2026 14:21:16 -0700 Subject: [PATCH 122/275] Update install instruction for tgz. Since TGZ based install cannot manage dependecies and setup env, user need to know what are the pre-install and post install checklist that need to be done to make rvs functional. --- .github/workflows/README_BUILD_PACKAGES.md | 63 ++++++++++++++++++++-- 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 85436fac1..9282692f2 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -346,16 +346,69 @@ sudo rpm -i --replacefiles --nodeps amdrocm7-rvs-*.rpm ### Any Linux Distribution (TGZ - Relocatable) +#### Pre-install: ROCm + +Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, and other ROCm libraries are discoverable. Follow the current Linux install guide in **rocm docs**: + +- **ROCm documentation (start here)**: +- **Linux install / deployment (paths, env, post-install)**: + +**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. + +#### Install RVS run-time dependencies (on the target system) + +The TGZ is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and an **OpenMP runtime**; exact package names differ by family: + +| Family | Typical packages | +|--------|------------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) — PCI access; for OpenMP use the distro’s `libgomp1` and/or an LLVM **libomp** runtime (e.g. `libomp5` / `libllvm-*` depending on the release; match your `apt` search for `libomp` / `libgomp`). | +| **RHEL / CentOS / Rocky / Alma (dnf/yum)** | `pciutils-libs` (provides `libpci`); for OpenMP: `libgomp` (GCC) and/or `libomp` if provided in the repo. | +| **SUSE / openSUSE (zypper)** | `libpci3` and `pciutils` as needed; OpenMP: `libgomp1` and/or a `libllvm-openmp*`-style package, depending on the release. | + +Examples (adjust package versions to your release): + ```bash -# Extract to the extras directory +# Ubuntu / Debian +sudo apt update +sudo apt install -y libpci3 libgomp1 + +# RHEL / Rocky / Alma 8+ (DNF) +sudo dnf install -y pciutils-libs libgomp +# if available in your repo: +# sudo dnf install -y libomp + +# openSUSE / SUSE (zypper) +sudo zypper install libpci3 libgomp1 +``` + +**Note:** RVS is often linked to **LLVM OpenMP** (`libomp`) from the ROCm toolchain. If the dynamic linker cannot find `libomp.so` after the steps below, that library may already be present under the **ROCm installation’s LLVM** tree (see post-install). Install host packages only where you still need a system copy. + +#### Extract the TGZ + +```bash +# Extract to the extras directory (example for ROCm major 7; match your path) sudo mkdir -p /opt/rocm/extras-7 sudo tar -xzf amdrocm7-rvs-*.tar.gz -C /opt/rocm/extras-7 +``` -# Setup environment -export PATH=/opt/rocm/extras-7/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$LD_LIBRARY_PATH +#### Post-install: `PATH` and `LD_LIBRARY_PATH` -# Run RVS +Point the shell at the extracted RVS prefix and the ROCm you installed (replace paths with your real `ROCM_PATH` and extras major version). Copy and paste the block as one unit: + +```bash +export ROCM_PATH=/opt/rocm # or your real ROCm root, per rocm docs +export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:\ +$ROCM_PATH/lib:\ +$ROCM_PATH/lib/llvm/lib:\ +$LD_LIBRARY_PATH +``` + +**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above: **`libomp.so` is often there** (ROCm’s LLVM), not only from the host distro. If your layout differs, run `find $ROCM_PATH -name 'libomp.so' 2>/dev/null` and point `LD_LIBRARY_PATH` at the directory you find. `rvs` also has rpath relative to its install; you may still need a host `libomp` or `libgomp` package. If you still get `libomp.so: cannot open shared object` from the dynamic linker, change the LLVM path for your ROCm version or add packages from the prerequisite section. + +**Run RVS** + +```bash rvs --help ``` From 76ce1123d50a16b633fefa3a3527fab0a223a28f Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 28 Apr 2026 14:18:57 -0700 Subject: [PATCH 123/275] update ROCm installation link --- .github/workflows/README_BUILD_PACKAGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 9282692f2..af4df28f6 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -351,7 +351,7 @@ sudo rpm -i --replacefiles --nodeps amdrocm7-rvs-*.rpm Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, and other ROCm libraries are discoverable. Follow the current Linux install guide in **rocm docs**: - **ROCm documentation (start here)**: -- **Linux install / deployment (paths, env, post-install)**: +- **Linux install / deployment (paths, env, post-install)**: **Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. From 1e5c7d57540ba820af6a7c81bb6e26eab4ec84f0 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 29 Apr 2026 08:58:08 -0700 Subject: [PATCH 124/275] update instruction for libomp install. --- .github/workflows/README_BUILD_PACKAGES.md | 32 ++++---- docs/INSTALL_TGZ.md | 90 ++++++++++++++++++++++ 2 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 docs/INSTALL_TGZ.md diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index af4df28f6..1c8955ee2 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -351,37 +351,35 @@ sudo rpm -i --replacefiles --nodeps amdrocm7-rvs-*.rpm Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, and other ROCm libraries are discoverable. Follow the current Linux install guide in **rocm docs**: - **ROCm documentation (start here)**: -- **Linux install / deployment (paths, env, post-install)**: +- **Linux install / deployment (paths, env, post-install)**: **Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. #### Install RVS run-time dependencies (on the target system) -The TGZ is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and an **OpenMP runtime**; exact package names differ by family: +The TGZ is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and **LLVM OpenMP** (**`libomp.so`**). -| Family | Typical packages | -|--------|------------------| -| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) — PCI access; for OpenMP use the distro’s `libgomp1` and/or an LLVM **libomp** runtime (e.g. `libomp5` / `libllvm-*` depending on the release; match your `apt` search for `libomp` / `libgomp`). | -| **RHEL / CentOS / Rocky / Alma (dnf/yum)** | `pciutils-libs` (provides `libpci`); for OpenMP: `libgomp` (GCC) and/or `libomp` if provided in the repo. | -| **SUSE / openSUSE (zypper)** | `libpci3` and `pciutils` as needed; OpenMP: `libgomp1` and/or a `libllvm-openmp*`-style package, depending on the release. | +| Family | PCI | LLVM OpenMP (`libomp.so`) | +|--------|-----|---------------------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0`) | **`libomp5`** on many releases (`apt search '^libomp'`). | +| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | **`libomp`** (LLVM OpenMP for Clang, **AppStream**). | +| **SUSE / openSUSE** | `libpci3`, `pciutils` as needed | **Versioned** packages, e.g. **`libomp18`**, **`libomp17`** — use **`zypper search -s libomp`** and install the **runtime** package for your release (names differ between Leap, SLE, and Tumbleweed). | -Examples (adjust package versions to your release): +Examples: ```bash # Ubuntu / Debian sudo apt update -sudo apt install -y libpci3 libgomp1 +sudo apt install -y libpci3 libomp5 -# RHEL / Rocky / Alma 8+ (DNF) -sudo dnf install -y pciutils-libs libgomp -# if available in your repo: -# sudo dnf install -y libomp +# RHEL / Rocky / Alma 8+ +sudo dnf install -y pciutils-libs libomp -# openSUSE / SUSE (zypper) -sudo zypper install libpci3 libgomp1 +# openSUSE (example package name for Tumbleweed; adjust after zypper search) +sudo zypper install libpci3 libomp18 ``` -**Note:** RVS is often linked to **LLVM OpenMP** (`libomp`) from the ROCm toolchain. If the dynamic linker cannot find `libomp.so` after the steps below, that library may already be present under the **ROCm installation’s LLVM** tree (see post-install). Install host packages only where you still need a system copy. +**Note:** Prefer **`libomp.so`** from **ROCm** when possible; host **`libomp`** packages are for when the linker still cannot find the library after setting `LD_LIBRARY_PATH`. #### Extract the TGZ @@ -404,7 +402,7 @@ $ROCM_PATH/lib/llvm/lib:\ $LD_LIBRARY_PATH ``` -**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above: **`libomp.so` is often there** (ROCm’s LLVM), not only from the host distro. If your layout differs, run `find $ROCM_PATH -name 'libomp.so' 2>/dev/null` and point `LD_LIBRARY_PATH` at the directory you find. `rvs` also has rpath relative to its install; you may still need a host `libomp` or `libgomp` package. If you still get `libomp.so: cannot open shared object` from the dynamic linker, change the LLVM path for your ROCm version or add packages from the prerequisite section. +**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above. If **`libomp.so`** is still missing, use `find $ROCM_PATH -name 'libomp.so'` or install host **`libomp`** packages from the table above. **Run RVS** diff --git a/docs/INSTALL_TGZ.md b/docs/INSTALL_TGZ.md new file mode 100644 index 000000000..d6c44181e --- /dev/null +++ b/docs/INSTALL_TGZ.md @@ -0,0 +1,90 @@ +# Installing RVS from the Linux TGZ (`.tar.gz`) archive + +This page describes how to **install and run** the ROCm Validation Suite (RVS) when you have the **relocatable tar.gz** produced by the project’s packaging (e.g. `amdrocm7-rvs-1.3.15-r0711.20260423-Linux.tar.gz`). + +- **Build pipeline, file naming, and S3 download paths** are documented in [README_BUILD_PACKAGES (GitHub workflow)](../.github/workflows/README_BUILD_PACKAGES.md#any-linux-distribution-tgz---relocatable). +- The **same install steps** are mirrored here so the main [README](../README.md) can link to a single, copy-paste-friendly user-facing guide. + +--- + +## Pre-install: ROCm + +Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, and other ROCm libraries are discoverable. Follow the current Linux install guide in **rocm docs**: + +- **ROCm documentation (start here)**: +- **Linux install / deployment (paths, env, post-install)**: + +**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. + +--- + +## Install RVS run-time dependencies (on the target system) + +The archive is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and **LLVM OpenMP** (**`libomp.so`**). + +| Family | PCI | LLVM OpenMP (`libomp.so`) | +|--------|-----|----------------------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0`) | **`libomp5`** on many releases (runtime SONAME may vary — use `apt search '^libomp'`). | +| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | **`libomp`** (LLVM OpenMP for Clang, **AppStream**). | +| **openSUSE / SUSE** | `libpci3`, `pciutils` as needed | **Versioned LLVM packages**, e.g. **`libomp18`**, **`libomp17`** on Tumbleweed — names track the LLVM stack. Use **`zypper search -s libomp`** and install the **runtime** package (not only `-devel`) that matches your distro. | + +Examples (adjust names to your release): + +```bash +# Ubuntu / Debian — LLVM OpenMP runtime +sudo apt update +sudo apt install -y libpci3 libomp5 + +# RHEL / Rocky / Alma 8+ — libomp is the standard LLVM OpenMP RPM (AppStream) +sudo dnf install -y pciutils-libs libomp + +# openSUSE Tumbleweed (example; Leap/SLE may use different version suffixes) +sudo zypper install libpci3 libomp18 +# zypper search -s libomp # list alternatives +``` + +**Note:** If **`libomp.so`** is still missing, it is **usually** provided with **ROCm** under **`$ROCM_PATH/lib/llvm/lib`** — the environment block below adds that path first. + +--- + +## Extract the TGZ + +```bash +# Example for ROCm major 7: match the extras path to your layout and the tarball name. +sudo mkdir -p /opt/rocm/extras-7 +sudo tar -xzf amdrocm7-rvs-*.tar.gz -C /opt/rocm/extras-7 +``` + +--- + +## Post-install: `PATH` and `LD_LIBRARY_PATH` + +Point the shell at the extracted RVS prefix and the ROCm you installed (replace paths with your real `ROCM_PATH` and extras major version). **Copy and paste the block as one unit:** + +```bash +export ROCM_PATH=/opt/rocm # or your real ROCm root, per rocm docs +export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:\ +$ROCM_PATH/lib:\ +$ROCM_PATH/lib/llvm/lib:\ +$LD_LIBRARY_PATH +``` + +**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above — **`libomp.so` is often there** (ROCm’s LLVM). If your layout differs, run `find $ROCM_PATH -name 'libomp.so' 2>/dev/null` and add that directory to `LD_LIBRARY_PATH`, or install the host **`libomp`** packages from the table above. + +--- + +## Run RVS + +```bash +rvs --help +``` + +(You can also add `/opt/rocm/extras-7/bin` to your user profile or system `PATH` so `rvs` is on the default path in new shells.) + +--- + +## See also + +- [CI / packaging: README_BUILD_PACKAGES.md](../.github/workflows/README_BUILD_PACKAGES.md) — building packages, S3, DEB/RPM, and the full **Installing generated packages** section +- [User guide: module configuration and examples](ug1main.md) From 42d63bbaf796168a3e904cb3d96defa0f033bde6 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 29 Apr 2026 12:28:31 -0700 Subject: [PATCH 125/275] cleanup and update RUNPATH RVS need libomp from llvm/lib provided in ROCm to work. Hence add RPATH/RUNPATH to ROCm_path/lib and ROCm_path/lib/llvm/lib. Anytime ROCm is installed in a non-standard location using TGZ user shall be instructed to set LD_LIBRARY_PATH with approriate path. --- .github/workflows/README_BUILD_PACKAGES.md | 53 ++++++++-------------- CMakeLists.txt | 29 ++++++++++-- build_packages_local.sh | 8 +--- 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 1c8955ee2..ed9886f75 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -62,7 +62,7 @@ GitHub Actions Workflow │ ├── export CPACK_RPM_PACKAGE_RELEASE (same as DEB) │ ├── export CMAKE_CXX_COMPILER=hipcc (AlmaLinux only) │ └── export CMAKE_COMMAND=cmake3 (AlmaLinux) or cmake (Ubuntu) - ├── 4. Configure CMake with Relocatable RPATH + ├── 4. Configure CMake (install RPATH defaults live in CMakeLists.txt) │ └── $CMAKE_COMMAND -B ./build \ │ -DCMAKE_BUILD_TYPE=Release \ │ -DROCM_PATH=$ROCM_PATH \ @@ -71,9 +71,6 @@ GitHub Actions Workflow │ -DROCM_MAJOR_VERSION=$ROCM_MAJOR \ │ -DCMAKE_INSTALL_PREFIX=/opt/rocm/extras-$ROCM_MAJOR \ │ -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/extras-$ROCM_MAJOR \ - │ -DCMAKE_SKIP_RPATH=FALSE \ - │ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ - │ -DCMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-$ROCM_MAJOR/lib" \ │ -DCMAKE_VERBOSE_MAKEFILE=1 \ │ -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ├── 5. Build RVS @@ -85,10 +82,10 @@ GitHub Actions Workflow ### Key Technical Details -**Relocatable RPATH**: The `$ORIGIN` relative RPATH ensures binaries can find their libraries regardless of installation location: +**Relocatable RPATH**: Defaults are set in **`CMakeLists.txt`** (`CMAKE_INSTALL_RPATH`, **`CMAKE_BUILD_RPATH`** (same list for the build tree), `CMAKE_SKIP_RPATH`, `CMAKE_INSTALL_RPATH_USE_LINK_PATH`). **`CMAKE_*_LINKER_FLAGS_INIT`** only adds **`--enable-new-dtags`** (RUNPATH behavior), not a second copy of **`$ORIGIN`**. On **GitHub Actions** (`GITHUB_ACTIONS=true`), **`CMAKE_SKIP_BUILD_RPATH`** is set so build-tree binaries do not pick up extra RPATH entries from the CI ROCm SDK path (e.g. **`.../rocm-sdk/install/lib/llvm/lib`**); **install/CPack** still use **`CMAKE_INSTALL_RPATH`**. The **`$ORIGIN`** relative entries resolve to the install prefix (`.../extras-/bin` → `.../extras-/lib`), so **`/opt/rocm/extras-/lib` is not duplicated** in the list. Absolute paths add **`/opt/rocm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`** — equivalent to: ```bash -CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-/lib" +CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/core-/lib:/opt/rocm/core-/lib/llvm/lib" ``` **Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. The **patch version** is auto-computed at CMake configure time: `git describe --tags --match "v..*"` counts commits since the last matching `v` tag. For example, if the tag is `v1.3.0` and there have been 15 commits since, the package version becomes `1.3.15`. If no matching tag exists or git is unavailable, the patch defaults to `0` from `CMakeLists.txt`. This works for both CI builds and direct local `cmake` invocations. @@ -103,7 +100,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras- **Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. -**Single Source of Truth**: All build logic resides in `build_packages_local.sh`, which can be used for both local builds and CI/CD. +**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. ### Workflow Steps @@ -353,33 +350,30 @@ Before you install the RVS TGZ, **ROCm must be installed, configured, and on you - **ROCm documentation (start here)**: - **Linux install / deployment (paths, env, post-install)**: -**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. +**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm libraries. Install a ROCm stack that includes **ROCm’s LLVM** (for example the **`rocm-llvm`** package from the ROCm repo). **DEB/RPM** packages from this project declare that dependency; TGZ users should mirror that on the host. The TGZ only ships RVS; it does not replace a full ROCm stack. #### Install RVS run-time dependencies (on the target system) -The TGZ is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and **LLVM OpenMP** (**`libomp.so`**). +The TGZ is built against ROCm; on the target host you still need **PCI** for GPU enumeration: -| Family | PCI | LLVM OpenMP (`libomp.so`) | -|--------|-----|---------------------------| -| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0`) | **`libomp5`** on many releases (`apt search '^libomp'`). | -| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | **`libomp`** (LLVM OpenMP for Clang, **AppStream**). | -| **SUSE / openSUSE** | `libpci3`, `pciutils` as needed | **Versioned** packages, e.g. **`libomp18`**, **`libomp17`** — use **`zypper search -s libomp`** and install the **runtime** package for your release (names differ between Leap, SLE, and Tumbleweed). | - -Examples: +| Family | Typical PCI package | +|--------|---------------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) | +| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | +| **SUSE / openSUSE** | `libpci3` / `pciutils` as appropriate for the release | ```bash # Ubuntu / Debian -sudo apt update -sudo apt install -y libpci3 libomp5 +sudo apt update && sudo apt install -y libpci3 # RHEL / Rocky / Alma 8+ -sudo dnf install -y pciutils-libs libomp +sudo dnf install -y pciutils-libs -# openSUSE (example package name for Tumbleweed; adjust after zypper search) -sudo zypper install libpci3 libomp18 +# openSUSE / SUSE (adjust package names per release) +sudo zypper install libpci3 ``` -**Note:** Prefer **`libomp.so`** from **ROCm** when possible; host **`libomp`** packages are for when the linker still cannot find the library after setting `LD_LIBRARY_PATH`. +User-facing install steps for TGZ (PATH / `LD_LIBRARY_PATH`, **`RPATH`** including **`/opt/rocm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`**) are in **[docs/INSTALL_TGZ.md](../../docs/INSTALL_TGZ.md)**. #### Extract the TGZ @@ -396,13 +390,10 @@ Point the shell at the extracted RVS prefix and the ROCm you installed (replace ```bash export ROCM_PATH=/opt/rocm # or your real ROCm root, per rocm docs export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:\ -$ROCM_PATH/lib:\ -$ROCM_PATH/lib/llvm/lib:\ -$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:$LD_LIBRARY_PATH ``` -**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above. If **`libomp.so`** is still missing, use `find $ROCM_PATH -name 'libomp.so'` or install host **`libomp`** packages from the table above. +**`rvs`** embeds **`RPATH`** for those paths, so it usually does not need **`LD_LIBRARY_PATH`** for them. The export still includes **`$ROCM_PATH/lib/llvm/lib`** for a typical ROCm tree, other tools, and troubleshooting; if LLVM is only under **`$ROCM_PATH/core-/lib/llvm/lib`**, add that path instead or as well. **Run RVS** @@ -521,7 +512,7 @@ Note: You may need to update the OS detection logic in `build_packages_local.sh` ### Customizing Build Parameters -Edit the CMake configuration section in `build_packages_local.sh`: +Edit the CMake arguments in `build_packages_local.sh`, or override **`CMAKE_INSTALL_RPATH`** / **`CMAKE_SKIP_RPATH`** from the command line when needed. Defaults match packaged builds: ```bash cmake -B "$BUILD_DIR" \ @@ -531,10 +522,6 @@ cmake -B "$BUILD_DIR" \ -DROCM_MAJOR_VERSION="$ROCM_MAJOR" \ -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" \ -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" \ - -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \ - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" \ - -DRPATH_MODE=OFF \ -DCMAKE_VERBOSE_MAKEFILE=1 \ -DFETCH_ROCMPATH_FROM_ROCMCORE=ON \ -DYOUR_CUSTOM_OPTION=ON # Add custom options here @@ -563,7 +550,7 @@ If binaries can't find libraries: # Check RPATH settings (replace 7 with your ROCm major version) readelf -d /opt/rocm/extras-7/bin/rvs | grep RPATH -# Should show: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/extras-7/lib +# Should include: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/core-7/lib:/opt/rocm/core-7/lib/llvm/lib ``` ### Missing Dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ca6fe381..692d7b2a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,9 @@ ################################################################################ cmake_minimum_required ( VERSION 3.5.0 ) -set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN:$ORIGIN/.." CACHE STRING "RUNPATH for libraries") -set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags,--rpath,$ORIGIN/../lib" CACHE STRING "RUNPATH for executables") +# Prefer RUNPATH (DT_RUNPATH); do not embed $ORIGIN here — CMAKE_BUILD_RPATH / CMAKE_INSTALL_RPATH below are the single source of truth. +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags" CACHE STRING "Shared linker flags") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-new-dtags" CACHE STRING "Executable linker flags") set( COMP_TYPE "applications" ) set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) @@ -197,6 +198,25 @@ set(CMAKE_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "CM set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm/extras-${ROCM_MAJOR_VERSION}" CACHE PATH "Prefix used in built packages") list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") +# RPATH (build tree + install): one list — avoids duplicating $ORIGIN paths that previously +# appeared in both CMAKE_*_LINKER_FLAGS_INIT and CMAKE_INSTALL_RPATH. +set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "Skip RPATH for build targets") +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "Append link paths to install RPATH") +set(CMAKE_INSTALL_RPATH + "\$ORIGIN;\$ORIGIN/../lib;\$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib/llvm/lib" + CACHE STRING "RPATH for installed RVS binaries and modules") +set(CMAKE_BUILD_RPATH "${CMAKE_INSTALL_RPATH}") + +# CI (GitHub Actions) uses a relocatable ROCm SDK under e.g. $HOME/rocm-sdk/install; the linker +# can still record those directories in build-tree binaries. Skip CMake's build RPATH there only — +# local builds keep CMAKE_BUILD_RPATH so uninstalled binaries/tests resolve libs. Install/CPack +# still apply CMAKE_INSTALL_RPATH (requires CMake 3.9+ for CMAKE_SKIP_BUILD_RPATH). +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9") + if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") + set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL "On GitHub Actions, skip build-tree RPATH (avoid embedding CI SDK paths)") + endif() +endif() + # Compile-time default used by rvs_get_rocm_install_path_string() after # getROCmInstallPath (if FETCH_*) and $ROCM_PATH env are considered. add_definitions(-DROCM_PATH="${ROCM_PATH}") @@ -294,8 +314,9 @@ set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") # Package dependencies: support both legacy (ROCm <=6.x) and new amdrocm-* naming (TheRock/ROCm 8.x per RFC0009) # DEB uses "old | new" OR syntax, RPM uses "(old or new)" boolean dependency syntax -set(ROCM_DEB_DEPS "hip-runtime-amd | amdrocm-runtimes, comgr | amdrocm-runtimes, hsa-rocr | amdrocm-runtimes, rocblas | amdrocm-blas, amd-smi-lib | amdrocm-amdsmi, hiprand | amdrocm-rand, hipblaslt | amdrocm-blas") -set(ROCM_RPM_DEPS "(hip-runtime-amd or amdrocm-runtimes), (comgr or amdrocm-runtimes), (hsa-rocr or amdrocm-runtimes), (rocblas or amdrocm-blas), (amd-smi-lib or amdrocm-amdsmi), (hiprand or amdrocm-rand), (hipblaslt or amdrocm-blas)") +# rocm-llvm: ROCm LLVM (includes libomp used by HIP/RVS); pull OpenMP runtime from the ROCm stack, not host libgomp. +set(ROCM_DEB_DEPS "hip-runtime-amd | amdrocm-runtimes, comgr | amdrocm-runtimes, hsa-rocr | amdrocm-runtimes, rocblas | amdrocm-blas, amd-smi-lib | amdrocm-amdsmi, hiprand | amdrocm-rand, hipblaslt | amdrocm-blas, rocm-llvm | amdrocm-llvm") +set(ROCM_RPM_DEPS "(hip-runtime-amd or amdrocm-runtimes), (comgr or amdrocm-runtimes), (hsa-rocr or amdrocm-runtimes), (rocblas or amdrocm-blas), (amd-smi-lib or amdrocm-amdsmi), (hiprand or amdrocm-rand), (hipblaslt or amdrocm-blas), (rocm-llvm or amdrocm-llvm)") if(FETCH_ROCMPATH_FROM_ROCMCORE) set(ROCM_DEB_DEPS "${ROCM_DEB_DEPS}, ${ROCM_CORE} | amdrocm-base") set(ROCM_RPM_DEPS "${ROCM_RPM_DEPS}, (${ROCM_CORE} or amdrocm-base)") diff --git a/build_packages_local.sh b/build_packages_local.sh index 51a0ff31a..e8da16b40 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -545,8 +545,8 @@ if [ -d "$BUILD_DIR" ]; then rm -rf "$BUILD_DIR" fi -# Build cmake command with optional CXX compiler -# TODO: May be cleanup RPATH later with lesser options. +# Build cmake command with optional CXX compiler. +# CMAKE_INSTALL_RPATH / CMAKE_SKIP_RPATH / CMAKE_INSTALL_RPATH_USE_LINK_PATH live in CMakeLists.txt. CMAKE_ARGS=( -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" @@ -556,10 +556,6 @@ CMAKE_ARGS=( -DCPACK_PACKAGE_NAME="amdrocm${ROCM_MAJOR}-rvs" -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" - -DCMAKE_SKIP_RPATH=FALSE - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" - -DRPATH_MODE=OFF -DCMAKE_VERBOSE_MAKEFILE=1 -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ) From 9f95f1404612ce06bc594d23e0a73a704905e339 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 29 Apr 2026 14:19:23 -0700 Subject: [PATCH 126/275] add libomp location to RPATH for older rocm Older ROCm install to /opt/rocm*. Adding llvm/lib from older ROCm will help RVS work with older versio of ROCm as well.Add cases to remove build path from RPATH. --- .github/workflows/README_BUILD_PACKAGES.md | 10 ++--- CMakeLists.txt | 23 ++++++++---- docs/INSTALL_TGZ.md | 43 +++++++++------------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index ed9886f75..c6d0b9a5b 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -82,10 +82,10 @@ GitHub Actions Workflow ### Key Technical Details -**Relocatable RPATH**: Defaults are set in **`CMakeLists.txt`** (`CMAKE_INSTALL_RPATH`, **`CMAKE_BUILD_RPATH`** (same list for the build tree), `CMAKE_SKIP_RPATH`, `CMAKE_INSTALL_RPATH_USE_LINK_PATH`). **`CMAKE_*_LINKER_FLAGS_INIT`** only adds **`--enable-new-dtags`** (RUNPATH behavior), not a second copy of **`$ORIGIN`**. On **GitHub Actions** (`GITHUB_ACTIONS=true`), **`CMAKE_SKIP_BUILD_RPATH`** is set so build-tree binaries do not pick up extra RPATH entries from the CI ROCm SDK path (e.g. **`.../rocm-sdk/install/lib/llvm/lib`**); **install/CPack** still use **`CMAKE_INSTALL_RPATH`**. The **`$ORIGIN`** relative entries resolve to the install prefix (`.../extras-/bin` → `.../extras-/lib`), so **`/opt/rocm/extras-/lib` is not duplicated** in the list. Absolute paths add **`/opt/rocm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`** — equivalent to: +**Relocatable RPATH**: Defaults are set in **`CMakeLists.txt`** (`CMAKE_INSTALL_RPATH`, **`CMAKE_BUILD_RPATH`** (same list for the build tree), `CMAKE_SKIP_RPATH`, `CMAKE_INSTALL_RPATH_USE_LINK_PATH`). **`CMAKE_*_LINKER_FLAGS_INIT`** only adds **`--enable-new-dtags`** (RUNPATH behavior), not a second copy of **`$ORIGIN`**. On **GitHub Actions** (`GITHUB_ACTIONS=true`), **`CMAKE_SKIP_BUILD_RPATH`** applies when using **CMake 3.9+**, and **`CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH`** (strip implicit SDK paths on install) when using **CMake 3.16+**. The **`$ORIGIN`** relative entries resolve to the install prefix (`.../extras-/bin` → `.../extras-/lib`), so **`/opt/rocm/extras-/lib` is not duplicated** in the list. Absolute paths add **`/opt/rocm/lib`**, **`/opt/rocm/lib/llvm/lib`** (older ROCm layouts), **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`** — equivalent to: ```bash -CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/core-/lib:/opt/rocm/core-/lib/llvm/lib" +CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/lib/llvm/lib:/opt/rocm/core-/lib:/opt/rocm/core-/lib/llvm/lib" ``` **Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. The **patch version** is auto-computed at CMake configure time: `git describe --tags --match "v..*"` counts commits since the last matching `v` tag. For example, if the tag is `v1.3.0` and there have been 15 commits since, the package version becomes `1.3.15`. If no matching tag exists or git is unavailable, the patch defaults to `0` from `CMakeLists.txt`. This works for both CI builds and direct local `cmake` invocations. @@ -373,7 +373,7 @@ sudo dnf install -y pciutils-libs sudo zypper install libpci3 ``` -User-facing install steps for TGZ (PATH / `LD_LIBRARY_PATH`, **`RPATH`** including **`/opt/rocm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`**) are in **[docs/INSTALL_TGZ.md](../../docs/INSTALL_TGZ.md)**. +User-facing install steps for TGZ (PATH / `LD_LIBRARY_PATH`, **`RPATH`** including **`/opt/rocm/lib`**, **`/opt/rocm/lib/llvm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`**) are in **[docs/INSTALL_TGZ.md](../../docs/INSTALL_TGZ.md)**. #### Extract the TGZ @@ -393,7 +393,7 @@ export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:$LD_LIBRARY_PATH ``` -**`rvs`** embeds **`RPATH`** for those paths, so it usually does not need **`LD_LIBRARY_PATH`** for them. The export still includes **`$ROCM_PATH/lib/llvm/lib`** for a typical ROCm tree, other tools, and troubleshooting; if LLVM is only under **`$ROCM_PATH/core-/lib/llvm/lib`**, add that path instead or as well. +**`rvs`** embeds **`RPATH`** for **`/opt/rocm/lib`**, **`/opt/rocm/lib/llvm/lib`**, **`core-`** paths, and the extras-relative **`$ORIGIN`** paths, so it usually does not need **`LD_LIBRARY_PATH`** for them. The export still includes **`$ROCM_PATH/lib/llvm/lib`** for a typical ROCm tree, other tools, and troubleshooting; if LLVM is only under **`$ROCM_PATH/core-/lib/llvm/lib`**, add that path instead or as well. **Run RVS** @@ -550,7 +550,7 @@ If binaries can't find libraries: # Check RPATH settings (replace 7 with your ROCm major version) readelf -d /opt/rocm/extras-7/bin/rvs | grep RPATH -# Should include: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/core-7/lib:/opt/rocm/core-7/lib/llvm/lib +# Should include: $ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/lib/llvm/lib:/opt/rocm/core-7/lib:/opt/rocm/core-7/lib/llvm/lib ``` ### Missing Dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index 692d7b2a5..e760a9da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,17 +203,24 @@ list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "Skip RPATH for build targets") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "Append link paths to install RPATH") set(CMAKE_INSTALL_RPATH - "\$ORIGIN;\$ORIGIN/../lib;\$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib/llvm/lib" + "\$ORIGIN;\$ORIGIN/../lib;\$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/lib/llvm/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib;/opt/rocm/core-${ROCM_MAJOR_VERSION}/lib/llvm/lib" CACHE STRING "RPATH for installed RVS binaries and modules") set(CMAKE_BUILD_RPATH "${CMAKE_INSTALL_RPATH}") -# CI (GitHub Actions) uses a relocatable ROCm SDK under e.g. $HOME/rocm-sdk/install; the linker -# can still record those directories in build-tree binaries. Skip CMake's build RPATH there only — -# local builds keep CMAKE_BUILD_RPATH so uninstalled binaries/tests resolve libs. Install/CPack -# still apply CMAKE_INSTALL_RPATH (requires CMake 3.9+ for CMAKE_SKIP_BUILD_RPATH). -if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9") - if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") - set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL "On GitHub Actions, skip build-tree RPATH (avoid embedding CI SDK paths)") +# CI (GitHub Actions): GITHUB_ACTIONS flags below need CMake 3.9+ / 3.16+ at configure time. +if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") + message(STATUS "RVS RPATH (GitHub Actions): CMake ${CMAKE_VERSION}") + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9") + set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL "On GitHub Actions, skip CMake build-tree RPATH") + message(STATUS "RVS RPATH (GitHub Actions): CMAKE_SKIP_BUILD_RPATH=${CMAKE_SKIP_BUILD_RPATH}") + else() + message(STATUS "RVS RPATH (GitHub Actions): CMAKE_SKIP_BUILD_RPATH not applied (need CMake 3.9+)") + endif() + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16") + set(CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH TRUE CACHE BOOL "On GitHub Actions, strip implicit link-dir RPATH on install") + message(STATUS "RVS RPATH (GitHub Actions): CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH=${CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH}") + else() + message(STATUS "RVS RPATH (GitHub Actions): CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH not applied (need CMake 3.16+)") endif() endif() diff --git a/docs/INSTALL_TGZ.md b/docs/INSTALL_TGZ.md index d6c44181e..df1d1f0a8 100644 --- a/docs/INSTALL_TGZ.md +++ b/docs/INSTALL_TGZ.md @@ -9,41 +9,37 @@ This page describes how to **install and run** the ROCm Validation Suite (RVS) w ## Pre-install: ROCm -Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, and other ROCm libraries are discoverable. Follow the current Linux install guide in **rocm docs**: +Before you install the RVS TGZ, **ROCm must be installed, configured, and on your `PATH` / `LD_LIBRARY_PATH` as in AMD’s documentation** so HIP, HSA, LLVM, and other ROCm libraries are discoverable. Install a stack that includes **ROCm’s LLVM** (for example the **`rocm-llvm`** package, or an equivalent meta-package from your ROCm repo). Follow **rocm docs**: - **ROCm documentation (start here)**: - **Linux install / deployment (paths, env, post-install)**: -**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm/LLVM libraries. The TGZ only ships RVS; it does not replace a full ROCm stack. +**Assumptions (TGZ use):** ROCm is set up on the machine, `ROCM_PATH` (or your install prefix) is correct, and the runtime can load ROCm libraries. The RVS build records **`RPATH`** entries with **`$ORIGIN`-relative** paths for the extras install, plus **`/opt/rocm/lib`**, **`/opt/rocm/lib/llvm/lib`** (older ROCm layouts), **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`** for the ROCm stack and LLVM (including OpenMP from ROCm’s LLVM). The TGZ only ships RVS; it does not replace a full ROCm stack. --- ## Install RVS run-time dependencies (on the target system) -The archive is built against ROCm, but the host still needs a few system libraries. Install at least **PCI (libpci)** and **LLVM OpenMP** (**`libomp.so`**). +Install **PCI** access for GPU enumeration where your distro does not already provide it: -| Family | PCI | LLVM OpenMP (`libomp.so`) | -|--------|-----|----------------------------| -| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0`) | **`libomp5`** on many releases (runtime SONAME may vary — use `apt search '^libomp'`). | -| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | **`libomp`** (LLVM OpenMP for Clang, **AppStream**). | -| **openSUSE / SUSE** | `libpci3`, `pciutils` as needed | **Versioned LLVM packages**, e.g. **`libomp18`**, **`libomp17`** on Tumbleweed — names track the LLVM stack. Use **`zypper search -s libomp`** and install the **runtime** package (not only `-devel`) that matches your distro. | - -Examples (adjust names to your release): +| Family | Typical package | +|--------|-----------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) | +| **RHEL / Rocky / Alma** | `pciutils-libs` | +| **SUSE / openSUSE** | `libpci3` / `pciutils` as appropriate for the release | ```bash -# Ubuntu / Debian — LLVM OpenMP runtime -sudo apt update -sudo apt install -y libpci3 libomp5 +# Ubuntu / Debian +sudo apt update && sudo apt install -y libpci3 -# RHEL / Rocky / Alma 8+ — libomp is the standard LLVM OpenMP RPM (AppStream) -sudo dnf install -y pciutils-libs libomp +# RHEL / Rocky / Alma 8+ +sudo dnf install -y pciutils-libs -# openSUSE Tumbleweed (example; Leap/SLE may use different version suffixes) -sudo zypper install libpci3 libomp18 -# zypper search -s libomp # list alternatives +# openSUSE / SUSE +sudo zypper install libpci3 ``` -**Note:** If **`libomp.so`** is still missing, it is **usually** provided with **ROCm** under **`$ROCM_PATH/lib/llvm/lib`** — the environment block below adds that path first. +The **DEB/RPM** packages from this project declare a dependency on **`rocm-llvm`** (ROCm LLVM, including the OpenMP runtime used at link time). Prefer installing RVS via those packages when possible so dependencies resolve automatically. --- @@ -59,18 +55,15 @@ sudo tar -xzf amdrocm7-rvs-*.tar.gz -C /opt/rocm/extras-7 ## Post-install: `PATH` and `LD_LIBRARY_PATH` -Point the shell at the extracted RVS prefix and the ROCm you installed (replace paths with your real `ROCM_PATH` and extras major version). **Copy and paste the block as one unit:** +Point the shell at the extracted RVS prefix and ROCm (adjust paths to match your install): ```bash export ROCM_PATH=/opt/rocm # or your real ROCm root, per rocm docs export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH -export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:\ -$ROCM_PATH/lib:\ -$ROCM_PATH/lib/llvm/lib:\ -$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:${LD_LIBRARY_PATH} ``` -**`libomp` (LLVM OpenMP):** `$ROCM_PATH/lib/llvm/lib` is already in the `export` block above — **`libomp.so` is often there** (ROCm’s LLVM). If your layout differs, run `find $ROCM_PATH -name 'libomp.so' 2>/dev/null` and add that directory to `LD_LIBRARY_PATH`, or install the host **`libomp`** packages from the table above. +**`rvs`** embeds **`RPATH`** for the ROCm stack and LLVM (see **Pre-install: ROCm**), including **`/opt/rocm/lib/llvm/lib`** where applicable, so it usually does not need **`LD_LIBRARY_PATH`** for them. The export still adds **`$ROCM_PATH/lib/llvm/lib`** so your environment matches a typical ROCm tree and works for other tools; if LLVM on your system is only under **`$ROCM_PATH/core-/lib/llvm/lib`**, include that path instead or as well. --- From d92a57f48354cda823686d355c8678fe017a502f Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 28 Apr 2026 13:09:57 -0700 Subject: [PATCH 127/275] update repo meta data and repo file instruction debian install fix for setting up repo structure. add meaningfull label for each folder in meta-data. update metadata to set the right file location without "./" --- .github/workflows/README_BUILD_PACKAGES.md | 9 ++++++--- .github/workflows/build-relocatable-packages.yml | 12 +++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index c6d0b9a5b..3f27d714c 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -197,18 +197,21 @@ s3:///nightly/rvs/ **Using the S3 repo with apt (Ubuntu/Debian):** ```bash -# Add the nightly repo (replace with the actual S3 bucket name) -echo "deb [trusted=yes] https://.s3.amazonaws.com/nightly/rvs/deb/ ./" \ +# Add the nightly repo (replace with the actual S3 bucket name). +# Use "/" as the suite field for this flat repo layout. +echo "deb [trusted=yes] https://.s3.amazonaws.com/nightly/rvs/deb /" \ | sudo tee /etc/apt/sources.list.d/rvs-nightly.list # Or the release repo -echo "deb [trusted=yes] https://.s3.amazonaws.com/release/rvs/deb/ ./" \ +echo "deb [trusted=yes] https://.s3.amazonaws.com/release/rvs/deb /" \ | sudo tee /etc/apt/sources.list.d/rvs-release.list sudo apt update sudo apt install amdrocm7-rvs # Replace 7 with your ROCm major version ``` +After `apt update`, **`apt list`** should show **`rvs-nightly`** or **`rvs-release`** (matching the bucket: `nightly/rvs/deb` vs `release/rvs/deb`) in the suite/codename column, because CI sets `Suite`, `Label`, and `Codename` in the flat `Release` file via `apt-ftparchive` options. If you still see **`unknown`**, run `apt update` again after a fresh metadata upload, or check that your `Release` on the server includes those fields. **`apt install amdrocm7-rvs`** still resolves versions from `Packages` either way. + **Using the S3 repo with yum/dnf (CentOS/RHEL/Rocky):** ```bash diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index f134550f9..3f0e30e33 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -183,8 +183,10 @@ jobs: BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then DEB_PREFIX="release/${BASE}/deb" + APT_SUITE="rvs-release" else DEB_PREFIX="nightly/${BASE}/deb" + APT_SUITE="rvs-nightly" fi STAGING=$(mktemp -d) @@ -198,8 +200,16 @@ jobs: cd "$STAGING" dpkg-scanpackages --multiversion . /dev/null > Packages + # dpkg-scanpackages emits "Filename: ./foo.deb". APT resolves that under the repo URL and may + # request .../deb/./foo.deb — S3/CloudFront keys are literal, so that path 404s. Strip "./". + sed -i 's#^Filename: \./#Filename: #g' Packages gzip -k -f Packages - apt-ftparchive release . > Release + apt-ftparchive \ + -o APT::FTPArchive::Release::Origin="ROCm Validation Suite" \ + -o APT::FTPArchive::Release::Label="${APT_SUITE}" \ + -o APT::FTPArchive::Release::Suite="${APT_SUITE}" \ + -o APT::FTPArchive::Release::Codename="${APT_SUITE}" \ + release . > Release aws s3 sync "$STAGING/" "s3://${BUCKET}/${DEB_PREFIX}/" --no-progress From fc84d27e297f1a61738ae0fe48f81c06b9552973 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 30 Apr 2026 11:03:49 -0700 Subject: [PATCH 128/275] static link yaml-cpp for ubuntu Ubuntu 22.04 install libyaml-cpp.a in /usr/lib/x86_64-linux-gnu/. Add this path so that both OS link libyaml-cpp as static. /usr/lib/x86_64-linux-gnu/libyaml-cpp.a --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e760a9da0..1f705e4d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -411,9 +411,14 @@ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) ################################################################################ # check yaml-cpp available at configure time # First try to find static yaml-cpp library -find_library(YAML_CPP_STATIC_LIB +find_library(YAML_CPP_STATIC_LIB NAMES libyaml-cpp.a yaml-cpp.a - PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib + PATHS + /usr/lib/x86_64-linux-gnu + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib NO_DEFAULT_PATH # avoid searches in cmake_install_prefix etc DOC "Path to yaml-cpp static library" ) From 030c24c8cdc22e8e68f31279c96fb8f5d2f5bdbf Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 30 Apr 2026 18:32:14 -0500 Subject: [PATCH 129/275] RVS version 1.5.0 --- CHANGELOG.md | 5 +++++ CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93768a54a..4ac49b77c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.5.0 + +### Added + + ## RVS 1.4.0 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f705e4d7..10b538e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ set( COMP_TYPE "applications" ) set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) project ("rocm-validation-suite" - VERSION 1.4.0) + VERSION 1.5.0) # Default libdir to "lib", this skips GNUInstallDirs from trying to take a guess if it's unset: set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") From 6e4d858525d479ce946b87e93018129384dfe331 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 1 May 2026 20:23:49 -0500 Subject: [PATCH 130/275] Set duration properly and remove blank function. --- gst.so/src/action.cpp | 11 ++++++++--- gst.so/src/gst_worker.cpp | 3 --- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gst.so/src/action.cpp b/gst.so/src/action.cpp index 04cc7eced..b8258b1fd 100644 --- a/gst.so/src/action.cpp +++ b/gst.so/src/action.cpp @@ -123,9 +123,7 @@ using std::regex; #define GST_DEFAULT_STRIDE_D 0 #define GST_DEFAULT_BLAS_SOURCE "rocblas" #define GST_DEFAULT_COMPUTE_TYPE "fp32_r" - -#define RVS_DEFAULT_PARALLEL false -#define RVS_DEFAULT_DURATION 0 +#define GST_DEFAULT_DURATION 0 #define GST_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" @@ -582,6 +580,13 @@ bool gst_action::get_all_gst_config_keys(void) { bsts = false; } + if (property_get_int(RVS_CONF_DURATION_KEY, &property_duration, GST_DEFAULT_DURATION)) { + msg = "Invalid '" + std::string(RVS_CONF_DURATION_KEY) + + "' key"; + rvs::lp::Err(msg, module_name, action_name); + bsts = false; + } + /* If operation and data type both not set, default to sgemm */ if ((gst_ops_type == GST_DEFAULT_OPS_TYPE) && (gst_data_type == GST_DEFAULT_OPS_TYPE)) { gst_ops_type = "sgemm"; diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 5275c2b56..637d33e9a 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -646,9 +646,6 @@ void GSTWorker::run() { check_target_stress(max_gflops); } -void GSTWorker::log_gst_test_result(bool gst_test_passed) { -} - /** * @brief computes the difference (in milliseconds) between 2 points in time * @param t_end second point in time From da22a0ef7bc3251fb8ee9e3fb2e9688c8b9088c8 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 5 May 2026 21:39:31 +0530 Subject: [PATCH 131/275] Update CHANGELOG.md --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7ac7b662..c5a1f331b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,17 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.5.0 + +### Added + +- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** + ## RVS 1.4.0 ### Added - TransferBench support to PEBB and PBQT. -- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** - IET power stress test for MI250X. - Babel support for normal distribution–based data initialization. - Configurable Non-Temporal support in Babel. From 072c0bcf29ddbc2578d300eab0781b11519f51a3 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 5 May 2026 13:28:56 -0500 Subject: [PATCH 132/275] NPS2/QPX mode GST conf. for MI350X/MI355X. --- rvs/conf/MI350X/NPS2/QPX/gst_single.conf | 393 +++++++++++++++++++++++ rvs/conf/MI355X/NPS2/QPX/gst_single.conf | 393 +++++++++++++++++++++++ 2 files changed, 786 insertions(+) create mode 100644 rvs/conf/MI350X/NPS2/QPX/gst_single.conf create mode 100644 rvs/conf/MI355X/NPS2/QPX/gst_single.conf diff --git a/rvs/conf/MI350X/NPS2/QPX/gst_single.conf b/rvs/conf/MI350X/NPS2/QPX/gst_single.conf new file mode 100644 index 000000000..80ddded1a --- /dev/null +++ b/rvs/conf/MI350X/NPS2/QPX/gst_single.conf @@ -0,0 +1,393 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + diff --git a/rvs/conf/MI355X/NPS2/QPX/gst_single.conf b/rvs/conf/MI355X/NPS2/QPX/gst_single.conf new file mode 100644 index 000000000..80ddded1a --- /dev/null +++ b/rvs/conf/MI355X/NPS2/QPX/gst_single.conf @@ -0,0 +1,393 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-Tflops-2K2K2K-trig-fp4 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 2048 * 2048 * 2048 +# Set matrix data type as fp4 real number +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as XXXX +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves XXXX TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-Tflops-2K2K2K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-fp6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-2K2K2K-trig-bf6 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-8K8K16K-rand-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-Tflops-3K-trig-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-3K-rand-fp32 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: rand + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-trig-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-8K-rand-fp64 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: rand + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + From 6ae458b0c9e49ecc25773c3e2cfabc1fd0256f7a Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 6 May 2026 14:08:19 -0500 Subject: [PATCH 133/275] fp4 and fp6 datatype update. --- src/rvs_blas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 83f6a8b98..7a4d785d4 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -2514,7 +2514,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E2M3_EXT) + else if(static_cast(dataType) == HIP_R_6F_E2M3) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2528,7 +2528,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E3M2_EXT) + else if(static_cast(dataType) == HIP_R_6F_E3M2) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2542,7 +2542,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_4F_E2M1_EXT) + else if(static_cast(dataType) == HIP_R_4F_E2M1) { DGen::DataGenerator dgen; return generateData(dgen, From 8516ee2986997e4f0e72cd565d46818a68600b86 Mon Sep 17 00:00:00 2001 From: jkottiku Date: Wed, 6 May 2026 12:11:23 -0700 Subject: [PATCH 134/275] Revert "fp4 and fp6 datatype update." This reverts commit 6ae458b0c9e49ecc25773c3e2cfabc1fd0256f7a. --- src/rvs_blas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 7a4d785d4..83f6a8b98 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -2514,7 +2514,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E2M3) + else if(static_cast(dataType) == HIP_R_6F_E2M3_EXT) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2528,7 +2528,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E3M2) + else if(static_cast(dataType) == HIP_R_6F_E3M2_EXT) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2542,7 +2542,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_4F_E2M1) + else if(static_cast(dataType) == HIP_R_4F_E2M1_EXT) { DGen::DataGenerator dgen; return generateData(dgen, From af95109608cfd606aec67ec0ff2f2cf675adff6e Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 6 May 2026 14:14:38 -0500 Subject: [PATCH 135/275] fp4 and fp6 datatype update. --- src/rvs_blas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 83f6a8b98..7a4d785d4 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -2514,7 +2514,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E2M3_EXT) + else if(static_cast(dataType) == HIP_R_6F_E2M3) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2528,7 +2528,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_6F_E3M2_EXT) + else if(static_cast(dataType) == HIP_R_6F_E3M2) { DGen::DataGenerator dgen; return generateData(dgen, @@ -2542,7 +2542,7 @@ std::vector rvs_blas::generateMXInput(hipDataType dataType, isTranspose, isMatrixA); } - else if(static_cast(dataType) == HIP_R_4F_E2M1_EXT) + else if(static_cast(dataType) == HIP_R_4F_E2M1) { DGen::DataGenerator dgen; return generateData(dgen, From b28f6bffa94a0340aa80e66c9c1bb4ea754bb5d2 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 7 May 2026 12:12:41 -0500 Subject: [PATCH 136/275] Time resolution in microseconds --- gst.so/src/gst_worker.cpp | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 637d33e9a..d6650b0f2 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -124,7 +124,7 @@ void GSTWorker::hit_max_gflops(int *error, string *err_description) { gst_log_interval_time; double seconds_elapsed = 0, curr_gflops; uint16_t num_sgemm_ops_log_interval = 0; - uint64_t millis_sgemm_ops; + uint64_t micros_sgemm_ops; string msg; *error = 0; @@ -138,7 +138,7 @@ void GSTWorker::hit_max_gflops(int *error, string *err_description) { gst_end_time = std::chrono::system_clock::now(); if (time_diff(gst_end_time, gst_start_time) >= - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + NMAX_MS_GPU_RUN_PEAK_PERFORMANCE * 1000u) break; if (copy_matrix) { @@ -161,10 +161,10 @@ void GSTWorker::hit_max_gflops(int *error, string *err_description) { num_sgemm_ops_log_interval++; gst_end_time = std::chrono::system_clock::now(); - millis_sgemm_ops = time_diff(gst_end_time, gst_log_interval_time); - if (millis_sgemm_ops >= log_interval) { + micros_sgemm_ops = time_diff(gst_end_time, gst_log_interval_time); + if (micros_sgemm_ops >= log_interval * 1000u) { // compute the GFLOPS - seconds_elapsed = static_cast (millis_sgemm_ops) / 1000; + seconds_elapsed = static_cast (micros_sgemm_ops) / 1000000; if (seconds_elapsed != 0) { curr_gflops = static_cast(gpu_blas->gemm_gflop_count() * num_sgemm_ops_log_interval) / seconds_elapsed; @@ -194,7 +194,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { gst_last_sgemm_end_time; double seconds_elapsed, curr_gflops, dyn_delay_target_stress; uint16_t num_sgemm_ops = 0, num_sgemm_ops_log_interval = 0; - uint64_t millis_sgemm_ops, millis_last_sgemm; + uint64_t micros_sgemm_ops, micros_last_sgemm; uint16_t proc_delay = 0; uint64_t start_time, end_time; double timetakenforoneiteration, gflops_interval; @@ -232,7 +232,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { gst_end_time = std::chrono::system_clock::now(); if (time_diff(gst_end_time, gst_start_time) > - ramp_interval - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + ramp_interval * 1000u - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE * 1000u) return false; gst_last_sgemm_start_time = std::chrono::system_clock::now(); @@ -276,12 +276,12 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { gflops_interval = gpu_blas->gemm_gflop_count()/timetakenforoneiteration; gst_last_sgemm_end_time = std::chrono::system_clock::now(); - millis_last_sgemm = + micros_last_sgemm = time_diff(gst_last_sgemm_end_time, gst_last_sgemm_start_time); if (static_cast( - (1000 * gpu_blas->gemm_gflop_count()) / + (1000000 * gpu_blas->gemm_gflop_count()) / target_stress) < - millis_last_sgemm) { + micros_last_sgemm) { // last SGEMM timed-out (it took more than it should) dyn_delay_target_stress = 1; } @@ -291,12 +291,12 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { num_sgemm_ops_log_interval++; gst_end_time = std::chrono::system_clock::now(); - millis_sgemm_ops = + micros_sgemm_ops = time_diff(gst_end_time, gst_start_gflops_time); - if (millis_sgemm_ops >= NMAX_MS_SGEMM_OPS_RAMP_SUB_INTERVAL) { + if (micros_sgemm_ops >= NMAX_MS_SGEMM_OPS_RAMP_SUB_INTERVAL * 1000u) { // compute the GFLOPS seconds_elapsed = static_cast - (millis_sgemm_ops) / 1000; + (micros_sgemm_ops) / 1000000; if (seconds_elapsed > 0) { curr_gflops = static_cast( gpu_blas->gemm_gflop_count() * @@ -305,7 +305,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { target_stress + target_stress * tolerance/2) { ramp_actual_time = time_diff(gst_end_time, gst_start_time) + - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE; + NMAX_MS_GPU_RUN_PEAK_PERFORMANCE * 1000u; delay_target_stress /= num_sgemm_ops; return true; } @@ -317,12 +317,12 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { gst_start_gflops_time = std::chrono::system_clock::now(); } - millis_sgemm_ops = + micros_sgemm_ops = time_diff(gst_end_time, gst_log_interval_time); - if (millis_sgemm_ops >= log_interval) { + if (micros_sgemm_ops >= log_interval * 1000u) { // compute the GFLOPS seconds_elapsed = static_cast - (millis_sgemm_ops) / 1000; + (micros_sgemm_ops) / 1000000; if (seconds_elapsed > 0) { curr_gflops = static_cast( @@ -433,7 +433,7 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { uint32_t num_gemm_ops = 0; auto desc = action_descriptor{action_name, MODULE_NAME, gpu_id}; - uint64_t total_milliseconds, log_interval_milliseconds; + uint64_t total_microseconds, log_interval_microseconds; double start_time, end_time; double seconds_elapsed, gflops_interval; double timetakenforoneiteration; @@ -493,14 +493,14 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { num_gemm_ops += gst_hot_calls; gst_end_time = std::chrono::system_clock::now(); - total_milliseconds = time_diff(gst_end_time, gst_start_time); + total_microseconds = time_diff(gst_end_time, gst_start_time); - log_interval_milliseconds = time_diff(gst_end_time, + log_interval_microseconds = time_diff(gst_end_time, gst_log_interval_time); - if ((log_interval_milliseconds >= log_interval || 0 == run_duration_ms) && num_gemm_ops > 0) { + if ((log_interval_microseconds >= log_interval * 1000u || 0 == run_duration_ms) && num_gemm_ops > 0) { - seconds_elapsed = static_cast (log_interval_milliseconds) / 1000; + seconds_elapsed = static_cast (log_interval_microseconds) / 1000000; if (seconds_elapsed != 0) { @@ -555,11 +555,11 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + " " + GST_START_MSG + " " + - " Execution time in milliseconds :" + std::to_string(total_milliseconds) + + " Execution time in microseconds :" + std::to_string(total_microseconds) + " run_duration_ms :" + std::to_string(run_duration_ms); rvs::lp::Log(msg, rvs::logtrace); - if (0 == run_duration_ms || total_milliseconds >= run_duration_ms) + if (0 == run_duration_ms || total_microseconds >= run_duration_ms * 1000u) break; } @@ -647,17 +647,17 @@ void GSTWorker::run() { } /** - * @brief computes the difference (in milliseconds) between 2 points in time + * @brief computes the difference (in microseconds) between 2 points in time * @param t_end second point in time * @param t_start first point in time - * @return time difference in milliseconds + * @return time difference in microseconds */ uint64_t GSTWorker::time_diff( std::chrono::time_point t_end, std::chrono::time_point t_start) { - auto milliseconds = std::chrono::duration_cast( + auto microseconds = std::chrono::duration_cast( t_end - t_start); - return milliseconds.count(); + return microseconds.count(); } /** From 51e22e3aa37098f0225e8f9c0410f1ab76a40dec Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 7 May 2026 16:20:48 -0700 Subject: [PATCH 137/275] update workflow for ROCm download Workflow was defaulting to ROCm 7.11 from AWS S3. This location has changed. Updated workflow to pick ROCm based on job/version information. Scheduled: Pick from ROCm nightly PR/PUSH(master/main/rel): Pick from last ROCm release Manual Trigger: Based on ROCm version Local Build: Based on ROCm version if provided else latest nightly --- .github/workflows/README_BUILD_PACKAGES.md | 35 +++- .../workflows/build-relocatable-packages.yml | 173 ++++++++++++++++-- build_packages_local.sh | 159 +++++++++++++--- 3 files changed, 324 insertions(+), 43 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 3f27d714c..1a926f38f 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -16,16 +16,32 @@ All packages are built with relocatable RPATH settings, meaning they can be inst The workflow runs automatically on: - Push to `master`, `main`, or `release/**` branches - Pull requests to `master` or `main` branches -- **Scheduled**: Daily at **5:00 AM PST** (13:00 UTC); uses **latest ROCm version** (auto-fetched from TheRock) -- Manual trigger via GitHub Actions UI (workflow_dispatch) +- **Scheduled**: Daily at **5:00 AM PST** (13:00 UTC); **latest ROCm nightly** from [ROCm SDK nightly tarballs](https://rocm.nightlies.amd.com/tarball-multi-arch/) (or repo variable overrides). +- **Pull requests** and **pushes** to `master`, `main`, or `release/**` (including merges): **latest ROCm release** (**X.Y.Z**) from [repo.amd.com ROCm tarballs](https://repo.amd.com/rocm/tarball/). +- **Manual** (`workflow_dispatch`): if **`ROCM_VERSION`** is pinned (**workflow input** and/or **`vars.ROCM_VERSION`**), the tarball is chosen by **version format** (nightly `x.y.za…` vs release `X.Y.Z`). If no version is pinned, the job uses **latest nightly** (same as schedule). + +### ROCm SDK: nightly vs release in CI + +The workflow sets `ROCM_SDK_CHANNEL` and SDK URLs before calling `build_packages_local.sh`: + +| Trigger | SDK source | +|---------|------------| +| **`schedule`** | **Nightly** — latest nightly tarball from the nightly listing | +| **`pull_request`** (to `master` / `main`) | **Release** — latest **X.Y.Z** from the release listing | +| **`push`** to `master`, `main`, or `release/**` | **Release** — same (covers merge-after-PR) | +| **`push`** to other branches | **Nightly** | +| **`workflow_dispatch`** | **Format-based** when `rocm_version` input or `vars.ROCM_VERSION` is set; otherwise **latest nightly** | + +Local builds (no CI): default is **latest nightly** if `ROCM_VERSION` is unset; if set, tarball location follows the same **format** rules as in `build_packages_local.sh`. ### Manual Trigger Parameters When manually triggering the workflow, you can specify: -1. **ROCm Version** (e.g., `7.11.0a20260121`) - - Default: empty (auto-fetches latest from TheRock) - - Or specify an explicit version string +1. **ROCm Version** + - Empty — **latest nightly** (unless `vars.ROCM_VERSION` is set in the repo, which pins a version and triggers format-based selection). + - **`X.Y.Z`** — release tarball at [repo.amd.com](https://repo.amd.com/rocm/tarball/). + - **`x.y.za…`** — nightly tarball at [nightlies](https://rocm.nightlies.amd.com/tarball-multi-arch/). 2. **GPU Family Target**: - `gfx94X-dcgpu` - MI300A/MI300X @@ -284,7 +300,14 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | Variable | Default | Description | |----------|---------|-------------| -| `ROCM_VERSION` | Auto-fetched (fallback: `7.11.0a20260121`) | ROCm SDK version from TheRock. If not set, script fetches latest version automatically. | +| `ROCM_VERSION` | _(unset)_ | If set, selects tarball by **format** (see below). If unset locally: **latest nightly**. If unset in CI: channel selects latest **nightly** vs **release X.Y.Z**. | +| `ROCM_SDK_RELEASE_URL` | `https://repo.amd.com/rocm/tarball/` | HTML listing for **release** tarballs (`therock-dist-linux--X.Y.Z.tar.gz`). Used when `ROCM_SDK_CHANNEL=release` or `auto` with this URL set. | +| `ROCM_SDK_RELEASE_BASE_URL` | `https://repo.amd.com/rocm/tarball` | Directory URL for downloading **X.Y.Z** tarballs; overridden when version string is nightly-shaped. | +| `ROCM_SDK_BASE_URL` | See script | Effective tarball base after channel + version-shape resolution. | +| `ROCM_SDK_INDEX_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch/` | **Nightly** listing for latest nightly SDK discovery. | +| `ROCM_SDK_NIGHTLY_BASE_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch` | Tarball base for **nightly** builds (`x.y.za…` versions). | +| `ROCM_SDK_NIGHTLY_INDEX_URL` | _(same as index default)_ | Optional override for nightly listing URL. | +| `ROCM_SDK_CHANNEL` | `auto` locally | **`nightly`** / **`release`** / **`auto`**. CI sets channel per trigger (see table above); manual with a pin uses **`auto`** so tarball follows version format. | | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | | `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `8.0` → `0800`) - used for RVS version tagging | diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 3f0e30e33..e045612b2 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -16,7 +16,7 @@ on: workflow_dispatch: inputs: rocm_version: - description: 'ROCm version (e.g., 7.11.0a20260121)' + description: 'Optional pin — empty uses latest nightly (unless vars.ROCM_VERSION set). Release X.Y.Z vs nightly x.y.za… selects tarball host by format.' required: false default: '' gpu_family: @@ -36,7 +36,9 @@ permissions: id-token: write env: - ROCM_VERSION: ${{ vars.ROCM_VERSION || '7.11.0a20260121' }} + # Leave unset unless you pin a version via repo variable or workflow_dispatch input. + # With vars.ROCM_SDK_RELEASE_URL set, the script picks latest X.Y.Z from that listing for GPU_FAMILY. + ROCM_VERSION: ${{ vars.ROCM_VERSION }} GPU_FAMILY: ${{ vars.GPU_FAMILY || 'gfx110X-all' }} BUILD_TYPE: Release # Optional Step 6 in build_packages_local.sh: set repo Actions variable @@ -79,16 +81,88 @@ jobs: echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV fi + # Schedule → latest ROCm *nightly*. PR + merge (push to main/master/release/*) → latest ROCm *release*. + # Manual: if a version is pinned (workflow input or vars.ROCM_VERSION), tarball follows *format* (auto). + - name: Configure ROCm SDK channel (nightly vs release) + run: | + NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' + NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' + [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' + [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' + + REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' + [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' + REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' + [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" + + release_build() { + { + echo "ROCM_SDK_CHANNEL=release" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_BASE_URL=$REL_BASE" + echo "ROCM_SDK_INDEX_URL=" + } >> "$GITHUB_ENV" + } + + nightly_build() { + { + echo "ROCM_SDK_CHANNEL=nightly" + echo "ROCM_SDK_RELEASE_URL=" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + } >> "$GITHUB_ENV" + } + + # Manual run with a pin: resolve tarball location by version format (nightly x.y.za… vs release X.Y.Z) + format_build() { + { + echo "ROCM_SDK_CHANNEL=auto" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + } >> "$GITHUB_ENV" + } + + EVENT='${{ github.event_name }}' + REF='${{ github.ref }}' + IN_VER='${{ github.event.inputs.rocm_version }}' + VAR_VER='${{ vars.ROCM_VERSION }}' + + if [ "$EVENT" = "schedule" ]; then + nightly_build + echo "ROCm SDK channel: nightly (scheduled — latest nightly)" + elif [ "$EVENT" = "pull_request" ]; then + release_build + echo "ROCm SDK channel: release (pull request — latest X.Y.Z)" + elif [ "$EVENT" = "push" ]; then + if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then + release_build + echo "ROCm SDK channel: release (push to main or release/* — includes merge)" + else + nightly_build + echo "ROCm SDK channel: nightly (push to feature branch)" + fi + elif [ "$EVENT" = "workflow_dispatch" ]; then + if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then + format_build + echo "ROCm SDK: manual — tarball base chosen by version format (input or vars.ROCM_VERSION)" + else + nightly_build + echo "ROCm SDK channel: nightly (manual, no version pin)" + fi + else + nightly_build + echo "ROCm SDK channel: nightly (fallback)" + fi + - name: Build and Package RVS run: | chmod +x build_packages_local.sh - # Run build script with sudo (Ubuntu runner needs sudo for apt-get) - sudo -E ROCM_VERSION=${{ env.ROCM_VERSION }} \ - GPU_FAMILY=${{ env.GPU_FAMILY }} \ - BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ - ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ - ./build_packages_local.sh + # ROCM_SDK_* come from "Configure ROCm SDK channel" via GITHUB_ENV; sudo -E preserves them. + sudo -E ./build_packages_local.sh - name: Fix file ownership if: always() @@ -251,15 +325,84 @@ jobs: echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV fi + # Schedule → nightly latest. PR + merge → release latest. Manual → format when version pinned. + - name: Configure ROCm SDK channel (nightly vs release) + run: | + NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' + NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' + [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' + [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' + + REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' + [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' + REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' + [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" + + release_build() { + { + echo "ROCM_SDK_CHANNEL=release" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_BASE_URL=$REL_BASE" + echo "ROCM_SDK_INDEX_URL=" + } >> "$GITHUB_ENV" + } + + nightly_build() { + { + echo "ROCM_SDK_CHANNEL=nightly" + echo "ROCM_SDK_RELEASE_URL=" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + } >> "$GITHUB_ENV" + } + + format_build() { + { + echo "ROCM_SDK_CHANNEL=auto" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + } >> "$GITHUB_ENV" + } + + EVENT='${{ github.event_name }}' + REF='${{ github.ref }}' + IN_VER='${{ github.event.inputs.rocm_version }}' + VAR_VER='${{ vars.ROCM_VERSION }}' + + if [ "$EVENT" = "schedule" ]; then + nightly_build + echo "ROCm SDK channel: nightly (scheduled)" + elif [ "$EVENT" = "pull_request" ]; then + release_build + echo "ROCm SDK channel: release (pull request)" + elif [ "$EVENT" = "push" ]; then + if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then + release_build + echo "ROCm SDK channel: release (push to main or release/*)" + else + nightly_build + echo "ROCm SDK channel: nightly (feature branch push)" + fi + elif [ "$EVENT" = "workflow_dispatch" ]; then + if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then + format_build + echo "ROCm SDK: manual — format-based tarball" + else + nightly_build + echo "ROCm SDK channel: nightly (manual, no version)" + fi + else + nightly_build + echo "ROCm SDK channel: nightly (fallback)" + fi + - name: Build and Package RVS run: | chmod +x build_packages_local.sh - - ROCM_VERSION=${{ env.ROCM_VERSION }} \ - GPU_FAMILY=${{ env.GPU_FAMILY }} \ - BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ - ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ ./build_packages_local.sh - name: Verify RPM Package diff --git a/build_packages_local.sh b/build_packages_local.sh index e8da16b40..2a4c905e7 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -13,13 +13,59 @@ BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" # SDK Source Configuration -# Default: TheRock public S3 nightly bucket (works from any network). -# Override via environment variables or GitHub Actions repository variables (vars.*). +# Defaults point at AMD-hosted listings (override via env or GitHub vars). +# - Nightly index: https://rocm.nightlies.amd.com/tarball-multi-arch/ +# - Release listing: https://repo.amd.com/rocm/tarball/ # -# If your SDK server has no index page for auto-detection, set ROCM_SDK_INDEX_URL="" -# and provide ROCM_VERSION explicitly. -ROCM_SDK_BASE_URL="${ROCM_SDK_BASE_URL:-https://therock-nightly-tarball.s3.us-east-2.amazonaws.com}" -ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" +# Local builds: if ROCM_VERSION is unset (channel auto, no release listing env), latest *nightly* is fetched. +# If ROCM_VERSION is set, tarball base follows format: +# - Nightly: x.y.za (e.g. 7.11.0a20260121) → nightly base URL +# - Release: X.Y.Z (e.g. 7.11.0) → release base URL +# +# ROCM_SDK_CHANNEL: nightly | release | auto (default auto). +# - nightly: latest SDK from nightly listing (ROCM_SDK_INDEX_URL). +# - release: latest X.Y.Z from release listing (ROCM_SDK_RELEASE_URL). +# - auto: release listing URL set → release discovery; else nightly index. +# +# Optional: ROCM_SDK_NIGHTLY_BASE_URL, ROCM_SDK_NIGHTLY_INDEX_URL, ROCM_SDK_RELEASE_URL (listing), +# ROCM_SDK_RELEASE_BASE_URL (tarball directory for X.Y.Z downloads). +_ROCM_NIGHTLY_INDEX_DEFAULT="https://rocm.nightlies.amd.com/tarball-multi-arch/" +_ROCM_NIGHTLY_BASE_DEFAULT="https://rocm.nightlies.amd.com/tarball-multi-arch" +_ROCM_RELEASE_LIST_DEFAULT="https://repo.amd.com/rocm/tarball/" +_ROCM_RELEASE_BASE_DEFAULT="https://repo.amd.com/rocm/tarball" + +ROCM_SDK_CHANNEL="${ROCM_SDK_CHANNEL:-auto}" +ROCM_SDK_RELEASE_URL="${ROCM_SDK_RELEASE_URL:-}" + +if [ "$ROCM_SDK_CHANNEL" = "nightly" ]; then + ROCM_SDK_RELEASE_URL="" + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + ROCM_SDK_INDEX_URL="${ROCM_SDK_NIGHTLY_INDEX_URL:-${ROCM_SDK_INDEX_URL:-$_ROCM_NIGHTLY_INDEX_DEFAULT}}" +elif [ "$ROCM_SDK_CHANNEL" = "release" ]; then + ROCM_SDK_RELEASE_URL="${ROCM_SDK_RELEASE_URL:-$_ROCM_RELEASE_LIST_DEFAULT}" + if [ -z "${ROCM_SDK_BASE_URL:-}" ]; then + if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" + else + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/*}" + fi + fi + ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-}" +else + # auto (local: no release URL → nightly latest; CI sets channel explicitly) + if [ -n "${ROCM_SDK_RELEASE_URL}" ]; then + if [ -z "${ROCM_SDK_BASE_URL:-}" ]; then + if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" + else + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/*}" + fi + fi + else + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + fi + ROCM_SDK_INDEX_URL="${ROCM_SDK_NIGHTLY_INDEX_URL:-${ROCM_SDK_INDEX_URL:-$_ROCM_NIGHTLY_INDEX_DEFAULT}}" +fi # Post-build upload configuration # Set UPLOAD_TARGET to enable automatic upload of built packages after the build. @@ -69,6 +115,27 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1" >&2 } +# Join base URL and filename without duplicate slashes +join_base_and_file() { + local base="$1" + local path="$2" + base="${base%/}" + printf '%s/%s' "$base" "$path" +} + +# After ROCM_VERSION is known: pick tarball host directory from version shape (overrides channel defaults). +# Nightly: x.y.za Release: X.Y.Z (three-part semver only) +apply_sdk_tarball_base_for_version() { + local v="$1" + if echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+a[0-9]+'; then + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + print_info "Version matches ROCm nightly format (x.y.za…) → tarball base: $ROCM_SDK_BASE_URL" + elif echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_RELEASE_BASE_DEFAULT}}" + print_info "Version matches ROCm release format (X.Y.Z) → tarball base: $ROCM_SDK_BASE_URL" + fi +} + # Function to fetch latest ROCm version for specified GPU family # Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { @@ -84,17 +151,39 @@ fetch_latest_rocm_version() { sort -V | tail -1) if [ -z "$latest_version" ]; then - print_error "Could not fetch latest ROCm version for $gpu_family" - print_info "Falling back to default version: 7.11.0a20260121" - ROCM_VERSION="7.11.0a20260121" + print_error "Could not fetch latest ROCm nightly version for $gpu_family from $ROCM_SDK_INDEX_URL" return 1 fi - + print_success "Found latest ROCm version: $latest_version" ROCM_VERSION="$latest_version" return 0 } +# Fetch latest ROCm *release* tarball version (semantic X.Y.Z only; excludes nightly builds like 7.11.0a20260121). +# Parses ROCM_SDK_RELEASE_URL (HTML listing / index). Sets ROCM_VERSION. +fetch_latest_rocm_release_version() { + local gpu_family="$1" + local list_url="${ROCM_SDK_RELEASE_URL:-$_ROCM_RELEASE_LIST_DEFAULT}" + + print_info "Fetching latest ROCm release version (X.Y.Z) for $gpu_family..." + print_info "Release listing URL: $list_url" + + local latest_version + latest_version=$(wget -qO- "$list_url" 2>/dev/null | \ + grep -oP "therock-dist-linux-${gpu_family}-\K[0-9]+\.[0-9]+\.[0-9]+(?=\.tar\.gz)" | \ + sort -V | uniq | tail -1) + + if [ -z "$latest_version" ]; then + print_error "No therock-dist-linux-${gpu_family}-X.Y.Z.tar.gz found under release listing (expected forms like 7.11.0)" + return 1 + fi + + print_success "Found latest ROCm release version: $latest_version" + ROCM_VERSION="$latest_version" + return 0 +} + # Function to check and install dependencies check_and_install_dependencies() { print_info "Checking for required build dependencies..." @@ -293,12 +382,40 @@ check_and_install_dependencies() { # Check and install dependencies (installs wget, etc. - required before fetch_latest_rocm_version) check_and_install_dependencies -# Determine ROCm version: use environment variable or fetch latest (wget is now available) +# Determine ROCm version: explicit env > channel-specific listing if [ -n "$ROCM_VERSION" ]; then print_info "Using specified ROCm version: $ROCM_VERSION" +elif [ "$ROCM_SDK_CHANNEL" = "nightly" ]; then + print_info "No ROCm version specified; fetching latest from ROCm nightly index (channel=nightly)..." + if [ -z "$ROCM_SDK_INDEX_URL" ]; then + print_error "ROCM_SDK_CHANNEL=nightly requires ROCM_SDK_INDEX_URL" + exit 1 + fi + fetch_latest_rocm_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm nightly version" + exit 1 + fi +elif [ "$ROCM_SDK_CHANNEL" = "release" ]; then + print_info "No ROCm version specified; fetching latest release X.Y.Z from ROCM_SDK_RELEASE_URL..." + if [ -z "$ROCM_SDK_RELEASE_URL" ]; then + print_error "ROCM_SDK_CHANNEL=release requires ROCM_SDK_RELEASE_URL when ROCM_VERSION is unset" + exit 1 + fi + fetch_latest_rocm_release_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm release version" + exit 1 + fi +elif [ -n "$ROCM_SDK_RELEASE_URL" ]; then + print_info "No ROCm version specified; resolving latest release from ROCM_SDK_RELEASE_URL (channel=auto)..." + fetch_latest_rocm_release_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm release version" + exit 1 + fi elif [ -n "$ROCM_SDK_INDEX_URL" ]; then - # Auto-detection only works when an index URL is available (e.g. S3 bucket) - print_info "No ROCm version specified, fetching latest from index..." + print_info "No ROCm version specified, fetching latest from nightly index (channel=auto)..." fetch_latest_rocm_version "$GPU_FAMILY" if [ -z "$ROCM_VERSION" ]; then @@ -307,25 +424,23 @@ elif [ -n "$ROCM_SDK_INDEX_URL" ]; then fi else print_error "ROCM_VERSION is required" - print_info "The configured SDK server does not provide an index page for auto-detection." - print_info "Set it via environment variable, e.g.:" + print_info "Set ROCM_VERSION, or configure ROCM_SDK_RELEASE_URL (release X.Y.Z tarballs) or ROCM_SDK_INDEX_URL (nightly listing)." + print_info "Example:" echo "" - echo " export ROCM_VERSION=\"7.11.0a20260121\"" + echo " export ROCM_VERSION=\"7.11.0\"" echo " ./build_packages_local.sh" echo "" - print_info "Or in GitHub Actions workflow:" - echo "" - echo " env:" - echo " ROCM_VERSION: \"7.11.0a20260121\"" - echo "" exit 1 fi +apply_sdk_tarball_base_for_version "$ROCM_VERSION" + # Print configuration echo "================================================================================" echo " ROCm Validation Suite - Local Package Build Script" echo "================================================================================" print_info "ROCm Version: $ROCM_VERSION" +print_info "ROCm SDK channel: ${ROCM_SDK_CHANNEL:-auto}" print_info "GPU Family: $GPU_FAMILY" print_info "Build Type: $BUILD_TYPE" print_info "Build Directory: $BUILD_DIR" @@ -340,7 +455,7 @@ echo "" # Step 1: Download ROCm SDK print_info "Step 1: Downloading ROCm SDK tarball..." -TARBALL_URL="${ROCM_SDK_BASE_URL}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" +TARBALL_URL=$(join_base_and_file "$ROCM_SDK_BASE_URL" "therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz") TARBALL_FILE="$ROCM_INSTALL_DIR/rocm-sdk.tar.gz" mkdir -p "$ROCM_INSTALL_DIR" From a5eda4d28e4a2d4a167fb76edeeda1d7956521b9 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 8 May 2026 07:21:04 -0700 Subject: [PATCH 138/275] fix parsing of release URL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Treat the release listing URL and the tarball directory as the same path, and only normalize a trailing slash — same idea as the workflow’s REL_BASE="${REL_URL%/} --- build_packages_local.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 2a4c905e7..14d60de6f 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -47,7 +47,8 @@ elif [ "$ROCM_SDK_CHANNEL" = "release" ]; then if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" else - ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/*}" + # Same directory as listing: strip trailing / only (not %/* — that drops /tarball when URL has no trailing slash). + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/}" fi fi ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-}" @@ -58,7 +59,8 @@ else if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" else - ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/*}" + # Listing URL and tarball base share the same path; normalize trailing slash only. + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/}" fi fi else From 5cf1c1c1787adf9a8f39368dcc1c0bf9bc49a7c4 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 8 May 2026 15:00:06 -0700 Subject: [PATCH 139/275] skip authentication/upload to S3 for PR from fork GitHub will not give that job repository secrets or a reliable OIDC response for fork PRs --- .../workflows/build-relocatable-packages.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index e045612b2..0d78d6787 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -183,13 +183,13 @@ jobs: echo "Package filename: $DEB_FILE" fi - # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) + # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs: OIDC token response is empty → JSON parse fails) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: sudo apt-get update && sudo apt-get install -y awscli - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -210,7 +210,7 @@ jobs: # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -247,7 +247,7 @@ jobs: # can be consumed directly as a DEB repository by apt. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload DEB repo metadata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -422,14 +422,14 @@ jobs: echo "Package filename: $RPM_FILE" fi - # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) + # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs — OIDC not usable) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -450,7 +450,7 @@ jobs: # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -493,7 +493,7 @@ jobs: # directly as an RPM repository by yum/dnf. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload RPM repodata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 From be28d444b1adaa9ca1d06b5f220bc23198ea9784 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 8 May 2026 08:35:07 +0000 Subject: [PATCH 140/275] Config changes for mi350p variant --- rvs/conf/MI350P-450W/babel_single.conf | 55 ++++++++ rvs/conf/MI350P-450W/gst_single.conf | 171 +++++++++++++++++++++++++ rvs/conf/MI350P-450W/iet_single.conf | 118 +++++++++++++++++ rvs/conf/MI350P-450W/iet_stress.conf | 61 +++++++++ rvs/conf/MI350P-600W/babel_single.conf | 55 ++++++++ rvs/conf/MI350P-600W/gst_single.conf | 171 +++++++++++++++++++++++++ rvs/conf/MI350P-600W/iet_single.conf | 119 +++++++++++++++++ rvs/conf/MI350P-600W/iet_stress.conf | 61 +++++++++ 8 files changed, 811 insertions(+) create mode 100644 rvs/conf/MI350P-450W/babel_single.conf create mode 100644 rvs/conf/MI350P-450W/gst_single.conf create mode 100644 rvs/conf/MI350P-450W/iet_single.conf create mode 100644 rvs/conf/MI350P-450W/iet_stress.conf create mode 100644 rvs/conf/MI350P-600W/babel_single.conf create mode 100644 rvs/conf/MI350P-600W/gst_single.conf create mode 100644 rvs/conf/MI350P-600W/iet_single.conf create mode 100644 rvs/conf/MI350P-600W/iet_stress.conf diff --git a/rvs/conf/MI350P-450W/babel_single.conf b/rvs/conf/MI350P-450W/babel_single.conf new file mode 100644 index 000000000..165e7c22d --- /dev/null +++ b/rvs/conf/MI350P-450W/babel_single.conf @@ -0,0 +1,55 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# BABEL test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space (e.g.: device: 50599 3245) +# Set parallel execution to false +# Set run count to 1 (test will run once) +# + +actions: +- name: babel-double-4gib + device: all + module: babel + parallel: false + count: 1 + num_iter: 3000 + array_size: 536870912 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dot: true + triad: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 1024 diff --git a/rvs/conf/MI350P-450W/gst_single.conf b/rvs/conf/MI350P-450W/gst_single.conf new file mode 100644 index 000000000..d062c56d1 --- /dev/null +++ b/rvs/conf/MI350P-450W/gst_single.conf @@ -0,0 +1,171 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-96Tflops-8K12K4K-trig-tf32 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 8192 * 12288 * 4096 +# Set matrix data type as fp32 real number +# Set compute type as tf32 (xf32) +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as 96 TFLOPS +# Set blas source (backend) as hipblaslt +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves 96 TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-8K12K4K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 50 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-8K12K4K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + copy_matrix: false + target_stress: 0 + hot_calls: 100 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + copy_matrix: false + target_stress: 0 + hot_calls: 100 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K32K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K16K-trig-bf8 + device: all + module: gst + matrix_init: trig + target_stress: 0 + data_type: fp8_e5m2_r # BF8 (OCP E5M2) -> HIP_R_8F_E5M2 + out_data_type: bf16_r + compute_type: fp32_r + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + duration: 15000 + hot_calls: 1000 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K32K-trig-fp6 + device: all + module: gst + target_stress: 0 + matrix_init: trig + data_type: fp6_e3m2_r # MX FP6 E3M2 -> HIP_R_6F_E3M2 + out_data_type: fp16_r + compute_type: fp32_r + scale_a: block + scale_b: block + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + duration: 15000 + blas_source: hipblaslt + diff --git a/rvs/conf/MI350P-450W/iet_single.conf b/rvs/conf/MI350P-450W/iet_single.conf new file mode 100644 index 000000000..2084c61d5 --- /dev/null +++ b/rvs/conf/MI350P-450W/iet_single.conf @@ -0,0 +1,118 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET test - MI350P power validation using typed GEMM via hipBLASLt +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set blas source (backend) as hipblaslt +# Set target power according to MI350P TDP +# +# Run test with: +# cd bin +# ./rvs -c conf/MI350P/iet_single.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU power reaches at least +# the target_power threshold, FALSE otherwise + +actions: +- name: iet-8K8K16K-bf16 + device: all + module: iet + parallel: true + duration: 30000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 450 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-8K8K16K-fp16 + device: all + module: iet + parallel: true + wait: 5000 + duration: 30000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 450 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-8K8K16K-fp8 + device: all + module: iet + parallel: true + duration: 25000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 450 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-stress-bw + device: all + module: iet + parallel: true + wait: 8000 + duration: 40000 + sample_interval: 1000 + target_power: 450 + bw_workload: true + cp_workload: false + tolerance: 0.05 diff --git a/rvs/conf/MI350P-450W/iet_stress.conf b/rvs/conf/MI350P-450W/iet_stress.conf new file mode 100644 index 000000000..ff32405a3 --- /dev/null +++ b/rvs/conf/MI350P-450W/iet_stress.conf @@ -0,0 +1,61 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET stress test - MI350P long running power validation using typed GEMM via hipBLASLt +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set blas source (backend) as hipblaslt +# Set target power according to MI350P TDP +# +# Run test with: +# cd bin +# ./rvs -c conf/MI350P/iet_stress.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU power reaches at least +# the target_power threshold, FALSE otherwise + +actions: +- name: iet-stress-450W-dgemm-true + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 438 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand diff --git a/rvs/conf/MI350P-600W/babel_single.conf b/rvs/conf/MI350P-600W/babel_single.conf new file mode 100644 index 000000000..165e7c22d --- /dev/null +++ b/rvs/conf/MI350P-600W/babel_single.conf @@ -0,0 +1,55 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# BABEL test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space (e.g.: device: 50599 3245) +# Set parallel execution to false +# Set run count to 1 (test will run once) +# + +actions: +- name: babel-double-4gib + device: all + module: babel + parallel: false + count: 1 + num_iter: 3000 + array_size: 536870912 + test_type: 2 + mibibytes: true + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dot: true + triad: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 1024 diff --git a/rvs/conf/MI350P-600W/gst_single.conf b/rvs/conf/MI350P-600W/gst_single.conf new file mode 100644 index 000000000..c0509435f --- /dev/null +++ b/rvs/conf/MI350P-600W/gst_single.conf @@ -0,0 +1,171 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# GST test - gst-96Tflops-8K12K4K-trig-tf32 +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set matrices sizes to 8192 * 12288 * 4096 +# Set matrix data type as fp32 real number +# Set compute type as tf32 (xf32) +# Set matrix data initialization method as trignometric float +# Set copy_matrix to false (the matrices will be copied to GPUs only once) +# Set target stress GFLOPS as 96 TFLOPS +# Set blas source (backend) as hipblaslt +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves 96 TFLOPS or more +# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# Else test on the GPU fails (FALSE). + +actions: +- name: gst-8K8K16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 50 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-8K8K16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + copy_matrix: false + target_stress: 0 + hot_calls: 100 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-8K8K16K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + copy_matrix: false + target_stress: 0 + hot_calls: 100 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K32K-trig-fp4 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K16K-trig-bf8 + module: gst + device: all + matrix_init: trig + target_stress: 0 + data_type: fp8_e5m2_r # BF8 (OCP E5M2) -> HIP_R_8F_E5M2 + out_data_type: bf16_r + compute_type: fp32_r + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + duration: 15000 + hot_calls: 1000 + blas_source: hipblaslt + +- name: gst-Tflops-4K4K32K-trig-fp6 + module: gst + device: all + target_stress: 0 + matrix_init: trig + data_type: fp6_e3m2_r # MX FP6 E3M2 -> HIP_R_6F_E3M2 + out_data_type: fp16_r + compute_type: fp32_r + scale_a: block + scale_b: block + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + duration: 15000 + blas_source: hipblaslt + diff --git a/rvs/conf/MI350P-600W/iet_single.conf b/rvs/conf/MI350P-600W/iet_single.conf new file mode 100644 index 000000000..38acaf417 --- /dev/null +++ b/rvs/conf/MI350P-600W/iet_single.conf @@ -0,0 +1,119 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET test - MI350P power validation using typed GEMM via hipBLASLt +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set blas source (backend) as hipblaslt +# Set target power according to MI350P TDP +# +# Run test with: +# cd bin +# ./rvs -c conf/MI350P/iet_single.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU power reaches at least +# the target_power threshold, FALSE otherwise + +actions: +- name: iet-8K8K16K-bf16 + device: all + module: iet + parallel: true + duration: 30000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 590 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-8K8K16K-fp16 + device: all + module: iet + parallel: true + wait: 5000 + duration: 30000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 590 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-8K8K16K-fp8 + device: all + module: iet + parallel: true + wait: 5000 + duration: 30000 + hot_calls: 500 + sample_interval: 1000 + log_interval: 3000 + target_power: 590 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 1 + blas_source: hipblaslt + +- name: iet-wait-stress-bw + device: all + module: iet + parallel: true + wait: 8000 + duration: 40000 + sample_interval: 1000 + target_power: 590 + bw_workload: true + cp_workload: false + tolerance: 0.05 diff --git a/rvs/conf/MI350P-600W/iet_stress.conf b/rvs/conf/MI350P-600W/iet_stress.conf new file mode 100644 index 000000000..36b14fe7a --- /dev/null +++ b/rvs/conf/MI350P-600W/iet_stress.conf @@ -0,0 +1,61 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET stress test - MI350P long running power validation using typed GEMM via hipBLASLt +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space +# Set blas source (backend) as hipblaslt +# Set target power according to MI350P TDP +# +# Run test with: +# cd bin +# ./rvs -c conf/MI350P/iet_stress.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU power reaches at least +# the target_power threshold, FALSE otherwise + +actions: +- name: iet-stress-600W-dgemm-true + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 580 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand From 3b33ec669f174df623b4b619512d23712cd0c1e6 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 8 May 2026 08:47:53 +0000 Subject: [PATCH 141/275] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5a1f331b..dc9b6b4ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added - Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** +- MI350P configs for GST, IET and babel tests. ## RVS 1.4.0 From 0f98ce1eca5c265f031cc61ce10e5f4d812911b4 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 8 May 2026 21:14:39 +0530 Subject: [PATCH 142/275] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc9b6b4ea..e6c174ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,6 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added - Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** -- MI350P configs for GST, IET and babel tests. ## RVS 1.4.0 @@ -20,6 +19,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// - Support for action selection using the `-s` option. - Support for module-based test execution using the `-m` option. - Support for time‑duration based Babel test execution. +- MI350P configs for GST, IET and babel tests. ## RVS 1.3.0 for ROCm 7.2 From 44c0022bbb8f14d060c0a11f36abbeee49b85d04 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 8 May 2026 17:48:18 +0000 Subject: [PATCH 143/275] remove single iet configs --- rvs/conf/MI350P-450W/iet_single.conf | 118 -------------------------- rvs/conf/MI350P-600W/iet_single.conf | 119 --------------------------- 2 files changed, 237 deletions(-) delete mode 100644 rvs/conf/MI350P-450W/iet_single.conf delete mode 100644 rvs/conf/MI350P-600W/iet_single.conf diff --git a/rvs/conf/MI350P-450W/iet_single.conf b/rvs/conf/MI350P-450W/iet_single.conf deleted file mode 100644 index 2084c61d5..000000000 --- a/rvs/conf/MI350P-450W/iet_single.conf +++ /dev/null @@ -1,118 +0,0 @@ -# ################################################################################ -# # -# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. -# # -# # MIT LICENSE: -# # Permission is hereby granted, free of charge, to any person obtaining a copy of -# # this software and associated documentation files (the "Software"), to deal in -# # the Software without restriction, including without limitation the rights to -# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# # of the Software, and to permit persons to whom the Software is furnished to do -# # so, subject to the following conditions: -# # -# # The above copyright notice and this permission notice shall be included in all -# # copies or substantial portions of the Software. -# # -# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# # SOFTWARE. -# # -# ############################################################################### - -# IET test - MI350P power validation using typed GEMM via hipBLASLt -# -# Preconditions: -# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g -# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify -# all the GPUs IDs separated by white space -# Set blas source (backend) as hipblaslt -# Set target power according to MI350P TDP -# -# Run test with: -# cd bin -# ./rvs -c conf/MI350P/iet_single.conf -# -# Expected result: -# The test on each GPU passes (TRUE) if the GPU power reaches at least -# the target_power threshold, FALSE otherwise - -actions: -- name: iet-8K8K16K-bf16 - device: all - module: iet - parallel: true - duration: 30000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 450 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: bf16_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-8K8K16K-fp16 - device: all - module: iet - parallel: true - wait: 5000 - duration: 30000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 450 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: fp16_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-8K8K16K-fp8 - device: all - module: iet - parallel: true - duration: 25000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 450 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: fp8_e4m3_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-stress-bw - device: all - module: iet - parallel: true - wait: 8000 - duration: 40000 - sample_interval: 1000 - target_power: 450 - bw_workload: true - cp_workload: false - tolerance: 0.05 diff --git a/rvs/conf/MI350P-600W/iet_single.conf b/rvs/conf/MI350P-600W/iet_single.conf deleted file mode 100644 index 38acaf417..000000000 --- a/rvs/conf/MI350P-600W/iet_single.conf +++ /dev/null @@ -1,119 +0,0 @@ -# ################################################################################ -# # -# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. -# # -# # MIT LICENSE: -# # Permission is hereby granted, free of charge, to any person obtaining a copy of -# # this software and associated documentation files (the "Software"), to deal in -# # the Software without restriction, including without limitation the rights to -# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# # of the Software, and to permit persons to whom the Software is furnished to do -# # so, subject to the following conditions: -# # -# # The above copyright notice and this permission notice shall be included in all -# # copies or substantial portions of the Software. -# # -# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# # SOFTWARE. -# # -# ############################################################################### - -# IET test - MI350P power validation using typed GEMM via hipBLASLt -# -# Preconditions: -# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g -# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify -# all the GPUs IDs separated by white space -# Set blas source (backend) as hipblaslt -# Set target power according to MI350P TDP -# -# Run test with: -# cd bin -# ./rvs -c conf/MI350P/iet_single.conf -# -# Expected result: -# The test on each GPU passes (TRUE) if the GPU power reaches at least -# the target_power threshold, FALSE otherwise - -actions: -- name: iet-8K8K16K-bf16 - device: all - module: iet - parallel: true - duration: 30000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 590 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: bf16_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-8K8K16K-fp16 - device: all - module: iet - parallel: true - wait: 5000 - duration: 30000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 590 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: fp16_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-8K8K16K-fp8 - device: all - module: iet - parallel: true - wait: 5000 - duration: 30000 - hot_calls: 500 - sample_interval: 1000 - log_interval: 3000 - target_power: 590 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 16384 - matrix_init: trig - data_type: fp8_e4m3_r - compute_type: fp32_r - transa: 0 - transb: 0 - alpha: 1 - beta: 1 - blas_source: hipblaslt - -- name: iet-wait-stress-bw - device: all - module: iet - parallel: true - wait: 8000 - duration: 40000 - sample_interval: 1000 - target_power: 590 - bw_workload: true - cp_workload: false - tolerance: 0.05 From dae3c50bc6fbcf2200cb6b4873073931371c871f Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 7 May 2026 17:45:32 -0500 Subject: [PATCH 144/275] Throughput logging as output --- babel.so/src/rvs_stress.cpp | 51 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 575160964..edcdfc135 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -274,21 +274,21 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << "n_elements" << csv_separator << "sizeof" << csv_separator << ((mibibytes) ? "max_mibytes_per_sec" : "max_mbytes_per_sec") << csv_separator - << "min_runtime" << csv_separator - << "max_runtime" << csv_separator - << "avg_runtime" << std::endl; + << ((mibibytes) ? "mibps_at_min_t" : "mbps_at_min_t") << csv_separator + << ((mibibytes) ? "mibps_at_max_t" : "mbps_at_max_t") << csv_separator + << ((mibibytes) ? "mibps_at_avg_t" : "mbps_at_avg_t") << std::endl; } else { - sstr << "\n------------------------------------------------------------------------" << std::endl + sstr << "\n---------------------------------------------------------------------------------" << std::endl << std::left << std::setw(12) << "GPU Id" << std::left << std::setw(12) << "Function" << std::left << std::setw(15) << ((mibibytes) ? "MiBytes/sec" : "MBytes/sec") - << std::left << std::setw(12) << "Min (sec)" - << std::left << std::setw(12) << "Max" - << std::left << std::setw(12) << "Average" + << std::left << std::setw(15) << ((mibibytes) ? "Max MiB/s" : "Max MB/s") + << std::left << std::setw(15) << ((mibibytes) ? "Min MiB/s" : "Min MB/s") + << std::left << std::setw(15) << ((mibibytes) ? "Avg MiB/s" : "Avg MB/s") << std::endl - << "------------------------------------------------------------------------" << std::endl + << "---------------------------------------------------------------------------------" << std::endl << std::fixed; } @@ -322,6 +322,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, // Calculate average; ignore the first result double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(effective_num_times - 1); + const double bw_scale = (mibibytes) ? pow(2.0, -20.0) : 1.0E-6; // Display results if (output_as_csv) { @@ -331,10 +332,10 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << effective_num_times << csv_separator << ARRAY_SIZE << csv_separator << sizeof(T) << csv_separator - << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) << csv_separator - << *minmax.first << csv_separator - << *minmax.second << csv_separator - << average + << bw_scale * sizes[i] / (*minmax.first) << csv_separator + << bw_scale * sizes[i] / (*minmax.first) << csv_separator + << bw_scale * sizes[i] / (*minmax.second) << csv_separator + << bw_scale * sizes[i] / average << std::endl; } else @@ -343,26 +344,32 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << std::left << std::setw(12) << device.second << std::left << std::setw(12) << labels[i] << std::left << std::setw(15) << std::setprecision(3) << - ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) - << std::left << std::setw(12) << std::setprecision(5) << *minmax.first - << std::left << std::setw(12) << std::setprecision(5) << *minmax.second - << std::left << std::setw(12) << std::setprecision(5) << average + bw_scale * sizes[i] / (*minmax.first) + << std::left << std::setw(15) << std::setprecision(3) << + bw_scale * sizes[i] / (*minmax.first) + << std::left << std::setw(15) << std::setprecision(3) << + bw_scale * sizes[i] / (*minmax.second) + << std::left << std::setw(15) << std::setprecision(3) << + bw_scale * sizes[i] / average << std::endl; } if (json){ + const char *key = mibibytes ? "MiBytes/sec" : "MBytes/sec"; + const char *peak_key = mibibytes ? "Max_MiBytes/sec" : "Max_MBytes/sec"; + const char *worst_key = mibibytes ? "Min_MiBytes/sec" : "Min_MBytes/sec"; + const char *avg_key = mibibytes ? "Avg_MiBytes/sec" : "Avg_MBytes/sec"; log_to_json(desc, rvs::logresults, "Function",std::string(labels[i]), - "MBytes/sec", (mibibytes) ? - std::to_string(pow(2.0, -20.0)) : std::to_string((1.0E-6) * sizes[i] / (*minmax.first)), - "Min(s)",std::to_string( *minmax.first), - "Max(s)", std::to_string(*minmax.second), - "Average(s)", std::to_string(average), + key, std::to_string(bw_scale * sizes[i] / (*minmax.first)), + peak_key, std::to_string(bw_scale * sizes[i] / (*minmax.first)), + worst_key, std::to_string(bw_scale * sizes[i] / (*minmax.second)), + avg_key, std::to_string(bw_scale * sizes[i] / average), "pass", "true"); } } } sstr - << "------------------------------------------------------------------------" << std::endl; + << "---------------------------------------------------------------------------------" << std::endl; rvs::lp::Log(sstr.str(), rvs::logresults); delete stream; From b5902607d363021926db8e494345fa2233e0108c Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 15 May 2026 12:37:33 +0530 Subject: [PATCH 145/275] Update build-relocatable-packages.yml --- .../workflows/build-relocatable-packages.yml | 210 +++++++++++++++--- 1 file changed, 182 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 479879289..28f0a78a7 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -16,7 +16,7 @@ on: workflow_dispatch: inputs: rocm_version: - description: 'ROCm version (e.g., 7.11.0a20260121)' + description: 'Optional pin — empty uses latest nightly (unless vars.ROCM_VERSION set). Release X.Y.Z vs nightly x.y.za… selects tarball host by format.' required: false default: '' gpu_family: @@ -36,7 +36,9 @@ permissions: id-token: write env: - ROCM_VERSION: ${{ vars.ROCM_VERSION || '7.11.0a20260121' }} + # Leave unset unless you pin a version via repo variable or workflow_dispatch input. + # With vars.ROCM_SDK_RELEASE_URL set, the script picks latest X.Y.Z from that listing for GPU_FAMILY. + ROCM_VERSION: ${{ vars.ROCM_VERSION }} GPU_FAMILY: ${{ vars.GPU_FAMILY || 'gfx110X-all' }} BUILD_TYPE: Release # Optional Step 6 in build_packages_local.sh: set repo Actions variable @@ -62,7 +64,7 @@ jobs: outputs: s3_bucket_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.bucket }} s3_paths_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.paths }} - + steps: # Bootstrap the bare ubuntu:* image so actions/checkout and downstream steps # (dpkg-deb verify, apt-ftparchive, awscli) work without needing sudo on bare metal. @@ -97,14 +99,87 @@ jobs: echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV fi + # Schedule → latest ROCm *nightly*. PR + merge (push to main/master/release/*) → latest ROCm *release*. + # Manual: if a version is pinned (workflow input or vars.ROCM_VERSION), tarball follows *format* (auto). + - name: Configure ROCm SDK channel (nightly vs release) + run: | + NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' + NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' + [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' + [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' + + REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' + [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' + REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' + [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" + + release_build() { + { + echo "ROCM_SDK_CHANNEL=release" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_BASE_URL=$REL_BASE" + echo "ROCM_SDK_INDEX_URL=" + } >> "$GITHUB_ENV" + } + + nightly_build() { + { + echo "ROCM_SDK_CHANNEL=nightly" + echo "ROCM_SDK_RELEASE_URL=" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + } >> "$GITHUB_ENV" + } + + # Manual run with a pin: resolve tarball location by version format (nightly x.y.za… vs release X.Y.Z) + format_build() { + { + echo "ROCM_SDK_CHANNEL=auto" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + } >> "$GITHUB_ENV" + } + + EVENT='${{ github.event_name }}' + REF='${{ github.ref }}' + IN_VER='${{ github.event.inputs.rocm_version }}' + VAR_VER='${{ vars.ROCM_VERSION }}' + + if [ "$EVENT" = "schedule" ]; then + nightly_build + echo "ROCm SDK channel: nightly (scheduled — latest nightly)" + elif [ "$EVENT" = "pull_request" ]; then + release_build + echo "ROCm SDK channel: release (pull request — latest X.Y.Z)" + elif [ "$EVENT" = "push" ]; then + if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then + release_build + echo "ROCm SDK channel: release (push to main or release/* — includes merge)" + else + nightly_build + echo "ROCm SDK channel: nightly (push to feature branch)" + fi + elif [ "$EVENT" = "workflow_dispatch" ]; then + if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then + format_build + echo "ROCm SDK: manual — tarball base chosen by version format (input or vars.ROCM_VERSION)" + else + nightly_build + echo "ROCm SDK channel: nightly (manual, no version pin)" + fi + else + nightly_build + echo "ROCm SDK channel: nightly (fallback)" + fi + - name: Build and Package RVS run: | chmod +x build_packages_local.sh - ROCM_VERSION=${{ env.ROCM_VERSION }} \ - GPU_FAMILY=${{ env.GPU_FAMILY }} \ - BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ - ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ + # Container runs as root; ROCM_SDK_* come from "Configure ROCm SDK channel" via GITHUB_ENV. ./build_packages_local.sh - name: Verify DEB Package @@ -121,13 +196,13 @@ jobs: echo "Package filename: $DEB_FILE" fi - # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) + # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs: OIDC token response is empty → JSON parse fails) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: apt-get update && apt-get install -y awscli - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -148,7 +223,7 @@ jobs: # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -185,7 +260,7 @@ jobs: # can be consumed directly as a DEB repository by apt. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload DEB repo metadata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -195,8 +270,10 @@ jobs: BASE="rvs" if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then DEB_PREFIX="release/${BASE}/deb" + APT_SUITE="rvs-release" else DEB_PREFIX="nightly/${BASE}/deb" + APT_SUITE="rvs-nightly" fi STAGING=$(mktemp -d) @@ -210,8 +287,16 @@ jobs: cd "$STAGING" dpkg-scanpackages --multiversion . /dev/null > Packages + # dpkg-scanpackages emits "Filename: ./foo.deb". APT resolves that under the repo URL and may + # request .../deb/./foo.deb — S3/CloudFront keys are literal, so that path 404s. Strip "./". + sed -i 's#^Filename: \./#Filename: #g' Packages gzip -k -f Packages - apt-ftparchive release . > Release + apt-ftparchive \ + -o APT::FTPArchive::Release::Origin="ROCm Validation Suite" \ + -o APT::FTPArchive::Release::Label="${APT_SUITE}" \ + -o APT::FTPArchive::Release::Suite="${APT_SUITE}" \ + -o APT::FTPArchive::Release::Codename="${APT_SUITE}" \ + release . > Release aws s3 sync "$STAGING/" "s3://${BUCKET}/${DEB_PREFIX}/" --no-progress @@ -229,7 +314,7 @@ jobs: outputs: s3_bucket_centos: ${{ steps.upload-s3-centos.outputs.bucket }} s3_paths_centos: ${{ steps.upload-s3-centos.outputs.paths }} - + steps: - name: Install Git (for checkout) run: | @@ -253,15 +338,84 @@ jobs: echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV fi + # Schedule → nightly latest. PR + merge → release latest. Manual → format when version pinned. + - name: Configure ROCm SDK channel (nightly vs release) + run: | + NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' + NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' + [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' + [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' + + REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' + [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' + REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' + [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" + + release_build() { + { + echo "ROCM_SDK_CHANNEL=release" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_BASE_URL=$REL_BASE" + echo "ROCM_SDK_INDEX_URL=" + } >> "$GITHUB_ENV" + } + + nightly_build() { + { + echo "ROCM_SDK_CHANNEL=nightly" + echo "ROCM_SDK_RELEASE_URL=" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + } >> "$GITHUB_ENV" + } + + format_build() { + { + echo "ROCM_SDK_CHANNEL=auto" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + } >> "$GITHUB_ENV" + } + + EVENT='${{ github.event_name }}' + REF='${{ github.ref }}' + IN_VER='${{ github.event.inputs.rocm_version }}' + VAR_VER='${{ vars.ROCM_VERSION }}' + + if [ "$EVENT" = "schedule" ]; then + nightly_build + echo "ROCm SDK channel: nightly (scheduled)" + elif [ "$EVENT" = "pull_request" ]; then + release_build + echo "ROCm SDK channel: release (pull request)" + elif [ "$EVENT" = "push" ]; then + if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then + release_build + echo "ROCm SDK channel: release (push to main or release/*)" + else + nightly_build + echo "ROCm SDK channel: nightly (feature branch push)" + fi + elif [ "$EVENT" = "workflow_dispatch" ]; then + if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then + format_build + echo "ROCm SDK: manual — format-based tarball" + else + nightly_build + echo "ROCm SDK channel: nightly (manual, no version)" + fi + else + nightly_build + echo "ROCm SDK channel: nightly (fallback)" + fi + - name: Build and Package RVS run: | chmod +x build_packages_local.sh - - ROCM_VERSION=${{ env.ROCM_VERSION }} \ - GPU_FAMILY=${{ env.GPU_FAMILY }} \ - BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ - ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ ./build_packages_local.sh - name: Verify RPM Package @@ -281,14 +435,14 @@ jobs: echo "Package filename: $RPM_FILE" fi - # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) + # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs — OIDC not usable) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -309,7 +463,7 @@ jobs: # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos - if: github.repository == 'ROCm/ROCmValidationSuite' + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -347,12 +501,12 @@ jobs: echo "paths=CentOS/RHEL packages|${PREFIX}" >> $GITHUB_OUTPUT fi echo "Done." - + # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed # directly as an RPM repository by yum/dnf. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload RPM repodata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -387,7 +541,7 @@ jobs: runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} # Only runs when the workflow is not cancelled and always() is true if: always() && !cancelled() - + steps: - name: Generate Build Report run: | From 1e51831548e7bc178b9b38566c9a6b1b1f452df0 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 15 May 2026 12:39:23 +0530 Subject: [PATCH 146/275] Update build_packages_local.sh --- build_packages_local.sh | 217 ++++++++++++++++++++++++++++++---------- 1 file changed, 165 insertions(+), 52 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index baa4d3820..2c9c8abbd 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -13,13 +13,61 @@ BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" # SDK Source Configuration -# Default: TheRock public S3 nightly bucket (works from any network). -# Override via environment variables or GitHub Actions repository variables (vars.*). +# Defaults point at AMD-hosted listings (override via env or GitHub vars). +# - Nightly index: https://rocm.nightlies.amd.com/tarball-multi-arch/ +# - Release listing: https://repo.amd.com/rocm/tarball/ # -# If your SDK server has no index page for auto-detection, set ROCM_SDK_INDEX_URL="" -# and provide ROCM_VERSION explicitly. -ROCM_SDK_BASE_URL="${ROCM_SDK_BASE_URL:-https://therock-nightly-tarball.s3.us-east-2.amazonaws.com}" -ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" +# Local builds: if ROCM_VERSION is unset (channel auto, no release listing env), latest *nightly* is fetched. +# If ROCM_VERSION is set, tarball base follows format: +# - Nightly: x.y.za (e.g. 7.11.0a20260121) → nightly base URL +# - Release: X.Y.Z (e.g. 7.11.0) → release base URL +# +# ROCM_SDK_CHANNEL: nightly | release | auto (default auto). +# - nightly: latest SDK from nightly listing (ROCM_SDK_INDEX_URL). +# - release: latest X.Y.Z from release listing (ROCM_SDK_RELEASE_URL). +# - auto: release listing URL set → release discovery; else nightly index. +# +# Optional: ROCM_SDK_NIGHTLY_BASE_URL, ROCM_SDK_NIGHTLY_INDEX_URL, ROCM_SDK_RELEASE_URL (listing), +# ROCM_SDK_RELEASE_BASE_URL (tarball directory for X.Y.Z downloads). +_ROCM_NIGHTLY_INDEX_DEFAULT="https://rocm.nightlies.amd.com/tarball-multi-arch/" +_ROCM_NIGHTLY_BASE_DEFAULT="https://rocm.nightlies.amd.com/tarball-multi-arch" +_ROCM_RELEASE_LIST_DEFAULT="https://repo.amd.com/rocm/tarball/" +_ROCM_RELEASE_BASE_DEFAULT="https://repo.amd.com/rocm/tarball" + +ROCM_SDK_CHANNEL="${ROCM_SDK_CHANNEL:-auto}" +ROCM_SDK_RELEASE_URL="${ROCM_SDK_RELEASE_URL:-}" + +if [ "$ROCM_SDK_CHANNEL" = "nightly" ]; then + ROCM_SDK_RELEASE_URL="" + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + ROCM_SDK_INDEX_URL="${ROCM_SDK_NIGHTLY_INDEX_URL:-${ROCM_SDK_INDEX_URL:-$_ROCM_NIGHTLY_INDEX_DEFAULT}}" +elif [ "$ROCM_SDK_CHANNEL" = "release" ]; then + ROCM_SDK_RELEASE_URL="${ROCM_SDK_RELEASE_URL:-$_ROCM_RELEASE_LIST_DEFAULT}" + if [ -z "${ROCM_SDK_BASE_URL:-}" ]; then + if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" + else + # Same directory as listing: strip trailing / only (not %/* — that drops /tarball when URL has no trailing slash). + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/}" + fi + fi + ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-}" +else + # auto (local: no release URL → nightly latest; CI sets channel explicitly) + if [ -n "${ROCM_SDK_RELEASE_URL}" ]; then + if [ -z "${ROCM_SDK_BASE_URL:-}" ]; then + if [ -n "${ROCM_SDK_RELEASE_BASE_URL:-}" ]; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL}" + else + # Listing URL and tarball base share the same path; normalize trailing slash only. + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_URL%/}" + fi + fi + else + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + fi + ROCM_SDK_INDEX_URL="${ROCM_SDK_NIGHTLY_INDEX_URL:-${ROCM_SDK_INDEX_URL:-$_ROCM_NIGHTLY_INDEX_DEFAULT}}" +fi # Post-build upload configuration # Set UPLOAD_TARGET to enable automatic upload of built packages after the build. @@ -69,6 +117,27 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1" >&2 } +# Join base URL and filename without duplicate slashes +join_base_and_file() { + local base="$1" + local path="$2" + base="${base%/}" + printf '%s/%s' "$base" "$path" +} + +# After ROCM_VERSION is known: pick tarball host directory from version shape (overrides channel defaults). +# Nightly: x.y.za Release: X.Y.Z (three-part semver only) +apply_sdk_tarball_base_for_version() { + local v="$1" + if echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+a[0-9]+'; then + ROCM_SDK_BASE_URL="${ROCM_SDK_NIGHTLY_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_NIGHTLY_BASE_DEFAULT}}" + print_info "Version matches ROCm nightly format (x.y.za…) → tarball base: $ROCM_SDK_BASE_URL" + elif echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then + ROCM_SDK_BASE_URL="${ROCM_SDK_RELEASE_BASE_URL:-${ROCM_SDK_BASE_URL:-$_ROCM_RELEASE_BASE_DEFAULT}}" + print_info "Version matches ROCm release format (X.Y.Z) → tarball base: $ROCM_SDK_BASE_URL" + fi +} + # Function to fetch latest ROCm version for specified GPU family # Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { @@ -82,19 +151,41 @@ fetch_latest_rocm_version() { local latest_version=$(wget -qO- "$ROCM_SDK_INDEX_URL" 2>/dev/null | \ grep -oP "therock-dist-linux-${gpu_family}-\K[^<\"]+(?=\.tar\.gz)" | \ sort -V | tail -1) - + if [ -z "$latest_version" ]; then - print_error "Could not fetch latest ROCm version for $gpu_family" - print_info "Falling back to default version: 7.11.0a20260121" - ROCM_VERSION="7.11.0a20260121" + print_error "Could not fetch latest ROCm nightly version for $gpu_family from $ROCM_SDK_INDEX_URL" return 1 fi - + print_success "Found latest ROCm version: $latest_version" ROCM_VERSION="$latest_version" return 0 } +# Fetch latest ROCm *release* tarball version (semantic X.Y.Z only; excludes nightly builds like 7.11.0a20260121). +# Parses ROCM_SDK_RELEASE_URL (HTML listing / index). Sets ROCM_VERSION. +fetch_latest_rocm_release_version() { + local gpu_family="$1" + local list_url="${ROCM_SDK_RELEASE_URL:-$_ROCM_RELEASE_LIST_DEFAULT}" + + print_info "Fetching latest ROCm release version (X.Y.Z) for $gpu_family..." + print_info "Release listing URL: $list_url" + + local latest_version + latest_version=$(wget -qO- "$list_url" 2>/dev/null | \ + grep -oP "therock-dist-linux-${gpu_family}-\K[0-9]+\.[0-9]+\.[0-9]+(?=\.tar\.gz)" | \ + sort -V | uniq | tail -1) + + if [ -z "$latest_version" ]; then + print_error "No therock-dist-linux-${gpu_family}-X.Y.Z.tar.gz found under release listing (expected forms like 7.11.0)" + return 1 + fi + + print_success "Found latest ROCm release version: $latest_version" + ROCM_VERSION="$latest_version" + return 0 +} + # ROCm SDK CMake configs (e.g. hipblaslt-config.cmake) call block(), which was added # in CMake 3.25. Ubuntu 22.04 ships cmake 3.22 — too old. # Try Kitware's APT repo first (clean apt integration); fall back to pip for restricted @@ -173,7 +264,7 @@ ensure_recent_cmake_ubuntu() { # Function to check and install dependencies check_and_install_dependencies() { print_info "Checking for required build dependencies..." - + # Detect OS if [ -f /etc/os-release ]; then . /etc/os-release @@ -182,7 +273,7 @@ check_and_install_dependencies() { print_error "Cannot detect OS. Please install dependencies manually." exit 1 fi - + # Check for command-line tools MISSING_TOOLS=() command -v cmake >/dev/null 2>&1 || MISSING_TOOLS+=("cmake") @@ -194,7 +285,7 @@ check_and_install_dependencies() { command -v tar >/dev/null 2>&1 || MISSING_TOOLS+=("tar") command -v doxygen >/dev/null 2>&1 || MISSING_TOOLS+=("doxygen") command -v python3 >/dev/null 2>&1 || MISSING_TOOLS+=("python3") - + # Check for library dependencies (platform-specific) MISSING_LIBS=() if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then @@ -211,16 +302,16 @@ check_and_install_dependencies() { [ -f /usr/include/numa.h ] || MISSING_LIBS+=("numactl-devel") command -v rpmbuild >/dev/null 2>&1 || MISSING_LIBS+=("rpm-build") fi - + # Combine missing tools and libraries MISSING_DEPS=() [ ${#MISSING_TOOLS[@]} -ne 0 ] && MISSING_DEPS+=("${MISSING_TOOLS[@]}") [ ${#MISSING_LIBS[@]} -ne 0 ] && MISSING_DEPS+=("${MISSING_LIBS[@]}") - + if [ ${#MISSING_DEPS[@]} -ne 0 ]; then print_warning "Missing dependencies: ${MISSING_DEPS[*]}" echo "" - + if [[ "$OS" =~ ^(ubuntu|debian)$ ]]; then print_info "Installing dependencies for Ubuntu/Debian..." apt-get update @@ -239,12 +330,12 @@ check_and_install_dependencies() { libnuma-dev elif [[ "$OS" =~ ^(centos|rhel|rocky|almalinux|amzn)$ ]]; then print_info "Installing dependencies for CentOS/RHEL/Rocky/AlmaLinux..." - + # Check if running in manylinux container (has /opt/python) if [ -d /opt/python ]; then print_info "Detected manylinux environment - some tools may be pre-installed" fi - + # Enable PowerTools/CRB repository (contains doxygen and yaml-cpp) print_info "Enabling PowerTools/CRB repository..." if command -v dnf >/dev/null 2>&1; then @@ -262,11 +353,11 @@ check_and_install_dependencies() { yum-config-manager --enable devel 2>/dev/null || \ print_warning "Could not enable PowerTools/devel repo (may already be enabled)" fi - + # Install EPEL repository (may already be present in manylinux) print_info "Installing EPEL repository..." yum install -y epel-release 2>/dev/null || print_warning "EPEL may already be installed" - + print_info "Installing build dependencies..." # Note: manylinux typically has gcc, g++, make pre-installed yum install -y \ @@ -282,7 +373,7 @@ check_and_install_dependencies() { python3 \ numactl-devel \ || print_warning "Some packages may already be installed" - + # Install a gcc-toolset with C++20 support (requires GCC >= 11) # Try highest available first for best C++20/C++23 support, fall back to minimum viable # RHEL/AlmaLinux/Rocky 8+ use gcc-toolset-{ver}, CentOS 7 uses devtoolset-{ver} @@ -312,11 +403,11 @@ check_and_install_dependencies() { print_warning "No gcc-toolset (11-14) or devtoolset-11 available - C++20 headers like may be missing" fi fi - + # Install cmake and yaml-cpp separately as they may need special handling print_info "Installing cmake..." yum install -y cmake3 || yum install -y cmake || print_warning "cmake installation may have failed" - + print_info "Installing yaml-cpp..." yum install -y yaml-cpp-devel yaml-cpp-static 2>/dev/null || \ print_warning "yaml-cpp may not be available - will try to continue" @@ -341,10 +432,10 @@ check_and_install_dependencies() { echo " - rpm-build tools" exit 1 fi - + print_success "Dependencies installed successfully" echo "" - + # Verify installation by re-checking print_info "Verifying installation..." VERIFY_FAILED=() @@ -353,7 +444,7 @@ check_and_install_dependencies() { VERIFY_FAILED+=("$tool") fi done - + if [ ${#VERIFY_FAILED[@]} -ne 0 ]; then print_error "Failed to install: ${VERIFY_FAILED[*]}" exit 1 @@ -369,12 +460,40 @@ check_and_install_dependencies() { check_and_install_dependencies ensure_recent_cmake_ubuntu -# Determine ROCm version: use environment variable or fetch latest (wget is now available) +# Determine ROCm version: explicit env > channel-specific listing if [ -n "$ROCM_VERSION" ]; then print_info "Using specified ROCm version: $ROCM_VERSION" +elif [ "$ROCM_SDK_CHANNEL" = "nightly" ]; then + print_info "No ROCm version specified; fetching latest from ROCm nightly index (channel=nightly)..." + if [ -z "$ROCM_SDK_INDEX_URL" ]; then + print_error "ROCM_SDK_CHANNEL=nightly requires ROCM_SDK_INDEX_URL" + exit 1 + fi + fetch_latest_rocm_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm nightly version" + exit 1 + fi +elif [ "$ROCM_SDK_CHANNEL" = "release" ]; then + print_info "No ROCm version specified; fetching latest release X.Y.Z from ROCM_SDK_RELEASE_URL..." + if [ -z "$ROCM_SDK_RELEASE_URL" ]; then + print_error "ROCM_SDK_CHANNEL=release requires ROCM_SDK_RELEASE_URL when ROCM_VERSION is unset" + exit 1 + fi + fetch_latest_rocm_release_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm release version" + exit 1 + fi +elif [ -n "$ROCM_SDK_RELEASE_URL" ]; then + print_info "No ROCm version specified; resolving latest release from ROCM_SDK_RELEASE_URL (channel=auto)..." + fetch_latest_rocm_release_version "$GPU_FAMILY" + if [ -z "$ROCM_VERSION" ]; then + print_error "Failed to determine ROCm release version" + exit 1 + fi elif [ -n "$ROCM_SDK_INDEX_URL" ]; then - # Auto-detection only works when an index URL is available (e.g. S3 bucket) - print_info "No ROCm version specified, fetching latest from index..." + print_info "No ROCm version specified, fetching latest from nightly index (channel=auto)..." fetch_latest_rocm_version "$GPU_FAMILY" if [ -z "$ROCM_VERSION" ]; then @@ -383,25 +502,23 @@ elif [ -n "$ROCM_SDK_INDEX_URL" ]; then fi else print_error "ROCM_VERSION is required" - print_info "The configured SDK server does not provide an index page for auto-detection." - print_info "Set it via environment variable, e.g.:" + print_info "Set ROCM_VERSION, or configure ROCM_SDK_RELEASE_URL (release X.Y.Z tarballs) or ROCM_SDK_INDEX_URL (nightly listing)." + print_info "Example:" echo "" - echo " export ROCM_VERSION=\"7.11.0a20260121\"" + echo " export ROCM_VERSION=\"7.11.0\"" echo " ./build_packages_local.sh" echo "" - print_info "Or in GitHub Actions workflow:" - echo "" - echo " env:" - echo " ROCM_VERSION: \"7.11.0a20260121\"" - echo "" exit 1 fi +apply_sdk_tarball_base_for_version "$ROCM_VERSION" + # Print configuration echo "================================================================================" echo " ROCm Validation Suite - Local Package Build Script" echo "================================================================================" print_info "ROCm Version: $ROCM_VERSION" +print_info "ROCm SDK channel: ${ROCM_SDK_CHANNEL:-auto}" print_info "GPU Family: $GPU_FAMILY" print_info "Build Type: $BUILD_TYPE" print_info "Build Directory: $BUILD_DIR" @@ -416,7 +533,7 @@ echo "" # Step 1: Download ROCm SDK print_info "Step 1: Downloading ROCm SDK tarball..." -TARBALL_URL="${ROCM_SDK_BASE_URL}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" +TARBALL_URL=$(join_base_and_file "$ROCM_SDK_BASE_URL" "therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz") TARBALL_FILE="$ROCM_INSTALL_DIR/rocm-sdk.tar.gz" mkdir -p "$ROCM_INSTALL_DIR" @@ -455,13 +572,13 @@ if [ -z "$goto_step2" ]; then print_info "Please check if the ROCm version and GPU family are correct" exit 1 fi - + # Extract tarball print_info "Extracting ROCm SDK..." mkdir -p "$ROCM_INSTALL_DIR/install" tar -xzf "$TARBALL_FILE" -C "$ROCM_INSTALL_DIR/install" --strip-components=1 print_success "Extraction complete" - + export ROCM_PATH="$ROCM_INSTALL_DIR/install" print_success "ROCm SDK installed to: $ROCM_PATH" fi @@ -574,7 +691,7 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then else print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi - + # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" @@ -645,8 +762,8 @@ if [ -d "$BUILD_DIR" ]; then rm -rf "$BUILD_DIR" fi -# Build cmake command with optional CXX compiler -# TODO: May be cleanup RPATH later with lesser options. +# Build cmake command with optional CXX compiler. +# CMAKE_INSTALL_RPATH / CMAKE_SKIP_RPATH / CMAKE_INSTALL_RPATH_USE_LINK_PATH live in CMakeLists.txt. CMAKE_ARGS=( -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" @@ -656,10 +773,6 @@ CMAKE_ARGS=( -DCPACK_PACKAGE_NAME="amdrocm${ROCM_MAJOR}-rvs" -DCMAKE_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" - -DCMAKE_SKIP_RPATH=FALSE - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE - -DCMAKE_INSTALL_RPATH="\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib/rvs:/opt/rocm/extras-${ROCM_MAJOR}/lib" - -DRPATH_MODE=OFF -DCMAKE_VERBOSE_MAKEFILE=1 -DFETCH_ROCMPATH_FROM_ROCMCORE=ON ) @@ -708,14 +821,14 @@ if command -v dpkg >/dev/null 2>&1; then print_info "Creating DEB package..." cd "$BUILD_DIR" cpack -G DEB --verbose - + if [ $? -eq 0 ]; then DEB_FILE=$(ls amdrocm*-rvs*.deb 2>/dev/null | head -1) if [ -n "$DEB_FILE" ]; then print_success "Created DEB package: $DEB_FILE" DEB_SIZE=$(du -h "$DEB_FILE" | cut -f1) print_info "Package size: $DEB_SIZE" - + # Verify DEB package print_info "Verifying DEB package..." dpkg-deb -I "$DEB_FILE" | head -20 @@ -732,14 +845,14 @@ if command -v rpm >/dev/null 2>&1; then cd "$BUILD_DIR" cpack -G RPM --verbose - + if [ $? -eq 0 ]; then RPM_FILE=$(ls amdrocm*-rvs*.rpm 2>/dev/null | head -1) if [ -n "$RPM_FILE" ]; then print_success "Created RPM package: $RPM_FILE" RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1) print_info "Package size: $RPM_SIZE" - + # Verify RPM package print_info "Verifying RPM package..." rpm -qip "$RPM_FILE" | head -20 From 676057057c249fc8b1d5a85f5de61ac6ce7289d7 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 14 May 2026 18:49:44 -0500 Subject: [PATCH 147/275] Additions, Corrections and Updates in docs --- README.md | 75 +++++++++++++++++++++++++++++----------------- docs/features.md | 33 +++++++++++--------- docs/ug1main.md | 78 +++++++++++++++++++++++++----------------------- 3 files changed, 108 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index 1c2579029..5bdb1bbae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ROCmValidationSuite -The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that affects the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. +The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that affect the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. -RVS is a collection of tests, benchmarks and qualification tools each targeting a specific sub-system of the ROCm platform. All of the tools are implemented in software and share a common command line interface. Each set of tests are implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. +RVS is a collection of tests, benchmarks and qualification tools each targeting a specific sub-system of the ROCm platform. All of the tools are implemented in software and share a common command-line interface. Each set of tests is implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. For different RVS modules and their description, refer to [the documentation on features](./FEATURES.md). @@ -39,12 +39,9 @@ sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gc Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to [ROCm installation guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html) for more details. -**Note:** - -rocm_smi64 package has been renamed to rocm-smi-lib64 from >= ROCm3.0. If you are using ROCm release < 3.0 , install the package as "rocm_smi64". -rocm-smi-lib64 package has been renamed to rocm-smi-lib from >= ROCm4.1. +Install rocBLAS and the SMI library. For ROCm 6.4 and earlier, install `rocm-smi-lib`. For ROCm 7.0 and later, install `amd-smi-lib`. -Install rocBLAS. For ROCm 6.4 and earlier, install ``rocm-smi-lib``. For ROCm 7.0 and later, install ``amd-smi-lib``. +**ROCm 6.4 and earlier:** Ubuntu : @@ -64,8 +61,28 @@ SUSE : sudo zypper install rocblas rocm-smi-lib ``` +**ROCm 7.0 and later:** + +Ubuntu : + +``` +sudo apt-get install rocblas amd-smi-lib +``` + +CentOS & RHEL : + +``` +sudo yum install --nogpgcheck rocblas amd-smi-lib +``` + +SUSE : + +``` +sudo zypper install rocblas amd-smi-lib +``` + **Note:** -If rocm-smi-lib is already installed but /opt/rocm/lib/librocm_smi64.so doesn't exist. Do below: +If `rocm-smi-lib` is already installed but `/opt/rocm/lib/librocm_smi64.so` does not exist, reinstall it as follows: Ubuntu : @@ -76,13 +93,13 @@ sudo dpkg -r rocm-smi-lib && sudo apt install rocm-smi-lib CentOS & RHEL : ``` -sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib +sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib ``` SUSE : ``` -sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib +sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib ``` ## Building from Source @@ -104,7 +121,7 @@ If ROCm 6.4 is installed, clone the RVS repository from the 6.4 release branch b git clone https://github.com/ROCm/ROCmValidationSuite.git -b release/rocm-rel-6.4 ``` -### Configure: +### Configure ``` cd ROCmValidationSuite @@ -126,16 +143,16 @@ Option 2: Using the symbolic link cmake -B ./build -DROCM_PATH=/opt/rocm -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm ``` -### Build binary: +### Build binary ``` make -C ./build ``` **Note:** -Use the -j option with the build command to enable parallel compilation, which can significantly speed up the build process. +Use the `-j` option with the build command to enable parallel compilation, which can significantly speed up the build process. -### Build package: +### Build package ``` cd ./build @@ -145,7 +162,7 @@ make package **Note:** Based on your OS, only DEB or RPM package will be built. You may ignore an error for the unrelated configuration -### Install built package: +### Install built package Ubuntu : @@ -160,10 +177,10 @@ sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm ``` **Note:** -RVS is getting packaged as part of ROCm release starting from 3.0. You can install pre-compiled package as below. +RVS is getting packaged as part of ROCm release starting from 3.0. You can install the pre-compiled package as below. Please make sure Prerequisites, ROCm stack, rocblas and rocm-smi-lib64 are already installed -### Install package packaged with ROCm release: +### Install package packaged with ROCm release Ubuntu : @@ -194,9 +211,11 @@ cd /build/bin Command examples: ``` -./rvs --help ; Lists all options to run RVS test suite -./rvs -g ; Lists supported GPUs available in the machine -./rvs -c conf/gst_single.conf ; Run GST module default test configuration +./rvs --help # Lists all options to run RVS test suite +./rvs -g # Lists supported GPUs available in the machine +./rvs -c conf/gst_single.conf # Run GST module default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected ``` ### Run version pre-compiled and packaged with ROCm release @@ -208,16 +227,18 @@ cd /opt/rocm/bin Command examples: ``` -./rvs --help ; Lists all options to run RVS test suite -./rvs -g ; Lists supported GPUs available in the machine -./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf ; Run GST default test configuration +./rvs --help # Lists all options to run RVS test suite +./rvs -g # Lists supported GPUs available in the machine +./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected ``` To run GPU specific test configuration, use configuration files from GPU folders in "/opt/rocm/share/rocm-validation-suite/conf" ``` -./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf ; Run MI300X specific GST test configuration -./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration +./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration +./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration ``` **Note:** @@ -225,5 +246,5 @@ If present, always use GPU specific configurations instead of default test confi ## Reporting -Test results, errors and verbose logs are printed as terminal output. To enable json logging use "-j" command line option. -The json output file path can be specified after "-j" option. If not specified, a file is created in /var/tmp folder and the name of the file will be printed to stdout. The json file schemas are documented at [schemas](./docs/schemas) +Test results, errors and verbose logs are printed as terminal output. To enable JSON logging, use the `-j` command-line option. +The JSON output file path can be specified after the `-j` option. If not specified, a file is created in the `/var/tmp` folder and the name of the file will be printed to stdout. The JSON file schemas are documented at [schemas](./docs/schemas) diff --git a/docs/features.md b/docs/features.md index d461b7a12..d5e0ddab8 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,20 +1,20 @@ # ROCmValidationSuite Modules -## GPU Properties – GPUP +## GPU Properties – GPUP module The GPU Properties module queries the configuration of a target device and returns the device’s static characteristics. These static values can be used to debug issues such as device support, performance and firmware problems. ## GPU Monitor – GM module [deprecated] -The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS modules execution if one of the quantities exceeds a specified boundary value. +The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS module's execution if one of the quantities exceeds a specified boundary value. -## PCI Express State Monitor – PESM module [deprecated] +## PCI Express State Monitor – PESM module [deprecated] The PCIe State Monitor tool is used to actively monitor the PCIe interconnect between the host platform and the GPU. The module will register a “listener” on a target GPU’s PCIe interconnect, and log a message whenever it detects a state change. The PESM will be able to detect the following state changes: 1. PCIe link speed changes 2. GPU power state changes -## ROCm Configuration Qualification Tool - RCQT module -The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes checking the dependencies corresponding to the ROCm meta-packages are installed correctly. +## ROCm Configuration Qualification Tool – RCQT module +The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes verifying that the dependencies corresponding to the ROCm meta-packages are installed correctly. ## PCI Express Qualification Tool – PEQT module The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is connected. The qualification test will be capable of determining the following characteristics of the PCIe bus interconnect to a GPU: @@ -24,7 +24,7 @@ The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is 3. PCIe link speed 4. PCIe link width -## SBIOS Mapping Qualification Tool – SMQT module [deprecated] +## SBIOS Mapping Qualification Tool – SMQT module [deprecated] The GPU SBIOS mapping qualification tool is designed to verify that a platform’s SBIOS has satisfied the BAR mapping requirements for VDI and Radeon Instinct products for ROCm support. ## P2P Benchmark and Qualification Tool – PBQT module @@ -33,14 +33,14 @@ The P2P Benchmark and Qualification Tool is designed to provide the list of all ## PCI Express Bandwidth Benchmark – PEBB module The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA transfers between system memory and a target GPU card’s memory. The maximum bandwidth obtained is reported to help debug low bandwidth issues. The benchmark should be capable of targeting one, some or all of the GPUs installed in a platform, reporting individual benchmark statistics for each. -## GPU Stress Test - GST module -The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). +## GPU Stress Test – GST module +The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). -## Input EDPp Test - IET module +## Input EDPp Test – IET module The Input EDPp Test runs GEMM workloads to stress the GPU power (i.e. TGP). This test is used to verify if the GPU is capable of handling max. power stress for a sustained period of time. Also checks whether GPU power reaches a set target power. -## Memory Test - MEM module -The Memory module tests the GPU memory for hard and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests [Algorithm, data pattern] +## Memory Test – MEM module +The Memory module tests the GPU memory for hard and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests: 1. Walking 1 bit 2. Own address test @@ -53,9 +53,14 @@ The Memory module tests the GPU memory for hard and soft errors using HIP. It co 9. Modulo 20, random pattern 10. Memory stress test -## BABEL benchmark Test - BABEL module +## BABEL Benchmark Test – BABEL module The Babel module executes BabelStream (synthetic GPU benchmark based on the original STREAM benchmark for CPUs) benchmark that measures memory transfer rates (bandwidth) to and from global device memory. Various benchmark tests are implemented using GPU kernels in HIP (Heterogeneous Interface for Portability) programming language. -## Thermal Stress Test - TST module -The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temperatures under various stressful workloads. Also checks whether GPU junction temperature reaches target and trottle temperatures. +## Thermal Stress Test – TST module +The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temperatures under various stressful workloads. Also checks whether GPU junction temperature reaches target and throttle temperatures. + +## Pulse Stress Test – PULSE module +The Pulse Stress Test creates power fluctuations by alternating between high-compute (GEMM) and idle phases at a configurable rate. A two-level barrier synchronizes all GPUs so they spike current simultaneously, maximizing stress on the PSU. + +**PS: Beta version — not intended for production use. Pass/fail criteria are still being tuned.** diff --git a/docs/ug1main.md b/docs/ug1main.md index 7a0575702..1aee88909 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -3,14 +3,14 @@ ## Introduction The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that -affects the functionality and performance of AMD GPU(s) operating in a +affect the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. RVS is a collection of tests, benchmarks, and qualification tools each targeting a specific sub-system of the ROCm platform. The tools are -implemented in software and share a common command line interface. Each set of -tests are implemented in a “module” which is a library encapsulating the +implemented in software and share a common command-line interface. Each set of +tests is implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. @@ -50,23 +50,27 @@ RVS package components are installed in `/opt/rocm`. Package contains: cd /build/bin Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -c conf/gst_single.conf ; Run GST module default test configuration + ./rvs --help # Lists all options to run RVS test suite + ./rvs -g # Lists supported GPUs available in the machine + ./rvs -c conf/gst_single.conf # Run GST module default test configuration + ./rvs -m gst # Run GST module using platform-detected config + ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected -### Run version pre-compiled and packaged with ROCm release +#### Run version pre-compiled and packaged with ROCm release cd /opt/rocm/bin Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf ; Run GST default test configuration + ./rvs --help # Lists all options to run RVS test suite + ./rvs -g # Lists supported GPUs available in the machine + ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration + ./rvs -m gst # Run GST module using platform-detected config + ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected To run GPU specific test configuration, use configuration files from GPU folders in "/opt/rocm/share/rocm-validation-suite/conf" - ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf ; Run MI300X specific GST test configuration - ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration + ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration + ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration Note: If present, always use GPU specific configurations instead of default test configurations. @@ -88,7 +92,7 @@ allowing for easy addition of new modules in the future. The GPU Properties module queries the configuration of a target device and returns the device’s static characteristics. These static values can be used to debug issues such as device support, performance and firmware problems. #### GPU Monitor – GM module -The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS modules execution if one of the quantities exceeds a specified boundary value. +The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS module's execution if one of the quantities exceeds a specified boundary value. #### PCI Express State Monitor – PESM module The PCIe State Monitor tool is used to actively monitor the PCIe interconnect between the host platform and the GPU. The module will register a “listener” on a target GPU’s PCIe interconnect, and log a message whenever it detects a state change. The PESM will be able to detect the following state changes: @@ -97,7 +101,7 @@ The PCIe State Monitor tool is used to actively monitor the PCIe interconnect be 2. GPU power state changes #### ROCm Configuration Qualification Tool - RCQT module -The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes checking the dependencies corresponding to the ROCm meta-packages are installed correctly. +The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes verifying that the dependencies corresponding to the ROCm meta-packages are installed correctly. #### PCI Express Qualification Tool – PEQT module The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is connected. The qualification test will be capable of determining the following characteristics of the PCIe bus interconnect to a GPU: @@ -121,7 +125,7 @@ Please see the web page “ROCm, a New Era in Open GPU Computing” to find out The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA transfers between system memory and a target GPU card’s memory. The maximum bandwidth obtained is reported to help debug low bandwidth issues. The benchmark should be capable of targeting one, some or all of the GPUs installed in a platform, reporting individual benchmark statistics for each. #### GPU Stress Test - GST module -The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). +The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). #### Input EDPp Test - IET module The Input EDPp Test runs GEMM workloads to stress the GPU power (that is, TGP). This test is used to verify if the GPU is capable of handling max. power stress for a sustained period of time. Also checks whether GPU power reaches a set target power. @@ -222,11 +226,11 @@ isn’t specified the default is 1. Some modules will ignore this parameter. + + @@ -409,7 +413,7 @@ format will be returned: **Example 1:** -Consider action> +Consider action: actions: - name: action_1 @@ -562,7 +566,7 @@ message will be printed to stdout while the bounding value is still exceeded.
Config Key Type Description
rpmpackagelistCollection of StringsSpecifies the packages checked if installed on system for rhel/centos family.
Specifies the packages checked if installed on system for rhel family.
debpackagelistCollection of Strings Specifies the packages checked if installed on system for ubuntu family.
-r--runSpecify the test level to run. +Valid range is 1 to 5, with 5 indicating the highest stress test level. +
-d--debugLevelSpecify the debug level for the output log. The range is 0-5 with 5 being the highest verbose level.
-s--selectActionsComma separated list of action names or 0-based action +index numbers to run from the configuration file. Only the matching actions will be executed. +All other actions are skipped. +
-j--jsonGenerate output file in JSON format. if a path follows this argument, that will be used as json log file; else a file created in /var/tmp/ with timestamp in name. diff --git a/rvs/src/rvscli.cpp b/rvs/src/rvscli.cpp index 3f6cd0706..fc12e30cd 100644 --- a/rvs/src/rvscli.cpp +++ b/rvs/src/rvscli.cpp @@ -151,6 +151,10 @@ void rvs::cli::init_grammar() { grammar.insert(gpair("-i", sp)); grammar.insert(gpair("--indexes", sp)); + sp = std::make_shared("-s", command, value); + grammar.insert(gpair("-s", sp)); + grammar.insert(gpair("--selectActions", sp)); + sp = std::make_shared("-j", command, optionalvalue); grammar.insert(gpair("-j", sp)); grammar.insert(gpair("--json", sp)); diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index 9b24b3f91..4ef6f440b 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -510,6 +510,10 @@ void rvs::exec::do_help() { cout << " if a path follows this argument, that will be used as json log file\n"; cout << " else a file created in /var/tmp/ with timestamp in name.\n\n"; + cout << "-s --selectActions Comma separated list of action names or 0-based action index numbers\n"; + cout << " to run from the configuration file. Only the matching actions will\n"; + cout << " be executed. All other actions are skipped.\n\n"; + cout << "-l --debugLogFile Generate log file with output and debug information.\n\n"; diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index b08d66d44..08cd3cb10 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -29,6 +29,9 @@ #include #include #include +#include +#include +#include #include "include/rvsexec.h" #include "yaml-cpp/yaml.h" @@ -81,13 +84,53 @@ int rvs::exec::do_yaml(const std::string& config_file) { return -1; } + std::set selected_action_names; + std::set selected_action_indices; + std::string select_val; + if (rvs::options::has_option("-s", &select_val) && !select_val.empty()) { + std::replace(select_val.begin(), select_val.end(), ',', ' '); + std::istringstream iss(select_val); + std::vector tokens; + std::string token; + bool all_numeric = true; + while (iss >> token) { + tokens.push_back(token); + try { + size_t pos = 0; + int idx = std::stoi(token, &pos); + if (pos != token.size() || idx < 0) + all_numeric = false; + } catch (...) { + all_numeric = false; + } + } + for (const auto& t : tokens) { + if (all_numeric) + selected_action_indices.insert(std::stoi(t)); + else + selected_action_names.insert(t); + } + } + bool has_selection = !selected_action_names.empty() || + !selected_action_indices.empty(); + /* Number of times to repeat the test */ for (int i = 0; i < num_times; i++) { + int action_idx = 0; // for all actions... - for (YAML::const_iterator it = actions.begin(); it != actions.end(); ++it) { + for (YAML::const_iterator it = actions.begin(); it != actions.end(); + ++it, ++action_idx) { const YAML::Node& action = *it; + if (has_selection) { + std::string action_name = action["name"].as(); + if (selected_action_names.find(action_name) == selected_action_names.end() && + selected_action_indices.find(action_idx) == selected_action_indices.end()) { + continue; + } + } + sts = 0; rvs::logger::log("Action name :" + action["name"].as(), rvs::logresults); @@ -569,13 +612,53 @@ int rvs::exec::do_yaml(yaml_data_type_t data_type, const std::string& data) { /* Start of action tests */ + std::set selected_action_names; + std::set selected_action_indices; + std::string select_val; + if (rvs::options::has_option("-s", &select_val) && !select_val.empty()) { + std::replace(select_val.begin(), select_val.end(), ',', ' '); + std::istringstream iss(select_val); + std::vector tokens; + std::string token; + bool all_numeric = true; + while (iss >> token) { + tokens.push_back(token); + try { + size_t pos = 0; + int idx = std::stoi(token, &pos); + if (pos != token.size() || idx < 0) + all_numeric = false; + } catch (...) { + all_numeric = false; + } + } + for (const auto& t : tokens) { + if (all_numeric) + selected_action_indices.insert(std::stoi(t)); + else + selected_action_names.insert(t); + } + } + bool has_selection = !selected_action_names.empty() || + !selected_action_indices.empty(); + /* Number of times to execute the test */ for (int i = 0; i < num_times; i++) { + int action_idx = 0; // for all actions... - for (YAML::const_iterator it = actions.begin(); it != actions.end(); ++it) { + for (YAML::const_iterator it = actions.begin(); it != actions.end(); + ++it, ++action_idx) { const YAML::Node& action = *it; + if (has_selection) { + std::string action_name = action["name"].as(); + if (selected_action_names.find(action_name) == selected_action_names.end() && + selected_action_indices.find(action_idx) == selected_action_indices.end()) { + continue; + } + } + sts = 0; rvs::logger::log("Action name :" + action["name"].as(), rvs::logresults); From c9728cd3b47a582474b8d0aa879f8c15b3aff21a Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 16 Mar 2026 11:38:12 -0700 Subject: [PATCH 078/275] github workflow update to upload pacakges to S3 Each time build is done packages created should be uploaded to AWS S3 bucket for PR builds. --- .github/workflows/README_BUILD_PACKAGES.md | 28 ++++++++++ .../workflows/build-relocatable-packages.yml | 56 +++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 2fd6f2f49..3ce14bb41 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -113,6 +113,34 @@ The GitHub Actions workflow performs minimal platform-specific operations: 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) 5. **Upload Artifacts** - Store packages with 30-day retention +6. **Upload to S3** (push to `master`/`main` only) - Right after packages are built, each job (Ubuntu and CentOS) uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET`. + +### S3 Upload (OIDC – No Stored Credentials) + +On push to `master` or `main`, **each build job** uploads its packages to S3 as soon as that job finishes building (no separate upload job). Uses **AWS OIDC**; no long-term access key or secret. + +**Where `vars` and `secrets` are defined** + +They are **not** in the workflow file. They are set in the repo: + +- **Secrets** (e.g. `secrets.AWS_ROLE_ARN`): **Settings** → **Secrets and variables** → **Actions** → **Secrets** tab → New repository secret. +- **Variables** (e.g. `vars.AWS_S3_BUCKET`): **Settings** → **Secrets and variables** → **Actions** → **Variables** tab → New repository variable. + +**Required setup for S3 upload:** + +1. **Repository secret** (Secrets tab, see above): + - Name: `AWS_ROLE_ARN` + - Value: the IAM role ARN to assume for S3 upload (e.g. `arn:aws:iam::123456789012:role/my-s3-upload-role`). Keeps the role ID hidden from the workflow. + +2. **Repository variable** (Variables tab, see above): + - Name: `AWS_S3_BUCKET` + - Value: your S3 bucket name (e.g. `my-rocm-packages`). + +3. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. + +**Upload path (per job):** `s3:///rocm-validation-suite///ubuntu-22.04/` (DEB + TGZ) and `.../manylinux_2_28/` (RPM + TGZ). + +If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). ## Build Script: build_packages_local.sh diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 8b0912f1e..8a976ddbe 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -43,6 +43,9 @@ jobs: strategy: matrix: ubuntu_version: ['22.04'] + permissions: + id-token: write + contents: read steps: - name: Checkout Repository @@ -98,6 +101,31 @@ jobs: build/rocm-validation-suite*.tar.gz retention-days: 30 + - name: Install AWS CLI + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + run: sudo apt-get update && sudo apt-get install -y awscli + + - name: Upload to S3 + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables + - name: Sync Ubuntu packages to S3 + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + run: | + BUCKET="${{ vars.AWS_S3_BUCKET }}" + if [ -z "$BUCKET" ]; then + echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." + exit 0 + fi + PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" + echo "Uploading to s3://${BUCKET}/${PREFIX}/" + aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Done. s3://${BUCKET}/${PREFIX}/" + build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) runs-on: ubuntu-latest @@ -106,6 +134,9 @@ jobs: strategy: matrix: distro: ['manylinux_2_28'] + permissions: + id-token: write + contents: read steps: - name: Install Git (for checkout) @@ -170,6 +201,31 @@ jobs: build/rocm-validation-suite*.tar.gz retention-days: 30 + - name: Install AWS CLI + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + run: pip install --break-system-packages awscli 2>/dev/null || pip install awscli + + - name: Upload to S3 + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables + - name: Sync CentOS/RHEL packages to S3 + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + run: | + BUCKET="${{ vars.AWS_S3_BUCKET }}" + if [ -z "$BUCKET" ]; then + echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." + exit 0 + fi + PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" + echo "Uploading to s3://${BUCKET}/${PREFIX}/" + aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Done. s3://${BUCKET}/${PREFIX}/" + create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] From 965fcb12e9503cc0ce2d00bb2c9db427f004a544 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 16 Mar 2026 15:11:11 -0700 Subject: [PATCH 079/275] Add S3 for pull-request as weel --- .github/workflows/README_BUILD_PACKAGES.md | 4 ++-- .github/workflows/build-relocatable-packages.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 3ce14bb41..e8e320127 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -113,11 +113,11 @@ The GitHub Actions workflow performs minimal platform-specific operations: 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) 5. **Upload Artifacts** - Store packages with 30-day retention -6. **Upload to S3** (push to `master`/`main` only) - Right after packages are built, each job (Ubuntu and CentOS) uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET`. +6. **Upload to S3** (on push to `master`/`main` or on pull request) - Right after packages are built, each job (Ubuntu and CentOS) uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET`. ### S3 Upload (OIDC – No Stored Credentials) -On push to `master` or `main`, **each build job** uploads its packages to S3 as soon as that job finishes building (no separate upload job). Uses **AWS OIDC**; no long-term access key or secret. +On push to `master`/`main` or on pull request, **each build job** uploads its packages to S3 as soon as that job finishes building (no separate upload job). Uses **AWS OIDC**; no long-term access key or secret. **Where `vars` and `secrets` are defined** diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 8a976ddbe..951106a3c 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -102,11 +102,11 @@ jobs: retention-days: 30 - name: Install AWS CLI - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' run: sudo apt-get update && sudo apt-get install -y awscli - name: Upload to S3 - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} @@ -114,7 +114,7 @@ jobs: # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - name: Sync Ubuntu packages to S3 - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -202,11 +202,11 @@ jobs: retention-days: 30 - name: Install AWS CLI - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' run: pip install --break-system-packages awscli 2>/dev/null || pip install awscli - name: Upload to S3 - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} @@ -214,7 +214,7 @@ jobs: # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - name: Sync CentOS/RHEL packages to S3 - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -230,7 +230,7 @@ jobs: name: Create Release Summary needs: [build-ubuntu, build-centos] runs-on: ubuntu-latest - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' steps: - name: Download All Artifacts From e5f270b9b7cb957f5cfbfe741c4e53eb8576a22c Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 16 Mar 2026 15:14:28 -0700 Subject: [PATCH 080/275] Add aws list to confirm upload is sucessfull --- .github/workflows/build-relocatable-packages.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 951106a3c..c8c4e8b3e 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -124,6 +124,8 @@ jobs: PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing uploaded files:" + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "Done. s3://${BUCKET}/${PREFIX}/" build-centos: @@ -224,6 +226,8 @@ jobs: PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing uploaded files:" + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "Done. s3://${BUCKET}/${PREFIX}/" create-release: From 9e1187d7ee1e26b776923bbb38fac1b3c6af9586 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 16 Mar 2026 16:00:34 -0700 Subject: [PATCH 081/275] Run upload only if PR is not from forks --- .github/workflows/README_BUILD_PACKAGES.md | 9 +++++++-- .../workflows/build-relocatable-packages.yml | 17 +++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index e8e320127..3d4e1f635 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -113,11 +113,11 @@ The GitHub Actions workflow performs minimal platform-specific operations: 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) 5. **Upload Artifacts** - Store packages with 30-day retention -6. **Upload to S3** (on push to `master`/`main` or on pull request) - Right after packages are built, each job (Ubuntu and CentOS) uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET`. +6. **Upload to S3** (on push to `master`/`main` or on pull request from the same repo) - Right after packages are built, each job uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET` and secret `AWS_ROLE_ARN`. Skipped for pull requests from forks (secrets are not available). ### S3 Upload (OIDC – No Stored Credentials) -On push to `master`/`main` or on pull request, **each build job** uploads its packages to S3 as soon as that job finishes building (no separate upload job). Uses **AWS OIDC**; no long-term access key or secret. +On push to `master`/`main` or on pull request from the **same repository**, **each build job** uploads its packages to S3 after building. Uses **AWS OIDC**; no long-term access key or secret. S3 upload is **skipped for pull requests from forks** because GitHub does not provide secrets to those workflows (avoids "Credentials could not be loaded" errors). **Where `vars` and `secrets` are defined** @@ -394,6 +394,11 @@ cmake -B "$BUILD_DIR" \ ## Troubleshooting +### S3: "Credentials could not be loaded" + +- **PR from a fork:** S3 upload is skipped for fork PRs (secrets are not passed). Use a branch in the same repo or push to `main`/`master` to upload. +- **Same repo / push:** Ensure the `AWS_ROLE_ARN` secret is set (Settings → Secrets and variables → Actions → Secrets) and the IAM role’s trust policy allows GitHub OIDC for this repo. Ensure the OIDC identity provider exists in the AWS account (`token.actions.githubusercontent.com`). + ### Package Build Fails 1. Check the workflow logs in GitHub Actions diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index c8c4e8b3e..b34b374fb 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -102,11 +102,11 @@ jobs: retention-days: 30 - name: Install AWS CLI - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) run: sudo apt-get update && sudo apt-get install -y awscli - name: Upload to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} @@ -114,7 +114,7 @@ jobs: # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - name: Sync Ubuntu packages to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -204,11 +204,12 @@ jobs: retention-days: 30 - name: Install AWS CLI - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' - run: pip install --break-system-packages awscli 2>/dev/null || pip install awscli + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + run: | + python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Upload to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} @@ -216,7 +217,7 @@ jobs: # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - name: Sync CentOS/RHEL packages to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -234,7 +235,7 @@ jobs: name: Create Release Summary needs: [build-ubuntu, build-centos] runs-on: ubuntu-latest - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'pull_request' + if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) steps: - name: Download All Artifacts From 13e02a5898d6b5d69d11df8b95d191d3e35b0f87 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 17 Mar 2026 11:36:28 -0700 Subject: [PATCH 082/275] Trying aws cp instead of aws sync --- .github/workflows/build-relocatable-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index b34b374fb..d86f6857d 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -123,7 +123,7 @@ jobs: fi PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing uploaded files:" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "Done. s3://${BUCKET}/${PREFIX}/" @@ -226,7 +226,7 @@ jobs: fi PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 sync ./build "s3://${BUCKET}/${PREFIX}/" --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing uploaded files:" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "Done. s3://${BUCKET}/${PREFIX}/" From a80d19a2d630da1362dad5ca52ac97aea1fb3e26 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 17 Mar 2026 14:34:58 -0700 Subject: [PATCH 083/275] Dummy commit to re-trigger build --- .github/workflows/build-relocatable-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index d86f6857d..729999e47 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -126,7 +126,7 @@ jobs: aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing uploaded files:" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable - echo "Done. s3://${BUCKET}/${PREFIX}/" + echo "Done... s3://${BUCKET}/${PREFIX}/" build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) @@ -229,7 +229,7 @@ jobs: aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing uploaded files:" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable - echo "Done. s3://${BUCKET}/${PREFIX}/" + echo "Done... s3://${BUCKET}/${PREFIX}/" create-release: name: Create Release Summary From aaa61ef01204407732b11c20c4496927090f04a6 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 17 Mar 2026 16:21:09 -0700 Subject: [PATCH 084/275] upload files based on nightly & release build Upload only if build is triggered from rocm/rocm-validation-suite Release files uploaded to rocm-validation-suite/release Nightly files uploaded to rocm-vlaidation-suite/nightly Pulish S3 link in build summary --- .github/workflows/README_BUILD_PACKAGES.md | 14 +- .../workflows/build-relocatable-packages.yml | 144 +++++++++++++++--- 2 files changed, 130 insertions(+), 28 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 3d4e1f635..cfa3019ec 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -113,11 +113,11 @@ The GitHub Actions workflow performs minimal platform-specific operations: 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) 5. **Upload Artifacts** - Store packages with 30-day retention -6. **Upload to S3** (on push to `master`/`main` or on pull request from the same repo) - Right after packages are built, each job uploads its own packages to S3 using OIDC (no access keys). Requires repository variable `AWS_S3_BUCKET` and secret `AWS_ROLE_ARN`. Skipped for pull requests from forks (secrets are not available). +6. **Upload to S3** (when repo is `ROCm/ROCmValidationSuite` and trigger is schedule, push to `master`/`main`/`release/*`, or same-repo PR) – Each job uploads its packages to S3 using OIDC. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped for other repos and for pull requests from forks. ### S3 Upload (OIDC – No Stored Credentials) -On push to `master`/`main` or on pull request from the **same repository**, **each build job** uploads its packages to S3 after building. Uses **AWS OIDC**; no long-term access key or secret. S3 upload is **skipped for pull requests from forks** because GitHub does not provide secrets to those workflows (avoids "Credentials could not be loaded" errors). +S3 upload runs **only when** the repository is **`ROCm/ROCmValidationSuite`** and the run is one of: scheduled (cron), push to `master`/`main`/`release/*`, or pull request from the same repository. Uses **AWS OIDC**; no long-term access key or secret. Skipped for other repos and for pull requests from forks. **Where `vars` and `secrets` are defined** @@ -138,10 +138,18 @@ They are **not** in the workflow file. They are set in the repo: 3. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. -**Upload path (per job):** `s3:///rocm-validation-suite///ubuntu-22.04/` (DEB + TGZ) and `.../manylinux_2_28/` (RPM + TGZ). +**S3 path layout (all under `s3:///rocm-validation-suite/`):** + +| Trigger | Path | Contents | +|--------|------|----------| +| **Scheduled (daily)** | `nightly/deb/`, `nightly/rpm/`, `nightly/tar/` | DEB and TGZ → `nightly/deb` and `nightly/tar` (Ubuntu job); RPM and TGZ → `nightly/rpm` and `nightly/tar` (CentOS job). | +| **Push to `release/*`** | `release//deb/`, `release//rpm/`, `release//tar/` | Same split by type; `` is e.g. `release/rocm-rel-6.4`. | +| **Push to `master`/`main` or same-repo PR** | `//ubuntu-22.04/` or `.../manylinux_2_28/` | All built packages (DEB+TGZ or RPM+TGZ) in one prefix per job. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). +When packages are uploaded to S3, the **build report** artifact includes an **S3 Upload Locations** section with clickable links to each S3 prefix (AWS Console). This makes it easy to open the bucket and browse the uploaded DEB, RPM, and TGZ files from the report. + ## Build Script: build_packages_local.sh The workflow uses `build_packages_local.sh` as the core build engine. This script provides a complete, self-contained build system that works identically in both local development and CI/CD environments. diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 729999e47..7c49fd5bb 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -46,6 +46,9 @@ jobs: permissions: id-token: write contents: read + outputs: + s3_bucket_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.bucket }} + s3_paths_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.paths }} steps: - name: Checkout Repository @@ -101,32 +104,60 @@ jobs: build/rocm-validation-suite*.tar.gz retention-days: 30 + # S3 upload only for repo ROCm/ROCmValidationSuite (schedule, release/* push, master/main push, or same-repo PR) - name: Install AWS CLI - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) run: sudo apt-get update && sudo apt-get install -y awscli - - name: Upload to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + - name: Configure AWS credentials + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - - name: Sync Ubuntu packages to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/deb, nightly/tar; release/* → release//deb, .../tar; else → //ubuntu-22.04 + - name: Upload Ubuntu packages to S3 + id: upload-s3-ubuntu + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." exit 0 fi - PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" - echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing uploaded files:" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable - echo "Done... s3://${BUCKET}/${PREFIX}/" + BASE="rocm-validation-suite" + if [ "${{ github.event_name }}" = "schedule" ]; then + echo "Scheduled build: uploading to nightly/deb and nightly/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/nightly/deb/" + aws s3 ls "s3://${BUCKET}/${BASE}/nightly/deb/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/nightly/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/nightly/tar/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|${BASE}/nightly/deb||Ubuntu TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then + REF_NAME="${{ github.ref_name }}" + echo "Release branch build: uploading to release/${REF_NAME}/deb and release/${REF_NAME}/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|${BASE}/release/${REF_NAME}/deb||Ubuntu TGZ|${BASE}/release/${REF_NAME}/tar" >> $GITHUB_OUTPUT + else + PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" + echo "Uploading to s3://${BUCKET}/${PREFIX}/" + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${PREFIX}/" + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu packages|${PREFIX}" >> $GITHUB_OUTPUT + fi + echo "Done." build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) @@ -139,6 +170,9 @@ jobs: permissions: id-token: write contents: read + outputs: + s3_bucket_centos: ${{ steps.upload-s3-centos.outputs.bucket }} + s3_paths_centos: ${{ steps.upload-s3-centos.outputs.paths }} steps: - name: Install Git (for checkout) @@ -203,39 +237,67 @@ jobs: build/rocm-validation-suite*.tar.gz retention-days: 30 + # S3 upload only for repo ROCm/ROCmValidationSuite (schedule, release/* push, master/main push, or same-repo PR) - name: Install AWS CLI - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - - name: Upload to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + - name: Configure AWS credentials + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable set in Settings → Secrets and variables → Actions → Variables - - name: Sync CentOS/RHEL packages to S3 - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rpm, nightly/tar; release/* → release//rpm, .../tar; else → //manylinux_2_28 + - name: Upload CentOS/RHEL packages to S3 + id: upload-s3-centos + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." exit 0 fi - PREFIX="rocm-validation-suite/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" - echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing uploaded files:" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable - echo "Done... s3://${BUCKET}/${PREFIX}/" + BASE="rocm-validation-suite" + if [ "${{ github.event_name }}" = "schedule" ]; then + echo "Scheduled build: uploading to nightly/rpm and nightly/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/nightly/rpm/" + aws s3 ls "s3://${BUCKET}/${BASE}/nightly/rpm/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/nightly/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/nightly/tar/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|${BASE}/nightly/rpm||CentOS/RHEL TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then + REF_NAME="${{ github.ref_name }}" + echo "Release branch build: uploading to release/${REF_NAME}/rpm and release/${REF_NAME}/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|${BASE}/release/${REF_NAME}/rpm||CentOS/RHEL TGZ|${BASE}/release/${REF_NAME}/tar" >> $GITHUB_OUTPUT + else + PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" + echo "Uploading to s3://${BUCKET}/${PREFIX}/" + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${PREFIX}/" + aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL packages|${PREFIX}" >> $GITHUB_OUTPUT + fi + echo "Done." create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] runs-on: ubuntu-latest - if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + if: github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) steps: - name: Download All Artifacts @@ -317,6 +379,38 @@ jobs: cat build-report.md + - name: Add S3 upload links to build report + run: | + BUCKET="${{ needs.build-ubuntu.outputs.s3_bucket_ubuntu }}" + if [ -z "$BUCKET" ]; then + BUCKET="${{ needs.build-centos.outputs.s3_bucket_centos }}" + fi + if [ -z "$BUCKET" ]; then + echo "No S3 upload in this run, skipping S3 links section." + exit 0 + fi + echo "" >> build-report.md + echo "## S3 Upload Locations" >> build-report.md + echo "" >> build-report.md + echo "Packages were uploaded to the following S3 locations (AWS Console links):" >> build-report.md + echo "" >> build-report.md + PATHS_UBUNTU="${{ needs.build-ubuntu.outputs.s3_paths_ubuntu }}" + PATHS_CENTOS="${{ needs.build-centos.outputs.s3_paths_centos }}" + echo "$PATHS_UBUNTU" | sed 's/||/\n/g' | while IFS= read -r part; do + [ -z "$part" ] && continue + label="${part%%|*}"; prefix="${part#*|}" + enc=$(echo "$prefix" | sed 's|/|%2F|g')/ + echo "- [$label](https://s3.console.aws.amazon.com/s3/buckets/${BUCKET}?prefix=${enc})" >> build-report.md + done + echo "$PATHS_CENTOS" | sed 's/||/\n/g' | while IFS= read -r part; do + [ -z "$part" ] && continue + label="${part%%|*}"; prefix="${part#*|}" + enc=$(echo "$prefix" | sed 's|/|%2F|g')/ + echo "- [$label](https://s3.console.aws.amazon.com/s3/buckets/${BUCKET}?prefix=${enc})" >> build-report.md + done + echo "" >> build-report.md + cat build-report.md + - name: Upload Build Report uses: actions/upload-artifact@v4 with: From 294fe02b7376663fdc1ad203cd8e80fbd3f5c0ce Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 18 Mar 2026 10:21:47 -0700 Subject: [PATCH 085/275] Update release pkg S3 location --- .github/workflows/README_BUILD_PACKAGES.md | 2 +- .../workflows/build-relocatable-packages.yml | 38 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index cfa3019ec..05f6c7383 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -143,7 +143,7 @@ They are **not** in the workflow file. They are set in the repo: | Trigger | Path | Contents | |--------|------|----------| | **Scheduled (daily)** | `nightly/deb/`, `nightly/rpm/`, `nightly/tar/` | DEB and TGZ → `nightly/deb` and `nightly/tar` (Ubuntu job); RPM and TGZ → `nightly/rpm` and `nightly/tar` (CentOS job). | -| **Push to `release/*`** | `release//deb/`, `release//rpm/`, `release//tar/` | Same split by type; `` is e.g. `release/rocm-rel-6.4`. | +| **Push to `release/*`** | `release/deb/`, `release/rpm/`, `release/tar/` | Same split by type; all release branches write to the same paths so the latest release is always at a fixed location for auto-update. | | **Push to `master`/`main` or same-repo PR** | `//ubuntu-22.04/` or `.../manylinux_2_28/` | All built packages (DEB+TGZ or RPM+TGZ) in one prefix per job. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 7c49fd5bb..44d8799ec 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -116,7 +116,7 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/deb, nightly/tar; release/* → release//deb, .../tar; else → //ubuntu-22.04 + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/deb, nightly/tar; release/* → release/deb, release/tar; else → //ubuntu-22.04 - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -138,16 +138,15 @@ jobs: echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|${BASE}/nightly/deb||Ubuntu TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - REF_NAME="${{ github.ref_name }}" - echo "Release branch build: uploading to release/${REF_NAME}/deb and release/${REF_NAME}/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/deb/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --human-readable + echo "Release branch build: uploading to release/deb and release/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/release/deb/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/deb/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/release/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|${BASE}/release/${REF_NAME}/deb||Ubuntu TGZ|${BASE}/release/${REF_NAME}/tar" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|${BASE}/release/deb||Ubuntu TGZ|${BASE}/release/tar" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" @@ -250,7 +249,7 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rpm, nightly/tar; release/* → release//rpm, .../tar; else → //manylinux_2_28 + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rpm, nightly/tar; release/* → release/rpm, release/tar; else → //manylinux_2_28 - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -272,16 +271,15 @@ jobs: echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|${BASE}/nightly/rpm||CentOS/RHEL TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - REF_NAME="${{ github.ref_name }}" - echo "Release branch build: uploading to release/${REF_NAME}/rpm and release/${REF_NAME}/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/rpm/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/${REF_NAME}/tar/" --human-readable + echo "Release branch build: uploading to release/rpm and release/tar" + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${BASE}/release/rpm/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/rpm/" --human-readable + echo "Listing s3://${BUCKET}/${BASE}/release/tar/" + aws s3 ls "s3://${BUCKET}/${BASE}/release/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|${BASE}/release/${REF_NAME}/rpm||CentOS/RHEL TGZ|${BASE}/release/${REF_NAME}/tar" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|${BASE}/release/rpm||CentOS/RHEL TGZ|${BASE}/release/tar" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" From b335050ca9f94bcc7cab4b35af2b163c71975dc8 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 18 Mar 2026 13:13:30 -0700 Subject: [PATCH 086/275] re-arrange S3 folder for cloud setup --- .github/workflows/README_BUILD_PACKAGES.md | 8 +-- .../workflows/build-relocatable-packages.yml | 68 +++++++++---------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 05f6c7383..b1360d463 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -138,13 +138,13 @@ They are **not** in the workflow file. They are set in the repo: 3. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. -**S3 path layout (all under `s3:///rocm-validation-suite/`):** +**S3 path layout:** | Trigger | Path | Contents | |--------|------|----------| -| **Scheduled (daily)** | `nightly/deb/`, `nightly/rpm/`, `nightly/tar/` | DEB and TGZ → `nightly/deb` and `nightly/tar` (Ubuntu job); RPM and TGZ → `nightly/rpm` and `nightly/tar` (CentOS job). | -| **Push to `release/*`** | `release/deb/`, `release/rpm/`, `release/tar/` | Same split by type; all release branches write to the same paths so the latest release is always at a fixed location for auto-update. | -| **Push to `master`/`main` or same-repo PR** | `//ubuntu-22.04/` or `.../manylinux_2_28/` | All built packages (DEB+TGZ or RPM+TGZ) in one prefix per job. | +| **Scheduled (daily)** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | DEB and TGZ → `nightly/rocm-validation-suite/deb` and `.../tar` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (CentOS job). | +| **Push to `release/*`** | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | Same split by type; all release branches write to the same paths for auto-update. | +| **Push to `master`/`main` or same-repo PR** | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | All built packages (DEB+TGZ or RPM+TGZ) in one prefix per job. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 44d8799ec..8b508e827 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -116,7 +116,7 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/deb, nightly/tar; release/* → release/deb, release/tar; else → //ubuntu-22.04 + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rocm-validation-suite/deb,tar; release/* → release/rocm-validation-suite/deb,tar; else → rocm-validation-suite///ubuntu-22.04 - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -128,25 +128,25 @@ jobs: fi BASE="rocm-validation-suite" if [ "${{ github.event_name }}" = "schedule" ]; then - echo "Scheduled build: uploading to nightly/deb and nightly/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/nightly/deb/" - aws s3 ls "s3://${BUCKET}/${BASE}/nightly/deb/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/nightly/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/nightly/tar/" --human-readable + echo "Scheduled build: uploading to nightly/rocm-validation-suite/deb and nightly/rocm-validation-suite/tar" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable + echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|${BASE}/nightly/deb||Ubuntu TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|nightly/${BASE}/deb||Ubuntu TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - echo "Release branch build: uploading to release/deb and release/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/release/deb/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/deb/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/release/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/tar/" --human-readable + echo "Release branch build: uploading to release/rocm-validation-suite/deb and release/rocm-validation-suite/tar" + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/release/${BASE}/deb/" + aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable + echo "Listing s3://${BUCKET}/release/${BASE}/tar/" + aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|${BASE}/release/deb||Ubuntu TGZ|${BASE}/release/tar" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|release/${BASE}/deb||Ubuntu TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" @@ -249,7 +249,7 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rpm, nightly/tar; release/* → release/rpm, release/tar; else → //manylinux_2_28 + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rocm-validation-suite/rpm,tar; release/* → release/rocm-validation-suite/rpm,tar; else → rocm-validation-suite///manylinux_2_28 - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -261,25 +261,25 @@ jobs: fi BASE="rocm-validation-suite" if [ "${{ github.event_name }}" = "schedule" ]; then - echo "Scheduled build: uploading to nightly/rpm and nightly/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/nightly/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/nightly/rpm/" - aws s3 ls "s3://${BUCKET}/${BASE}/nightly/rpm/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/nightly/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/nightly/tar/" --human-readable + echo "Scheduled build: uploading to nightly/rocm-validation-suite/rpm and nightly/rocm-validation-suite/tar" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable + echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|${BASE}/nightly/rpm||CentOS/RHEL TGZ|${BASE}/nightly/tar" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - echo "Release branch build: uploading to release/rpm and release/tar" - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${BASE}/release/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${BASE}/release/rpm/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/rpm/" --human-readable - echo "Listing s3://${BUCKET}/${BASE}/release/tar/" - aws s3 ls "s3://${BUCKET}/${BASE}/release/tar/" --human-readable + echo "Release branch build: uploading to release/rocm-validation-suite/rpm and release/rocm-validation-suite/tar" + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/release/${BASE}/rpm/" + aws s3 ls "s3://${BUCKET}/release/${BASE}/rpm/" --human-readable + echo "Listing s3://${BUCKET}/release/${BASE}/tar/" + aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|${BASE}/release/rpm||CentOS/RHEL TGZ|${BASE}/release/tar" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" From a54b003c6f606d76a727d3c25a74fbed58defe86 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 7 Apr 2026 20:48:10 -0700 Subject: [PATCH 087/275] upload tar file from manylinux job only No need to upload tar file from both the builds. Taking manylinux binaries as the base for install anywhere case. Need to added externaly depedency that can cause execution failure if installed on OS that do not have the required third-party libs --- .github/workflows/README_BUILD_PACKAGES.md | 6 +++--- .../workflows/build-relocatable-packages.yml | 21 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index b1360d463..98c47a037 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -142,9 +142,9 @@ They are **not** in the workflow file. They are set in the repo: | Trigger | Path | Contents | |--------|------|----------| -| **Scheduled (daily)** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | DEB and TGZ → `nightly/rocm-validation-suite/deb` and `.../tar` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (CentOS job). | -| **Push to `release/*`** | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | Same split by type; all release branches write to the same paths for auto-update. | -| **Push to `master`/`main` or same-repo PR** | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | All built packages (DEB+TGZ or RPM+TGZ) in one prefix per job. | +| **Scheduled (daily)** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). | +| **Push to `release/*`** | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | Same split by type; all release branches write to the same paths for auto-update. TGZ uploaded only by manylinux job. | +| **Push to `master`/`main` or same-repo PR** | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 8b508e827..e9a5a3b7c 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -116,7 +116,8 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rocm-validation-suite/deb,tar; release/* → release/rocm-validation-suite/deb,tar; else → rocm-validation-suite///ubuntu-22.04 + # vars.AWS_S3_BUCKET = repository variable. Paths: nightly → nightly/rocm-validation-suite/deb; release/* → release/rocm-validation-suite/deb; else → rocm-validation-suite///ubuntu-22.04 + # tar.gz is uploaded only by the manylinux (CentOS) job - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -128,33 +129,27 @@ jobs: fi BASE="rocm-validation-suite" if [ "${{ github.event_name }}" = "schedule" ]; then - echo "Scheduled build: uploading to nightly/rocm-validation-suite/deb and nightly/rocm-validation-suite/tar" + echo "Scheduled build: uploading to nightly/rocm-validation-suite/deb" aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable - echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|nightly/${BASE}/deb||Ubuntu TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - echo "Release branch build: uploading to release/rocm-validation-suite/deb and release/rocm-validation-suite/tar" + echo "Release branch build: uploading to release/rocm-validation-suite/deb" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/deb/" aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable - echo "Listing s3://${BUCKET}/release/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|release/${BASE}/deb||Ubuntu TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|release/${BASE}/deb" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --include "rocm-validation-suite*.tar.gz" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu packages|${PREFIX}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|${PREFIX}" >> $GITHUB_OUTPUT fi echo "Done." From d97e913c185695956cfc62f943aad290e6850ae2 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 10 Apr 2026 15:17:08 -0700 Subject: [PATCH 088/275] Add repo metadata to use S3 space as package repo Both rpm/deb packages need repo metadata to be used as repo to install packages using apt/yum/dnf install --- .github/workflows/README_BUILD_PACKAGES.md | 77 +++++++++++++++++++ .../workflows/build-relocatable-packages.yml | 68 ++++++++++++++++ 2 files changed, 145 insertions(+) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 98c47a037..8ea449365 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -114,6 +114,7 @@ The GitHub Actions workflow performs minimal platform-specific operations: 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) 5. **Upload Artifacts** - Store packages with 30-day retention 6. **Upload to S3** (when repo is `ROCm/ROCmValidationSuite` and trigger is schedule, push to `master`/`main`/`release/*`, or same-repo PR) – Each job uploads its packages to S3 using OIDC. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped for other repos and for pull requests from forks. +7. **Generate Repo Metadata** (nightly and release builds only) – Creates APT repo metadata (`Packages`, `Packages.gz`, `Release`) for DEB and YUM/DNF repodata (`repodata/`) for RPM, then uploads to S3 so the paths can be used as native package repositories. ### S3 Upload (OIDC – No Stored Credentials) @@ -150,6 +151,82 @@ If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the wo When packages are uploaded to S3, the **build report** artifact includes an **S3 Upload Locations** section with clickable links to each S3 prefix (AWS Console). This makes it easy to open the bucket and browse the uploaded DEB, RPM, and TGZ files from the report. +### Repository Metadata (repodata) + +For **nightly** and **release** builds, the workflow also generates package repository metadata so that the S3 paths can be used directly as `apt` (DEB) and `yum`/`dnf` (RPM) repositories. This runs after the package upload step in each job. + +**RPM repodata** (CentOS/RHEL job): +- Tool: `createrepo_c` (falls back to `createrepo`) +- Downloads existing RPMs from S3, merges in the newly built RPM, regenerates the `repodata/` directory, and syncs everything back +- Result: `repodata/repomd.xml`, `repodata/primary.xml.gz`, `repodata/filelists.xml.gz`, `repodata/other.xml.gz` + +**DEB repo metadata** (Ubuntu job): +- Tools: `dpkg-scanpackages`, `apt-ftparchive` +- Downloads existing DEBs from S3, merges in the newly built DEB, regenerates `Packages`, `Packages.gz`, and `Release`, and syncs everything back +- Result: `Packages`, `Packages.gz`, `Release` + +**S3 directory layout after metadata generation:** + +``` +s3:///nightly/rocm-validation-suite/ +├── deb/ +│ ├── rocm-validation-suite_1.0.0_amd64.deb +│ ├── Packages +│ ├── Packages.gz +│ └── Release +├── rpm/ +│ ├── rocm-validation-suite-1.0.0.x86_64.rpm +│ └── repodata/ +│ ├── repomd.xml +│ ├── primary.xml.gz +│ ├── filelists.xml.gz +│ └── other.xml.gz +└── tar/ + └── rocm-validation-suite-1.0.0-Linux.tar.gz +``` + +**Using the S3 repo with apt (Ubuntu/Debian):** + +```bash +# Add the nightly repo (replace with the actual S3 bucket name) +echo "deb [trusted=yes] https://.s3.amazonaws.com/nightly/rocm-validation-suite/deb/ ./" \ + | sudo tee /etc/apt/sources.list.d/rvs-nightly.list + +# Or the release repo +echo "deb [trusted=yes] https://.s3.amazonaws.com/release/rocm-validation-suite/deb/ ./" \ + | sudo tee /etc/apt/sources.list.d/rvs-release.list + +sudo apt update +sudo apt install rocm-validation-suite +``` + +**Using the S3 repo with yum/dnf (CentOS/RHEL/Rocky):** + +```bash +# Add the nightly repo (replace with the actual S3 bucket name) +cat <<'EOF' | sudo tee /etc/yum.repos.d/rvs-nightly.repo +[rvs-nightly] +name=RVS Nightly Packages +baseurl=https://.s3.amazonaws.com/nightly/rocm-validation-suite/rpm/ +enabled=1 +gpgcheck=0 +EOF + +# Or the release repo +cat <<'EOF' | sudo tee /etc/yum.repos.d/rvs-release.repo +[rvs-release] +name=RVS Release Packages +baseurl=https://.s3.amazonaws.com/release/rocm-validation-suite/rpm/ +enabled=1 +gpgcheck=0 +EOF + +sudo yum install rocm-validation-suite +# or: sudo dnf install rocm-validation-suite +``` + +> **Note:** `[trusted=yes]` (apt) and `gpgcheck=0` (yum) disable GPG verification. For production use, sign the packages and metadata with a GPG key and distribute the public key to users. Repository metadata is only generated for **nightly** (scheduled) and **release** builds; per-branch/PR builds upload raw packages without metadata. + ## Build Script: build_packages_local.sh The workflow uses `build_packages_local.sh` as the core build engine. This script provides a complete, self-contained build system that works identically in both local development and CI/CD environments. diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index e9a5a3b7c..289cc57cb 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -153,6 +153,42 @@ jobs: fi echo "Done." + # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path + # can be consumed directly as a DEB repository by apt. + - name: Generate and upload DEB repo metadata to S3 + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) + run: | + BUCKET="${{ vars.AWS_S3_BUCKET }}" + [ -z "$BUCKET" ] && exit 0 + + sudo apt-get update && sudo apt-get install -y dpkg-dev apt-utils + + BASE="rocm-validation-suite" + if [ "${{ github.event_name }}" = "schedule" ]; then + DEB_PREFIX="nightly/${BASE}/deb" + else + DEB_PREFIX="release/${BASE}/deb" + fi + + STAGING=$(mktemp -d) + + echo "Downloading existing DEBs from s3://${BUCKET}/${DEB_PREFIX}/ ..." + aws s3 sync "s3://${BUCKET}/${DEB_PREFIX}/" "$STAGING/" \ + --exclude "Packages*" --exclude "Release*" --exclude "InRelease" \ + --no-progress || true + + cp ./build/rocm-validation-suite*.deb "$STAGING/" 2>/dev/null || true + + cd "$STAGING" + dpkg-scanpackages --multiversion . /dev/null > Packages + gzip -k -f Packages + apt-ftparchive release . > Release + + aws s3 sync "$STAGING/" "s3://${BUCKET}/${DEB_PREFIX}/" --no-progress + + echo "=== DEB repo metadata uploaded to s3://${BUCKET}/${DEB_PREFIX}/ ===" + aws s3 ls "s3://${BUCKET}/${DEB_PREFIX}/" --human-readable + build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) runs-on: ubuntu-latest @@ -286,6 +322,38 @@ jobs: fi echo "Done." + # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed + # directly as an RPM repository by yum/dnf. + - name: Generate and upload RPM repodata to S3 + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) + run: | + BUCKET="${{ vars.AWS_S3_BUCKET }}" + [ -z "$BUCKET" ] && exit 0 + + yum install -y createrepo_c || yum install -y createrepo + + BASE="rocm-validation-suite" + if [ "${{ github.event_name }}" = "schedule" ]; then + RPM_PREFIX="nightly/${BASE}/rpm" + else + RPM_PREFIX="release/${BASE}/rpm" + fi + + STAGING=$(mktemp -d) + + echo "Downloading existing RPMs from s3://${BUCKET}/${RPM_PREFIX}/ ..." + aws s3 sync "s3://${BUCKET}/${RPM_PREFIX}/" "$STAGING/" \ + --exclude "repodata/*" --no-progress || true + + cp ./build/rocm-validation-suite*.rpm "$STAGING/" 2>/dev/null || true + + createrepo_c "$STAGING" || createrepo "$STAGING" + + aws s3 sync "$STAGING/" "s3://${BUCKET}/${RPM_PREFIX}/" --no-progress + + echo "=== RPM repodata uploaded to s3://${BUCKET}/${RPM_PREFIX}/repodata/ ===" + aws s3 ls "s3://${BUCKET}/${RPM_PREFIX}/repodata/" --human-readable + create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] From 04e37700f8a691dc3284b9ba8d152beb063ebacf Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 12 Apr 2026 02:54:54 -0700 Subject: [PATCH 089/275] update yaml and build script using GH variables and cleanup --- .../workflows/build-relocatable-packages.yml | 49 +++-- build_packages_local.sh | 200 +++++++++++++++--- 2 files changed, 200 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 289cc57cb..6286301cb 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -32,14 +32,14 @@ on: default: 'gfx110X-all' env: - ROCM_VERSION: '7.11.0a20260121' - GPU_FAMILY: 'gfx110X-all' + ROCM_VERSION: ${{ vars.ROCM_VERSION }} + GPU_FAMILY: ${{ vars.GPU_FAMILY }} BUILD_TYPE: Release jobs: build-ubuntu: name: Build Ubuntu Packages - runs-on: ubuntu-22.04 + runs-on: ${{ vars.RUNNER_LABEL }} strategy: matrix: ubuntu_version: ['22.04'] @@ -51,6 +51,11 @@ jobs: s3_paths_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.paths }} steps: + - name: Clean workspace + run: | + sudo rm -rf "${{ github.workspace }}/build" || true + sudo chown -R $(id -u):$(id -g) "${{ github.workspace }}" || true + - name: Checkout Repository uses: actions/checkout@v4 with: @@ -58,8 +63,7 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ]; then - # Scheduled run: use latest ROCm (leave ROCM_VERSION unset for auto-fetch) + if [ "${{ github.event_name }}" = "schedule" ] && [ -n "${{ vars.ROCM_SDK_INDEX_URL }}" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV echo "Scheduled run: will auto-fetch latest ROCm version" fi @@ -72,15 +76,20 @@ jobs: - name: Build and Package RVS run: | - # Make build script executable chmod +x build_packages_local.sh - # Run build script with sudo (Ubuntu runner needs sudo for apt-get) - sudo ROCM_VERSION=${{ env.ROCM_VERSION }} \ + sudo -E ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ + ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ + ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ ./build_packages_local.sh + - name: Fix file ownership + if: always() + run: | + sudo chown -R $(id -u):$(id -g) "${{ github.workspace }}" || true + - name: Verify DEB Package run: | cd ./build @@ -116,8 +125,6 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly → nightly/rocm-validation-suite/deb; release/* → release/rocm-validation-suite/deb; else → rocm-validation-suite///ubuntu-22.04 - # tar.gz is uploaded only by the manylinux (CentOS) job - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -153,8 +160,6 @@ jobs: fi echo "Done." - # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path - # can be consumed directly as a DEB repository by apt. - name: Generate and upload DEB repo metadata to S3 if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) run: | @@ -191,7 +196,7 @@ jobs: build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) - runs-on: ubuntu-latest + runs-on: ${{ vars.RUNNER_LABEL_CONTAINER }} container: image: quay.io/pypa/manylinux_2_28_x86_64 strategy: @@ -216,29 +221,26 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ]; then + if [ "${{ github.event_name }}" = "schedule" ] && [ -n "${{ vars.ROCM_SDK_INDEX_URL }}" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV echo "Scheduled run: will auto-fetch latest ROCm version" - elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then + fi + if [ -n "${{ github.event.inputs.rocm_version }}" ]; then echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV - else - echo "ROCM_VERSION=${{ env.ROCM_VERSION }}" >> $GITHUB_ENV fi if [ -n "${{ github.event.inputs.gpu_family }}" ]; then echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV - else - echo "GPU_FAMILY=${{ env.GPU_FAMILY }}" >> $GITHUB_ENV fi - name: Build and Package RVS run: | - # Make build script executable chmod +x build_packages_local.sh - # Run build script (no sudo needed - container runs as root) ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ + ROCM_SDK_BASE_URL=${{ vars.ROCM_SDK_BASE_URL }} \ + ROCM_SDK_INDEX_URL=${{ vars.ROCM_SDK_INDEX_URL }} \ ./build_packages_local.sh - name: Verify RPM Package @@ -280,7 +282,6 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. Paths: nightly (schedule) → nightly/rocm-validation-suite/rpm,tar; release/* → release/rocm-validation-suite/rpm,tar; else → rocm-validation-suite///manylinux_2_28 - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -322,8 +323,6 @@ jobs: fi echo "Done." - # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed - # directly as an RPM repository by yum/dnf. - name: Generate and upload RPM repodata to S3 if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) run: | @@ -357,7 +356,7 @@ jobs: create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] - runs-on: ubuntu-latest + runs-on: ${{ vars.RUNNER_LABEL_UTILITY }} if: github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) steps: diff --git a/build_packages_local.sh b/build_packages_local.sh index 77f6d1bca..47a9ca1a7 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -12,6 +12,41 @@ BUILD_TYPE="${BUILD_TYPE:-Release}" BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" +# SDK Source Configuration +# Default: TheRock public S3 nightly bucket (works from any network). +# +# For AMD internal genesis server (requires AMD network / self-hosted runners): +# export ROCM_SDK_BASE_URL="https://rocm.genesis.amd.com/tarball" +# export ROCM_SDK_INDEX_URL="" # genesis has no index page +# export ROCM_VERSION="7.13.0" # must be set explicitly +# +# In GitHub Actions, these are set via repository variables (vars.*). +ROCM_SDK_BASE_URL="${ROCM_SDK_BASE_URL:-https://therock-nightly-tarball.s3.us-east-2.amazonaws.com}" +ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" + +# Post-build upload configuration +# Set UPLOAD_TARGET to enable automatic upload of built packages after the build. +# Packages are organized into: //// +# +# Supported formats: +# Local path: UPLOAD_TARGET="/mnt/shared/packages/" +# SCP: UPLOAD_TARGET="scp://user@buildserver:/opt/packages/" +# Rsync: UPLOAD_TARGET="rsync://user@buildserver:/opt/packages/" +# HTTP PUT: UPLOAD_TARGET="http://localhost:8080" +# (use with packages_server/ nginx setup for auto directory creation) +# +# If the local nginx package server is running, auto-detect it: +# UPLOAD_TARGET="http://localhost:8080" when nginx is serving on 8080 +# +# UPLOAD_REPO overrides the repo name in the upload path (auto-detected from git remote). +if [ -z "${UPLOAD_TARGET:-}" ]; then + if curl -s -o /dev/null -w '' http://localhost:8080/ 2>/dev/null; then + UPLOAD_TARGET="http://localhost:8080" + fi +fi +UPLOAD_TARGET="${UPLOAD_TARGET:-}" +UPLOAD_REPO="${UPLOAD_REPO:-}" + # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' @@ -39,13 +74,13 @@ print_error() { # Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { local gpu_family="$1" - local index_url="https://therock-nightly-tarball.s3.amazonaws.com/index.html" - - print_info "Fetching latest ROCm version for $gpu_family from TheRock..." - + + print_info "Fetching latest ROCm version for $gpu_family..." + print_info "Index URL: $ROCM_SDK_INDEX_URL" + # Download index page and parse for latest tarball matching GPU family # Pattern: therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz - local latest_version=$(wget -qO- "$index_url" 2>/dev/null | \ + local latest_version=$(wget -qO- "$ROCM_SDK_INDEX_URL" 2>/dev/null | \ grep -oP "therock-dist-linux-${gpu_family}-\K[^<\"]+(?=\.tar\.gz)" | \ sort -V | tail -1) @@ -171,12 +206,10 @@ check_and_install_dependencies() { doxygen \ rpm-build \ python3 \ - numactl-devel\ + numactl-devel \ || print_warning "Some packages may already be installed" # Install a gcc-toolset with C++20 support (requires GCC >= 11) - # Try highest available first for best C++20/C++23 support, fall back to minimum viable - # RHEL/AlmaLinux/Rocky 8+ use gcc-toolset-{ver}, CentOS 7 uses devtoolset-{ver} if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then GCC_TOOLSET_INSTALLED="" for ver in 14 13 12 11; do @@ -189,7 +222,6 @@ check_and_install_dependencies() { fi fi done - # Fallback to devtoolset (CentOS 7) - only devtoolset-11 has if [ -z "$GCC_TOOLSET_INSTALLED" ]; then if yum list available devtoolset-11 &>/dev/null; then print_info "Found devtoolset-11 - installing for C++20 support (CentOS 7)..." @@ -262,15 +294,29 @@ check_and_install_dependencies # Determine ROCm version: use environment variable or fetch latest (wget is now available) if [ -n "$ROCM_VERSION" ]; then print_info "Using specified ROCm version: $ROCM_VERSION" -else - print_info "No ROCm version specified, fetching latest..." +elif [ -n "$ROCM_SDK_INDEX_URL" ]; then + # Auto-detection only works when an index URL is available (e.g. S3 bucket) + print_info "No ROCm version specified, fetching latest from index..." fetch_latest_rocm_version "$GPU_FAMILY" - - # Validate that ROCM_VERSION was properly set + if [ -z "$ROCM_VERSION" ]; then print_error "Failed to determine ROCm version" exit 1 fi +else + print_error "ROCM_VERSION is required" + print_info "Genesis server does not provide an index page for auto-detection." + print_info "Set it via environment variable, e.g.:" + echo "" + echo " export ROCM_VERSION=\"7.11.0a20260121\"" + echo " ./build_packages_local.sh" + echo "" + print_info "Or in GitHub Actions workflow:" + echo "" + echo " env:" + echo " ROCM_VERSION: \"7.11.0a20260121\"" + echo "" + exit 1 fi # Print configuration @@ -282,25 +328,37 @@ print_info "GPU Family: $GPU_FAMILY" print_info "Build Type: $BUILD_TYPE" print_info "Build Directory: $BUILD_DIR" print_info "ROCm Install: $ROCM_INSTALL_DIR" +print_info "SDK Source: $ROCM_SDK_BASE_URL" +if [ -n "$UPLOAD_TARGET" ]; then + print_info "Upload Target: $UPLOAD_TARGET" +fi print_info "RVS Version: Will be read from CMakeLists.txt by CMake/CPack" echo "================================================================================" echo "" # Step 1: Download ROCm SDK print_info "Step 1: Downloading ROCm SDK tarball..." -TARBALL_URL="https://therock-nightly-tarball.s3.us-east-2.amazonaws.com/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" +TARBALL_URL="${ROCM_SDK_BASE_URL}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" TARBALL_FILE="$ROCM_INSTALL_DIR/rocm-sdk.tar.gz" mkdir -p "$ROCM_INSTALL_DIR" if [ -f "$ROCM_INSTALL_DIR/install/bin/hipconfig" ]; then print_warning "ROCm SDK already exists at $ROCM_INSTALL_DIR/install" - read -p "Do you want to re-download? (y/N): " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - rm -rf "$ROCM_INSTALL_DIR/install" + if [ -t 0 ]; then + read -p "Do you want to re-download? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + rm -rf "$ROCM_INSTALL_DIR/install" + else + print_info "Using existing ROCm SDK" + export ROCM_PATH="$ROCM_INSTALL_DIR/install" + print_success "ROCm SDK path set to: $ROCM_PATH" + echo "" + goto_step2=true + fi else - print_info "Using existing ROCm SDK" + print_info "Non-interactive mode: reusing existing ROCm SDK" export ROCM_PATH="$ROCM_INSTALL_DIR/install" print_success "ROCm SDK path set to: $ROCM_PATH" echo "" @@ -397,7 +455,6 @@ fi if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like - # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ GCC_TOOLSET_ENABLED="" for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) @@ -414,7 +471,6 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers may be missing" fi - # Set C++ compiler to hipcc from ROCm if [ -x "$ROCM_PATH/bin/hipcc" ]; then export CMAKE_CXX_COMPILER="$ROCM_PATH/bin/hipcc" print_success "Set CMAKE_CXX_COMPILER to hipcc (CentOS/RHEL/AlmaLinux/Rocky)" @@ -422,11 +478,9 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi - # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" else - # Ubuntu and others: use defaults (system compiler and cmake) export CMAKE_COMMAND="cmake" print_info "Using cmake (Ubuntu/other)" fi @@ -496,7 +550,6 @@ if [ -n "$CMAKE_CXX_COMPILER" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") fi -# Point hipcc at the GCC toolchain for C++20 standard library headers if [ -n "$GCC_TOOLCHAIN" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="--gcc-toolchain=$GCC_TOOLCHAIN") print_success "Set --gcc-toolchain=$GCC_TOOLCHAIN for hipcc" @@ -598,6 +651,105 @@ fi cd - > /dev/null echo "" +# Step 6: Upload packages (optional) +if [ -n "$UPLOAD_TARGET" ]; then + print_info "Step 6: Uploading packages to $UPLOAD_TARGET..." + + # Build organized upload subpath: // + if [ -z "$UPLOAD_REPO" ]; then + UPLOAD_REPO=$(git remote get-url origin 2>/dev/null | sed 's|.*/||; s|\.git$||') + [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null) + [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO="unknown" + fi + UPLOAD_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's|[^a-zA-Z0-9._-]|-|g') + [ -z "$UPLOAD_BRANCH" ] && UPLOAD_BRANCH="unknown" + UPLOAD_DATE=$(date +%Y-%m-%d) + UPLOAD_SUBPATH="${UPLOAD_REPO}/${UPLOAD_BRANCH}/${UPLOAD_DATE}" + + print_info "Upload path: .../${UPLOAD_SUBPATH}/" + + PKGS=$(find "$BUILD_DIR" -maxdepth 1 -name 'rocm-validation-suite*' \( -name '*.deb' -o -name '*.rpm' -o -name '*.tar.gz' \) 2>/dev/null) + if [ -z "$PKGS" ]; then + print_error "No packages found to upload" + else + UPLOAD_OK=true + + case "$UPLOAD_TARGET" in + scp://*) + SCP_DEST="${UPLOAD_TARGET#scp://}" + SCP_DEST="${SCP_DEST%/}/${UPLOAD_SUBPATH}/" + print_info "Uploading via SCP to $SCP_DEST" + # Create remote directory first + SCP_HOST="${SCP_DEST%%:*}" + SCP_PATH="${SCP_DEST#*:}" + ssh "$SCP_HOST" "mkdir -p '$SCP_PATH'" 2>/dev/null || true + for pkg in $PKGS; do + print_info " $(basename "$pkg")" + if ! scp "$pkg" "$SCP_DEST"; then + print_error "SCP upload failed for $(basename "$pkg")" + UPLOAD_OK=false + fi + done + ;; + rsync://*) + RSYNC_DEST="${UPLOAD_TARGET#rsync://}" + RSYNC_DEST="${RSYNC_DEST%/}/${UPLOAD_SUBPATH}/" + print_info "Uploading via rsync to $RSYNC_DEST" + if ! echo "$PKGS" | xargs -I{} rsync -avz --progress {} "$RSYNC_DEST"; then + print_error "Rsync upload failed" + UPLOAD_OK=false + fi + ;; + http://*|https://*) + UPLOAD_URL="${UPLOAD_TARGET%/}/${UPLOAD_SUBPATH}" + print_info "Uploading via HTTP PUT to $UPLOAD_URL/" + for pkg in $PKGS; do + local_name=$(basename "$pkg") + print_info " $local_name" + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -X PUT -T "$pkg" \ + "${UPLOAD_URL}/${local_name}") + if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then + print_success " Uploaded $local_name (HTTP $HTTP_CODE)" + else + print_error " Failed to upload $local_name (HTTP $HTTP_CODE)" + UPLOAD_OK=false + fi + done + # Show shareable URL (resolve localhost to real IP for team sharing) + if [[ "$UPLOAD_TARGET" =~ localhost|127\.0\.0\.1 ]]; then + SHARE_IP=$(ip -4 route get 1.1.1.1 2>/dev/null | grep -oP 'src \K[0-9.]+' | head -1) + [ -z "$SHARE_IP" ] && SHARE_IP=$(hostname -I 2>/dev/null | awk '{print $1}') + if [ -n "$SHARE_IP" ]; then + SHARE_URL=$(echo "$UPLOAD_URL" | sed "s|localhost|$SHARE_IP|;s|127\.0\.0\.1|$SHARE_IP|") + print_info "Share this URL with your team: ${SHARE_URL}/" + fi + fi + print_info "Browse uploads: ${UPLOAD_URL}/" + ;; + *) + LOCAL_DEST="${UPLOAD_TARGET%/}/${UPLOAD_SUBPATH}" + print_info "Copying packages to $LOCAL_DEST" + mkdir -p "$LOCAL_DEST" + for pkg in $PKGS; do + print_info " $(basename "$pkg")" + if ! cp "$pkg" "$LOCAL_DEST/"; then + print_error "Copy failed for $(basename "$pkg")" + UPLOAD_OK=false + fi + done + ;; + esac + + if [ "$UPLOAD_OK" = true ]; then + print_success "All packages uploaded successfully" + else + print_warning "Some uploads failed - check errors above" + fi + fi + echo "" +fi + # Summary echo "================================================================================" print_success "Package build completed successfully!" From 22d572ea2394ad850bc3f541acef0bfb6abeca82 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 12 Apr 2026 03:28:13 -0700 Subject: [PATCH 090/275] cleanup --- .../workflows/build-relocatable-packages.yml | 20 +++++++++---------- build_packages_local.sh | 11 ++++------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 6286301cb..fa8f30ac0 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -31,21 +31,22 @@ on: - gfx120X-all default: 'gfx110X-all' +permissions: + contents: read + id-token: write + env: - ROCM_VERSION: ${{ vars.ROCM_VERSION }} - GPU_FAMILY: ${{ vars.GPU_FAMILY }} + ROCM_VERSION: ${{ vars.ROCM_VERSION || '7.11.0a20260121' }} + GPU_FAMILY: ${{ vars.GPU_FAMILY || 'gfx110X-all' }} BUILD_TYPE: Release jobs: build-ubuntu: name: Build Ubuntu Packages - runs-on: ${{ vars.RUNNER_LABEL }} + runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} strategy: matrix: ubuntu_version: ['22.04'] - permissions: - id-token: write - contents: read outputs: s3_bucket_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.bucket }} s3_paths_ubuntu: ${{ steps.upload-s3-ubuntu.outputs.paths }} @@ -196,15 +197,12 @@ jobs: build-centos: name: Build CentOS/RHEL Packages (manylinux_2_28) - runs-on: ${{ vars.RUNNER_LABEL_CONTAINER }} + runs-on: ${{ vars.RUNNER_LABEL_CONTAINER || 'ubuntu-latest' }} container: image: quay.io/pypa/manylinux_2_28_x86_64 strategy: matrix: distro: ['manylinux_2_28'] - permissions: - id-token: write - contents: read outputs: s3_bucket_centos: ${{ steps.upload-s3-centos.outputs.bucket }} s3_paths_centos: ${{ steps.upload-s3-centos.outputs.paths }} @@ -356,7 +354,7 @@ jobs: create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] - runs-on: ${{ vars.RUNNER_LABEL_UTILITY }} + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} if: github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) steps: diff --git a/build_packages_local.sh b/build_packages_local.sh index 47a9ca1a7..ebf30cef4 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -14,13 +14,10 @@ ROCM_INSTALL_DIR="$HOME/rocm-sdk" # SDK Source Configuration # Default: TheRock public S3 nightly bucket (works from any network). +# Override via environment variables or GitHub Actions repository variables (vars.*). # -# For AMD internal genesis server (requires AMD network / self-hosted runners): -# export ROCM_SDK_BASE_URL="https://rocm.genesis.amd.com/tarball" -# export ROCM_SDK_INDEX_URL="" # genesis has no index page -# export ROCM_VERSION="7.13.0" # must be set explicitly -# -# In GitHub Actions, these are set via repository variables (vars.*). +# If your SDK server has no index page for auto-detection, set ROCM_SDK_INDEX_URL="" +# and provide ROCM_VERSION explicitly. ROCM_SDK_BASE_URL="${ROCM_SDK_BASE_URL:-https://therock-nightly-tarball.s3.us-east-2.amazonaws.com}" ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" @@ -305,7 +302,7 @@ elif [ -n "$ROCM_SDK_INDEX_URL" ]; then fi else print_error "ROCM_VERSION is required" - print_info "Genesis server does not provide an index page for auto-detection." + print_info "The configured SDK server does not provide an index page for auto-detection." print_info "Set it via environment variable, e.g.:" echo "" echo " export ROCM_VERSION=\"7.11.0a20260121\"" From 1f50ef97df8b0f727b0152475d6f5e99151adda1 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 12 Apr 2026 04:01:09 -0700 Subject: [PATCH 091/275] cleanup and refactor and keep fallbacks --- .../workflows/build-relocatable-packages.yml | 44 ++++++++++++++----- build_packages_local.sh | 2 +- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index fa8f30ac0..599fbcc9b 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -64,7 +64,7 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ] && [ -n "${{ vars.ROCM_SDK_INDEX_URL }}" ]; then + if [ "${{ github.event_name }}" = "schedule" ] && [ -z "${{ vars.ROCM_VERSION }}" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV echo "Scheduled run: will auto-fetch latest ROCm version" fi @@ -121,10 +121,22 @@ jobs: - name: Configure AWS credentials if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ARN }} - aws-region: us-east-1 + run: | + TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ + "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") + CREDS=$(aws sts assume-role-with-web-identity \ + --role-arn "${{ secrets.AWS_ROLE_ARN }}" \ + --role-session-name "github-actions-${{ github.run_id }}" \ + --web-identity-token "$TOKEN" \ + --query 'Credentials' --output json) + echo "AWS_ACCESS_KEY_ID=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['AccessKeyId'])")" >> $GITHUB_ENV + echo "AWS_SECRET_ACCESS_KEY=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SecretAccessKey'])")" >> $GITHUB_ENV + echo "AWS_SESSION_TOKEN=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SessionToken'])")" >> $GITHUB_ENV + echo "AWS_DEFAULT_REGION=us-east-1" >> $GITHUB_ENV + echo "::add-mask::$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SecretAccessKey'])")" + echo "::add-mask::$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SessionToken'])")" + env: + AWS_DEFAULT_REGION: us-east-1 - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu @@ -219,7 +231,7 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ] && [ -n "${{ vars.ROCM_SDK_INDEX_URL }}" ]; then + if [ "${{ github.event_name }}" = "schedule" ] && [ -z "${{ vars.ROCM_VERSION }}" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV echo "Scheduled run: will auto-fetch latest ROCm version" fi @@ -275,10 +287,22 @@ jobs: - name: Configure AWS credentials if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ARN }} - aws-region: us-east-1 + run: | + TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ + "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") + CREDS=$(aws sts assume-role-with-web-identity \ + --role-arn "${{ secrets.AWS_ROLE_ARN }}" \ + --role-session-name "github-actions-${{ github.run_id }}" \ + --web-identity-token "$TOKEN" \ + --query 'Credentials' --output json) + echo "AWS_ACCESS_KEY_ID=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['AccessKeyId'])")" >> $GITHUB_ENV + echo "AWS_SECRET_ACCESS_KEY=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SecretAccessKey'])")" >> $GITHUB_ENV + echo "AWS_SESSION_TOKEN=$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SessionToken'])")" >> $GITHUB_ENV + echo "AWS_DEFAULT_REGION=us-east-1" >> $GITHUB_ENV + echo "::add-mask::$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SecretAccessKey'])")" + echo "::add-mask::$(echo "$CREDS" | python3 -c "import sys,json; print(json.load(sys.stdin)['SessionToken'])")" + env: + AWS_DEFAULT_REGION: us-east-1 - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos diff --git a/build_packages_local.sh b/build_packages_local.sh index ebf30cef4..3d4cf4926 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -19,7 +19,7 @@ ROCM_INSTALL_DIR="$HOME/rocm-sdk" # If your SDK server has no index page for auto-detection, set ROCM_SDK_INDEX_URL="" # and provide ROCM_VERSION explicitly. ROCM_SDK_BASE_URL="${ROCM_SDK_BASE_URL:-https://therock-nightly-tarball.s3.us-east-2.amazonaws.com}" -ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" +ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-https://therock-nightly-tarball.s3.amazonaws.com/index.html}" # Post-build upload configuration # Set UPLOAD_TARGET to enable automatic upload of built packages after the build. From 4267fa9171218107f2aa3ba7534d0196f8a42447 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 13 Apr 2026 07:18:14 -0400 Subject: [PATCH 092/275] use hipblaslt, infer datat type if missing and add fp16 --- pulse.so/src/action.cpp | 29 +++++++++++++++++++++++++++++ rvs/conf/pulse_single.conf | 22 +++++++++++++--------- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp index 4e8108891..212f22f6e 100644 --- a/pulse.so/src/action.cpp +++ b/pulse.so/src/action.cpp @@ -317,6 +317,35 @@ bool pulse_action::get_all_pulse_config_keys(void) { bsts = false; } + if (pulse_blas_source != "rocblas" && pulse_blas_source != "hipblaslt") { + msg = "'" + std::string(RVS_CONF_BLAS_SOURCE_KEY) + + "' must be 'rocblas' or 'hipblaslt'"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + + // hipBLASLt needs explicit matrix data types; rocBLAS can rely on ops_type alone. + if (pulse_blas_source == "hipblaslt" && pulse_data_type.empty()) { + if (pulse_ops_type == "sgemm") { + pulse_data_type = "fp32_r"; + } else if (pulse_ops_type == "dgemm") { + pulse_data_type = "fp64_r"; + } else if (pulse_ops_type == "hgemm") { + pulse_data_type = "fp16_r"; + } else { + msg = "hipblaslt requires 'data_type' in the action when 'ops_type' is not " + "sgemm, dgemm, or hgemm"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + } + + // Default compute_type is fp32_r; double GEMM with hipBLASLt needs fp64 compute. + if (pulse_blas_source == "hipblaslt" && pulse_ops_type == "dgemm" && + pulse_compute_type == std::string(PULSE_DEFAULT_COMPUTE_TYPE)) { + pulse_compute_type = "fp64_r"; + } + if (high_phase_ratio < 0.0f || high_phase_ratio > 1.0f) { msg = "'" + std::string(RVS_CONF_HIGH_PHASE_RATIO_KEY) + "' must be between 0.0 and 1.0"; diff --git a/rvs/conf/pulse_single.conf b/rvs/conf/pulse_single.conf index 4c1141108..115dfe496 100644 --- a/rvs/conf/pulse_single.conf +++ b/rvs/conf/pulse_single.conf @@ -23,9 +23,7 @@ # - GEMM compute errors (data corruption) # - Power supply unable to handle transient spikes # -# Prerequisites: -# - Sufficient permissions for clock manipulation via AMD SMI -# - rocBLAS installed and accessible + actions: - name: pulse_stress_basic @@ -46,7 +44,9 @@ actions: halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff - blas_source: rocblas + blas_source: hipblaslt + data_type: fp32_r + compute_type: fp32_r - name: pulse_stress_aggressive device: all @@ -66,9 +66,11 @@ actions: halt_on_error: true gpu_sync_wait: 10000 verify_mode: diff - blas_source: rocblas + blas_source: hipblaslt + data_type: fp32_r + compute_type: fp32_r -- name: pulse_stress_dgemm +- name: pulse_stress_fp16 device: all module: pulse parallel: true @@ -77,13 +79,15 @@ actions: log_interval: 5000 pulse_rate: 2 high_phase_ratio: 0.5 - ops_type: dgemm + ops_type: hgemm matrix_size: 8192 alpha: 2.0 beta: -1.0 tolerance: 10.0 - workload_iterations: 64 + workload_iterations: 128 halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff - blas_source: rocblas + blas_source: hipblaslt + data_type: fp16_r + compute_type: fp32_r From 9fa2f851d6bf83bdf299cb3c0a710ae49d946f0f Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 13 Apr 2026 14:46:38 -0700 Subject: [PATCH 093/275] Update package dependency with amdrocm pacakges. Starting ROCm 7.12 rocm pacakges have changed names. Newer RVS continue to work with old ROCm and new as well provided dependent libraries are connected with LD_LIBRARY_PATH/ldconf. Need to make sure RVS is installable with old or new method of ROCm installed in the system. Ref:https://github.com/ROCm/TheRock/blob/main/ docs/rfcs/RFC0009-OS-Packaging-Requirements.md --- CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc43b3ee6..84171df85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,11 +234,13 @@ set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices Inc.") set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") -# Package dependencies +# Package dependencies: support both legacy (ROCm <=6.x) and new amdrocm-* naming (TheRock/ROCm 8.x per RFC0009) +# DEB uses "old | new" OR syntax, RPM uses "(old or new)" boolean dependency syntax +set(ROCM_DEB_DEPS "hip-runtime-amd | amdrocm-runtimes, comgr | amdrocm-runtimes, hsa-rocr | amdrocm-runtimes, rocblas | amdrocm-blas, amd-smi-lib | amdrocm-amdsmi, hiprand | amdrocm-rand, hipblaslt | amdrocm-blas") +set(ROCM_RPM_DEPS "(hip-runtime-amd or amdrocm-runtimes), (comgr or amdrocm-runtimes), (hsa-rocr or amdrocm-runtimes), (rocblas or amdrocm-blas), (amd-smi-lib or amdrocm-amdsmi), (hiprand or amdrocm-rand), (hipblaslt or amdrocm-blas)") if(FETCH_ROCMPATH_FROM_ROCMCORE) - set(ROCM_DEPENDENT_PACKAGES "hip-runtime-amd, comgr, hsa-rocr, rocblas, amd-smi-lib, hiprand, hipblaslt, ${ROCM_CORE}") -else() - set(ROCM_DEPENDENT_PACKAGES "hip-runtime-amd, comgr, hsa-rocr, rocblas, amd-smi-lib, hiprand, hipblaslt") + set(ROCM_DEB_DEPS "${ROCM_DEB_DEPS}, ${ROCM_CORE} | amdrocm-base") + set(ROCM_RPM_DEPS "${ROCM_RPM_DEPS}, (${ROCM_CORE} or amdrocm-base)") endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) @@ -396,23 +398,23 @@ endif() if (YAML_CPP_STATIC_FOUND) # Static linking - no runtime yaml-cpp dependency needed if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs") endif() message(STATUS "Package dependencies: yaml-cpp statically linked, no runtime dependency") else() # Dynamic linking - yaml-cpp runtime dependency required if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp-dev") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libyaml-cpp-dev") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, libpci3, libyaml-cpp0_6") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libyaml-cpp0_6") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_DEPENDENT_PACKAGES}, pciutils-libs, yaml-cpp") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, yaml-cpp") endif() message(STATUS "Package dependencies: yaml-cpp dynamically linked, runtime dependency included") endif() From 375fa796391ec05971af8bf2f4221c99500f2bc6 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 14 Apr 2026 00:07:56 -0700 Subject: [PATCH 094/275] gate local pushes, refactor code --- .github/workflows/build-relocatable-packages.yml | 4 ++++ build_packages_local.sh | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 599fbcc9b..4299bbb1c 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -39,6 +39,10 @@ env: ROCM_VERSION: ${{ vars.ROCM_VERSION || '7.11.0a20260121' }} GPU_FAMILY: ${{ vars.GPU_FAMILY || 'gfx110X-all' }} BUILD_TYPE: Release + # Optional Step 6 in build_packages_local.sh: set repo Actions variable + # RVS_AUTO_DETECT_LOCAL_UPLOAD to "1" to probe localhost:8080 when UPLOAD_TARGET is unset. + # Leave the variable undefined for default (no probe; S3 uses workflow steps only). + RVS_AUTO_DETECT_LOCAL_UPLOAD: ${{ vars.RVS_AUTO_DETECT_LOCAL_UPLOAD }} jobs: build-ubuntu: diff --git a/build_packages_local.sh b/build_packages_local.sh index 3d4cf4926..8ca7fb8ac 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -32,11 +32,13 @@ ROCM_SDK_INDEX_URL="${ROCM_SDK_INDEX_URL:-https://therock-nightly-tarball.s3.ama # HTTP PUT: UPLOAD_TARGET="http://localhost:8080" # (use with packages_server/ nginx setup for auto directory creation) # -# If the local nginx package server is running, auto-detect it: -# UPLOAD_TARGET="http://localhost:8080" when nginx is serving on 8080 +# Internal-only convenience: if UPLOAD_TARGET is unset, set RVS_AUTO_DETECT_LOCAL_UPLOAD=1 +# (e.g. in workflow env or shell) to probe http://localhost:8080/ once and use it when +# something responds. Default is off so external/CI builds never curl localhost; GitHub +# uploads use the workflow S3 steps, not Step 6 of this script. # # UPLOAD_REPO overrides the repo name in the upload path (auto-detected from git remote). -if [ -z "${UPLOAD_TARGET:-}" ]; then +if [ -z "${UPLOAD_TARGET:-}" ] && [ -n "${RVS_AUTO_DETECT_LOCAL_UPLOAD:-}" ]; then if curl -s -o /dev/null -w '' http://localhost:8080/ 2>/dev/null; then UPLOAD_TARGET="http://localhost:8080" fi From e44b3d2747aeda906045817b6aa13e11f1455f5b Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 14 Apr 2026 22:48:39 -0700 Subject: [PATCH 095/275] retain prior comments and format comments for readability --- .../workflows/build-relocatable-packages.yml | 20 ++++++++++++++++--- build_packages_local.sh | 8 ++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 4299bbb1c..a4d1469e8 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -82,7 +82,7 @@ jobs: - name: Build and Package RVS run: | chmod +x build_packages_local.sh - + # Run build script with sudo (Ubuntu runner needs sudo for apt-get) sudo -E ROCM_VERSION=${{ env.ROCM_VERSION }} \ GPU_FAMILY=${{ env.GPU_FAMILY }} \ BUILD_TYPE=${{ env.BUILD_TYPE }} \ @@ -142,6 +142,11 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 + # vars.AWS_S3_BUCKET = repository variable. + # Paths: nightly → nightly/rocm-validation-suite/deb; + # release/* → release/rocm-validation-suite/deb; + # else → rocm-validation-suite///ubuntu-22.04 + # tar.gz is uploaded only by the manylinux (CentOS) job - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -177,6 +182,8 @@ jobs: fi echo "Done." + # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path + # can be consumed directly as a DEB repository by apt. - name: Generate and upload DEB repo metadata to S3 if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) run: | @@ -283,7 +290,8 @@ jobs: build/rocm-validation-suite*.tar.gz retention-days: 30 - # S3 upload only for repo ROCm/ROCmValidationSuite (schedule, release/* push, master/main push, or same-repo PR) + # S3 upload only for repo ROCm/ROCmValidationSuite + # (schedule, release/* push, master/main push, or same-repo PR) - name: Install AWS CLI if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) run: | @@ -308,6 +316,10 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 + # vars.AWS_S3_BUCKET = repository variable. + # Paths: nightly (schedule) → nightly/rocm-validation-suite/rpm,tar; + # release/* → release/rocm-validation-suite/rpm,tar; + # else → rocm-validation-suite///manylinux_2_28 - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) @@ -348,7 +360,9 @@ jobs: echo "paths=CentOS/RHEL packages|${PREFIX}" >> $GITHUB_OUTPUT fi echo "Done." - + + # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed + # directly as an RPM repository by yum/dnf. - name: Generate and upload RPM repodata to S3 if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) run: | diff --git a/build_packages_local.sh b/build_packages_local.sh index 8ca7fb8ac..01bacd3d2 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -209,6 +209,8 @@ check_and_install_dependencies() { || print_warning "Some packages may already be installed" # Install a gcc-toolset with C++20 support (requires GCC >= 11) + # Try highest available first for best C++20/C++23 support, fall back to minimum viable + # RHEL/AlmaLinux/Rocky 8+ use gcc-toolset-{ver}, CentOS 7 uses devtoolset-{ver} if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then GCC_TOOLSET_INSTALLED="" for ver in 14 13 12 11; do @@ -221,6 +223,7 @@ check_and_install_dependencies() { fi fi done + # Fallback to devtoolset (CentOS 7) - only devtoolset-11 has if [ -z "$GCC_TOOLSET_INSTALLED" ]; then if yum list available devtoolset-11 &>/dev/null; then print_info "Found devtoolset-11 - installing for C++20 support (CentOS 7)..." @@ -454,6 +457,8 @@ fi if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like + # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ + GCC_TOOLSET_ENABLED="" for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) @@ -477,9 +482,11 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi + # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" else + # Ubuntu and others: use defaults (system compiler and cmake) export CMAKE_COMMAND="cmake" print_info "Using cmake (Ubuntu/other)" fi @@ -549,6 +556,7 @@ if [ -n "$CMAKE_CXX_COMPILER" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") fi +# Point hipcc at the GCC toolchain for C++20 standard library headers if [ -n "$GCC_TOOLCHAIN" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="--gcc-toolchain=$GCC_TOOLCHAIN") print_success "Set --gcc-toolchain=$GCC_TOOLCHAIN for hipcc" From 7faf7a6f893d07952f73aca537c99609c8b1a13d Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 15 Apr 2026 08:34:46 -0400 Subject: [PATCH 096/275] doc update --- FEATURES.md | 2 + docs/ug1main.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) diff --git a/FEATURES.md b/FEATURES.md index adae880de..7e4034e41 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -59,3 +59,5 @@ The Babel module executes BabelStream (synthetic GPU benchmark based on the orig ## Thermal Stress Test - TST module The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temperatures under various stressful workloads. Also checks whether GPU junction temperature reaches target and trottle temperatures. +## Pulse Stress Test- Pulse module +The Pulse Stress Test creates power fluctuations by alternating between high-compute (GEMM) and idle phases at a configurable rate. Two-level barrier synchronizes all GPUs so they spike current simultaneously, maximizing stress on the PSU. diff --git a/docs/ug1main.md b/docs/ug1main.md index d808202d2..08b9fd00e 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -126,6 +126,9 @@ The GPU Stress Test runs various GEMM computations as workloads to stress the GP #### Input EDPp Test - IET module The Input EDPp Test runs GEMM workloads to stress the GPU power (that is, TGP). This test is used to verify if the GPU is capable of handling max. power stress for a sustained period of time. Also checks whether GPU power reaches a set target power. +#### GPU Power Pulse Test - PULSE module +The Pulse test drives repeating **high-power** (GEMM compute) and **low-power** (idle, minimum clocks) phases at a configurable rate so that GPU power swings over time. That pattern stresses the power supply and voltage regulators with transients rather than a single sustained power level. With **parallel: true** on multiple GPUs, the module uses a CPU-side barrier and a GPU-side fine-grained barrier so that devices tend to enter the heavy phase together, increasing aggregate current steps. Power and temperature are read through **AMD SMI**. GEMM execution uses the same **rvs_blas** stack as GST/IET (**rocBLAS** or **hipBLASLt**). + #### Memory Test - MEM module The Memory module tests the GPU memory for hardware errors and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests [Algorithm, data pattern] @@ -2559,3 +2562,103 @@ The output for such a configuration file may look like this: **) please increase the ramp_interval and/or the tolerance value(s) and try again (in case of a 'ramp time exceeded' message) **) please increase the tolerance value (in case too many 'power violation message' are logged out) + + +## Pulse Module + +The **Pulse** module is intended for **time-varying** GPU power stress: it alternates **high** phases (maximum clocks plus continuous GEMM) and **low** phases (minimum clocks plus idle/sleep), repeating for the action **duration**. That produces periodic power swings useful for exercising PSU transient response and platform power delivery, complementing **IET** (which targets a sustained power level). + +GEMM type, matrix size, and BLAS backend follow the same concepts as **GST** / **IET** (see those sections and `rvs_blas`). Sample reference configuration: `rvs/conf/pulse_single.conf`. + +### Behavior summary + +- Each **pulse cycle** is one high phase followed by one low phase. Phase lengths derive from **pulse_rate** (Hz) and **high_phase_ratio**; each phase is at least **10 ms** after rounding. +- **High phase:** sets GPU clocks high, runs GEMM in a loop (**workload_iterations** per inner batch) until the high-phase time budget elapses, samples power, checks junction temperature (**failure if above 105°C**). +- After the high phase, the module calls **hipDeviceSynchronize** so work drains before the low phase (clearer separation of high vs. low power). +- **Low phase:** sets clocks low, sleeps briefly between **sample_interval**-style sampling (5 ms sleep steps in the implementation), samples power. +- With **parallel: true** and **more than one GPU**, threads coordinate with a **std::barrier** and a small **GPU kernel** using **fine-grained coherent** host memory so all GPUs synchronize across the pulse loop (avoids deadlock on shutdown via a shared **done** flag). +- **Pass:** for primary MCM dies, the action passes if **at least one** pulse completed, there was **no** BLAS enqueue/sync failure (unless **halt_on_error** stops earlier), and **no** thermal violation; **secondary MCM** GPUs are treated as pass by default. **Fail** otherwise. + +### Prerequisites + +- **ROCm** with **hipBLASLt** and **rocBLAS** available as for the rest of RVS (the `rvs` binary links **hipblaslt**; GEMM code lives in **rvslib**). +- **AMD SMI** initialized for power and temperature queries (same family of requirements as other SMI-based modules). Elevated privileges are often required for clock control and power metrics. +- For **hipBLASLt**, **data_type** must be valid (e.g. **fp32_r** with **sgemm**, **fp16_r** with **hgemm** and **compute_type** such as **fp32_r**). If **data_type** is omitted with **blas_source: hipblaslt**, the module infers **fp32_r** / **fp64_r** / **fp16_r** from **ops_type** **sgemm** / **dgemm** / **hgemm** respectively; for **dgemm** with hipBLASLt, if **compute_type** is still the default **fp32_r**, it is adjusted to **fp64_r**. + +### Module specific keys + +Keys below are in addition to **common** keys (**name**, **module**, **device**, **duration**, **parallel**, **log_interval**, **count**, **wait**, etc.—see **Common Configuration Keys**). + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Config Key TypeDescription
pulse_rateIntegerPulse frequency in **Hertz** (cycles per second). Default 2. Use roughly **1–5 Hz** if you want power readings to show clear high/low separation; very high rates shorten phases below typical GPU power-state and SMI averaging windows, so reported averages may converge.
high_phase_ratioFloatFraction of each cycle spent in the **high** (GEMM) phase, **0.0–1.0**. Default 0.5. Lower values spend more time in the low phase.
matrix_sizeIntegerSquare GEMM dimension **M = N = K**. Default 4096. Larger matrices increase compute and power draw during the high phase.
ops_typeStringGEMM operation flavor (e.g. sgemm, dgemm, hgemm). Default sgemm. Must match **data_type** / **compute_type** when using hipBLASLt.
data_typeStringMatrix data type string for hipBLASLt (e.g. fp32_r, fp16_r). Default empty (rocBLAS can infer from **ops_type** alone).
out_data_typeStringOptional output type for GEMM; default empty (same as input type where applicable).
compute_typeStringhipBLASLt compute type (e.g. fp32_r). Default fp32_r.
blas_sourceStringrocblas or hipblaslt. Default rocblas.
alphaFloatGEMM scalar α. Default 2.0.
betaFloatGEMM scalar β. Default -1.0.
transaIntegerTranspose A: **0** no transpose, **1** transpose. Default 0.
transbIntegerTranspose B: **0** no transpose, **1** transpose. Default 1.
ldaIntegerLeading dimension offset A (0 = use minimum). Defaults 0.
ldbIntegerLeading dimension offset B. Default 0.
ldcIntegerLeading dimension offset C. Default 0.
lddIntegerLeading dimension offset D. Default 0.
matrix_initStringHost matrix initialization (e.g. default, hiprand). Default default.
workload_iterationsIntegerGEMM calls per inner batch in the high phase before re-checking time and power. Default 128. Increase for heavier per-iteration work; tune with **pulse_rate** and phase length.
sample_intervalIntegerReserved sampling interval (ms) for pulse-specific logic; values below **50** are raised to **50**. Default 100.
toleranceFloatDefault 10.0. Parsed and passed to the worker; **not** currently used in pass/fail logic (reserved for future checks).
verify_modeStringe.g. diff / crc. Default diff. Parsed; **not** currently used in pass/fail logic (reserved for future GEMM verification).
halt_on_errorBoolIf **true**, stop the GPU thread on first BLAS or thermal error. Default false.
hot_callsIntegerBLAS “hot call” / warmup-related parameter forwarded to **rvs_blas**. Default 1.
gpu_sync_waitIntegerDefault 10000. Parsed from configuration; **not** referenced by the current barrier implementation (placeholder for future timeout behavior).
+ +### Output + +Log lines use the action **name**, module tag **pulse**, and GPU id. + + + + + + + + + +
Output / log Description
Start[INFO] ... pulse <gpu_id> start pulse_rate=<hz>
Parameters[INFO] ... pulse_rate=... Hz period=...ms high=...ms low=...ms
Thermal error[ERROR] ... thermal violation: <temp>C (junction > 105°C)
Periodic summaryAt each log_interval, moving averages and extrema: pulse #N avg_high=...W avg_low=...W max_high=...W min_low=...W delta=...W
CompletionSummary over the run: pulse count, average high/low power, delta, max high, min low.
pass[RESULT] ... pass: TRUE or FALSE per GPU.
+ +With **JSON** logging enabled, per-pulse records can include **power_high_w**, **power_low_w**, **power_delta_w**, phase durations, **temp_c**, **gemm_count**, and a final **summary** with **pass**. + +### Example + +Minimal illustration (see **pulse_single.conf** for full examples including **hipblaslt** + **fp16_r**): + + actions: + - name: pulse_stress_basic + device: all + module: pulse + parallel: true + duration: 60000 + log_interval: 5000 + pulse_rate: 2 + high_phase_ratio: 0.5 + ops_type: sgemm + matrix_size: 8192 + blas_source: hipblaslt + data_type: fp32_r + compute_type: fp32_r + workload_iterations: 128 + halt_on_error: false + +Run from the build or package **bin** directory, for example: + + ./rvs -c conf/pulse_single.conf -d 3 + +### Notes + +- Tune **matrix_size**, **pulse_rate**, and **high_phase_ratio** to match GPU class and the transient behavior you want to stress. +- **hipBLASLt** often delivers higher GEMM throughput than rocBLAS on supported GPUs; **fp16_r** / **hgemm** with **compute_type: fp32_r** is a common high-throughput choice (as in the **pulse_stress_fp16** action in **pulse_single.conf**). From c441a9301a3ca9526258e1e46e189c327bd1a607 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 17 Apr 2026 04:48:09 -0400 Subject: [PATCH 097/275] review comment fixes, and minor updates --- pulse.so/include/action.h | 2 + pulse.so/include/pulse_worker.h | 11 +- pulse.so/src/action.cpp | 19 +++ pulse.so/src/pulse_worker.cpp | 206 +++++++++++++++++++++++++++----- pulse.so/src/rvs_module.cpp | 3 +- rvs/conf/pulse_single.conf | 15 ++- 6 files changed, 223 insertions(+), 33 deletions(-) diff --git a/pulse.so/include/action.h b/pulse.so/include/action.h index 578baa13e..a999f0c40 100644 --- a/pulse.so/include/action.h +++ b/pulse.so/include/action.h @@ -106,6 +106,8 @@ class pulse_action: public rvs::actionbase { std::string pulse_blas_source; //! gemm compute type std::string pulse_compute_type; + //! fail high phase if junction/edge temp (C) exceeds this; 0 disables check + float pulse_max_temp_c; friend class PulseWorker; diff --git a/pulse.so/include/pulse_worker.h b/pulse.so/include/pulse_worker.h index 91c10946f..ccbc3c534 100644 --- a/pulse.so/include/pulse_worker.h +++ b/pulse.so/include/pulse_worker.h @@ -96,6 +96,10 @@ class PulseWorker : public rvs::ThreadBase { tolerance = _tolerance; } + void set_max_temp_c(float _c) { + max_temp_c = _c; + } + void set_matrix_size(uint64_t _matrix_size) { matrix_size = _matrix_size; } @@ -187,9 +191,11 @@ class PulseWorker : public rvs::ThreadBase { bool set_lowest_clocks(void); bool restore_clocks(void); - bool gpu_barrier_sync(bool time_up); + bool gpu_barrier_sync(bool time_up, bool& test_passed); - protected: + bool run_gemm_verify(bool& test_passed); + + protected: std::unique_ptr gpu_blas; std::string action_name; @@ -204,6 +210,7 @@ class PulseWorker : public rvs::ThreadBase { int pulse_rate; float high_phase_ratio; float tolerance; + float max_temp_c; uint64_t matrix_size; std::string pulse_ops_type; diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp index 212f22f6e..36f836b0a 100644 --- a/pulse.so/src/action.cpp +++ b/pulse.so/src/action.cpp @@ -79,6 +79,7 @@ using std::map; #define RVS_CONF_MATRIX_INIT_KEY "matrix_init" #define RVS_CONF_BLAS_SOURCE_KEY "blas_source" #define RVS_CONF_COMPUTE_TYPE_KEY "compute_type" +#define RVS_CONF_MAX_TEMP_C_KEY "max_temp_c" #define PULSE_DEFAULT_RATE 2 #define PULSE_DEFAULT_HIGH_PHASE_RATIO 0.5f @@ -104,6 +105,7 @@ using std::map; #define PULSE_DEFAULT_MATRIX_INIT "default" #define PULSE_DEFAULT_BLAS_SOURCE "rocblas" #define PULSE_DEFAULT_COMPUTE_TYPE "fp32_r" +#define PULSE_DEFAULT_MAX_TEMP_C 105.0f #define PULSE_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" #define JSON_CREATE_NODE_ERROR "JSON cannot create node" @@ -113,6 +115,7 @@ static constexpr auto MODULE_NAME_CAPS = "PULSE"; pulse_action::pulse_action() { module_name = MODULE_NAME; + pulse_max_temp_c = PULSE_DEFAULT_MAX_TEMP_C; } pulse_action::~pulse_action() { @@ -317,6 +320,21 @@ bool pulse_action::get_all_pulse_config_keys(void) { bsts = false; } + if (property_get(RVS_CONF_MAX_TEMP_C_KEY, + &pulse_max_temp_c, PULSE_DEFAULT_MAX_TEMP_C)) { + msg = "invalid '" + std::string(RVS_CONF_MAX_TEMP_C_KEY) + + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + if (pulse_max_temp_c < 0.0f || + (pulse_max_temp_c > 0.0f && pulse_max_temp_c > 200.0f)) { + msg = "'" + std::string(RVS_CONF_MAX_TEMP_C_KEY) + + "' must be 0 to disable the thermal check, or a limit in (0, 200] °C"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + if (pulse_blas_source != "rocblas" && pulse_blas_source != "hipblaslt") { msg = "'" + std::string(RVS_CONF_BLAS_SOURCE_KEY) + "' must be 'rocblas' or 'hipblaslt'"; @@ -476,6 +494,7 @@ bool pulse_action::do_pulse_test(map pulse_gpus_device_index, workers[i].set_matrix_init(pulse_matrix_init); workers[i].set_blas_source(pulse_blas_source); workers[i].set_compute_type(pulse_compute_type); + workers[i].set_max_temp_c(pulse_max_temp_c); workers[i].set_mcm_type(mcm_type[i]); workers[i].set_num_gpus(num_gpus); workers[i].set_worker_index(i); diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp index 67963af7a..5b2cb59af 100644 --- a/pulse.so/src/pulse_worker.cpp +++ b/pulse.so/src/pulse_worker.cpp @@ -1,4 +1,9 @@ /******************************************************************************** + * + * Pulse worker: alternating GEMM / idle phases, SMI power & temperature, + * optional end-of-run GEMM verify (verify_mode / tolerance; CPU accuracy + * skipped for matrix_size > 2048), sample_interval throttling, multi-GPU + * barriers on the default HIP stream, configurable max_temp_c. * * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. * @@ -31,6 +36,8 @@ #include #include #include +#include +#include #include "hip/hip_runtime.h" #include "hip/hip_runtime_api.h" @@ -50,6 +57,48 @@ using std::string; bool PulseWorker::bjson = false; +static string pulse_mode_normalize(const string& in) { + string out; + for (char c : in) { + if (!std::isspace(static_cast(c))) + out.push_back(static_cast( + std::tolower(static_cast(c)))); + } + return out; +} + +/** Map verify_mode to rvs_blas::validate_gemm flags (GST-style semantics). */ +static void pulse_verify_flags(const string& verify_mode, + const string& ops_type, const string& data_type, + bool& self_check, bool& accu_check) { + self_check = false; + accu_check = false; + const string m = pulse_mode_normalize(verify_mode); + if (m.empty() || m == "none" || m == "off" || m == "false") + return; + if (m == "crc") { + self_check = true; + return; + } + if (m == "diff") { + if (ops_type == "sgemm" || ops_type == "dgemm") { + accu_check = true; + } else if (data_type == "fp16_r" || data_type == "bf16_r" || + data_type == "fp8_r" || ops_type == "hgemm") { + self_check = true; + } else { + self_check = true; + } + return; + } + if (m == "both" || m == "full") { + self_check = true; + if (ops_type == "sgemm" || ops_type == "dgemm") + accu_check = true; + return; + } +} + static uint64_t time_diff( std::chrono::time_point t_end, std::chrono::time_point t_start) { @@ -85,6 +134,7 @@ PulseWorker::PulseWorker() pulse_rate(2), high_phase_ratio(0.5f), tolerance(10.0f), + max_temp_c(105.0f), matrix_size(4096), pulse_trans_a(0), pulse_trans_b(1), @@ -118,6 +168,16 @@ float PulseWorker::read_power(void) { return -1.0f; } +// amdsmi_get_temp_metric: some stacks return millidegree Celsius (e.g. 43000 +// for 43 °C, as in gm.so); others return whole degrees in the int64 (as in +// tst_worker). Values with magnitude above 1000 are treated as millidegrees. +static float amdsmi_temperature_to_celsius(int64_t raw) { + const int64_t mag = raw >= 0 ? raw : -raw; + if (mag > 1000) + return static_cast(raw) / 1000.0f; + return static_cast(raw); +} + float PulseWorker::read_temperature(void) { int64_t temp = 0; amdsmi_status_t stat = amdsmi_get_temp_metric(smi_device_handle, @@ -127,7 +187,7 @@ float PulseWorker::read_temperature(void) { AMDSMI_TEMPERATURE_TYPE_EDGE, AMDSMI_TEMP_CURRENT, &temp); } if (stat == AMDSMI_STATUS_SUCCESS) { - return static_cast(temp) / 1000.0f; + return amdsmi_temperature_to_celsius(temp); } return -1.0f; } @@ -136,7 +196,8 @@ bool PulseWorker::discover_valid_clock_levels(void) { amdsmi_frequencies_t freqs{}; string msg; - // Discover GFX clock levels + // Discover GFX clock levels — brief sleep after each set_clk_freq so the + // driver can apply the request before the next probe. if (amdsmi_get_clk_freq(smi_device_handle, AMDSMI_CLK_TYPE_SYS, &freqs) == AMDSMI_STATUS_SUCCESS) { for (uint32_t level = 0; level < freqs.num_supported; ++level) { @@ -316,7 +377,7 @@ bool PulseWorker::setup_blas(void) { return true; } -bool PulseWorker::gpu_barrier_sync(bool time_up) { +bool PulseWorker::gpu_barrier_sync(bool time_up, bool& test_passed) { if (!cpu_barrier || !gpu_arrival_count || !gpu_release_flag) return !time_up; @@ -339,15 +400,78 @@ bool PulseWorker::gpu_barrier_sync(bool time_up) { } cpu_barrier->arrive_and_wait(); - // Level 2: GPU barrier — launch tiny kernel that spins until all GPUs arrive + if (gpu_device_index >= 0) + hipSetDevice(gpu_device_index); + + // Default stream + device sync (same pattern as pre-stream refactor). gpu_sync_barrier_kernel<<<1, 1>>>( gpu_arrival_count, gpu_release_flag, num_gpus); + if (hipDeviceSynchronize() != hipSuccess) { + string msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " hipDeviceSynchronize failed after " + "GPU barrier kernel"; + rvs::lp::Err(msg, "PULSE", action_name); + test_passed = false; + } + return true; +} + +bool PulseWorker::run_gemm_verify(bool& test_passed) { + bool self_check = false; + bool accu_check = false; + pulse_verify_flags(verify_mode, pulse_ops_type, pulse_data_type, + self_check, accu_check); + if (!self_check && !accu_check) + return true; + + // CPU accuracy reference is O(n³) — do not run per pulse on large matrices. + constexpr uint64_t kMaxAccuMatrixDim = 2048ULL; + if (accu_check && matrix_size > kMaxAccuMatrixDim) { + accu_check = false; + if (!self_check) + self_check = true; + } + + if (gpu_device_index >= 0) + hipSetDevice(gpu_device_index); + + double self_error = 0.0; + double accu_error = 0.0; + if (!gpu_blas->validate_gemm(self_check, accu_check, self_error, + accu_error)) { + string msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " GEMM validate_gemm failed (unsupported " + "combination for verify_mode)"; + rvs::lp::Err(msg, "PULSE", action_name); + test_passed = false; + return false; + } + + const double tol = static_cast(tolerance); + if (self_check && self_error > tol) { + string msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " GEMM self-check error " + + std::to_string(self_error) + " exceeds tolerance " + + std::to_string(tol); + rvs::lp::Err(msg, "PULSE", action_name); + test_passed = false; + return false; + } + if (accu_check && accu_error > tol) { + string msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " GEMM accuracy error " + + std::to_string(accu_error) + " exceeds tolerance " + + std::to_string(tol); + rvs::lp::Err(msg, "PULSE", action_name); + test_passed = false; + return false; + } return true; } bool PulseWorker::do_pulse_stress(void) { std::chrono::time_point test_start, phase_start, - now, last_log_time; + now, last_log_time, last_sample_time; string msg; char gpuid_buff[12]; rvs::action_result_t action_result; @@ -385,6 +509,8 @@ bool PulseWorker::do_pulse_stress(void) { high_phase_ms = std::max(high_phase_ms, 10.0); low_phase_ms = std::max(low_phase_ms, 10.0); + const uint64_t smpl_ms = std::max(1ULL, sample_interval); + msg = "[" + action_name + "] " + MODULE_NAME + " " + std::to_string(gpu_id) + " pulse_rate=" + std::to_string(pulse_rate) + "Hz period=" + std::to_string(period_ms) + @@ -405,7 +531,7 @@ bool PulseWorker::do_pulse_stress(void) { // remaining GPUs deadlock. After the barrier, if ANY GPU signaled // done, ALL GPUs exit together. if (cpu_barrier && num_gpus > 1) { - if (!gpu_barrier_sync(time_up)) + if (!gpu_barrier_sync(time_up, test_passed)) break; } else if (time_up) { break; @@ -420,6 +546,8 @@ bool PulseWorker::do_pulse_stress(void) { set_highest_clocks(); phase_start = std::chrono::system_clock::now(); + last_sample_time = phase_start; + while (true) { now = std::chrono::system_clock::now(); double phase_elapsed = std::chrono::duration( @@ -446,23 +574,28 @@ bool PulseWorker::do_pulse_stress(void) { break; } - float power = read_power(); - if (power > 0) { - total_power_high += power; - high_samples++; - if (power > max_power_high) max_power_high = power; - if (power > pulse_peak_high) pulse_peak_high = power; - } + now = std::chrono::system_clock::now(); + if (time_diff(now, last_sample_time) >= smpl_ms) { + float power = read_power(); + if (power > 0) { + total_power_high += power; + high_samples++; + if (power > max_power_high) max_power_high = power; + if (power > pulse_peak_high) pulse_peak_high = power; + } - float temp = read_temperature(); - if (temp > 0) pulse_temp = temp; - if (temp > 105.0f) { - msg = "[" + action_name + "] " + MODULE_NAME + " " + - std::to_string(gpu_id) + " thermal violation: " + - std::to_string(temp) + "C"; - rvs::lp::Log(msg, rvs::logerror); - test_passed = false; - if (halt_on_error) goto done; + float temp = read_temperature(); + if (temp > 0) pulse_temp = temp; + if (max_temp_c > 0.0f && temp > max_temp_c) { + msg = "[" + action_name + "] " + MODULE_NAME + " " + + std::to_string(gpu_id) + " thermal violation: " + + std::to_string(temp) + "C (limit " + std::to_string(max_temp_c) + + "C)"; + rvs::lp::Log(msg, rvs::logerror); + test_passed = false; + if (halt_on_error) goto done; + } + last_sample_time = now; } } @@ -478,6 +611,7 @@ bool PulseWorker::do_pulse_stress(void) { set_lowest_clocks(); phase_start = std::chrono::system_clock::now(); + last_sample_time = phase_start; while (true) { now = std::chrono::system_clock::now(); double phase_elapsed = std::chrono::duration( @@ -485,14 +619,23 @@ bool PulseWorker::do_pulse_stress(void) { if (phase_elapsed >= low_phase_ms) break; - std::this_thread::sleep_for(std::chrono::milliseconds(5)); + double remain_ms = low_phase_ms - phase_elapsed; + unsigned sleep_chunk = static_cast( + std::min(remain_ms, static_cast(smpl_ms))); + if (sleep_chunk < 1u) + sleep_chunk = 1u; + std::this_thread::sleep_for(std::chrono::milliseconds(sleep_chunk)); - float power_low = read_power(); - if (power_low > 0) { - total_power_low += power_low; - low_samples++; - if (power_low < min_power_low) min_power_low = power_low; - if (power_low < pulse_trough_low) pulse_trough_low = power_low; + now = std::chrono::system_clock::now(); + if (time_diff(now, last_sample_time) >= smpl_ms) { + float power_low = read_power(); + if (power_low > 0) { + total_power_low += power_low; + low_samples++; + if (power_low < min_power_low) min_power_low = power_low; + if (power_low < pulse_trough_low) pulse_trough_low = power_low; + } + last_sample_time = now; } } @@ -540,6 +683,11 @@ bool PulseWorker::do_pulse_stress(void) { } done: + if (gpu_blas && gpu_device_index >= 0) { + hipSetDevice(gpu_device_index); + hipDeviceSynchronize(); + (void)run_gemm_verify(test_passed); + } restore_clocks(); float avg_power_high = (high_samples > 0) diff --git a/pulse.so/src/rvs_module.cpp b/pulse.so/src/rvs_module.cpp index f906d60ea..f323a35fa 100644 --- a/pulse.so/src/rvs_module.cpp +++ b/pulse.so/src/rvs_module.cpp @@ -60,7 +60,8 @@ extern "C" const char* rvs_module_get_config(void) { "matrix_size (int), ops_type (string), " "tolerance (float), sample_interval (int), " "workload_iterations (int), halt_on_error (bool), " - "gpu_sync_wait (int), verify_mode (string)"; + "gpu_sync_wait (int, reserved), verify_mode (string), " + "max_temp_c (float, 0=off)"; } extern "C" const char* rvs_module_get_output(void) { diff --git a/rvs/conf/pulse_single.conf b/rvs/conf/pulse_single.conf index 115dfe496..50e82f231 100644 --- a/rvs/conf/pulse_single.conf +++ b/rvs/conf/pulse_single.conf @@ -19,10 +19,18 @@ # recommended for GPUs with >500W TDP. # # Failure conditions: -# - Thermal violations (junction temperature > 105 C) +# - Thermal: junction (or edge) temperature exceeds max_temp_c (°C) # - GEMM compute errors (data corruption) # - Power supply unable to handle transient spikes # +# max_temp_c (float, °C): fail the high phase if reported temp exceeds this. +# Default in module is 105 if omitted. Use 0 to disable the thermal check. +# +# verify_mode: GEMM check runs once at end of the action (not every pulse). +# diff/crc/both — for matrix_size > 2048, CPU accuracy is skipped (self-check +# only) because full CPU reference GEMM would stall for a very long time. +# gpu_sync_wait: parsed for compatibility; barrier uses device sync on stream 0. +# actions: @@ -37,6 +45,7 @@ actions: high_phase_ratio: 0.5 ops_type: sgemm matrix_size: 8192 + matrix_init: trig alpha: 2.0 beta: -1.0 tolerance: 10.0 @@ -44,6 +53,7 @@ actions: halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff + max_temp_c: 105 blas_source: hipblaslt data_type: fp32_r compute_type: fp32_r @@ -66,6 +76,7 @@ actions: halt_on_error: true gpu_sync_wait: 10000 verify_mode: diff + max_temp_c: 105 blas_source: hipblaslt data_type: fp32_r compute_type: fp32_r @@ -81,6 +92,7 @@ actions: high_phase_ratio: 0.5 ops_type: hgemm matrix_size: 8192 + matrix_init: trig alpha: 2.0 beta: -1.0 tolerance: 10.0 @@ -88,6 +100,7 @@ actions: halt_on_error: false gpu_sync_wait: 10000 verify_mode: diff + max_temp_c: 105 blas_source: hipblaslt data_type: fp16_r compute_type: fp32_r From 6805c404279f0d265c7e888b28b0abd2c10c9551 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 8 Apr 2026 12:20:02 -0500 Subject: [PATCH 098/275] Add time-based Babel run --- babel.so/include/action.h | 10 ++- babel.so/include/rvs_memworker.h | 9 +++ babel.so/src/action.cpp | 16 +++++ babel.so/src/rvs_memworker.cpp | 6 +- babel.so/src/rvs_stress.cpp | 113 ++++++++++++++++++++++++------- rvs/conf/MI210/babel.conf | 3 +- rvs/conf/MI300X/babel.conf | 3 +- rvs/conf/MI308X-HF/babel.conf | 3 +- rvs/conf/MI308X/babel.conf | 3 +- rvs/conf/MI325X/babel.conf | 3 +- rvs/conf/MI350X/babel.conf | 5 +- rvs/conf/MI355X/babel.conf | 3 +- rvs/conf/babel.conf | 5 +- 13 files changed, 140 insertions(+), 42 deletions(-) diff --git a/babel.so/include/action.h b/babel.so/include/action.h index be733e823..e2f5f1b96 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -63,10 +63,12 @@ using std::map; #define RVS_CONF_DOT "dot" #define RVS_CONF_TRIAD "triad" #define RVS_CONF_DATA_INIT "data_init" -#define RVS_CONF_NONTEMPORAL "nontemporal" +#define RVS_CONF_NONTEMPORAL "nontemporal" +#define RVS_CONF_DURATION "duration" #define MEM_DEFAULT_ARRAY_SIZE 33554432 // 32 MB #define MEM_DEFAULT_NUM_ITER 100 +#define MEM_DEFAULT_DURATION 0 // 0 means use num_iter instead #define MEM_DEFAULT_TEST_TYPE 1 #define MEM_DEFAULT_MEM_MIBIBYTE false #define MEM_DEFAULT_OP_CSV false @@ -124,7 +126,9 @@ class mem_action: public rvs::actionbase { int test_type; //! number of iterations uint64_t num_iterations; - //! number of iterations + //! test duration in milliseconds (0 = use num_iterations) + uint64_t duration; + //! array size uint64_t array_size; //! number of dwords per lane uint16_t dwords_per_lane; diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index 8a9fd866d..af14ad7f6 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -173,6 +173,13 @@ class MemWorker : public rvs::ThreadBase { //! returns the number of iterations uint64_t get_num_iterations(void) { return num_iterations; } + //! sets the test duration in milliseconds (0 = use num_iterations) + void set_duration(uint64_t _duration) { + duration = _duration; + } + //! returns the test duration in milliseconds + uint64_t get_duration(void) { return duration; } + //! sets the array size void set_array_size(uint64_t _array_size) { array_size = _array_size; @@ -295,6 +302,8 @@ class MemWorker : public rvs::ThreadBase { uint64_t run_duration_ms; //! Number of iterations uint64_t num_iterations; + //! Test duration in milliseconds (0 = use num_iterations) + uint64_t duration; //! output as csv bool output_csv; //! Mibibytes diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index dcf3021c4..74b6a5fb8 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -101,6 +101,7 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { workers[i].set_mibibytes(mibibytes); workers[i].set_output_csv(output_csv); workers[i].set_num_iterations(num_iterations); + workers[i].set_duration(duration); workers[i].set_read(read); workers[i].set_write(write); workers[i].set_copy(copy); @@ -255,6 +256,14 @@ bool mem_action::get_all_mem_config_keys(void) { bsts = false; } + if (property_get_int(RVS_CONF_DURATION, + &duration, MEM_DEFAULT_DURATION)) { + msg = "invalid '" + + std::string(RVS_CONF_DURATION) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + if (property_get(RVS_CONF_MEM_MIBIBYTE, &mibibytes, MEM_DEFAULT_MEM_MIBIBYTE)) { msg = "invalid '" + @@ -326,6 +335,13 @@ bool mem_action::get_all_mem_config_keys(void) { bsts = false; } + if (num_iterations < 2) { + msg = "invalid '" + + std::string(RVS_CONF_NUM_ITER) + "' key value" + " - expected value greater than 1" ; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + return bsts; } diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index ac321269b..9b08a62ab 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,7 +41,7 @@ bool MemWorker::bjson = false; extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal); + const std::string& data_init, const std::string& nontemporal, uint64_t duration); #define FLOAT_TEST 1 #define DOUBLE_TEST 2 @@ -86,6 +86,6 @@ void MemWorker::run() { result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, dwords_per_lane, chunks_per_block, tb_size, - MemWorker::bjson, action_name, &test, data_init, nontemporal); + MemWorker::bjson, action_name, &test, data_init, nontemporal, duration); } diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 5002ce263..575160964 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -41,40 +41,40 @@ void check_solution(const unsigned int ntimes, std::vector& a, std::vector template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal); + const std::string& data_init, const std::string& nontemporal, uint64_t duration); template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal); + const std::string& data_init, const std::string& nontemporal, uint64_t duration); void parseArguments(int argc, char *argv[]); bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal) { + const std::string& data_init, const std::string& nontemporal, uint64_t duration) { bool result = false; switch(test_type) { case FLOAT_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal); + json, action, test, data_init, nontemporal, duration); break; case DOUBLE_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal); + json, action, test, data_init, nontemporal, duration); break; case TRAID_FLOAT: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal); + json, action, test, data_init, nontemporal, duration); break; case TRIAD_DOUBLE: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal); + json, action, test, data_init, nontemporal, duration); break; default: @@ -88,16 +88,20 @@ bool run_babel(std::pair device, int num_times, int array_size, b template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal) + const std::string& data_init, const std::string& nontemporal, uint64_t duration) { std::string msg; std::streamsize ss = std::cout.precision(); std::stringstream sstr; auto desc = action_descriptor{action, module_name, device.second}; + bool time_based = (duration > 0); if (!output_as_csv) { - msg = "Running kernels " + std::to_string(num_times) + " times, " ; + if (time_based) + msg = "Running kernels for " + std::to_string(duration) + " ms, "; + else + msg = "Running kernels " + std::to_string(num_times) + " times, " ; if (sizeof(T) == sizeof(float)) @@ -136,9 +140,14 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, ARRAY_SIZE*sizeof(T)*1.0E-6; auto total_size = mibibytes ? 3.0*ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6; - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Iterations", std::to_string(num_times) ); + if (time_based) + log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), + "Total size", std::to_string(total_size), + "Duration(ms)", std::to_string(duration) ); + else + log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), + "Total size", std::to_string(total_size), + "Iterations", std::to_string(num_times) ); } // Create host vectors @@ -168,9 +177,21 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, // Declare timers std::chrono::high_resolution_clock::time_point t1, t2; + auto loop_start = std::chrono::high_resolution_clock::now(); + auto duration_limit = std::chrono::milliseconds(duration); + uint64_t actual_iterations = 0; + // Main loop - run each babel subtest if enabled - for (unsigned int k = 0; k < num_times; k++) + // When duration > 0: run until elapsed time exceeds duration + // When duration == 0: run for num_times iterations + for (uint64_t k = 0; !time_based ? (k < (uint64_t)num_times) : true; k++) { + if (time_based) { + auto elapsed = std::chrono::high_resolution_clock::now() - loop_start; + if (elapsed >= duration_limit) + break; + } + if(test->read) { // Execute Read t1 = std::chrono::high_resolution_clock::now(); @@ -226,6 +247,18 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, t2 = std::chrono::high_resolution_clock::now(); timings[6].push_back(std::chrono::duration_cast >(t2 - t1).count()); } + + actual_iterations++; + } + + uint64_t effective_num_times = time_based ? actual_iterations : (uint64_t)num_times; + + if (time_based) { + auto total_elapsed = std::chrono::duration_cast>( + std::chrono::high_resolution_clock::now() - loop_start).count(); + msg = "Completed " + std::to_string(actual_iterations) + " iterations in " + + std::to_string(total_elapsed) + " seconds"; + rvs::lp::Log(msg, rvs::logresults); } // Check solutions @@ -288,14 +321,14 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, auto minmax = std::minmax_element(timings[i].begin()+1, timings[i].end()); // Calculate average; ignore the first result - double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(num_times - 1); + double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(effective_num_times - 1); // Display results if (output_as_csv) { sstr << device.second << csv_separator << labels[i] << csv_separator - << num_times << csv_separator + << effective_num_times << csv_separator << ARRAY_SIZE << csv_separator << sizeof(T) << csv_separator << ((mibibytes) ? pow(2.0, -20.0) : 1.0E-6) * sizes[i] / (*minmax.first) << csv_separator @@ -339,15 +372,19 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal) + const std::string& data_init, const std::string& nontemporal, uint64_t duration) { std::string msg; auto desc = action_descriptor{action, module_name, device.second}; triad_only = true; + bool time_based = (duration > 0); std::stringstream sstr; if (!output_as_csv) { - msg = "Running triad " + std::to_string (num_times) + " times,"; + if (time_based) + msg = "Running triad for " + std::to_string(duration) + " ms,"; + else + msg = "Running triad " + std::to_string (num_times) + " times,"; msg += "Number of elements: " + std::to_string(ARRAY_SIZE) + ", "; if (sizeof(T) == sizeof(float)) @@ -380,9 +417,14 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b ARRAY_SIZE*sizeof(T)*1.0E-6; auto total_size = mibibytes ? 3.0*ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6; - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Iterations", std::to_string(num_times) ); + if (time_based) + log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), + "Total size", std::to_string(total_size), + "Duration(ms)", std::to_string(duration) ); + else + log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), + "Total size", std::to_string(total_size), + "Iterations", std::to_string(num_times) ); } std::cout.precision(ss); } @@ -409,23 +451,43 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b // Declare timers std::chrono::high_resolution_clock::time_point t1, t2; + uint64_t actual_iterations = 0; + // Run triad in loop t1 = std::chrono::high_resolution_clock::now(); - for (unsigned int k = 0; k < num_times; k++) - { - stream->triad(); + if (time_based) { + auto duration_limit = std::chrono::milliseconds(duration); + while (true) { + auto elapsed = std::chrono::high_resolution_clock::now() - t1; + if (elapsed >= duration_limit) + break; + stream->triad(); + actual_iterations++; + } + } else { + for (unsigned int k = 0; k < num_times; k++) + { + stream->triad(); + } + actual_iterations = num_times; } t2 = std::chrono::high_resolution_clock::now(); double runtime = std::chrono::duration_cast >(t2 - t1).count(); + if (time_based) { + msg = "Completed " + std::to_string(actual_iterations) + " triad iterations in " + + std::to_string(runtime) + " seconds"; + rvs::lp::Log(msg, rvs::logresults); + } + // Check solutions T sum = 0.0; stream->read_arrays(a, b, c); // check_solution(num_times, a, b, c, sum, ARRAY_SIZE); // Display timing results - double total_bytes = 3 * sizeof(T) * ARRAY_SIZE * num_times; + double total_bytes = 3 * sizeof(T) * ARRAY_SIZE * actual_iterations; double bandwidth = ((mibibytes) ? pow(2.0, -30.0) : 1.0E-9) * (total_bytes / runtime); if (output_as_csv) @@ -441,7 +503,7 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b << std::endl << device.second << csv_separator << "Triad" << csv_separator - << num_times << csv_separator + << actual_iterations << csv_separator << ARRAY_SIZE << csv_separator << sizeof(T) << csv_separator << bandwidth << csv_separator @@ -529,4 +591,3 @@ void check_solution(const unsigned int ntimes, std::vector& a, std::vector rvs::lp::Log(sstr.str() ,rvs::logerror); } } - diff --git a/rvs/conf/MI210/babel.conf b/rvs/conf/MI210/babel.conf index 83908b4a2..69c1c02b7 100644 --- a/rvs/conf/MI210/babel.conf +++ b/rvs/conf/MI210/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: true # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 5000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 268435456 # Buffer size the test operates, this is 256 MiB test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI300X/babel.conf b/rvs/conf/MI300X/babel.conf index 864636a12..2c06833a8 100644 --- a/rvs/conf/MI300X/babel.conf +++ b/rvs/conf/MI300X/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 5000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 268435456 # Buffer size the test operates, this is 256 MiB test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI308X-HF/babel.conf b/rvs/conf/MI308X-HF/babel.conf index 2d44692aa..89daa98bb 100644 --- a/rvs/conf/MI308X-HF/babel.conf +++ b/rvs/conf/MI308X-HF/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 3000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 865075200 # Buffer size the test operates, this is 825 MiB test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI308X/babel.conf b/rvs/conf/MI308X/babel.conf index d01a40492..821ddbb59 100644 --- a/rvs/conf/MI308X/babel.conf +++ b/rvs/conf/MI308X/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 3000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 865075200 # Buffer size the test operates, this is 825 MiB test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI325X/babel.conf b/rvs/conf/MI325X/babel.conf index 95d70687f..d2a32b047 100644 --- a/rvs/conf/MI325X/babel.conf +++ b/rvs/conf/MI325X/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 5000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 268435456 # Buffer size the test operates, this is 256 MiB test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: true # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI350X/babel.conf b/rvs/conf/MI350X/babel.conf index e5d1be26f..bd0d40ef0 100644 --- a/rvs/conf/MI350X/babel.conf +++ b/rvs/conf/MI350X/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -40,7 +40,8 @@ actions: module: babel # Name of the module parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) - num_iter: 2000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + num_iter: 10 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 865075200 # Array size the test operates, this is 825 MiB test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/MI355X/babel.conf b/rvs/conf/MI355X/babel.conf index 148addbbd..a820979c1 100644 --- a/rvs/conf/MI355X/babel.conf +++ b/rvs/conf/MI355X/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -41,6 +41,7 @@ actions: parallel: false # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) num_iter: 2000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 865075200 # Array size the test operates, this is 825 MiB test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB diff --git a/rvs/conf/babel.conf b/rvs/conf/babel.conf index 5964664ef..8d2b368fe 100644 --- a/rvs/conf/babel.conf +++ b/rvs/conf/babel.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -40,7 +40,8 @@ actions: module: babel #Name of the module parallel: true # Parallel true or false count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) - num_iter: 5000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + num_iter: 5000 # Number of iterations, this many kernels are launched simultaneously and stresses the system + duration: 0 # Duration in milliseconds. When > 0, runs for this time instead of num_iter. 0 = use num_iter array_size: 33554432 # Buffer size the test operates , this is 32MB test_type: 2 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double mibibytes: false # mibibytes , if you want to specify in bytes (array size in bytes) , make this true From 60e565e49ddf59ede582d9291eff08d912327887 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 20 Apr 2026 22:53:35 -0700 Subject: [PATCH 099/275] pull latest ROCm for schduled job. This will ensure new ROCm is not causing issue in building a known good RVS mainline. --- .github/workflows/build-relocatable-packages.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index a4d1469e8..4f808d0e5 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -68,11 +68,10 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ] && [ -z "${{ vars.ROCM_VERSION }}" ]; then + if [ "${{ github.event_name }}" = "schedule" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV - echo "Scheduled run: will auto-fetch latest ROCm version" - fi - if [ -n "${{ github.event.inputs.rocm_version }}" ]; then + echo "Scheduled run: build script will auto-fetch latest ROCm version" + elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV fi if [ -n "${{ github.event.inputs.gpu_family }}" ]; then @@ -242,11 +241,10 @@ jobs: - name: Set ROCm Version and GPU Family run: | - if [ "${{ github.event_name }}" = "schedule" ] && [ -z "${{ vars.ROCM_VERSION }}" ]; then + if [ "${{ github.event_name }}" = "schedule" ]; then echo "ROCM_VERSION=" >> $GITHUB_ENV - echo "Scheduled run: will auto-fetch latest ROCm version" - fi - if [ -n "${{ github.event.inputs.rocm_version }}" ]; then + echo "Scheduled run: build script will auto-fetch latest ROCm version" + elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV fi if [ -n "${{ github.event.inputs.gpu_family }}" ]; then From 62c6fab58cff8b905b7d627a74a656c1512b0c8e Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 21 Apr 2026 08:04:04 -0400 Subject: [PATCH 100/275] rebased against master --- build_packages_local.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 5ca2c336d..3b7e3a62b 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -458,28 +458,31 @@ fi if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then # Enable the installed gcc-toolset/devtoolset so hipcc (clang) finds C++20 headers like # Discover the toolset path dynamically via rpm rather than hardcoding /opt/rh/ - - GCC_TOOLSET_ENABLED="" + GCC_TOOLCHAIN="" for pkg in gcc-toolset-14 gcc-toolset-13 gcc-toolset-12 gcc-toolset-11 devtoolset-11; do - ENABLE_SCRIPT=$(rpm -ql ${pkg}-runtime 2>/dev/null | grep '/enable$' | head -1) + ENABLE_SCRIPT=$(rpm -ql "${pkg}-runtime" 2>/dev/null | grep '/enable$' | head -1) if [ -n "$ENABLE_SCRIPT" ] && [ -f "$ENABLE_SCRIPT" ]; then TOOLSET_ROOT=$(dirname "$ENABLE_SCRIPT") + # shellcheck source=/dev/null source "$ENABLE_SCRIPT" GCC_TOOLCHAIN="${TOOLSET_ROOT}/root/usr" + export GCC_TOOLCHAIN print_success "Enabled ${pkg} from ${TOOLSET_ROOT} (GCC $(gcc -dumpversion))" break fi done - # Fallback: probe /opt/rh/ directly (e.g. manylinux images with pre-installed toolsets) + # Fallback: manylinux / images with toolsets under /opt/rh/ without rpm -ql match if [ -z "$GCC_TOOLCHAIN" ]; then for ts_ver in 14 13 12 11; do ts_root="/opt/rh/gcc-toolset-${ts_ver}/root/usr" if [ -d "${ts_root}/include/c++" ]; then GCC_TOOLCHAIN="${ts_root}" if [ -f "/opt/rh/gcc-toolset-${ts_ver}/enable" ]; then + # shellcheck source=/dev/null source "/opt/rh/gcc-toolset-${ts_ver}/enable" fi + export GCC_TOOLCHAIN print_success "Using gcc-toolset-${ts_ver} for C++20 stdlib (${ts_root})" break fi @@ -487,7 +490,7 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then fi if [ -z "$GCC_TOOLCHAIN" ]; then - print_warning "No gcc-toolset (11-14) found; C++20 headers like may be missing" + print_warning "No gcc-toolset (11-14) or devtoolset-11 found - C++20 headers like may be missing" fi if [ -x "$ROCM_PATH/bin/hipcc" ]; then @@ -496,7 +499,7 @@ if [[ "$OS" =~ ^(centos|rhel|almalinux|rocky)$ ]]; then else print_warning "hipcc not found at $ROCM_PATH/bin/hipcc - using system default compiler" fi - + # Use cmake3 for RHEL-based distros export CMAKE_COMMAND="cmake3" print_info "Using cmake3 (CentOS/RHEL/AlmaLinux/Rocky)" @@ -633,6 +636,7 @@ if command -v rpm >/dev/null 2>&1; then print_info "Creating RPM package..." cd "$BUILD_DIR" cpack -G RPM --verbose + if [ $? -eq 0 ]; then RPM_FILE=$(ls rocm-validation-suite*.rpm 2>/dev/null | head -1) From 43c10573710777b17b151daed465b0e32e1bec04 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 00:02:00 -0700 Subject: [PATCH 101/275] update S3 upload to release/nightly Fixed an issue on upload to release branch even when build is not from release branch. Also simplified the condition check for each type of job and removed artifact upload to github storage. --- .github/workflows/README_BUILD_PACKAGES.md | 48 ++++-- .../workflows/build-relocatable-packages.yml | 163 ++++++------------ 2 files changed, 77 insertions(+), 134 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 8ea449365..10addf54e 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -24,8 +24,8 @@ The workflow runs automatically on: When manually triggering the workflow, you can specify: 1. **ROCm Version** (e.g., `7.11.0a20260121`) - - Default: `7.11.0a20260121` - - The script can also auto-fetch the latest version from TheRock + - Default: empty (auto-fetches latest from TheRock) + - Or specify an explicit version string 2. **GPU Family Target**: - `gfx94X-dcgpu` - MI300A/MI300X @@ -112,13 +112,12 @@ The GitHub Actions workflow performs minimal platform-specific operations: 2. **Set Environment Variables** from workflow inputs or defaults 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) -5. **Upload Artifacts** - Store packages with 30-day retention -6. **Upload to S3** (when repo is `ROCm/ROCmValidationSuite` and trigger is schedule, push to `master`/`main`/`release/*`, or same-repo PR) – Each job uploads its packages to S3 using OIDC. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped for other repos and for pull requests from forks. -7. **Generate Repo Metadata** (nightly and release builds only) – Creates APT repo metadata (`Packages`, `Packages.gz`, `Release`) for DEB and YUM/DNF repodata (`repodata/`) for RPM, then uploads to S3 so the paths can be used as native package repositories. +5. **Upload to S3** (when repo is `ROCm/ROCmValidationSuite`) – Each job uploads its packages to S3 using OIDC. The bash routing logic determines the S3 path: `release/*` branch builds (push or manual) go to `release/`, scheduled/push/manual builds go to `nightly/`, and PR builds go to a ref-specific path. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped gracefully if `AWS_S3_BUCKET` is not set. +6. **Generate Repo Metadata** (schedule, push, and manual builds only) – Creates APT repo metadata (`Packages`, `Packages.gz`, `Release`) for DEB and YUM/DNF repodata (`repodata/`) for RPM, then uploads to S3 so the paths can be used as native package repositories. Skipped for PR builds since their packages go to one-off ref-specific paths. ### S3 Upload (OIDC – No Stored Credentials) -S3 upload runs **only when** the repository is **`ROCm/ROCmValidationSuite`** and the run is one of: scheduled (cron), push to `master`/`main`/`release/*`, or pull request from the same repository. Uses **AWS OIDC**; no long-term access key or secret. Skipped for other repos and for pull requests from forks. +S3 upload runs **only when** the repository is **`ROCm/ROCmValidationSuite`** (the `if` guard prevents forks from attempting credential setup). The upload step itself is always reached, but exits gracefully if `AWS_S3_BUCKET` is not set. Uses **AWS OIDC**; no long-term access key or secret. The bash routing inside the upload step determines the S3 destination based on the event type and branch. **Where `vars` and `secrets` are defined** @@ -127,6 +126,18 @@ They are **not** in the workflow file. They are set in the repo: - **Secrets** (e.g. `secrets.AWS_ROLE_ARN`): **Settings** → **Secrets and variables** → **Actions** → **Secrets** tab → New repository secret. - **Variables** (e.g. `vars.AWS_S3_BUCKET`): **Settings** → **Secrets and variables** → **Actions** → **Variables** tab → New repository variable. +### Runner Configuration + +The workflow uses GitHub repository variables to control which runners execute each job, allowing you to use self-hosted runners or GitHub-provided runners: + +| Variable | Default | Used by | +|----------|---------|---------| +| `RUNNER_LABEL` | `ubuntu-22.04` | Ubuntu build job | +| `RUNNER_LABEL_CONTAINER` | `ubuntu-latest` | CentOS/manylinux build job (container) | +| `RUNNER_LABEL_UTILITY` | `ubuntu-latest` | Release summary job | + +To use a self-hosted runner, set the variable to your runner's label (e.g., `self-hosted` or a custom label) in **Settings** → **Secrets and variables** → **Actions** → **Variables**. + **Required setup for S3 upload:** 1. **Repository secret** (Secrets tab, see above): @@ -143,9 +154,9 @@ They are **not** in the workflow file. They are set in the repo: | Trigger | Path | Contents | |--------|------|----------| -| **Scheduled (daily)** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). | -| **Push to `release/*`** | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | Same split by type; all release branches write to the same paths for auto-update. TGZ uploaded only by manylinux job. | -| **Push to `master`/`main` or same-repo PR** | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). | +| **`release/*` branch** (`push` or `workflow_dispatch`) | `release/rocm-validation-suite/deb/`, `release/rocm-validation-suite/rpm/`, `release/rocm-validation-suite/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). Only PR merges into release branches or manual dispatch on release branches write here. | +| **Scheduled**, **push to `master`/`main`**, or **`workflow_dispatch` on non-release branch** | `nightly/rocm-validation-suite/deb/`, `nightly/rocm-validation-suite/rpm/`, `nightly/rocm-validation-suite/tar/` | Same split by type. All non-release builds go to nightly. | +| **Pull request** (same-repo) | `rocm-validation-suite///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). One-off path, no repo metadata generated. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). @@ -153,7 +164,7 @@ When packages are uploaded to S3, the **build report** artifact includes an **S3 ### Repository Metadata (repodata) -For **nightly** and **release** builds, the workflow also generates package repository metadata so that the S3 paths can be used directly as `apt` (DEB) and `yum`/`dnf` (RPM) repositories. This runs after the package upload step in each job. +For **scheduled**, **push**, and **manual** (`workflow_dispatch`) builds, the workflow generates package repository metadata so that the S3 paths can be used directly as `apt` (DEB) and `yum`/`dnf` (RPM) repositories. This runs after the package upload step in each job. PR builds are excluded since their packages go to one-off ref-specific paths. **RPM repodata** (CentOS/RHEL job): - Tool: `createrepo_c` (falls back to `createrepo`) @@ -225,7 +236,7 @@ sudo yum install rocm-validation-suite # or: sudo dnf install rocm-validation-suite ``` -> **Note:** `[trusted=yes]` (apt) and `gpgcheck=0` (yum) disable GPG verification. For production use, sign the packages and metadata with a GPG key and distribute the public key to users. Repository metadata is only generated for **nightly** (scheduled) and **release** builds; per-branch/PR builds upload raw packages without metadata. +> **Note:** `[trusted=yes]` (apt) and `gpgcheck=0` (yum) disable GPG verification. For production use, sign the packages and metadata with a GPG key and distribute the public key to users. Repository metadata is generated for **scheduled**, **push**, and **manual** builds; PR builds upload raw packages to ref-specific paths without metadata. ## Build Script: build_packages_local.sh @@ -311,7 +322,7 @@ rocm-validation-suite-1.0.0-Linux.tar.gz ### Ubuntu/Debian (DEB) ```bash -# Download the artifact from GitHub Actions +# Download the package from S3 (or use the apt repo described above) sudo dpkg -i rocm-validation-suite_*.deb # Run RVS @@ -321,7 +332,7 @@ sudo dpkg -i rocm-validation-suite_*.deb ### CentOS/RHEL/Rocky Linux (RPM) ```bash -# Download the artifact from GitHub Actions +# Download the package from S3 (or use the yum/dnf repo described above) sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm # Run RVS @@ -366,15 +377,14 @@ rpm -qlp rocm-validation-suite-*.rpm # Package contents rpm -qRp rocm-validation-suite-*.rpm # Package dependencies ``` -## Accessing Build Artifacts +## Accessing Build Packages + +Packages are uploaded directly to **S3** (not GitHub Actions artifacts). To find them: 1. Go to the **Actions** tab in your GitHub repository 2. Click on the latest workflow run -3. Scroll down to **Artifacts** section -4. Download the package artifacts: - - `ubuntu-22.04-packages-${GPU_FAMILY}` - - `manylinux_2_28-packages-${GPU_FAMILY}` - - `build-report` (contains build summary) +3. Download the **`build-report`** artifact — it contains S3 console links to each package location +4. Or browse S3 directly using the path layout described above ## Customization diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 4f808d0e5..711189130 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -108,22 +108,13 @@ jobs: echo "Package filename: $DEB_FILE" fi - - name: Upload Ubuntu Packages - uses: actions/upload-artifact@v4 - with: - name: ubuntu-${{ matrix.ubuntu_version }}-packages-${{ env.GPU_FAMILY }} - path: | - build/rocm-validation-suite*.deb - build/rocm-validation-suite*.tar.gz - retention-days: 30 - - # S3 upload only for repo ROCm/ROCmValidationSuite (schedule, release/* push, master/main push, or same-repo PR) + # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: sudo apt-get update && sudo apt-get install -y awscli - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -141,14 +132,10 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. - # Paths: nightly → nightly/rocm-validation-suite/deb; - # release/* → release/rocm-validation-suite/deb; - # else → rocm-validation-suite///ubuntu-22.04 - # tar.gz is uploaded only by the manylinux (CentOS) job + # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -156,20 +143,20 @@ jobs: exit 0 fi BASE="rocm-validation-suite" - if [ "${{ github.event_name }}" = "schedule" ]; then - echo "Scheduled build: uploading to nightly/rocm-validation-suite/deb" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress - echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT - elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then + if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then echo "Release branch build: uploading to release/rocm-validation-suite/deb" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/deb/" aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|release/${BASE}/deb" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "Nightly/push build: uploading to nightly/rocm-validation-suite/deb" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "rocm-validation-suite*.deb" --no-progress + echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" @@ -182,9 +169,10 @@ jobs: echo "Done." # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path - # can be consumed directly as a DEB repository by apt. + # can be consumed directly as a DEB repository by apt. + # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload DEB repo metadata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -192,10 +180,10 @@ jobs: sudo apt-get update && sudo apt-get install -y dpkg-dev apt-utils BASE="rocm-validation-suite" - if [ "${{ github.event_name }}" = "schedule" ]; then - DEB_PREFIX="nightly/${BASE}/deb" - else + if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then DEB_PREFIX="release/${BASE}/deb" + else + DEB_PREFIX="nightly/${BASE}/deb" fi STAGING=$(mktemp -d) @@ -279,24 +267,14 @@ jobs: echo "Package filename: $RPM_FILE" fi - - name: Upload CentOS/RHEL Packages - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.distro }}-packages-${{ env.GPU_FAMILY }} - path: | - build/rocm-validation-suite*.rpm - build/rocm-validation-suite*.tar.gz - retention-days: 30 - - # S3 upload only for repo ROCm/ROCmValidationSuite - # (schedule, release/* push, master/main push, or same-repo PR) + # S3 upload for repo ROCm/ROCmValidationSuite (schedule, push, pull request, manual) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -314,13 +292,10 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # vars.AWS_S3_BUCKET = repository variable. - # Paths: nightly (schedule) → nightly/rocm-validation-suite/rpm,tar; - # release/* → release/rocm-validation-suite/rpm,tar; - # else → rocm-validation-suite///manylinux_2_28 + # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + if: github.repository == 'ROCm/ROCmValidationSuite' run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -328,17 +303,7 @@ jobs: exit 0 fi BASE="rocm-validation-suite" - if [ "${{ github.event_name }}" = "schedule" ]; then - echo "Scheduled build: uploading to nightly/rocm-validation-suite/rpm and nightly/rocm-validation-suite/tar" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable - echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT - elif [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/heads/release/* ]]; then + if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then echo "Release branch build: uploading to release/rocm-validation-suite/rpm and release/rocm-validation-suite/tar" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress @@ -348,6 +313,16 @@ jobs: aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "Nightly/push build: uploading to nightly/rocm-validation-suite/rpm and nightly/rocm-validation-suite/tar" + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "rocm-validation-suite*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "rocm-validation-suite*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable + echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" + aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT else PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" echo "Uploading to s3://${BUCKET}/${PREFIX}/" @@ -361,8 +336,9 @@ jobs: # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed # directly as an RPM repository by yum/dnf. + # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload RPM repodata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -370,10 +346,10 @@ jobs: yum install -y createrepo_c || yum install -y createrepo BASE="rocm-validation-suite" - if [ "${{ github.event_name }}" = "schedule" ]; then - RPM_PREFIX="nightly/${BASE}/rpm" - else + if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then RPM_PREFIX="release/${BASE}/rpm" + else + RPM_PREFIX="nightly/${BASE}/rpm" fi STAGING=$(mktemp -d) @@ -398,84 +374,41 @@ jobs: if: github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) steps: - - name: Download All Artifacts - uses: actions/download-artifact@v4 - with: - path: ./packages - - - name: Display Package Structure - run: | - echo "=== Generated Packages ===" - find ./packages -type f \( -name "*.deb" -o -name "*.rpm" -o -name "*.tar.gz" \) -exec ls -lh {} \; - - echo "" - echo "=== Package Summary ===" - echo "DEB packages:" - find ./packages -name "*.deb" -exec basename {} \; - echo "" - echo "RPM packages:" - find ./packages -name "*.rpm" -exec basename {} \; - echo "" - echo "TGZ packages:" - find ./packages -name "*.tar.gz" -exec basename {} \; - - name: Generate Build Report run: | - cat > build-report.md << 'EOF' + cat > build-report.md << 'REPORT' # ROCm Validation Suite - Build Report - + ## Build Information - **Commit**: ${{ github.sha }} - **Branch**: ${{ github.ref_name }} - - **RVS Version**: ${{ env.RVS_VERSION }} - - **ROCm Version**: ${{ env.ROCM_VERSION }} - - **GPU Family**: ${{ env.GPU_FAMILY }} - **Build Date**: $(date -u +'%Y-%m-%d %H:%M:%S UTC') - - ## Generated Packages - - ### Ubuntu Packages - ``` - $(find ./packages -name "*.deb" -exec basename {} \;) - ``` - - ### CentOS/RHEL Packages - ``` - $(find ./packages -name "*.rpm" -exec basename {} \;) - ``` - - ### TGZ Archives (Relocatable) - ``` - $(find ./packages -name "*.tar.gz" -exec basename {} \;) - ``` - + ## Installation Instructions - + ### Ubuntu/Debian ```bash sudo dpkg -i rocm-validation-suite_*.deb ``` - + ### CentOS/RHEL ```bash sudo rpm -i --replacefiles --nodeps rocm-validation-suite-*.rpm ``` - + ### Relocatable TGZ (Any Linux Distribution) ```bash tar -xzf rocm-validation-suite-*.tar.gz -C /opt/ export PATH=/opt/rocm/rvs/bin:$PATH export LD_LIBRARY_PATH=/opt/rocm/rvs/lib:$LD_LIBRARY_PATH ``` - + ## Notes - All packages are built with relocatable RPATH settings - TGZ packages can be extracted to any location - Install path: /opt/rocm/rvs - ROCm SDK from TheRock nightly builds is used - EOF - - cat build-report.md + REPORT - name: Add S3 upload links to build report run: | From 0db7420147b47da59e031b6e762cd604d31020ed Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 22 Apr 2026 01:54:44 -0700 Subject: [PATCH 102/275] create build summary if job not cancelled No need to check for branch/event based Release summary. --- .github/workflows/build-relocatable-packages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 711189130..3f23e5603 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -371,7 +371,8 @@ jobs: name: Create Release Summary needs: [build-ubuntu, build-centos] runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - if: github.event_name == 'schedule' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + # Only runs when the workflow is not cancelled and always() is true + if: always() && !cancelled() steps: - name: Generate Build Report From 7db4ac5b5820b35b98729e4eac7d8b9755bf42ee Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 25 Mar 2026 13:42:45 -0500 Subject: [PATCH 103/275] Add module (-m) cli option --- docs/ug1main.md | 5 +++ rvs/src/rvscli.cpp | 4 +++ rvs/src/rvsexec.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++-- src/gpu_util.cpp | 14 ++++---- 4 files changed, 100 insertions(+), 9 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index d808202d2..6aa7f4d03 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -272,6 +272,11 @@ else a file created in /var/tmp/ with timestamp in name.
-l--debugLogFileGenerate log file with output and debug information.
-m--moduleSpecify a module name to run the corresponding +platform-specific (MI-series GPUs) module configuration file. Valid modules: babel, gpup, +gst, iet, mem, pebb, peqt, pbqt, rcqt. +
-t--listTestsList the test modules present in RVS.
waitIntegerThis indicates how long the test should -wait -between executions, in milliseconds. Some +wait between executions, in milliseconds. Some modules will ignore this parameter. If the -count key is not specified, this key is ignored. -duration Integer This parameter overrides the count key, if +count key is not specified, this key is ignored.
durationIntegerThis parameter overrides the count key, if specified. This indicates how long the test should run, given in milliseconds. Some modules will ignore this parameter.
- @@ -589,7 +593,7 @@ specified, no logging will occur. monitor will terminate the RVS process when a bounds violation is encountered on any of the metrics specified.
Config Key Type Description
monitorBoolIf this this key is set to true, the GM module will start monitoring on +If this key is set to true, the GM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring of the specified device will be stopped.
metrics
forceBool If 'true' and terminate key is also 'true' -the RVS process will terminate immediately. **Note:** this may cose resource leaks +the RVS process will terminate immediately. **Note:** this may cause resource leaks within GPUs.
@@ -612,7 +616,7 @@ with the following format: [RESULT][][] gm started -In addition, an informational message is provided for each for each metric +In addition, an informational message is provided for each metric being monitored: [INFO ][][] gm monitoring bounds min: max: @@ -783,7 +787,7 @@ Monitoring is performed by polling respective PCIe registers roughly every 1ms ### Module Specific Keys -
Config Key Type Description
monitorBoolThis this key is set to true, the PESM +
monitorBoolThis key is set to true, the PESM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring will be stopped for all devices.
@@ -889,7 +893,7 @@ Consider this file: monitor: true -This file has and invalid entry in **deviceid** key. +This file has an invalid entry in **deviceid** key. If execute, an error will be reported: RVS-PESM: action: act1 invalide 'deviceid' key value: xxx @@ -909,12 +913,12 @@ checks required for ROCm support. The checks in this module do not target a specific device. \n\n Two types of actions are performed by RCQT. -1)Metapackage Check +1) Metapackage Check metapackage-validation: This will check the installation of the mentioned metapackages and their dependencies and their respective versions as required by metapackage. List of metapackages are provided with key **package** -2)Packages installation check +2) Packages installation check packagelist-install-validation: This action checks if the package is installed. Packages are provided against key **rpmpackagelist** and **debpackagelist** @@ -954,7 +958,7 @@ along with versions of each sub package: The check will emit a result message with the following format: - Meta package >metapakcage-name> : + Meta package : Package installed version is Package installed version is Package installed version is @@ -1036,7 +1040,7 @@ Output keys are described in the table below: **Example 1:** -In this example, given user does not exist. +In this example, all given packages are installed. actions: - name: packagelist-install-validation @@ -1515,7 +1519,7 @@ Please note that suitable values for **log\_interval** and **duration** depend on your system. - **log_interval**, in sequential mode, should be long enough to allow all -transfer tests to finish at lest once or "(pending)" and "(*)" will be displayed +transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. @@ -1642,7 +1646,7 @@ From the second line of result, we can see that source GPU (ID 3254) can access Here all source GPUs (device: all) with all destination GPUs (peers: all) are tested for p2p capability including bandwidth testing (test_bandwidth: true) -with bidirectional transfers (bidirectional: true) and with emmediate output +with bidirectional transfers (bidirectional: true) and with immediate output for each completed transfer (log_interval: 0) actions: @@ -1864,7 +1868,7 @@ Please note that suitable values for **log\_interval** and **duration** depend on your system. - **log_interval**, in sequential mode, should be long enough to allow all -transfer tests to finish at lest once or "(pending)" and "(*)" will be displayed +transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. @@ -1933,7 +1937,7 @@ peers. You may need to increase test duration. Cumulative duration of all transfers between the two particular nodes -At the beginning, test will display link infor for every CPU/GPU pair: +At the beginning, the test will display link info for every CPU/GPU pair: [RESULT][][] pcie-bandwidth [] distance: :[ :] @@ -2102,7 +2106,7 @@ gigaflops. This parameter is required. This parameter indicates if each operation should copy the matrix data to the GPU before executing. The default value is true. ramp_intervalInteger -This is an time interval, specified in milliseconds, given to the test to +This is a time interval, specified in milliseconds, given to the test to reach the given target_stress gigaflops. The default value is 5000 (5 seconds). This time is counted against the duration of the test. If the target gflops, or stress, is not achieved in this time frame, the test will fail. If the target @@ -2152,7 +2156,7 @@ gigaflops. level. -An informational message indicating will be emitted when the test starts +An informational message will be emitted when the test starts execution: [INFO ][][] gst start copy matrix: @@ -2321,7 +2325,7 @@ __[RESULT] [172077.448182] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: TRUE__
-When setting the __parallel__ to false, the __RVS__ will run the stress tests on +When setting the __parallel__ to true, the __RVS__ will run the stress tests on all selected GPUs in parallel and the output may look like this: __[INFO ] [173381.407428] action_1 gst 50599 start 5000.000000 copy @@ -2382,7 +2386,7 @@ Module specific keys are described in the table below: This is a floating point value specifying the target sustained power level for the test. ramp_intervalInteger -This is an time interval, specified in milliseconds, given to the test to +This is a time interval, specified in milliseconds, given to the test to determine the compute load that will sustain the target power. The default value is 5000 (5 seconds). This time is counted against the duration of the test. From 4726a39a9393346e759bb0f8ec55b4a590ba6af7 Mon Sep 17 00:00:00 2001 From: Peter Park Date: Fri, 15 May 2026 15:56:17 -0400 Subject: [PATCH 148/275] update _toc.yml.in to display updated files on web --- docs/conf.py | 4 +++- docs/sphinx/_toc.yml.in | 31 +++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 5749e8b22..1f8e60322 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,9 @@ left_nav_title = f"RVS {version_number} Documentation" exclude_patterns = [ - 'ug1main.md' + 'conceptual/**', + 'how to/**', + 'schemas/**', ] # for PDF output on Read the Docs diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 10656ed63..9b4f81b36 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -2,23 +2,18 @@ defaults: numbered: False root: index subtrees: -- caption: Install - entries: - - file: install/installation.rst - title: ROCm Validation Suite installation + - caption: Install + entries: + - file: install/installation.rst + title: ROCm Validation Suite installation + - caption: Reference + entries: + - file: ug1main.md + title: User guide + - file: features.md + title: ROCm Validation Suite modules -- caption: How to - entries: - - file: how to/configure-rvs.rst - title: Configure ROCm Validation Suite - -- caption: Conceptual - entries: - - file: conceptual/rvs-modules.rst - title: ROCm Validation Suite modules - - -- caption: About - entries: - - file: license.md + - caption: About + entries: + - file: license.md From ecef0deedd89156f358a7d0bc6cad699440c8159 Mon Sep 17 00:00:00 2001 From: Peter Park Date: Fri, 15 May 2026 15:59:38 -0400 Subject: [PATCH 149/275] update index --- docs/index.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 2a24ebfbc..90e4a255a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,25 +17,18 @@ For more information, refer to `GitHub. ` + * :doc:`ROCm Validation Suite installation <./install/installation>` + .. grid-item-card:: Reference - .. grid-item-card:: How to - - * :doc:`Configure ROCm Validation Suite ` + * :doc:`User guide ` .. grid-item-card:: Conceptual - * :doc:`ROCm Validation Suite modules <./conceptual/rvs-modules>` - + * :doc:`ROCm Validation Suite modules ` To contribute to the documentation, refer to `Contributing to ROCm `_. You can find licensing information on the `Licensing `_ page. - - - - - From 7417426ae98b727a8405f81f2baffdea290c7234 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid <88209527+jkottiku@users.noreply.github.com> Date: Fri, 15 May 2026 13:31:04 -0700 Subject: [PATCH 150/275] Documentation - Additions, Corrections and Updates. (#1150) * Additions, Corrections and Updates in docs * update _toc.yml.in to display updated files on web * update index --------- Co-authored-by: Peter Park --- README.md | 75 +++++++++++++++++++++++++-------------- docs/conf.py | 4 ++- docs/features.md | 33 +++++++++-------- docs/index.rst | 15 +++----- docs/sphinx/_toc.yml.in | 31 +++++++--------- docs/ug1main.md | 78 ++++++++++++++++++++++------------------- 6 files changed, 128 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 1c2579029..5bdb1bbae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ROCmValidationSuite -The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that affects the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. +The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that affect the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. -RVS is a collection of tests, benchmarks and qualification tools each targeting a specific sub-system of the ROCm platform. All of the tools are implemented in software and share a common command line interface. Each set of tests are implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. +RVS is a collection of tests, benchmarks and qualification tools each targeting a specific sub-system of the ROCm platform. All of the tools are implemented in software and share a common command-line interface. Each set of tests is implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. For different RVS modules and their description, refer to [the documentation on features](./FEATURES.md). @@ -39,12 +39,9 @@ sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gc Install ROCm stack for Ubuntu/CentOS/SLES/RHEL. Refer to [ROCm installation guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html) for more details. -**Note:** - -rocm_smi64 package has been renamed to rocm-smi-lib64 from >= ROCm3.0. If you are using ROCm release < 3.0 , install the package as "rocm_smi64". -rocm-smi-lib64 package has been renamed to rocm-smi-lib from >= ROCm4.1. +Install rocBLAS and the SMI library. For ROCm 6.4 and earlier, install `rocm-smi-lib`. For ROCm 7.0 and later, install `amd-smi-lib`. -Install rocBLAS. For ROCm 6.4 and earlier, install ``rocm-smi-lib``. For ROCm 7.0 and later, install ``amd-smi-lib``. +**ROCm 6.4 and earlier:** Ubuntu : @@ -64,8 +61,28 @@ SUSE : sudo zypper install rocblas rocm-smi-lib ``` +**ROCm 7.0 and later:** + +Ubuntu : + +``` +sudo apt-get install rocblas amd-smi-lib +``` + +CentOS & RHEL : + +``` +sudo yum install --nogpgcheck rocblas amd-smi-lib +``` + +SUSE : + +``` +sudo zypper install rocblas amd-smi-lib +``` + **Note:** -If rocm-smi-lib is already installed but /opt/rocm/lib/librocm_smi64.so doesn't exist. Do below: +If `rocm-smi-lib` is already installed but `/opt/rocm/lib/librocm_smi64.so` does not exist, reinstall it as follows: Ubuntu : @@ -76,13 +93,13 @@ sudo dpkg -r rocm-smi-lib && sudo apt install rocm-smi-lib CentOS & RHEL : ``` -sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib +sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib ``` SUSE : ``` -sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib +sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib ``` ## Building from Source @@ -104,7 +121,7 @@ If ROCm 6.4 is installed, clone the RVS repository from the 6.4 release branch b git clone https://github.com/ROCm/ROCmValidationSuite.git -b release/rocm-rel-6.4 ``` -### Configure: +### Configure ``` cd ROCmValidationSuite @@ -126,16 +143,16 @@ Option 2: Using the symbolic link cmake -B ./build -DROCM_PATH=/opt/rocm -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm ``` -### Build binary: +### Build binary ``` make -C ./build ``` **Note:** -Use the -j option with the build command to enable parallel compilation, which can significantly speed up the build process. +Use the `-j` option with the build command to enable parallel compilation, which can significantly speed up the build process. -### Build package: +### Build package ``` cd ./build @@ -145,7 +162,7 @@ make package **Note:** Based on your OS, only DEB or RPM package will be built. You may ignore an error for the unrelated configuration -### Install built package: +### Install built package Ubuntu : @@ -160,10 +177,10 @@ sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm ``` **Note:** -RVS is getting packaged as part of ROCm release starting from 3.0. You can install pre-compiled package as below. +RVS is getting packaged as part of ROCm release starting from 3.0. You can install the pre-compiled package as below. Please make sure Prerequisites, ROCm stack, rocblas and rocm-smi-lib64 are already installed -### Install package packaged with ROCm release: +### Install package packaged with ROCm release Ubuntu : @@ -194,9 +211,11 @@ cd /build/bin Command examples: ``` -./rvs --help ; Lists all options to run RVS test suite -./rvs -g ; Lists supported GPUs available in the machine -./rvs -c conf/gst_single.conf ; Run GST module default test configuration +./rvs --help # Lists all options to run RVS test suite +./rvs -g # Lists supported GPUs available in the machine +./rvs -c conf/gst_single.conf # Run GST module default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected ``` ### Run version pre-compiled and packaged with ROCm release @@ -208,16 +227,18 @@ cd /opt/rocm/bin Command examples: ``` -./rvs --help ; Lists all options to run RVS test suite -./rvs -g ; Lists supported GPUs available in the machine -./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf ; Run GST default test configuration +./rvs --help # Lists all options to run RVS test suite +./rvs -g # Lists supported GPUs available in the machine +./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected ``` To run GPU specific test configuration, use configuration files from GPU folders in "/opt/rocm/share/rocm-validation-suite/conf" ``` -./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf ; Run MI300X specific GST test configuration -./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration +./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration +./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration ``` **Note:** @@ -225,5 +246,5 @@ If present, always use GPU specific configurations instead of default test confi ## Reporting -Test results, errors and verbose logs are printed as terminal output. To enable json logging use "-j" command line option. -The json output file path can be specified after "-j" option. If not specified, a file is created in /var/tmp folder and the name of the file will be printed to stdout. The json file schemas are documented at [schemas](./docs/schemas) +Test results, errors and verbose logs are printed as terminal output. To enable JSON logging, use the `-j` command-line option. +The JSON output file path can be specified after the `-j` option. If not specified, a file is created in the `/var/tmp` folder and the name of the file will be printed to stdout. The JSON file schemas are documented at [schemas](./docs/schemas) diff --git a/docs/conf.py b/docs/conf.py index 5749e8b22..1f8e60322 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,9 @@ left_nav_title = f"RVS {version_number} Documentation" exclude_patterns = [ - 'ug1main.md' + 'conceptual/**', + 'how to/**', + 'schemas/**', ] # for PDF output on Read the Docs diff --git a/docs/features.md b/docs/features.md index d461b7a12..d5e0ddab8 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,20 +1,20 @@ # ROCmValidationSuite Modules -## GPU Properties – GPUP +## GPU Properties – GPUP module The GPU Properties module queries the configuration of a target device and returns the device’s static characteristics. These static values can be used to debug issues such as device support, performance and firmware problems. ## GPU Monitor – GM module [deprecated] -The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS modules execution if one of the quantities exceeds a specified boundary value. +The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS module's execution if one of the quantities exceeds a specified boundary value. -## PCI Express State Monitor – PESM module [deprecated] +## PCI Express State Monitor – PESM module [deprecated] The PCIe State Monitor tool is used to actively monitor the PCIe interconnect between the host platform and the GPU. The module will register a “listener” on a target GPU’s PCIe interconnect, and log a message whenever it detects a state change. The PESM will be able to detect the following state changes: 1. PCIe link speed changes 2. GPU power state changes -## ROCm Configuration Qualification Tool - RCQT module -The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes checking the dependencies corresponding to the ROCm meta-packages are installed correctly. +## ROCm Configuration Qualification Tool – RCQT module +The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes verifying that the dependencies corresponding to the ROCm meta-packages are installed correctly. ## PCI Express Qualification Tool – PEQT module The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is connected. The qualification test will be capable of determining the following characteristics of the PCIe bus interconnect to a GPU: @@ -24,7 +24,7 @@ The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is 3. PCIe link speed 4. PCIe link width -## SBIOS Mapping Qualification Tool – SMQT module [deprecated] +## SBIOS Mapping Qualification Tool – SMQT module [deprecated] The GPU SBIOS mapping qualification tool is designed to verify that a platform’s SBIOS has satisfied the BAR mapping requirements for VDI and Radeon Instinct products for ROCm support. ## P2P Benchmark and Qualification Tool – PBQT module @@ -33,14 +33,14 @@ The P2P Benchmark and Qualification Tool is designed to provide the list of all ## PCI Express Bandwidth Benchmark – PEBB module The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA transfers between system memory and a target GPU card’s memory. The maximum bandwidth obtained is reported to help debug low bandwidth issues. The benchmark should be capable of targeting one, some or all of the GPUs installed in a platform, reporting individual benchmark statistics for each. -## GPU Stress Test - GST module -The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). +## GPU Stress Test – GST module +The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). -## Input EDPp Test - IET module +## Input EDPp Test – IET module The Input EDPp Test runs GEMM workloads to stress the GPU power (i.e. TGP). This test is used to verify if the GPU is capable of handling max. power stress for a sustained period of time. Also checks whether GPU power reaches a set target power. -## Memory Test - MEM module -The Memory module tests the GPU memory for hard and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests [Algorithm, data pattern] +## Memory Test – MEM module +The Memory module tests the GPU memory for hard and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests: 1. Walking 1 bit 2. Own address test @@ -53,9 +53,14 @@ The Memory module tests the GPU memory for hard and soft errors using HIP. It co 9. Modulo 20, random pattern 10. Memory stress test -## BABEL benchmark Test - BABEL module +## BABEL Benchmark Test – BABEL module The Babel module executes BabelStream (synthetic GPU benchmark based on the original STREAM benchmark for CPUs) benchmark that measures memory transfer rates (bandwidth) to and from global device memory. Various benchmark tests are implemented using GPU kernels in HIP (Heterogeneous Interface for Portability) programming language. -## Thermal Stress Test - TST module -The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temperatures under various stressful workloads. Also checks whether GPU junction temperature reaches target and trottle temperatures. +## Thermal Stress Test – TST module +The Thermal Stress Test (TST) measures/monitors the GPU edge and junction temperatures under various stressful workloads. Also checks whether GPU junction temperature reaches target and throttle temperatures. + +## Pulse Stress Test – PULSE module +The Pulse Stress Test creates power fluctuations by alternating between high-compute (GEMM) and idle phases at a configurable rate. A two-level barrier synchronizes all GPUs so they spike current simultaneously, maximizing stress on the PSU. + +**PS: Beta version — not intended for production use. Pass/fail criteria are still being tuned.** diff --git a/docs/index.rst b/docs/index.rst index 2a24ebfbc..90e4a255a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,25 +17,18 @@ For more information, refer to `GitHub. ` + * :doc:`ROCm Validation Suite installation <./install/installation>` + .. grid-item-card:: Reference - .. grid-item-card:: How to - - * :doc:`Configure ROCm Validation Suite ` + * :doc:`User guide ` .. grid-item-card:: Conceptual - * :doc:`ROCm Validation Suite modules <./conceptual/rvs-modules>` - + * :doc:`ROCm Validation Suite modules ` To contribute to the documentation, refer to `Contributing to ROCm `_. You can find licensing information on the `Licensing `_ page. - - - - - diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 10656ed63..9b4f81b36 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -2,23 +2,18 @@ defaults: numbered: False root: index subtrees: -- caption: Install - entries: - - file: install/installation.rst - title: ROCm Validation Suite installation + - caption: Install + entries: + - file: install/installation.rst + title: ROCm Validation Suite installation + - caption: Reference + entries: + - file: ug1main.md + title: User guide + - file: features.md + title: ROCm Validation Suite modules -- caption: How to - entries: - - file: how to/configure-rvs.rst - title: Configure ROCm Validation Suite - -- caption: Conceptual - entries: - - file: conceptual/rvs-modules.rst - title: ROCm Validation Suite modules - - -- caption: About - entries: - - file: license.md + - caption: About + entries: + - file: license.md diff --git a/docs/ug1main.md b/docs/ug1main.md index 7a0575702..1aee88909 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -3,14 +3,14 @@ ## Introduction The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that -affects the functionality and performance of AMD GPU(s) operating in a +affect the functionality and performance of AMD GPU(s) operating in a high-performance/AI/ML computing environment. RVS is enabled using the ROCm software stack on a compatible software and hardware platform. RVS is a collection of tests, benchmarks, and qualification tools each targeting a specific sub-system of the ROCm platform. The tools are -implemented in software and share a common command line interface. Each set of -tests are implemented in a “module” which is a library encapsulating the +implemented in software and share a common command-line interface. Each set of +tests is implemented in a “module” which is a library encapsulating the functionality specific to the tool. The CLI can specify the directory containing modules to use when searching for libraries to load. Each module may have a set of options that it defines and a configuration file that supports its execution. @@ -50,23 +50,27 @@ RVS package components are installed in `/opt/rocm`. Package contains: cd /build/bin Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -c conf/gst_single.conf ; Run GST module default test configuration + ./rvs --help # Lists all options to run RVS test suite + ./rvs -g # Lists supported GPUs available in the machine + ./rvs -c conf/gst_single.conf # Run GST module default test configuration + ./rvs -m gst # Run GST module using platform-detected config + ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected -### Run version pre-compiled and packaged with ROCm release +#### Run version pre-compiled and packaged with ROCm release cd /opt/rocm/bin Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf ; Run GST default test configuration + ./rvs --help # Lists all options to run RVS test suite + ./rvs -g # Lists supported GPUs available in the machine + ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration + ./rvs -m gst # Run GST module using platform-detected config + ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected To run GPU specific test configuration, use configuration files from GPU folders in "/opt/rocm/share/rocm-validation-suite/conf" - ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf ; Run MI300X specific GST test configuration - ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration + ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration + ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration Note: If present, always use GPU specific configurations instead of default test configurations. @@ -88,7 +92,7 @@ allowing for easy addition of new modules in the future. The GPU Properties module queries the configuration of a target device and returns the device’s static characteristics. These static values can be used to debug issues such as device support, performance and firmware problems. #### GPU Monitor – GM module -The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS modules execution if one of the quantities exceeds a specified boundary value. +The GPU monitor tool is capable of running on one, some or all of the GPU(s) installed and will report various information at regular intervals. The module can be configured to halt another RVS module's execution if one of the quantities exceeds a specified boundary value. #### PCI Express State Monitor – PESM module The PCIe State Monitor tool is used to actively monitor the PCIe interconnect between the host platform and the GPU. The module will register a “listener” on a target GPU’s PCIe interconnect, and log a message whenever it detects a state change. The PESM will be able to detect the following state changes: @@ -97,7 +101,7 @@ The PCIe State Monitor tool is used to actively monitor the PCIe interconnect be 2. GPU power state changes #### ROCm Configuration Qualification Tool - RCQT module -The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes checking the dependencies corresponding to the ROCm meta-packages are installed correctly. +The ROCm Configuration Qualification Tool ensures the platform is capable of running ROCm applications and is configured correctly. It checks the installed versions of the ROCm components and the platform configuration of the system. This includes verifying that the dependencies corresponding to the ROCm meta-packages are installed correctly. #### PCI Express Qualification Tool – PEQT module The PCIe Qualification Tool is used to qualify the PCIe bus on which the GPU is connected. The qualification test will be capable of determining the following characteristics of the PCIe bus interconnect to a GPU: @@ -121,7 +125,7 @@ Please see the web page “ROCm, a New Era in Open GPU Computing” to find out The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA transfers between system memory and a target GPU card’s memory. The maximum bandwidth obtained is reported to help debug low bandwidth issues. The benchmark should be capable of targeting one, some or all of the GPUs installed in a platform, reporting individual benchmark statistics for each. #### GPU Stress Test - GST module -The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). +The GPU Stress Test runs various GEMM computations as workloads to stress the GPU FLOPS performance and check whether it meets the configured target GFLOPS. GEMM workloads shall be configured as either operation type or data type. GEMM based on operation types include SGEMM, DGEMM and HGEMM (Single/Double/Half-precision General Matrix Multiplication) - configured using operation parameter. GEMM based on data types include `fp8`, `i8`, `fp16`, `bf16`, `fp32` and `tf32` (`xf32`) - configured using data type parameter. The duration of the test is configurable, both in terms of time (how long to run) and iterations (how many times to run). #### Input EDPp Test - IET module The Input EDPp Test runs GEMM workloads to stress the GPU power (that is, TGP). This test is used to verify if the GPU is capable of handling max. power stress for a sustained period of time. Also checks whether GPU power reaches a set target power. @@ -222,11 +226,11 @@ isn’t specified the default is 1. Some modules will ignore this parameter. waitIntegerThis indicates how long the test should -wait -between executions, in milliseconds. Some +wait between executions, in milliseconds. Some modules will ignore this parameter. If the -count key is not specified, this key is ignored. -duration Integer This parameter overrides the count key, if +count key is not specified, this key is ignored. + +durationIntegerThis parameter overrides the count key, if specified. This indicates how long the test should run, given in milliseconds. Some modules will ignore this parameter. @@ -409,7 +413,7 @@ format will be returned: **Example 1:** -Consider action> +Consider action: actions: - name: action_1 @@ -562,7 +566,7 @@ message will be printed to stdout while the bounding value is still exceeded. - @@ -589,7 +593,7 @@ specified, no logging will occur. monitor will terminate the RVS process when a bounds violation is encountered on any of the metrics specified.
Config Key Type Description
monitorBoolIf this this key is set to true, the GM module will start monitoring on +If this key is set to true, the GM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring of the specified device will be stopped.
metrics
forceBool If 'true' and terminate key is also 'true' -the RVS process will terminate immediately. **Note:** this may cose resource leaks +the RVS process will terminate immediately. **Note:** this may cause resource leaks within GPUs.
@@ -612,7 +616,7 @@ with the following format: [RESULT][][] gm started -In addition, an informational message is provided for each for each metric +In addition, an informational message is provided for each metric being monitored: [INFO ][][] gm monitoring bounds min: max: @@ -783,7 +787,7 @@ Monitoring is performed by polling respective PCIe registers roughly every 1ms ### Module Specific Keys -
Config Key Type Description
monitorBoolThis this key is set to true, the PESM +
monitorBoolThis key is set to true, the PESM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring will be stopped for all devices.
@@ -889,7 +893,7 @@ Consider this file: monitor: true -This file has and invalid entry in **deviceid** key. +This file has an invalid entry in **deviceid** key. If execute, an error will be reported: RVS-PESM: action: act1 invalide 'deviceid' key value: xxx @@ -909,12 +913,12 @@ checks required for ROCm support. The checks in this module do not target a specific device. \n\n Two types of actions are performed by RCQT. -1)Metapackage Check +1) Metapackage Check metapackage-validation: This will check the installation of the mentioned metapackages and their dependencies and their respective versions as required by metapackage. List of metapackages are provided with key **package** -2)Packages installation check +2) Packages installation check packagelist-install-validation: This action checks if the package is installed. Packages are provided against key **rpmpackagelist** and **debpackagelist** @@ -954,7 +958,7 @@ along with versions of each sub package: The check will emit a result message with the following format: - Meta package >metapakcage-name> : + Meta package : Package installed version is Package installed version is Package installed version is @@ -1036,7 +1040,7 @@ Output keys are described in the table below: **Example 1:** -In this example, given user does not exist. +In this example, all given packages are installed. actions: - name: packagelist-install-validation @@ -1515,7 +1519,7 @@ Please note that suitable values for **log\_interval** and **duration** depend on your system. - **log_interval**, in sequential mode, should be long enough to allow all -transfer tests to finish at lest once or "(pending)" and "(*)" will be displayed +transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. @@ -1642,7 +1646,7 @@ From the second line of result, we can see that source GPU (ID 3254) can access Here all source GPUs (device: all) with all destination GPUs (peers: all) are tested for p2p capability including bandwidth testing (test_bandwidth: true) -with bidirectional transfers (bidirectional: true) and with emmediate output +with bidirectional transfers (bidirectional: true) and with immediate output for each completed transfer (log_interval: 0) actions: @@ -1864,7 +1868,7 @@ Please note that suitable values for **log\_interval** and **duration** depend on your system. - **log_interval**, in sequential mode, should be long enough to allow all -transfer tests to finish at lest once or "(pending)" and "(*)" will be displayed +transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. @@ -1933,7 +1937,7 @@ peers. You may need to increase test duration. Cumulative duration of all transfers between the two particular nodes -At the beginning, test will display link infor for every CPU/GPU pair: +At the beginning, the test will display link info for every CPU/GPU pair: [RESULT][][] pcie-bandwidth [] distance: :[ :] @@ -2102,7 +2106,7 @@ gigaflops. This parameter is required. This parameter indicates if each operation should copy the matrix data to the GPU before executing. The default value is true. ramp_intervalInteger -This is an time interval, specified in milliseconds, given to the test to +This is a time interval, specified in milliseconds, given to the test to reach the given target_stress gigaflops. The default value is 5000 (5 seconds). This time is counted against the duration of the test. If the target gflops, or stress, is not achieved in this time frame, the test will fail. If the target @@ -2152,7 +2156,7 @@ gigaflops. level. -An informational message indicating will be emitted when the test starts +An informational message will be emitted when the test starts execution: [INFO ][][] gst start copy matrix: @@ -2321,7 +2325,7 @@ __[RESULT] [172077.448182] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: TRUE__
-When setting the __parallel__ to false, the __RVS__ will run the stress tests on +When setting the __parallel__ to true, the __RVS__ will run the stress tests on all selected GPUs in parallel and the output may look like this: __[INFO ] [173381.407428] action_1 gst 50599 start 5000.000000 copy @@ -2382,7 +2386,7 @@ Module specific keys are described in the table below: This is a floating point value specifying the target sustained power level for the test. ramp_intervalInteger -This is an time interval, specified in milliseconds, given to the test to +This is a time interval, specified in milliseconds, given to the test to determine the compute load that will sustain the target power. The default value is 5000 (5 seconds). This time is counted against the duration of the test. From 555be6e6938f29b8d0ea6fc282e68c6f2b7f9fad Mon Sep 17 00:00:00 2001 From: peterjunpark Date: Fri, 15 May 2026 16:59:04 -0400 Subject: [PATCH 151/275] docs: Update installation page for 7.13 (#1151) * docs(rvs): move installation.rst to build.rst * docs(rvs): add install page add link to compat * docs: update heading in `build.rst` * remove stale doc * fix yaml indentation breaking sphinx build --- docs/index.rst | 2 +- docs/install/installation.rst | 311 +++++++--------------------------- docs/sphinx/_toc.yml.in | 4 +- 3 files changed, 67 insertions(+), 250 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 90e4a255a..82574feda 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,7 @@ For more information, refer to `GitHub. ` + * :doc:`Install ROCm Validation Suite <./install/installation>` .. grid-item-card:: Reference diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 6a0d24b00..1776c1724 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -1,285 +1,104 @@ .. meta:: - :description: Install ROCm Validation Suite - :keywords: install, rocm validation suite, rvs, RVS, AMD, ROCm + :description lang=en: Install ROCm Validation Suite (RVS) + :keywords: rocm, core, sdk, rvs, validation, suite, install +***************************** +Install ROCm Validation Suite +***************************** -********************************** -Installing ROCm Validation Suite -********************************** +ROCm Validation Suite (RVS) is supported on AMD Instinct and Radeon GPUs +supported by ROCm. See the :doc:`ROCm compatibilty matrix +` for support information. -You can obtain ROCm Validation Suite (RVS) by building it from: +For advanced workflows, source builds, or custom configurations, see +``__. -* the source code base +Install RVS on Linux +==================== -* a prebuilt package +ROCm Validation Suite (RVS) is a ROCm Extra requiring the ROCm Core SDK to be +installed. -Building from source code ---------------------------- +Install the ROCm Core SDK +------------------------- -RVS is an open-source solution. For more details, refer to the `ROCm Validation Suite GitHub repository. `_ +For instructions, see `Install AMD ROCm +`__. Use the +selector panel on that page to view instructions appropriate for your system +environment. +Install RVS +----------- -Package manager installation ------------------------------- - -Based on the OS, use the appropriate package manager to install the RVS package. - -For more details, refer to the `ROCm Validation Suite GitHub repository. `_ - -RVS package components are installed in ``/opt/rocm``. The package contains: - -- executable binary, located in ``_install-base_/bin/rvs``. -- public shared libraries, located in ``_install-base_/lib``. -- module specific shared libraries, located in ``_install-base_/lib/rvs``. -- default configuration files, located in ``_install-base_/share/rocm-validation-suite/conf``. -- GPU specific configuration files, located in ``_install-base_/share/rocm-validation-suite/conf/``. -- testscripts, located in ``_install-base_/share/rocm-validation-suite/testscripts``. -- user guide, located in ``_install-base_/share/rocm-validation-suite/userguide``. -- man page, located in ``_install-base_/share/man``. - -Prerequisites ------------------- - -RVS has been tested on all ROCm-supported Linux environments except for RHEL 9.4. See `Supported operating systems `_ for the complete list of ROCm-supported Linux environments. - -.. Note:: - - This topic provides commands for the primary Linux distribution families. These commands are also applicable to other operating systems derived from the same families. - -Ensure you review the following prerequisites carefully for each operating system before compiling or installing the RVS package. - -.. tab-set:: - .. tab-item:: Ubuntu - :sync: Ubuntu - - .. code-block:: shell - - sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unzip cmake git libyaml-cpp-dev - - .. tab-item:: RHEL - :sync: RHEL - - .. code-block:: shell - - sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel pciutils-devel - - .. tab-item:: SUSE - :sync: SUSE - - .. code-block:: shell - - sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel - - -Install ROCm stack, rocBLAS, and SMI lib ------------------------------------------- - -1. Install the ROCm software stack for Ubuntu, SLES or RHEL. Refer to the `ROCm installation guide `_ for more details. - -2. Install rocBLAS. For ROCm 6.4 and earlier, install ``rocm-smi-lib``. For ROCm 7.0 and later, install ``amd-smi-lib``. - -.. tab-set:: - .. tab-item:: Ubuntu - :sync: Ubuntu - - .. code-block:: shell - - sudo apt-get install rocblas rocm-smi-lib - - .. tab-item:: RHEL - :sync: RHEL - - .. code-block:: shell - - sudo yum install --nogpgcheck rocblas rocm-smi-lib - - .. tab-item:: SUSE - :sync: SUSE - - .. code-block:: shell - - sudo zypper install rocblas rocm-smi-lib - -If rocm-smi-lib is already installed, but ``/opt/rocm/lib/librocm_smi64.so`` doesn't exist, run the following commands as per the OS: - -.. tab-set:: - .. tab-item:: Ubuntu - :sync: Ubuntu - - .. code-block:: shell - - sudo dpkg -r rocm-smi-lib && sudo apt install rocm-smi-lib - - - .. tab-item:: RHEL - :sync: RHEL - - .. code-block:: shell - - sudo rpm -e rocm-smi-lib && sudo yum install rocm-smi-lib - - .. tab-item:: SUSE - :sync: SUSE - - .. code-block:: shell - - sudo rpm -e rocm-smi-lib && sudo zypper install rocm-smi-lib - - -Building from source ---------------------- - -This section explains how to get and compile the current development stream of RVS. - -1. Clone the repository. - -.. code-block:: - - git clone https://github.com/ROCm/ROCmValidationSuite.git - -2. Configure the build system for RVS. - -.. code-block:: - - cd ROCmValidationSuite - cmake -B ./build -DROCM_PATH= -DCMAKE_INSTALL_PREFIX= -DCPACK_PACKAGING_INSTALL_PREFIX= - -For example, if ROCm 5.5 was installed, run the following command: - -.. code-block:: - - cmake -B ./build -DROCM_PATH=/opt/rocm-5.5.0 -DCMAKE_INSTALL_PREFIX=/opt/rocm-5.5.0 -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm-5.5.0 - -3. Build the binary. - -.. code-block:: - - make -C ./build - -4. Build the package. - -.. code-block:: - - cd ./build - make package - -.. Note:: - - Depending on your OS, only DEB or RPM package will be built. - -.. Note:: - - You can ignore errors about unrelated configurations. - -5. Install the built package. - -.. tab-set:: - .. tab-item:: Ubuntu - :sync: Ubuntu - - .. code-block:: - - sudo dpkg -i rocm-validation-suite*.deb - - .. tab-item:: RHEL - :sync: RHEL - - .. code-block:: shell - - sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm - - .. tab-item:: SUSE - :sync: SUSE - - .. code-block:: shell - - sudo rpm -i --replacefiles --nodeps rocm-validation-suite*.rpm - -.. Note:: - - RVS is packaged as part of the ROCm release starting from 3.0. You can install the pre-compiled package as indicated below. Ensure prerequisites, ROCm stack, rocblas and rocm-smi-lib64 are already installed. - -6. Install the package included with the ROCm release. - -.. tab-set:: - .. tab-item:: Ubuntu - :sync: Ubuntu - - .. code-block:: - - sudo apt install rocm-validation-suite - +Use the following steps to install RVS on top of the ROCm Core SDK. - .. tab-item:: RHEL - :sync: RHEL +1. Install system dependencies using your Linux distribution's package manager. - .. code-block:: shell + .. tab-set:: - sudo yum install rocm-validation-suite + .. tab-item:: Ubuntu - .. tab-item:: SUSE - :sync: SUSE + .. code-block:: bash - .. code-block:: shell + sudo apt install libpci3 libgomp1 - sudo zypper install rocm-validation-suite + .. tab-item:: RHEL + .. code-block:: bash -Reporting ------------ + sudo dnf install pciutils-libs libgomp -Test results, errors, and verbose logs are printed as terminal output. To enable JSON logging, use the ``-j`` option. The JSON output file is stored in the ``/var/tmp`` folder and the file name will be printed. +2. Download the RVS tarball. -You can build RVS from the source code base or by installing from a pre-built package. See the preceding sections for more details. + .. code-block:: bash -Running RVS ------------- + wget https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz -Run the version built from source code -++++++++++++++++++++++++++++++++++++++ +3. Extract the tarball to the ROCm Extras location. Set ``ROCM_PATH`` to your + ROCm Core SDK location, which varies depending on how you installed it. For + example, if you installed the ROCm Core SDK using your Linux distribution's + package manager: -.. code-block:: + .. code-block:: bash - cd /build/bin + export ROCM_PATH=/opt/rocm + sudo mkdir -p $ROCM_PATH/extras-7 + sudo tar -xzf amdrocm7-rvs-1.4.21-288-Linux.tar.gz -C $ROCM_PATH/extras-7 - Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -d 3 ; Run set of RVS default sanity tests (in rvs.conf) with verbose level 3 - ./rvs -c conf/gst_single.conf ; Run GST module default test configuration +4. Complete the following post-installation step to set up your environment. + Set ``ROCM_PATH`` to your ROCm Core SDK location. -Run the version pre-compiled and packaged with the ROCm release -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + .. tab-set:: -.. code-block:: + .. tab-item:: User setup - cd /opt/rocm/bin + .. code-block:: bash - Command examples - ./rvs --help ; Lists all options to run RVS test suite - ./rvs -g ; Lists supported GPUs available in the machine - ./rvs -d 3 ; Run set of RVS sanity tests (in rvs.conf) with verbose level 3 - ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf ; Run GST default test configuration + tee -a ~/.bashrc << EOF -To run GPU-specific test configurations, use the configuration files in the GPU folders under ``/opt/rocm/share/rocm-validation-suite/conf``. + export ROCM_PATH=/opt/rocm + export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF -.. code-block:: + source ~/.bashrc - ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf ; Run MI300X specific GST test configuration - ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf ; Run Navi 32 specific GST test configuration + .. tab-item:: System-wide setup -.. Note:: + .. code-block:: bash - Always use GPU-specific configurations over the default test configurations. + sudo tee /etc/profile.d/set-rocm-env.sh << EOF -Building documentation ------------------------- + export ROCM_PATH=/opt/rocm + export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF -Run the following commands to build documentation locally. + sudo chmod +x /etc/profile.d/set-rocm-env.sh + source /etc/profile.d/set-rocm-env.sh -.. code-block:: +5. Verify your installation. - cd docs - pip3 install -r .sphinx/requirements.txt - python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html + .. code-block:: bash + rvs -h diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 9b4f81b36..16f6cfe95 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -5,15 +5,13 @@ subtrees: - caption: Install entries: - file: install/installation.rst - title: ROCm Validation Suite installation - + title: Install ROCm Validation Suite - caption: Reference entries: - file: ug1main.md title: User guide - file: features.md title: ROCm Validation Suite modules - - caption: About entries: - file: license.md From 748b1153c8744e0c667d25e92e45e6d0b7d1f579 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 18 May 2026 16:52:16 -0400 Subject: [PATCH 152/275] Adding the two files to create RVS tests pipeline Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 196 +++++++++++++++++ .github/workflows/rvs-nightly-tests.yml | 253 ++++++++++++++++++++++ 2 files changed, 449 insertions(+) create mode 100644 .github/workflows/README_NIGHTLY_TESTS.md create mode 100644 .github/workflows/rvs-nightly-tests.yml diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md new file mode 100644 index 000000000..0d8e1a50a --- /dev/null +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -0,0 +1,196 @@ +# RVS Nightly Tests Workflow + +This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), +which picks up the **latest RVS tarball** published at +[`https://repo.amd.com/rocm/rvs/tarball/`](https://repo.amd.com/rocm/rvs/tarball/) +once per day, installs it on a self-hosted GPU runner, and runs RVS levels +3 and 4. + +## What it does + +``` +schedule (or manual) + │ + ▼ +detect [ubuntu-latest] + │ curl https://repo.amd.com/rocm/rvs/tarball/ + │ → grep amdrocm*-rvs-*-Linux.tar.gz, sort -V, pick newest + │ → compare with cached marker (skip if unchanged) + ▼ +test [self-hosted GPU runner] + │ curl → ./pkg/.tar.gz + │ sudo tar -xzf … -C / → installs to /opt/rocm/extras-7/ + │ /opt/rocm/extras-7/bin/rvs -r 3 → reports/rvs_level_3.log + │ /opt/rocm/extras-7/bin/rvs -r 4 → reports/rvs_level_4.log + │ build Markdown SUMMARY.md → GitHub job summary + artifact + ▼ +artifact: rvs-nightly-report- +``` + +## Triggers + +| Trigger | Cadence | What fires | +|---|---|---| +| `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index. If the latest filename matches the previous run's, the run is **skipped** to avoid re-testing the same package. | +| `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and forcing a re-run. | + +The cron deliberately runs after AMD's typical nightly publish window; +adjust the cron string in the workflow if your publish cadence is different. + +## Manual dispatch inputs + +| Input | Default | Description | +|---|---|---| +| `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | +| `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | + +Example: + +```bash +gh workflow run rvs-nightly-tests.yml \ + -f tarball_url="https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ + -f force=true +``` + +## Repository configuration + +No secrets are required — the source URL is public. + +**Variables** (Settings → Secrets and variables → Actions → Variables): + +| Name | Default | Purpose | +|---|---|---| +| `RVS_TARBALL_INDEX_URL` | `https://repo.amd.com/rocm/rvs/tarball/` | Directory listing scraped for the latest tarball. Override to mirror or staging URLs without editing the workflow. | +| `RVS_TEST_RUNNER_LABEL` | `self-hosted` | Runner label (single string) used by the `test` job. Set to a more specific label like `gfx942` or `mi300x` if you have multiple GPU runners. | + +## How the latest tarball is picked + +The `detect` job does: + +```bash +curl -sL https://repo.amd.com/rocm/rvs/tarball/ \ + | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ + | sort -uV \ + | tail -n 1 +``` + +The regex matches any `amdrocm-rvs-…-Linux.tar.gz` filename in the +directory-listing HTML. `sort -V` is GNU "version sort" so version +suffixes like `1.4.21-9` and `1.4.21-100` compare correctly. The +**lexicographically largest by version** is selected. + +## How the tarball is installed + +The TGZ ships content rooted at `/opt/rocm/extras-7/`, so the workflow +extracts it at `/`: + +```bash +sudo mkdir -p /opt/rocm +sudo tar -xzf ./pkg/.tar.gz -C / +/opt/rocm/extras-7/bin/rvs --version +``` + +**Prerequisites on the runner:** + +- ROCm 7.x base stack already installed at `/opt/rocm/` (the TGZ only ships + RVS, not a full ROCm install; the RVS binary depends on ROCm libraries + resolved via `RPATH` and `LD_LIBRARY_PATH` to the system ROCm). +- Passwordless `sudo` (or `sudo` configured to not prompt) so the + `tar -xzf -C /` step works without interactive input. +- Network egress to `repo.amd.com` (port 443). + +## The tests + +Run verbatim: + +```bash +/opt/rocm/extras-7/bin/rvs -r 3 +/opt/rocm/extras-7/bin/rvs -r 4 +``` + +Both commands are executed sequentially. Each step captures full +stdout/stderr to `reports/rvs_level_.log` and its exit code is recorded +in a step output. Neither failure short-circuits the other — both levels +always run, and the job is marked failed at the end if either exited +non-zero. + +## Test report + +After both RVS commands finish, the `Build test report` step generates +`reports/SUMMARY.md` (also written to the GitHub job summary), e.g.: + +```markdown +# RVS Nightly Test Report + +| Field | Value | +|---|---| +| Run | `1234567890` | +| Trigger | `schedule` | +| Runner | `gpu-runner-01` | +| Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | +| Source URL | https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz | +| RVS version | `RVS 1.4.21.0-...` | +| Overall result | **PASS** | + +## Results + +| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | +|---------|--------------------------------------|:------:|-----:|-----------------------|-----------------------| +| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | +| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | +``` + +The full artifact contents: + +``` +rvs-nightly-report-/ +├── SUMMARY.md +├── rvs_level_3.log +└── rvs_level_4.log +``` + +Artifact retention is 30 days. + +## Self-hosted runner + +The `test` job runs on `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}`. +You must have at least one self-hosted runner registered to the repo with +that label, online, and with a usable GPU. Register runners at +`https://github.com/ROCm/ROCmValidationSuite/settings/actions/runners`. + +If the chosen runner is busy with another job, this workflow's +`concurrency:` group (`rvs-nightly-${{ github.workflow }}`, +`cancel-in-progress: false`) will queue the run rather than cancel the +running one. + +## Verifying the pipeline end-to-end + +After committing the workflow file to `master`, the fastest sanity check +is: + +```bash +gh workflow run rvs-nightly-tests.yml -f force=true +``` + +Watch the Actions tab for: + +1. `detect` resolves a tarball URL (`Latest tarball : amdrocm7-rvs-…`). +2. `test` job picks up on your self-hosted runner. +3. RVS extracts to `/opt/rocm/extras-7/`. +4. Two RVS level steps complete; the run summary shows the results table. + +## Debugging a failed run + +| Symptom | Likely cause | +|---|---| +| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify `https://repo.amd.com/rocm/rvs/tarball/` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link, or set `RVS_TARBALL_INDEX_URL` to the correct mirror. | +| `test` job stuck "Queued" | No self-hosted runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | +| `Install RVS` fails with "Permission denied" | Runner user can't `sudo` without password. Fix the runner's sudoers entry. | +| `Run RVS level N` exits non-zero immediately | ROCm base stack missing or wrong major version. `rvs --version` and `ldd /opt/rocm/extras-7/bin/rvs` give clues. | +| Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually with `force=true` to validate. | + +## References + +- [RVS source](../../README.md) +- [`build-relocatable-packages.yml`](./build-relocatable-packages.yml) and [`README_BUILD_PACKAGES.md`](./README_BUILD_PACKAGES.md) — the upstream packaging pipeline that produces these tarballs +- [GitHub Actions: scheduled events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml new file mode 100644 index 000000000..43b4e01a2 --- /dev/null +++ b/.github/workflows/rvs-nightly-tests.yml @@ -0,0 +1,253 @@ +name: RVS Nightly Tests + +# Picks up the latest RVS tarball published at +# https://repo.amd.com/rocm/rvs/tarball/ once per day, installs it on a +# self-hosted GPU runner, runs RVS levels 3 and 4, and uploads a Markdown +# report + per-level logs as an artifact. + +on: + schedule: + # 15:00 UTC daily (08:00 PST / 07:00 PDT). Adjust to match your build cadence. + - cron: '0 15 * * *' + workflow_dispatch: + inputs: + tarball_url: + description: 'Override tarball URL (default: latest from repo.amd.com)' + required: false + default: '' + force: + description: 'Run even if the latest tarball matches the last run' + type: boolean + default: false + +permissions: + contents: read + +concurrency: + group: rvs-nightly-${{ github.workflow }} + cancel-in-progress: false + +env: + TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL || 'https://repo.amd.com/rocm/rvs/tarball/' }} + RVS_BIN: /opt/rocm/extras-7/bin/rvs + +jobs: + detect: + name: Detect latest RVS tarball + runs-on: ubuntu-latest + outputs: + tarball_url: ${{ steps.resolve.outputs.tarball_url }} + tarball_name: ${{ steps.resolve.outputs.tarball_name }} + should_run: ${{ steps.resolve.outputs.should_run }} + steps: + - name: Restore last-seen marker (cron path) + if: github.event_name == 'schedule' + uses: actions/cache@v4 + with: + path: last_tarball_marker.txt + key: rvs-nightly-tarball-${{ github.run_id }} + restore-keys: | + rvs-nightly-tarball- + + - name: Resolve latest tarball URL + id: resolve + env: + INDEX_URL: ${{ env.TARBALL_INDEX_URL }} + INPUT_URL: ${{ inputs.tarball_url }} + FORCE: ${{ inputs.force }} + EVENT_NAME: ${{ github.event_name }} + run: | + set -euo pipefail + + fetch_latest() { + local idx="$1" + local html + html="$(curl -sL --max-time 30 "$idx" || true)" + # Match any amdrocm*-rvs-*-Linux.tar.gz filename in the listing HTML. + # `sort -V` picks the highest version (handles 1.4.21-9 vs 1.4.21-100 correctly). + echo "$html" \ + | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ + | sort -uV \ + | tail -n 1 \ + | awk -v p="${idx%/}" '{print p "/" $0}' + } + + if [ -n "${INPUT_URL:-}" ]; then + URL="$INPUT_URL" + else + URL="$(fetch_latest "$INDEX_URL")" + fi + + if [ -z "${URL:-}" ]; then + echo "::error::Could not resolve a tarball URL from $INDEX_URL" + exit 1 + fi + + NAME="$(basename "$URL")" + + SHOULD_RUN=true + if [ "$EVENT_NAME" = "schedule" ] && [ "$FORCE" != "true" ] && [ -f last_tarball_marker.txt ]; then + if [ "$(cat last_tarball_marker.txt)" = "$NAME" ]; then + SHOULD_RUN=false + echo "Latest tarball ($NAME) unchanged since last run — skipping." + fi + fi + echo "$NAME" > last_tarball_marker.txt + + { + echo "tarball_url=$URL" + echo "tarball_name=$NAME" + echo "should_run=$SHOULD_RUN" + } >> "$GITHUB_OUTPUT" + + echo "Latest tarball : $NAME" + echo "URL : $URL" + echo "Should run : $SHOULD_RUN" + + - name: Save marker (cron path) + if: github.event_name == 'schedule' + uses: actions/cache/save@v4 + with: + path: last_tarball_marker.txt + key: rvs-nightly-tarball-${{ steps.resolve.outputs.tarball_name }} + + test: + name: Install RVS and run levels 3 + 4 + needs: detect + if: needs.detect.outputs.should_run == 'true' + runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 180 + env: + TARBALL_URL: ${{ needs.detect.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.detect.outputs.tarball_name }} + steps: + - name: Show GPU / system info + run: | + uname -a + (rocm-smi || true) | head -40 + (rocminfo | head -40 || true) + + - name: Download tarball + run: | + set -euo pipefail + mkdir -p ./pkg + echo "Downloading: $TARBALL_URL" + curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" + ls -la ./pkg/ + file "./pkg/${TARBALL_NAME}" || true + + - name: Install RVS (extract TGZ to /) + run: | + set -euo pipefail + PKG="./pkg/${TARBALL_NAME}" + echo "Installing $PKG into /opt/rocm/extras-7/" + sudo mkdir -p /opt/rocm + # The TGZ payload is rooted at /opt/rocm/extras-7/... so extract at /. + sudo tar -xzf "$PKG" -C / + ls -la /opt/rocm/extras-7/bin/rvs + "$RVS_BIN" --version || true + + - name: Run RVS level 3 + id: rvs3 + run: | + set +e + mkdir -p ./reports + START=$(date -u +%FT%TZ) + echo "::group::RVS level 3 (${RVS_BIN} -r 3)" + "$RVS_BIN" -r 3 2>&1 | tee ./reports/rvs_level_3.log + RC=${PIPESTATUS[0]} + echo "::endgroup::" + END=$(date -u +%FT%TZ) + echo "rc=$RC" >> "$GITHUB_OUTPUT" + echo "start=$START" >> "$GITHUB_OUTPUT" + echo "end=$END" >> "$GITHUB_OUTPUT" + exit 0 + + - name: Run RVS level 4 + id: rvs4 + run: | + set +e + mkdir -p ./reports + START=$(date -u +%FT%TZ) + echo "::group::RVS level 4 (${RVS_BIN} -r 4)" + "$RVS_BIN" -r 4 2>&1 | tee ./reports/rvs_level_4.log + RC=${PIPESTATUS[0]} + echo "::endgroup::" + END=$(date -u +%FT%TZ) + echo "rc=$RC" >> "$GITHUB_OUTPUT" + echo "start=$START" >> "$GITHUB_OUTPUT" + echo "end=$END" >> "$GITHUB_OUTPUT" + exit 0 + + - name: Build test report + id: report + run: | + set -euo pipefail + mkdir -p ./reports + + RC3=${{ steps.rvs3.outputs.rc }} + RC4=${{ steps.rvs4.outputs.rc }} + [ "$RC3" -eq 0 ] && S3=PASS || S3=FAIL + [ "$RC4" -eq 0 ] && S4=PASS || S4=FAIL + if [ "$RC3" -eq 0 ] && [ "$RC4" -eq 0 ]; then + OVERALL=PASS + else + OVERALL=FAIL + fi + + RVS_VERSION=$("$RVS_BIN" --version 2>/dev/null | head -1 || echo "unknown") + + REPORT=./reports/SUMMARY.md + { + echo "# RVS Nightly Test Report" + echo "" + echo "| Field | Value |" + echo "|---|---|" + echo "| Run | [\`${{ github.run_id }}\`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |" + echo "| Trigger | \`${{ github.event_name }}\` |" + echo "| Runner | \`$(hostname)\` |" + echo "| Tarball | \`${TARBALL_NAME}\` |" + echo "| Source URL | ${TARBALL_URL} |" + echo "| RVS version | \`${RVS_VERSION}\` |" + echo "| Overall result | **${OVERALL}** |" + echo "" + echo "## Results" + echo "" + echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" + echo "|---|---|:--:|---:|---|---|" + echo "| Level 3 | \`${RVS_BIN} -r 3\` | ${S3} | ${RC3} | ${{ steps.rvs3.outputs.start }} | ${{ steps.rvs3.outputs.end }} |" + echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" + echo "" + echo "## Logs" + echo "" + echo "Full per-level stdout/stderr is attached to the run artifact" + echo "\`rvs-nightly-report-${{ github.run_id }}\`:" + echo "" + echo "- \`rvs_level_3.log\`" + echo "- \`rvs_level_4.log\`" + echo "- \`SUMMARY.md\` (this file)" + } > "$REPORT" + + cat "$REPORT" + cat "$REPORT" >> "$GITHUB_STEP_SUMMARY" + + { + echo "overall=$OVERALL" + echo "rc3=$RC3" + echo "rc4=$RC4" + } >> "$GITHUB_OUTPUT" + + - name: Upload report and logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-nightly-report-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Fail the job if any level failed + if: steps.report.outputs.overall == 'FAIL' + run: | + echo "::error::RVS test failure — level3 rc=${{ steps.report.outputs.rc3 }}, level4 rc=${{ steps.report.outputs.rc4 }}" + exit 1 From 80913d9850d5617452c69461dee066fc4443143f Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 18 May 2026 17:21:41 -0400 Subject: [PATCH 153/275] Removed the url from yml file so that it will only pick the url from the variable set Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-tests.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 43b4e01a2..ec77540ce 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,9 +1,9 @@ name: RVS Nightly Tests -# Picks up the latest RVS tarball published at -# https://repo.amd.com/rocm/rvs/tarball/ once per day, installs it on a -# self-hosted GPU runner, runs RVS levels 3 and 4, and uploads a Markdown -# report + per-level logs as an artifact. +# Picks up the latest RVS tarball published at the index URL configured in +# vars.RVS_TARBALL_INDEX_URL once per day, installs it on a self-hosted GPU +# runner, runs RVS levels 3 and 4, and uploads a Markdown report + per-level +# logs as an artifact. on: schedule: @@ -12,7 +12,7 @@ on: workflow_dispatch: inputs: tarball_url: - description: 'Override tarball URL (default: latest from repo.amd.com)' + description: 'Override tarball URL (default: latest from vars.RVS_TARBALL_INDEX_URL)' required: false default: '' force: @@ -28,7 +28,10 @@ concurrency: cancel-in-progress: false env: - TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL || 'https://repo.amd.com/rocm/rvs/tarball/' }} + # Required: configure per-repo under + # Settings → Secrets and variables → Actions → Variables. + # Workflow fails fast if unset. + TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL }} RVS_BIN: /opt/rocm/extras-7/bin/rvs jobs: @@ -59,6 +62,11 @@ jobs: run: | set -euo pipefail + if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL:-}" ]; then + echo "::error::vars.RVS_TARBALL_INDEX_URL is not set (Settings → Secrets and variables → Actions → Variables); set it or pass workflow_dispatch.tarball_url" + exit 1 + fi + fetch_latest() { local idx="$1" local html From 065197d780c7256accbc8714d64bca1fbc4ce184 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 18 May 2026 19:22:59 -0400 Subject: [PATCH 154/275] Edited the files to fix the path forinstalling RVS and added a check to see if ROCM is installed Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 154 ++++++++++++++++------ .github/workflows/rvs-nightly-tests.yml | 151 +++++++++++++++++++-- 2 files changed, 254 insertions(+), 51 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 0d8e1a50a..158d68924 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -1,8 +1,8 @@ # RVS Nightly Tests Workflow This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), -which picks up the **latest RVS tarball** published at -[`https://repo.amd.com/rocm/rvs/tarball/`](https://repo.amd.com/rocm/rvs/tarball/) +which picks up the **latest RVS tarball** from the index URL configured in +`vars.RVS_TARBALL_INDEX_URL` (e.g. `https://repo.amd.com/rocm/rvs/tarball/`) once per day, installs it on a self-hosted GPU runner, and runs RVS levels 3 and 4. @@ -13,16 +13,19 @@ schedule (or manual) │ ▼ detect [ubuntu-latest] - │ curl https://repo.amd.com/rocm/rvs/tarball/ + │ curl $RVS_TARBALL_INDEX_URL │ → grep amdrocm*-rvs-*-Linux.tar.gz, sort -V, pick newest │ → compare with cached marker (skip if unchanged) ▼ test [self-hosted GPU runner] - │ curl → ./pkg/.tar.gz - │ sudo tar -xzf … -C / → installs to /opt/rocm/extras-7/ - │ /opt/rocm/extras-7/bin/rvs -r 3 → reports/rvs_level_3.log - │ /opt/rocm/extras-7/bin/rvs -r 4 → reports/rvs_level_4.log - │ build Markdown SUMMARY.md → GitHub job summary + artifact + │ verify ROCm prereqs → fail-fast if ROCm missing or wrong major + │ curl → ./pkg/.tar.gz + │ parse ROCM_MAJOR from amdrocm-… → INSTALL_DIR=/opt/rocm/extras- + │ sudo tar -xzf … -C $INSTALL_DIR → installs to /opt/rocm/extras-/ + │ ldd $INSTALL_DIR/bin/rvs → fail-fast if any "not found" libs + │ $INSTALL_DIR/bin/rvs -r 3 → reports/rvs_level_3.log + │ $INSTALL_DIR/bin/rvs -r 4 → reports/rvs_level_4.log + │ build Markdown SUMMARY.md → GitHub job summary + artifact ▼ artifact: rvs-nightly-report- ``` @@ -44,31 +47,31 @@ adjust the cron string in the workflow if your publish cadence is different. | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | | `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | -Example: +Example (replace `` with the value of `vars.RVS_TARBALL_INDEX_URL`): ```bash gh workflow run rvs-nightly-tests.yml \ - -f tarball_url="https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ + -f tarball_url="/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ -f force=true ``` ## Repository configuration -No secrets are required — the source URL is public. +No secrets are required. **Variables** (Settings → Secrets and variables → Actions → Variables): -| Name | Default | Purpose | +| Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | `https://repo.amd.com/rocm/rvs/tarball/` | Directory listing scraped for the latest tarball. Override to mirror or staging URLs without editing the workflow. | -| `RVS_TEST_RUNNER_LABEL` | `self-hosted` | Runner label (single string) used by the `test` job. Set to a more specific label like `gfx942` or `mi300x` if you have multiple GPU runners. | +| `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | +| `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Runner label (single string) used by the `test` job. Set to a more specific label like `gfx942` or `mi300x` if you have multiple GPU runners. | ## How the latest tarball is picked -The `detect` job does: +The `detect` job does (with `$INDEX_URL` = `vars.RVS_TARBALL_INDEX_URL`): ```bash -curl -sL https://repo.amd.com/rocm/rvs/tarball/ \ +curl -sL "$INDEX_URL" \ | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ | sort -uV \ | tail -n 1 @@ -81,31 +84,98 @@ suffixes like `1.4.21-9` and `1.4.21-100` compare correctly. The ## How the tarball is installed -The TGZ ships content rooted at `/opt/rocm/extras-7/`, so the workflow -extracts it at `/`: +The install step parses the ROCm major version from the tarball filename +(e.g. `amdrocm7-rvs-1.4.21-…-Linux.tar.gz` → `7`) and extracts directly +into the matching `extras-` directory, so the same workflow handles +ROCm 6, 7, etc. without code changes: ```bash -sudo mkdir -p /opt/rocm -sudo tar -xzf ./pkg/.tar.gz -C / -/opt/rocm/extras-7/bin/rvs --version +# Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] +ROCM_MAJOR=7 +INSTALL_DIR=/opt/rocm/extras-${ROCM_MAJOR} # /opt/rocm/extras-7 +RVS_BIN_PATH=${INSTALL_DIR}/bin/rvs + +sudo mkdir -p "$INSTALL_DIR" +sudo tar -xzf ./pkg/.tar.gz -C "$INSTALL_DIR" + +export LD_LIBRARY_PATH="$INSTALL_DIR/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + +"$RVS_BIN_PATH" --version +``` + +The step fails fast if the filename doesn't match `^amdrocm-`, or +if `$RVS_BIN_PATH` isn't executable after extraction. The resolved +`RVS_BIN_PATH` is written to `$GITHUB_ENV` so the level-3, level-4, and +report steps pick it up automatically. + +**Prerequisites on the runner** (all enforced by the **Pre-flight ROCm checks** below — the workflow fails fast if any are missing): + +- ROCm base stack already installed at `/opt/rocm/` with a major version that matches the tarball name (e.g. `amdrocm7-rvs-…` requires ROCm 7.x). The TGZ only ships RVS, not a full ROCm install; the RVS binary depends on ROCm libraries resolved via `RPATH` to the system ROCm. +- Working kernel driver (`amdgpu`) and at least one GPU enumerated by `rocm-smi` and `rocminfo`. +- Passwordless `sudo` (or `sudo` configured to not prompt) so the `tar -xzf -C "$INSTALL_DIR"` step works without interactive input. +- Network egress to the host serving `vars.RVS_TARBALL_INDEX_URL` (typically port 443). + +## Pre-flight ROCm checks + +Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites`** on the GPU runner. The step accumulates failures and reports all of them in a single log so the cause is obvious: + +| Sub-check | Action on failure | Catches | +|---|---|---| +| `/opt/rocm/` directory exists | hard fail (`exit 1`) | ROCm not installed at all | +| Read ROCm version from `/opt/rocm/.info/version` (fallback `/opt/rocm/share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | +| Major version match (regex on tarball name vs runner version) | hard fail on mismatch | RVS-7 tarball on a ROCm-6 host | +| `rocm-smi --showid` runs and exits 0 | hard fail | `amdgpu` driver not loaded, or `rocm-smi` missing | +| `rocminfo` enumerates ≥ 1 GPU | hard fail | "ROCm installed but no GPU exposed" (group/permissions, BIOS IOMMU, etc.) | +| `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Missing/broken `ldconfig` cache (RPATH usually compensates) | + +A typical successful log: + +``` +=== /opt/rocm/ === +/opt/rocm -> /opt/rocm-7.11.0 +=== ROCm version === +/opt/rocm/.info/version : 7.11.0 +=== Major version match (tarball vs runner) === +tarball expects ROCm major : 7 +runner has ROCm major : 7 +=== rocm-smi === +GPU[0] : ID : 0x74a1 +=== rocminfo (GPU enumeration) === +GPU agents enumerated: 8 +=== Key ROCm runtime libraries === + OK : libhsa-runtime64.so.1 + OK : libamdhip64.so +::notice::ROCm prerequisites OK (version 7.11.0) ``` -**Prerequisites on the runner:** +After install, **`Verify RVS binary library resolution`** runs `ldd "$RVS_BIN"` (where `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs` from the install step) and fails the job if any library shows up as `not found` — preventing the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. -- ROCm 7.x base stack already installed at `/opt/rocm/` (the TGZ only ships - RVS, not a full ROCm install; the RVS binary depends on ROCm libraries - resolved via `RPATH` and `LD_LIBRARY_PATH` to the system ROCm). -- Passwordless `sudo` (or `sudo` configured to not prompt) so the - `tar -xzf -C /` step works without interactive input. -- Network egress to `repo.amd.com` (port 443). +### Manual one-liner (no workflow needed) + +To verify a runner is viable before enabling the schedule, drop this into an SSH session against any candidate runner: + +```bash +set -uo pipefail +[ -d /opt/rocm ] || { echo "no /opt/rocm"; exit 1; } +echo "version: $(cat /opt/rocm/.info/version 2>/dev/null || \ + cat /opt/rocm/share/doc/rocm-core/version 2>/dev/null || \ + echo unknown)" +rocm-smi --showid >/dev/null && echo "rocm-smi OK" +N=$(rocminfo 2>/dev/null | grep -c 'Device Type:.*GPU' || echo 0) +[ "$N" -ge 1 ] && echo "rocminfo OK ($N GPU agents)" || { echo "no GPU"; exit 1; } +ldconfig -p | grep -q libhsa-runtime64.so.1 && echo "libhsa-runtime64 OK" || echo "warn: libhsa-runtime64 missing" +echo "ROCm OK" +``` ## The tests -Run verbatim: +Run verbatim (with `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`, +populated by the install step — for an `amdrocm7-…` tarball this resolves +to `/opt/rocm/extras-7/bin/rvs`): ```bash -/opt/rocm/extras-7/bin/rvs -r 3 -/opt/rocm/extras-7/bin/rvs -r 4 +"$RVS_BIN" -r 3 +"$RVS_BIN" -r 4 ``` Both commands are executed sequentially. Each step captures full @@ -128,7 +198,7 @@ After both RVS commands finish, the `Build test report` step generates | Trigger | `schedule` | | Runner | `gpu-runner-01` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | -| Source URL | https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz | +| Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | RVS version | `RVS 1.4.21.0-...` | | Overall result | **PASS** | @@ -174,19 +244,29 @@ gh workflow run rvs-nightly-tests.yml -f force=true Watch the Actions tab for: -1. `detect` resolves a tarball URL (`Latest tarball : amdrocm7-rvs-…`). +1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). 2. `test` job picks up on your self-hosted runner. -3. RVS extracts to `/opt/rocm/extras-7/`. -4. Two RVS level steps complete; the run summary shows the results table. +3. **Verify ROCm prerequisites** prints `::notice::ROCm prerequisites OK`. +4. **Install RVS (detect ROCm major from filename)** prints the detected `ROCM_MAJOR` and `Installed RVS at: /opt/rocm/extras-/bin/rvs`. +5. **Verify RVS binary library resolution** prints `::notice::RVS binary's library dependencies resolved OK`. +6. Two RVS level steps complete; the run summary shows the results table. ## Debugging a failed run | Symptom | Likely cause | |---|---| -| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify `https://repo.amd.com/rocm/rvs/tarball/` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link, or set `RVS_TARBALL_INDEX_URL` to the correct mirror. | +| `detect` job exits with `vars.RVS_TARBALL_INDEX_URL is not set` | The required variable is unset. Set it in the repo Variables (e.g. to `https://repo.amd.com/rocm/rvs/tarball/`), or pass `tarball_url` via `workflow_dispatch`. | +| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the URL in `vars.RVS_TARBALL_INDEX_URL` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | | `test` job stuck "Queued" | No self-hosted runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | +| **Verify ROCm prerequisites** fails: `/opt/rocm/ does not exist` | Runner has no ROCm install. Install ROCm or pick a runner that has it. | +| **Verify ROCm prerequisites** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but the runner has ROCm ``. Either pin a matching tarball with `tarball_url`, or upgrade the runner's ROCm. | +| **Verify ROCm prerequisites** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded. `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | +| **Verify ROCm prerequisites** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to the runner user. Add the user to `video` and `render` groups, log out and back in. | +| **Install RVS** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | +| **Install RVS** fails: `rvs binary not found or not executable at /opt/rocm/extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `/opt/rocm/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | +| **Verify RVS binary library resolution** fails with `not found` | A ROCm runtime library is missing or not in `RPATH`. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | | `Install RVS` fails with "Permission denied" | Runner user can't `sudo` without password. Fix the runner's sudoers entry. | -| `Run RVS level N` exits non-zero immediately | ROCm base stack missing or wrong major version. `rvs --version` and `ldd /opt/rocm/extras-7/bin/rvs` give clues. | +| `Run RVS level N` exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing (e.g. `libpci3` on Debian). Check the level log for the specific error. | | Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually with `force=true` to validate. | ## References diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index ec77540ce..38828838d 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,9 +1,9 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball published at the index URL configured in -# vars.RVS_TARBALL_INDEX_URL once per day, installs it on a self-hosted GPU -# runner, runs RVS levels 3 and 4, and uploads a Markdown report + per-level -# logs as an artifact. +# vars.RVS_TARBALL_INDEX_URL once per day, installs it on a +# self-hosted GPU runner, runs RVS levels 3 and 4, and uploads a Markdown +# report + per-level logs as an artifact. on: schedule: @@ -32,7 +32,8 @@ env: # Settings → Secrets and variables → Actions → Variables. # Workflow fails fast if unset. TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL }} - RVS_BIN: /opt/rocm/extras-7/bin/rvs + # RVS_BIN is populated by the install step based on the ROCm major version + # parsed from the tarball filename (e.g. amdrocm7-rvs-… → extras-7/bin/rvs). jobs: detect: @@ -129,11 +130,93 @@ jobs: TARBALL_URL: ${{ needs.detect.outputs.tarball_url }} TARBALL_NAME: ${{ needs.detect.outputs.tarball_name }} steps: - - name: Show GPU / system info + - name: Verify ROCm prerequisites run: | + set -uo pipefail + fail=0 + + echo "=== System ===" uname -a - (rocm-smi || true) | head -40 - (rocminfo | head -40 || true) + echo + + echo "=== /opt/rocm/ ===" + if [ -d /opt/rocm ]; then + ls -la /opt/rocm | head -20 + [ -L /opt/rocm ] && echo "/opt/rocm -> $(readlink /opt/rocm)" + else + echo "::error::/opt/rocm/ does not exist; ROCm is not installed on this runner." + fail=1 + fi + echo + + echo "=== ROCm version ===" + if [ -f /opt/rocm/.info/version ]; then + ROCM_VERSION=$(cat /opt/rocm/.info/version) + echo "/opt/rocm/.info/version : $ROCM_VERSION" + elif [ -f /opt/rocm/share/doc/rocm-core/version ]; then + ROCM_VERSION=$(cat /opt/rocm/share/doc/rocm-core/version) + echo "rocm-core version : $ROCM_VERSION" + else + ROCM_VERSION="" + echo "::warning::no ROCm version file found at /opt/rocm/.info/version or /opt/rocm/share/doc/rocm-core/version" + fi + echo + + echo "=== Major version match (tarball vs runner) ===" + EXPECTED_MAJOR=$(echo "$TARBALL_NAME" | grep -oE '^amdrocm[0-9]+' | grep -oE '[0-9]+' | head -1) + INSTALLED_MAJOR=$(echo "$ROCM_VERSION" | grep -oE '^[0-9]+' | head -1) + echo "tarball expects ROCm major : ${EXPECTED_MAJOR:-?}" + echo "runner has ROCm major : ${INSTALLED_MAJOR:-?}" + if [ -n "$EXPECTED_MAJOR" ] && [ -n "$INSTALLED_MAJOR" ] && [ "$EXPECTED_MAJOR" != "$INSTALLED_MAJOR" ]; then + echo "::error::ROCm major version mismatch (tarball=$EXPECTED_MAJOR, runner=$INSTALLED_MAJOR)" + fail=1 + fi + echo + + echo "=== rocm-smi ===" + if command -v rocm-smi >/dev/null 2>&1; then + if rocm-smi --showid 2>&1 | tee /tmp/rocm-smi.out; then + echo "rocm-smi OK" + else + echo "::error::rocm-smi is on PATH but exited non-zero; check that the amdgpu kernel driver is loaded." + fail=1 + fi + else + echo "::error::rocm-smi not found on PATH; ROCm runtime tools are missing." + fail=1 + fi + echo + + echo "=== rocminfo (GPU enumeration) ===" + if command -v rocminfo >/dev/null 2>&1; then + rocminfo 2>&1 | head -40 || true + N_GPU=$(rocminfo 2>/dev/null | grep -c 'Device Type:.*GPU' || true) + N_GPU=${N_GPU:-0} + echo "GPU agents enumerated: $N_GPU" + if [ "$N_GPU" -lt 1 ]; then + echo "::error::rocminfo enumerated 0 GPU agents; the runner does not have a usable GPU." + fail=1 + fi + else + echo "::warning::rocminfo not found on PATH; skipping GPU enumeration check." + fi + echo + + echo "=== Key ROCm runtime libraries ===" + for lib in libhsa-runtime64.so.1 libamdhip64.so; do + if ldconfig -p 2>/dev/null | grep -q "$lib"; then + echo " OK : $lib" + else + echo "::warning::library $lib not found in ldconfig cache" + fi + done + echo + + if [ "$fail" -ne 0 ]; then + echo "::error::ROCm prerequisites check FAILED — refusing to install RVS." + exit 1 + fi + echo "::notice::ROCm prerequisites OK${ROCM_VERSION:+ (version $ROCM_VERSION)}" - name: Download tarball run: | @@ -144,16 +227,56 @@ jobs: ls -la ./pkg/ file "./pkg/${TARBALL_NAME}" || true - - name: Install RVS (extract TGZ to /) + - name: Install RVS (detect ROCm major from filename) run: | set -euo pipefail PKG="./pkg/${TARBALL_NAME}" - echo "Installing $PKG into /opt/rocm/extras-7/" - sudo mkdir -p /opt/rocm - # The TGZ payload is rooted at /opt/rocm/extras-7/... so extract at /. - sudo tar -xzf "$PKG" -C / - ls -la /opt/rocm/extras-7/bin/rvs - "$RVS_BIN" --version || true + + # Filenames look like amdrocm-rvs--Linux.tar.gz + # e.g. amdrocm7-rvs-1.4.21-r0711.20260423-Linux.tar.gz → MAJOR=7. + if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then + ROCM_MAJOR="${BASH_REMATCH[1]}" + else + echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" + exit 1 + fi + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" + + echo "Detected ROCm major version : ${ROCM_MAJOR}" + echo "Install target : ${INSTALL_DIR}" + + sudo mkdir -p "$INSTALL_DIR" + sudo tar -xzf "$PKG" -C "$INSTALL_DIR" + + export LD_LIBRARY_PATH="/opt/rocm/extras-${ROCM_MAJOR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + + if [ ! -x "$RVS_BIN_PATH" ]; then + echo "::error::rvs binary not found or not executable at $RVS_BIN_PATH after install" + ls -la "$INSTALL_DIR/" || true + ls -la "$INSTALL_DIR/bin/" || true + exit 1 + fi + + echo "RVS_BIN=$RVS_BIN_PATH" >> "$GITHUB_ENV" + echo "Installed RVS at: $RVS_BIN_PATH" + "$RVS_BIN_PATH" --version || true + + - name: Verify RVS binary library resolution + run: | + set -euo pipefail + if [ ! -x "$RVS_BIN" ]; then + echo "::error::$RVS_BIN was not produced by tarball extraction." + exit 1 + fi + echo "=== ldd $RVS_BIN ===" + LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) + echo "$LDD_OUTPUT" + if echo "$LDD_OUTPUT" | grep -q "not found"; then + echo "::error::RVS binary has unresolved library dependencies (see above)." + exit 1 + fi + echo "::notice::RVS binary's library dependencies resolved OK." - name: Run RVS level 3 id: rvs3 From b2560b1f82b78fea8d7a85c56747c39be45f9439 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 19 May 2026 00:33:26 -0700 Subject: [PATCH 155/275] Update workflow document to reflect Ubuntu container changes --- .github/workflows/README_BUILD_PACKAGES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 1a926f38f..d84765aaf 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -76,7 +76,7 @@ GitHub Actions Workflow │ ├── export ROCM_LIBPATCH_VERSION (major.minor in xxyy format, e.g., 0711) │ ├── export CPACK_DEBIAN_PACKAGE_RELEASE (see env table: r.date, PRs add .branch.commit) │ ├── export CPACK_RPM_PACKAGE_RELEASE (same as DEB) - │ ├── export CMAKE_CXX_COMPILER=hipcc (AlmaLinux only) + │ ├── export CMAKE_CXX_COMPILER=hipcc (AlmaLinux and Ubuntu/Debian) │ └── export CMAKE_COMMAND=cmake3 (AlmaLinux) or cmake (Ubuntu) ├── 4. Configure CMake (install RPATH defaults live in CMakeLists.txt) │ └── $CMAKE_COMMAND -B ./build \ @@ -108,7 +108,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **HIP Device Libraries**: Automatically located and exported as `HIP_DEVICE_LIB_PATH` for clang device library discovery. -**Compiler Selection**: For AlmaLinux (manylinux_2_28), `CMAKE_CXX_COMPILER` is set to ROCm's `hipcc`. Ubuntu uses system default compiler. +**Compiler Selection**: `CMAKE_CXX_COMPILER` is set to ROCm's `hipcc` on both AlmaLinux (manylinux_2_28) and Ubuntu/Debian. Because hipcc is Clang-based and does not bundle libstdc++, the system GCC tree is plumbed in via `--gcc-toolchain=$GCC_TOOLCHAIN`: on AlmaLinux this points at the discovered `gcc-toolset-`; on Ubuntu/Debian it is `/usr` (set when `/usr/include/c++/*/barrier` exists). **CMake Command**: Uses `cmake3` on AlmaLinux (manylinux_2_28) and `cmake` on Ubuntu. @@ -268,7 +268,7 @@ The workflow uses `build_packages_local.sh` as the core build engine. This scrip - **HIP Device Libraries**: Auto-locates amdgcn/bitcode directory and exports HIP_DEVICE_LIB_PATH - **CMake Configuration**: Sets up relocatable RPATHs and all build parameters - Uses cmake3 on AlmaLinux, cmake on Ubuntu - - Sets CMAKE_CXX_COMPILER to hipcc on AlmaLinux + - Sets CMAKE_CXX_COMPILER to hipcc on AlmaLinux and Ubuntu/Debian (Ubuntu also gets `--gcc-toolchain=/usr` for C++20 libstdc++ headers) - **Building**: Compiles RVS with parallel builds - **Packaging**: Creates DEB, RPM, and TGZ packages using CPack - **Color Output**: Clear, colored progress indicators @@ -292,9 +292,9 @@ sudo -E ./build_packages_local.sh sudo BUILD_TYPE=Debug ./build_packages_local.sh ``` -**Important**: The script requires root privileges to install system dependencies. Use `sudo` when running locally. In GitHub Actions: -- **Ubuntu runners**: Use `sudo` (runner has sudo access but not root by default) -- **Container builds** (Rocky/CentOS): No sudo needed (containers run as root) +**Important**: The script requires root privileges to install system dependencies. Use `sudo` when running locally on a bare-metal host. In GitHub Actions every build job runs inside a container as root, so the workflow invokes `./build_packages_local.sh` directly without `sudo`: +- **Ubuntu job**: runs in the `ubuntu:22.04` container +- **CentOS/manylinux job**: runs in the `manylinux_2_28_x86_64` container ### Environment Variables @@ -321,8 +321,8 @@ The workflow builds packages for: | Platform | Container/Runner | Package Types | Script Mode | |----------|------------------|---------------|-------------| -| Ubuntu 22.04 | ubuntu-22.04 | DEB, TGZ | Auto-detects Ubuntu | -| Manylinux 2.28 (AlmaLinux 8) | manylinux_2_28_x86_64 | RPM, TGZ | Auto-detects AlmaLinux | +| Ubuntu 22.04 | `ubuntu:22.04` container on `ubuntu-22.04` host | DEB, TGZ | Auto-detects Ubuntu | +| Manylinux 2.28 (AlmaLinux 8) | `manylinux_2_28_x86_64` container | RPM, TGZ | Auto-detects AlmaLinux | ## Package Naming Convention From 2831a6c192172abd4039e6206f306fd6bb27109e Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Tue, 19 May 2026 09:26:58 -0400 Subject: [PATCH 156/275] fix broken link (#1154) --- docs/install/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 1776c1724..3b9d2b9a9 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -23,7 +23,7 @@ Install the ROCm Core SDK ------------------------- For instructions, see `Install AMD ROCm -`__. Use the +`__. Use the selector panel on that page to view instructions appropriate for your system environment. From 227435bcf6bce943663cced28847b234fe763dd8 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 19 May 2026 11:53:42 -0400 Subject: [PATCH 157/275] Edited the files to add capability to execute RVS installation and testing on a separate target node over SSH Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 233 +++++++++++------ .github/workflows/rvs-nightly-tests.yml | 297 ++++++++++++++++++---- 2 files changed, 402 insertions(+), 128 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 158d68924..e1b4800bb 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -3,8 +3,14 @@ This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), which picks up the **latest RVS tarball** from the index URL configured in `vars.RVS_TARBALL_INDEX_URL` (e.g. `https://repo.amd.com/rocm/rvs/tarball/`) -once per day, installs it on a self-hosted GPU runner, and runs RVS levels -3 and 4. +once per day, copies it to a **configurable remote target node** over SSH, +installs it there, and runs RVS levels 3 and 4 on that node. + +The GitHub Actions runner ("RVS Runner") is only an **orchestrator** — it +doesn't need a GPU or ROCm installed locally. All RVS install, binary +verification, and `rvs -r 3` / `rvs -r 4` execution happens on the target +node. The target node is configurable so the same workflow can be pointed +at any GPU host without code changes. ## What it does @@ -17,15 +23,20 @@ detect [ubuntu-latest] │ → grep amdrocm*-rvs-*-Linux.tar.gz, sort -V, pick newest │ → compare with cached marker (skip if unchanged) ▼ -test [self-hosted GPU runner] - │ verify ROCm prereqs → fail-fast if ROCm missing or wrong major - │ curl → ./pkg/.tar.gz - │ parse ROCM_MAJOR from amdrocm-… → INSTALL_DIR=/opt/rocm/extras- - │ sudo tar -xzf … -C $INSTALL_DIR → installs to /opt/rocm/extras-/ - │ ldd $INSTALL_DIR/bin/rvs → fail-fast if any "not found" libs - │ $INSTALL_DIR/bin/rvs -r 3 → reports/rvs_level_3.log - │ $INSTALL_DIR/bin/rvs -r 4 → reports/rvs_level_4.log - │ build Markdown SUMMARY.md → GitHub job summary + artifact +test [GitHub runner = orchestrator] ──ssh──▶ [target node = GPU host] + │ validate target_node / target_user │ + │ write SSH key + config to $RUNNER_TEMP │ + │ ssh rvs-target hostname; id ─────────────────────────────▶ │ connectivity check + │ ssh rvs-target ─────────────────────────────▶ │ /opt/rocm, rocm-smi, rocminfo, libs + │ curl → ./pkg/.tar.gz │ + │ scp ./pkg/.tar.gz rvs-target:… ─────────────────────────────▶ │ $REMOTE_WORK_DIR/pkg/ + │ ssh rvs-target ─────────────────────────────▶ │ sudo -n tar -xzf → /opt/rocm/extras-/ + │ ssh rvs-target ─────────────────────────────▶ │ verify RVS lib resolution + │ ssh rvs-target rvs -r 3 ─────────────────────────────▶ │ writes $REMOTE_WORK_DIR/reports/rvs_level_3.log + │ ssh rvs-target rvs -r 4 ─────────────────────────────▶ │ writes $REMOTE_WORK_DIR/reports/rvs_level_4.log + │ scp rvs-target:…/reports/*.log ./reports/ ◀───────────────────────────── │ + │ build Markdown SUMMARY.md → GitHub job summary + artifact │ + │ ssh rvs-target rm -rf $REMOTE_WORK_DIR ─────────────────────────────▶ │ cleanup ▼ artifact: rvs-nightly-report- ``` @@ -35,7 +46,7 @@ artifact: rvs-nightly-report- | Trigger | Cadence | What fires | |---|---|---| | `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index. If the latest filename matches the previous run's, the run is **skipped** to avoid re-testing the same package. | -| `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and forcing a re-run. | +| `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL, forcing a re-run, and **retargeting at any node** without editing the workflow. | The cron deliberately runs after AMD's typical nightly publish window; adjust the cron string in the workflow if your publish cadence is different. @@ -46,25 +57,46 @@ adjust the cron string in the workflow if your publish cadence is different. |---|---|---| | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | | `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | +| `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | +| `target_user` | _(empty → `vars.RVS_TARGET_USER`, then `urtiwari`)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | +| `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | + +Workflow inputs **win over repo variables**, so individual `workflow_dispatch` +runs can be retargeted from the Actions UI without changing repo settings. -Example (replace `` with the value of `vars.RVS_TARBALL_INDEX_URL`): +Example — point a single run at a specific node: ```bash gh workflow run rvs-nightly-tests.yml \ -f tarball_url="/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ + -f target_node="10.245.134.83" \ + -f target_user="urtiwari" \ -f force=true ``` -## Repository configuration +Example — keep the default tarball but run on a different host today: -No secrets are required. +```bash +gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" +``` + +## Repository configuration **Variables** (Settings → Secrets and variables → Actions → Variables): | Name | Required? | Purpose | |---|---|---| | `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | -| `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Runner label (single string) used by the `test` job. Set to a more specific label like `gfx942` or `mi300x` if you have multiple GPU runners. | +| `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | +| `RVS_TARGET_USER` | optional (default `urtiwari`) | SSH user on the target node. | +| `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | +| `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | + +**Secrets** (Settings → Secrets and variables → Actions → Secrets): + +| Name | Required? | Purpose | +|---|---|---| +| `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | ## How the latest tarball is picked @@ -82,48 +114,63 @@ directory-listing HTML. `sort -V` is GNU "version sort" so version suffixes like `1.4.21-9` and `1.4.21-100` compare correctly. The **lexicographically largest by version** is selected. -## How the tarball is installed +## How the tarball is installed (on the target node) -The install step parses the ROCm major version from the tarball filename -(e.g. `amdrocm7-rvs-1.4.21-…-Linux.tar.gz` → `7`) and extracts directly -into the matching `extras-` directory, so the same workflow handles -ROCm 6, 7, etc. without code changes: +The runner derives the ROCm major version from the tarball filename +(e.g. `amdrocm7-rvs-1.4.21-…-Linux.tar.gz` → `7`), writes the derived +paths to `$GITHUB_ENV`, then SSHes into the target with those values +exported so the install runs against the matching `extras-` +directory. The same workflow handles ROCm 6, 7, etc. without code changes: ```bash +# On the runner (Validate target node configuration step): # Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] ROCM_MAJOR=7 INSTALL_DIR=/opt/rocm/extras-${ROCM_MAJOR} # /opt/rocm/extras-7 -RVS_BIN_PATH=${INSTALL_DIR}/bin/rvs +RVS_BIN=${INSTALL_DIR}/bin/rvs -sudo mkdir -p "$INSTALL_DIR" -sudo tar -xzf ./pkg/.tar.gz -C "$INSTALL_DIR" +# On the target node (Install RVS on target node step), via SSH: +sudo -n mkdir -p "$INSTALL_DIR" +sudo -n tar -xzf "$REMOTE_WORK_DIR/pkg/.tar.gz" -C "$INSTALL_DIR" export LD_LIBRARY_PATH="$INSTALL_DIR/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" -"$RVS_BIN_PATH" --version +"$RVS_BIN" --version ``` +`sudo -n` is non-interactive — it fails fast instead of hanging if +`NOPASSWD` isn't configured. There's no PTY over the SSH channel anyway, +so an interactive sudo prompt would deadlock the job. + The step fails fast if the filename doesn't match `^amdrocm-`, or -if `$RVS_BIN_PATH` isn't executable after extraction. The resolved -`RVS_BIN_PATH` is written to `$GITHUB_ENV` so the level-3, level-4, and -report steps pick it up automatically. +if `$RVS_BIN` isn't executable after extraction. + +### Prerequisites + +**On the GitHub runner (orchestrator):** -**Prerequisites on the runner** (all enforced by the **Pre-flight ROCm checks** below — the workflow fails fast if any are missing): +- `ssh`, `scp`, `ssh-keyscan`, and `curl` on `PATH`. +- Network egress to: + - the host serving `vars.RVS_TARBALL_INDEX_URL` (typically port 443), + - the target node (port 22 — or wherever its sshd listens, configurable in the SSH config block of the workflow). +- The runner does **not** need a GPU, ROCm, or `sudo`. +**On the target node** (all enforced by the **Pre-flight ROCm checks** below — the workflow fails fast if any are missing): + +- SSH server reachable from the runner, with the public counterpart of `secrets.RVS_TARGET_SSH_KEY` authorized for `$TARGET_USER`. +- `$TARGET_USER` has **`NOPASSWD` sudo** for `mkdir` + `tar` into `/opt/rocm/extras-` — the install step uses `sudo -n` and aborts otherwise. - ROCm base stack already installed at `/opt/rocm/` with a major version that matches the tarball name (e.g. `amdrocm7-rvs-…` requires ROCm 7.x). The TGZ only ships RVS, not a full ROCm install; the RVS binary depends on ROCm libraries resolved via `RPATH` to the system ROCm. - Working kernel driver (`amdgpu`) and at least one GPU enumerated by `rocm-smi` and `rocminfo`. -- Passwordless `sudo` (or `sudo` configured to not prompt) so the `tar -xzf -C "$INSTALL_DIR"` step works without interactive input. -- Network egress to the host serving `vars.RVS_TARBALL_INDEX_URL` (typically port 443). ## Pre-flight ROCm checks -Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites`** on the GPU runner. The step accumulates failures and reports all of them in a single log so the cause is obvious: +Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites on target node`** — the same checks as before, but executed remotely via SSH on the target node, not on the GitHub runner. The step accumulates failures and reports all of them in a single log so the cause is obvious: | Sub-check | Action on failure | Catches | |---|---|---| -| `/opt/rocm/` directory exists | hard fail (`exit 1`) | ROCm not installed at all | +| `/opt/rocm/` directory exists | hard fail (`exit 1`) | ROCm not installed on target | | Read ROCm version from `/opt/rocm/.info/version` (fallback `/opt/rocm/share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | -| Major version match (regex on tarball name vs runner version) | hard fail on mismatch | RVS-7 tarball on a ROCm-6 host | +| Major version match (regex on tarball name vs target's ROCm version) | hard fail on mismatch | RVS-7 tarball on a ROCm-6 host | | `rocm-smi --showid` runs and exits 0 | hard fail | `amdgpu` driver not loaded, or `rocm-smi` missing | | `rocminfo` enumerates ≥ 1 GPU | hard fail | "ROCm installed but no GPU exposed" (group/permissions, BIOS IOMMU, etc.) | | `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Missing/broken `ldconfig` cache (RPATH usually compensates) | @@ -135,9 +182,9 @@ A typical successful log: /opt/rocm -> /opt/rocm-7.11.0 === ROCm version === /opt/rocm/.info/version : 7.11.0 -=== Major version match (tarball vs runner) === +=== Major version match (tarball vs target node) === tarball expects ROCm major : 7 -runner has ROCm major : 7 +target has ROCm major : 7 === rocm-smi === GPU[0] : ID : 0x74a1 === rocminfo (GPU enumeration) === @@ -145,14 +192,14 @@ GPU agents enumerated: 8 === Key ROCm runtime libraries === OK : libhsa-runtime64.so.1 OK : libamdhip64.so -::notice::ROCm prerequisites OK (version 7.11.0) +::notice::ROCm prerequisites OK on target node (version 7.11.0) ``` -After install, **`Verify RVS binary library resolution`** runs `ldd "$RVS_BIN"` (where `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs` from the install step) and fails the job if any library shows up as `not found` — preventing the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. +After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`) and fails the job if any library shows up as `not found` — preventing the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. -### Manual one-liner (no workflow needed) +### Manual one-liner (validate a candidate target node) -To verify a runner is viable before enabling the schedule, drop this into an SSH session against any candidate runner: +To verify a node is viable before pointing the workflow at it, SSH into the candidate and run: ```bash set -uo pipefail @@ -164,13 +211,14 @@ rocm-smi --showid >/dev/null && echo "rocm-smi OK" N=$(rocminfo 2>/dev/null | grep -c 'Device Type:.*GPU' || echo 0) [ "$N" -ge 1 ] && echo "rocminfo OK ($N GPU agents)" || { echo "no GPU"; exit 1; } ldconfig -p | grep -q libhsa-runtime64.so.1 && echo "libhsa-runtime64 OK" || echo "warn: libhsa-runtime64 missing" -echo "ROCm OK" +sudo -n true 2>/dev/null && echo "NOPASSWD sudo OK" || echo "warn: sudo requires password (install step will fail)" +echo "Target node OK" ``` ## The tests -Run verbatim (with `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`, -populated by the install step — for an `amdrocm7-…` tarball this resolves +Run verbatim on the target node (with `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`, +populated by the validate step — for an `amdrocm7-…` tarball this resolves to `/opt/rocm/extras-7/bin/rvs`): ```bash @@ -178,16 +226,19 @@ to `/opt/rocm/extras-7/bin/rvs`): "$RVS_BIN" -r 4 ``` -Both commands are executed sequentially. Each step captures full -stdout/stderr to `reports/rvs_level_.log` and its exit code is recorded -in a step output. Neither failure short-circuits the other — both levels -always run, and the job is marked failed at the end if either exited -non-zero. +Both commands are executed sequentially over SSH. Each step captures full +stdout/stderr to `$REMOTE_WORK_DIR/reports/rvs_level_.log` on the +target, then the **`Collect logs from target node`** step `scp`s the +`*.log` files back to `./reports/` on the runner. Each command's exit +code is propagated through SSH and recorded in a step output. Neither +failure short-circuits the other — both levels always run, and the job +is marked failed at the end if either exited non-zero. ## Test report -After both RVS commands finish, the `Build test report` step generates -`reports/SUMMARY.md` (also written to the GitHub job summary), e.g.: +After both RVS commands finish and logs are collected, the `Build test report` +step generates `reports/SUMMARY.md` (also written to the GitHub job summary), +e.g.: ```markdown # RVS Nightly Test Report @@ -196,7 +247,9 @@ After both RVS commands finish, the `Build test report` step generates |---|---| | Run | `1234567890` | | Trigger | `schedule` | -| Runner | `gpu-runner-01` | +| Orchestrator (GitHub runner) | `gha-orchestrator-01` | +| Target node (test execution) | `e16u07` (`urtiwari@10.245.134.83`) | +| Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | RVS version | `RVS 1.4.21.0-...` | @@ -204,10 +257,10 @@ After both RVS commands finish, the `Build test report` step generates ## Results -| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | -|---------|--------------------------------------|:------:|-----:|-----------------------|-----------------------| -| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | -| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | +| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | +|---------|------------------------------------------------------|:------:|-----:|-----------------------|-----------------------| +| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` (on `e16u07`) | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | +| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` (on `e16u07`) | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | ``` The full artifact contents: @@ -221,14 +274,18 @@ rvs-nightly-report-/ Artifact retention is 30 days. -## Self-hosted runner +## GitHub runner vs target node + +The `test` job runs on `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}`, +but this runner only orchestrates — it doesn't need a GPU or ROCm. You can: -The `test` job runs on `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}`. -You must have at least one self-hosted runner registered to the repo with -that label, online, and with a usable GPU. Register runners at -`https://github.com/ROCm/ROCmValidationSuite/settings/actions/runners`. +- Reuse an existing self-hosted runner that already has SSH access to the lab. +- Use a small purpose-built orchestration runner (any Linux box with `ssh`/`scp`/`curl`). +- In principle, use a GitHub-hosted `ubuntu-latest` runner — but that requires the target node to be reachable from GitHub's hosted runner IPs, which usually isn't the case for lab hosts behind a VPN/bastion. -If the chosen runner is busy with another job, this workflow's +The **target node** is what needs the GPU, ROCm, and `NOPASSWD` sudo. It does **not** need to be a registered GitHub runner. + +If the chosen orchestrator runner is busy with another job, this workflow's `concurrency:` group (`rvs-nightly-${{ github.workflow }}`, `cancel-in-progress: false`) will queue the run rather than cancel the running one. @@ -245,11 +302,13 @@ gh workflow run rvs-nightly-tests.yml -f force=true Watch the Actions tab for: 1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). -2. `test` job picks up on your self-hosted runner. -3. **Verify ROCm prerequisites** prints `::notice::ROCm prerequisites OK`. -4. **Install RVS (detect ROCm major from filename)** prints the detected `ROCM_MAJOR` and `Installed RVS at: /opt/rocm/extras-/bin/rvs`. -5. **Verify RVS binary library resolution** prints `::notice::RVS binary's library dependencies resolved OK`. -6. Two RVS level steps complete; the run summary shows the results table. +2. `test` job picks up on your orchestrator runner. +3. **Validate target node configuration** prints the resolved `Target node`, `Remote work dir`, and `Expected RVS binary` path. +4. **Setup SSH key for target node** prints the target's `hostname` / `id` / `uptime` from the connectivity probe. +5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node`. +6. **Install RVS on target node** prints the detected `ROCM_MAJOR` and `Installed RVS at: /opt/rocm/extras-/bin/rvs`. +7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target`. +8. Two RVS level steps complete; the run summary shows the results table with both **Orchestrator** and **Target node** rows. ## Debugging a failed run @@ -257,20 +316,42 @@ Watch the Actions tab for: |---|---| | `detect` job exits with `vars.RVS_TARBALL_INDEX_URL is not set` | The required variable is unset. Set it in the repo Variables (e.g. to `https://repo.amd.com/rocm/rvs/tarball/`), or pass `tarball_url` via `workflow_dispatch`. | | `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the URL in `vars.RVS_TARBALL_INDEX_URL` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | -| `test` job stuck "Queued" | No self-hosted runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | -| **Verify ROCm prerequisites** fails: `/opt/rocm/ does not exist` | Runner has no ROCm install. Install ROCm or pick a runner that has it. | -| **Verify ROCm prerequisites** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but the runner has ROCm ``. Either pin a matching tarball with `tarball_url`, or upgrade the runner's ROCm. | -| **Verify ROCm prerequisites** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded. `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | -| **Verify ROCm prerequisites** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to the runner user. Add the user to `video` and `render` groups, log out and back in. | -| **Install RVS** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | -| **Install RVS** fails: `rvs binary not found or not executable at /opt/rocm/extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `/opt/rocm/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | -| **Verify RVS binary library resolution** fails with `not found` | A ROCm runtime library is missing or not in `RPATH`. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | -| `Install RVS` fails with "Permission denied" | Runner user can't `sudo` without password. Fix the runner's sudoers entry. | -| `Run RVS level N` exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing (e.g. `libpci3` on Debian). Check the level log for the specific error. | +| `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | +| **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `vars.RVS_TARGET_NODE` is set. Set the variable, or pass `target_node` via `workflow_dispatch`. | +| **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | +| **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify by `ssh -i $TARGET_USER@$TARGET_NODE hostname` from a workstation. | +| **Setup SSH key for target node** fails: `Connection timed out` / `Connection refused` | Network reachability problem between the orchestrator runner and the target node. Check firewall / VPN / bastion routing. | +| **Setup SSH key for target node** fails: `Host key verification failed` | `ssh-keyscan` couldn't pre-seed the key and `accept-new` rejected it (rare). Remove any stale entry for the target in the runner's `known_hosts`, or pre-populate it manually. | +| **Verify ROCm prerequisites on target node** fails: `/opt/rocm/ does not exist` | Target node has no ROCm install. Install ROCm or pick a different `target_node`. | +| **Verify ROCm prerequisites on target node** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but the target has ROCm ``. Either pin a matching tarball with `tarball_url`, or upgrade the target's ROCm. | +| **Verify ROCm prerequisites on target node** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded on the target. SSH in and `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | +| **Verify ROCm prerequisites on target node** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to `$TARGET_USER`. Add the user to `video` and `render` groups, log out and back in. | +| **Install RVS on target node** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | +| **Install RVS on target node** fails: `sudo: a password is required` | `$TARGET_USER` doesn't have `NOPASSWD` sudo on the target. Add a sudoers entry permitting `mkdir` and `tar` into `/opt/rocm/extras-*` without a password. | +| **Install RVS on target node** fails: `rvs binary not found or not executable at /opt/rocm/extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `/opt/rocm/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | +| **Verify RVS binary library resolution on target node** fails with `not found` | A ROCm runtime library is missing or not in `RPATH` on the target. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | +| **Run RVS level N on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check the level log for the specific error. | +| **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | | Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually with `force=true` to validate. | +## Retargeting at a different node + +There are three ways to point the workflow at a different node, in increasing order of permanence: + +1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir`). Anything left blank falls back to the repo variable, then to the hard-coded default. This is the right path for "test this tarball on host X today". +2. **Single run, from `gh` CLI:** + ```bash + gh workflow run rvs-nightly-tests.yml -f target_node="" + ``` +3. **Permanent change:** update repo variable `RVS_TARGET_NODE` (and optionally `RVS_TARGET_USER` / `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick this up unless an input overrides it. + +The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the +public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` +on **every** node you intend to point the workflow at. + ## References - [RVS source](../../README.md) - [`build-relocatable-packages.yml`](./build-relocatable-packages.yml) and [`README_BUILD_PACKAGES.md`](./README_BUILD_PACKAGES.md) — the upstream packaging pipeline that produces these tarballs - [GitHub Actions: scheduled events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) +- [GitHub Actions: encrypted secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) — for `RVS_TARGET_SSH_KEY` diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 38828838d..882be41bd 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,9 +1,31 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball published at the index URL configured in -# vars.RVS_TARBALL_INDEX_URL once per day, installs it on a -# self-hosted GPU runner, runs RVS levels 3 and 4, and uploads a Markdown -# report + per-level logs as an artifact. +# vars.RVS_TARBALL_INDEX_URL once per day, copies it to a configurable target +# node, installs it there, runs RVS levels 3 and 4 on that node, and uploads a +# Markdown report + per-level logs as an artifact from the GitHub runner. +# +# The GitHub Actions runner ("RVS Runner") only orchestrates. All RVS install, +# binary verification, and rvs -r 3 / -r 4 execution happens on the target node +# reached over SSH. The target node is configurable so the same workflow can be +# pointed at any GPU host without code changes. +# +# Required repo configuration +# --------------------------- +# Variables (Settings → Secrets and variables → Actions → Variables): +# RVS_TARBALL_INDEX_URL HTTP listing the published amdrocm*-rvs-*.tar.gz files. +# RVS_TARGET_NODE Default hostname/IP of the node that runs RVS. +# Can be overridden per-run via workflow_dispatch input. +# RVS_TARGET_USER (Optional) SSH user on the target node. Default: urtiwari. +# RVS_REMOTE_WORK_DIR (Optional) Working dir on the target node. +# Default: /tmp/rvs-nightly-. +# RVS_TEST_RUNNER_LABEL (Optional) Label of the GitHub runner. Default: self-hosted. +# +# Secrets (Settings → Secrets and variables → Actions → Secrets): +# RVS_TARGET_SSH_KEY Private SSH key (in PEM/OpenSSH format) authorized on +# the target node for RVS_TARGET_USER. The user on the +# target node must have NOPASSWD sudo for installs into +# /opt/rocm/extras-. on: schedule: @@ -19,6 +41,18 @@ on: description: 'Run even if the latest tarball matches the last run' type: boolean default: false + target_node: + description: 'Hostname/IP of node to install RVS on and run tests (default: vars.RVS_TARGET_NODE)' + required: false + default: '' + target_user: + description: 'SSH user on the target node (default: vars.RVS_TARGET_USER or "urtiwari")' + required: false + default: '' + remote_work_dir: + description: 'Working dir on the target node (default: vars.RVS_REMOTE_WORK_DIR or /tmp/rvs-nightly-)' + required: false + default: '' permissions: contents: read @@ -32,8 +66,6 @@ env: # Settings → Secrets and variables → Actions → Variables. # Workflow fails fast if unset. TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL }} - # RVS_BIN is populated by the install step based on the ROCm major version - # parsed from the tarball filename (e.g. amdrocm7-rvs-… → extras-7/bin/rvs). jobs: detect: @@ -121,7 +153,7 @@ jobs: key: rvs-nightly-tarball-${{ steps.resolve.outputs.tarball_name }} test: - name: Install RVS and run levels 3 + 4 + name: Install RVS and run levels 3 + 4 (on remote target node) needs: detect if: needs.detect.outputs.should_run == 'true' runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} @@ -129,9 +161,105 @@ jobs: env: TARBALL_URL: ${{ needs.detect.outputs.tarball_url }} TARBALL_NAME: ${{ needs.detect.outputs.tarball_name }} + # Target node where install + tests actually run. Inputs win over repo vars + # so individual runs can be retargeted via workflow_dispatch. + TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER || 'urtiwari' }} + # Workflow-scoped SSH state (in runner.temp so we never touch the runner + # user's own ~/.ssh on a shared self-hosted runner). + SSH_KEY_FILE: ${{ runner.temp }}/rvs_target_key + SSH_CONFIG_FILE: ${{ runner.temp }}/rvs_target_ssh_config steps: - - name: Verify ROCm prerequisites + - name: Validate target node configuration + env: + INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} + VAR_REMOTE_WORK_DIR: ${{ vars.RVS_REMOTE_WORK_DIR }} + run: | + set -euo pipefail + + if [ -z "${TARGET_NODE:-}" ]; then + echo "::error::No target node configured. Set workflow_dispatch input 'target_node' or repo variable 'RVS_TARGET_NODE'." + exit 1 + fi + + if [ -n "${INPUT_REMOTE_WORK_DIR:-}" ]; then REMOTE_WORK_DIR="$INPUT_REMOTE_WORK_DIR" + elif [ -n "${VAR_REMOTE_WORK_DIR:-}" ]; then REMOTE_WORK_DIR="$VAR_REMOTE_WORK_DIR" + else REMOTE_WORK_DIR="/tmp/rvs-nightly-${{ github.run_id }}" + fi + + # Derive ROCm major (and therefore the install dir / RVS binary path) up + # front so every remote step can refer to it without re-parsing. + if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then + ROCM_MAJOR="${BASH_REMATCH[1]}" + else + echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" + exit 1 + fi + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" + + { + echo "REMOTE_WORK_DIR=$REMOTE_WORK_DIR" + echo "ROCM_MAJOR=$ROCM_MAJOR" + echo "INSTALL_DIR=$INSTALL_DIR" + echo "RVS_BIN=$RVS_BIN_PATH" + } >> "$GITHUB_ENV" + + echo "Orchestrator runner : $(hostname)" + echo "Target node : $TARGET_USER@$TARGET_NODE" + echo "Remote work dir : $REMOTE_WORK_DIR" + echo "ROCm major : $ROCM_MAJOR" + echo "Expected RVS binary : $RVS_BIN_PATH" + + - name: Setup SSH key for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} + run: | + set -euo pipefail + if [ -z "${SSH_PRIVATE_KEY:-}" ]; then + echo "::error::secrets.RVS_TARGET_SSH_KEY is not set; cannot SSH to target node." + exit 1 + fi + + # Write key + config to workflow-scoped paths under runner.temp so we + # never modify the runner user's own ~/.ssh on a shared self-hosted runner. + install -m 600 /dev/null "$SSH_KEY_FILE" + printf '%s\n' "$SSH_PRIVATE_KEY" > "$SSH_KEY_FILE" + chmod 600 "$SSH_KEY_FILE" + + # known_hosts is local to this workflow run too. + KNOWN_HOSTS_FILE="${SSH_CONFIG_FILE}.known_hosts" + : > "$KNOWN_HOSTS_FILE" + chmod 600 "$KNOWN_HOSTS_FILE" + # Best-effort host key seeding; StrictHostKeyChecking=accept-new below + # still handles the case where keyscan fails (e.g. behind a bastion). + ssh-keyscan -T 15 -H "$TARGET_NODE" >> "$KNOWN_HOSTS_FILE" 2>/dev/null || true + + cat > "$SSH_CONFIG_FILE" <&1 | sed -n '/^__START__$/,$p' | tail -n +2 + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '$REMOTE_WORK_DIR/pkg' '$REMOTE_WORK_DIR/reports'" + + - name: Verify ROCm prerequisites on target node run: | + set -euo pipefail + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "TARBALL_NAME='$TARBALL_NAME' bash -s" <<'REMOTE' set -uo pipefail fail=0 @@ -144,7 +272,7 @@ jobs: ls -la /opt/rocm | head -20 [ -L /opt/rocm ] && echo "/opt/rocm -> $(readlink /opt/rocm)" else - echo "::error::/opt/rocm/ does not exist; ROCm is not installed on this runner." + echo "::error::/opt/rocm/ does not exist; ROCm is not installed on the target node." fail=1 fi echo @@ -162,13 +290,13 @@ jobs: fi echo - echo "=== Major version match (tarball vs runner) ===" + echo "=== Major version match (tarball vs target node) ===" EXPECTED_MAJOR=$(echo "$TARBALL_NAME" | grep -oE '^amdrocm[0-9]+' | grep -oE '[0-9]+' | head -1) INSTALLED_MAJOR=$(echo "$ROCM_VERSION" | grep -oE '^[0-9]+' | head -1) echo "tarball expects ROCm major : ${EXPECTED_MAJOR:-?}" - echo "runner has ROCm major : ${INSTALLED_MAJOR:-?}" + echo "target has ROCm major : ${INSTALLED_MAJOR:-?}" if [ -n "$EXPECTED_MAJOR" ] && [ -n "$INSTALLED_MAJOR" ] && [ "$EXPECTED_MAJOR" != "$INSTALLED_MAJOR" ]; then - echo "::error::ROCm major version mismatch (tarball=$EXPECTED_MAJOR, runner=$INSTALLED_MAJOR)" + echo "::error::ROCm major version mismatch (tarball=$EXPECTED_MAJOR, target=$INSTALLED_MAJOR)" fail=1 fi echo @@ -182,7 +310,7 @@ jobs: fail=1 fi else - echo "::error::rocm-smi not found on PATH; ROCm runtime tools are missing." + echo "::error::rocm-smi not found on PATH; ROCm runtime tools are missing on target." fail=1 fi echo @@ -194,7 +322,7 @@ jobs: N_GPU=${N_GPU:-0} echo "GPU agents enumerated: $N_GPU" if [ "$N_GPU" -lt 1 ]; then - echo "::error::rocminfo enumerated 0 GPU agents; the runner does not have a usable GPU." + echo "::error::rocminfo enumerated 0 GPU agents; the target node does not have a usable GPU." fail=1 fi else @@ -213,12 +341,13 @@ jobs: echo if [ "$fail" -ne 0 ]; then - echo "::error::ROCm prerequisites check FAILED — refusing to install RVS." + echo "::error::ROCm prerequisites check FAILED on target node — refusing to install RVS." exit 1 fi - echo "::notice::ROCm prerequisites OK${ROCM_VERSION:+ (version $ROCM_VERSION)}" + echo "::notice::ROCm prerequisites OK on target node${ROCM_VERSION:+ (version $ROCM_VERSION)}" + REMOTE - - name: Download tarball + - name: Download tarball on runner run: | set -euo pipefail mkdir -p ./pkg @@ -227,66 +356,83 @@ jobs: ls -la ./pkg/ file "./pkg/${TARBALL_NAME}" || true - - name: Install RVS (detect ROCm major from filename) + - name: Copy tarball to target node run: | set -euo pipefail - PKG="./pkg/${TARBALL_NAME}" + echo "Copying ./pkg/${TARBALL_NAME} -> rvs-target:${REMOTE_WORK_DIR}/pkg/" + scp -q -F "$SSH_CONFIG_FILE" "./pkg/${TARBALL_NAME}" "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "ls -la '${REMOTE_WORK_DIR}/pkg/'" - # Filenames look like amdrocm-rvs--Linux.tar.gz - # e.g. amdrocm7-rvs-1.4.21-r0711.20260423-Linux.tar.gz → MAJOR=7. - if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then - ROCM_MAJOR="${BASH_REMATCH[1]}" - else - echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" - exit 1 - fi - INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" - RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" + - name: Install RVS on target node + run: | + set -euo pipefail + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' bash -s" <<'REMOTE' + set -euo pipefail + PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" echo "Detected ROCm major version : ${ROCM_MAJOR}" echo "Install target : ${INSTALL_DIR}" + echo "Expected RVS binary : ${RVS_BIN}" - sudo mkdir -p "$INSTALL_DIR" - sudo tar -xzf "$PKG" -C "$INSTALL_DIR" + if [ ! -f "$PKG" ]; then + echo "::error::Tarball not found on target node at $PKG" + exit 1 + fi - export LD_LIBRARY_PATH="/opt/rocm/extras-${ROCM_MAJOR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + sudo -n mkdir -p "$INSTALL_DIR" + sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" - if [ ! -x "$RVS_BIN_PATH" ]; then - echo "::error::rvs binary not found or not executable at $RVS_BIN_PATH after install" + if [ ! -x "$RVS_BIN" ]; then + echo "::error::rvs binary not found or not executable at $RVS_BIN after install" ls -la "$INSTALL_DIR/" || true ls -la "$INSTALL_DIR/bin/" || true exit 1 fi - echo "RVS_BIN=$RVS_BIN_PATH" >> "$GITHUB_ENV" - echo "Installed RVS at: $RVS_BIN_PATH" - "$RVS_BIN_PATH" --version || true + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + echo "Installed RVS at: $RVS_BIN" + "$RVS_BIN" --version || true + REMOTE - - name: Verify RVS binary library resolution + - name: Verify RVS binary library resolution on target node run: | set -euo pipefail + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' bash -s" <<'REMOTE' + set -euo pipefail if [ ! -x "$RVS_BIN" ]; then - echo "::error::$RVS_BIN was not produced by tarball extraction." + echo "::error::$RVS_BIN was not produced by tarball extraction on target." exit 1 fi + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" echo "=== ldd $RVS_BIN ===" LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) echo "$LDD_OUTPUT" if echo "$LDD_OUTPUT" | grep -q "not found"; then - echo "::error::RVS binary has unresolved library dependencies (see above)." + echo "::error::RVS binary has unresolved library dependencies on target (see above)." exit 1 fi - echo "::notice::RVS binary's library dependencies resolved OK." + echo "::notice::RVS binary's library dependencies resolved OK on target." + REMOTE - - name: Run RVS level 3 + - name: Run RVS level 3 on target node id: rvs3 run: | set +e - mkdir -p ./reports START=$(date -u +%FT%TZ) - echo "::group::RVS level 3 (${RVS_BIN} -r 3)" - "$RVS_BIN" -r 3 2>&1 | tee ./reports/rvs_level_3.log + echo "::group::RVS level 3 (${RVS_BIN} -r 3) on $TARGET_NODE" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' bash -s" <<'REMOTE' + set +e + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + mkdir -p "${REMOTE_WORK_DIR}/reports" + "$RVS_BIN" -r 3 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_3.log" RC=${PIPESTATUS[0]} + echo "remote_rc=$RC" + exit $RC + REMOTE + RC=$? echo "::endgroup::" END=$(date -u +%FT%TZ) echo "rc=$RC" >> "$GITHUB_OUTPUT" @@ -294,15 +440,23 @@ jobs: echo "end=$END" >> "$GITHUB_OUTPUT" exit 0 - - name: Run RVS level 4 + - name: Run RVS level 4 on target node id: rvs4 run: | set +e - mkdir -p ./reports START=$(date -u +%FT%TZ) - echo "::group::RVS level 4 (${RVS_BIN} -r 4)" - "$RVS_BIN" -r 4 2>&1 | tee ./reports/rvs_level_4.log + echo "::group::RVS level 4 (${RVS_BIN} -r 4) on $TARGET_NODE" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' bash -s" <<'REMOTE' + set +e + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + mkdir -p "${REMOTE_WORK_DIR}/reports" + "$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" RC=${PIPESTATUS[0]} + echo "remote_rc=$RC" + exit $RC + REMOTE + RC=$? echo "::endgroup::" END=$(date -u +%FT%TZ) echo "rc=$RC" >> "$GITHUB_OUTPUT" @@ -310,6 +464,20 @@ jobs: echo "end=$END" >> "$GITHUB_OUTPUT" exit 0 + - name: Collect logs from target node + if: always() + run: | + set -euo pipefail + mkdir -p ./reports + if [ ! -f "$SSH_CONFIG_FILE" ]; then + echo "::warning::SSH config not present; skipping log collection." + exit 0 + fi + echo "Copying logs from rvs-target:${REMOTE_WORK_DIR}/reports/ -> ./reports/" + scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/*.log" ./reports/ || \ + echo "::warning::No log files retrieved from target node (tests may have failed before producing output)." + ls -la ./reports/ || true + - name: Build test report id: report run: | @@ -326,7 +494,17 @@ jobs: OVERALL=FAIL fi - RVS_VERSION=$("$RVS_BIN" --version 2>/dev/null | head -1 || echo "unknown") + # Query the actual version from the target so the report reflects the + # binary the tests ran against, not a stale local copy. + RVS_VERSION=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + "$RVS_BIN" --version 2>/dev/null + REMOTE + ) + + TARGET_HOSTNAME=$(ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'hostname' 2>/dev/null || echo "$TARGET_NODE") REPORT=./reports/SUMMARY.md { @@ -336,7 +514,9 @@ jobs: echo "|---|---|" echo "| Run | [\`${{ github.run_id }}\`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |" echo "| Trigger | \`${{ github.event_name }}\` |" - echo "| Runner | \`$(hostname)\` |" + echo "| Orchestrator (GitHub runner) | \`$(hostname)\` |" + echo "| Target node (test execution) | \`${TARGET_HOSTNAME}\` (\`${TARGET_USER}@${TARGET_NODE}\`) |" + echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" echo "| Tarball | \`${TARBALL_NAME}\` |" echo "| Source URL | ${TARBALL_URL} |" echo "| RVS version | \`${RVS_VERSION}\` |" @@ -346,8 +526,8 @@ jobs: echo "" echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" echo "|---|---|:--:|---:|---|---|" - echo "| Level 3 | \`${RVS_BIN} -r 3\` | ${S3} | ${RC3} | ${{ steps.rvs3.outputs.start }} | ${{ steps.rvs3.outputs.end }} |" - echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" + echo "| Level 3 | \`${RVS_BIN} -r 3\` (on \`${TARGET_HOSTNAME}\`) | ${S3} | ${RC3} | ${{ steps.rvs3.outputs.start }} | ${{ steps.rvs3.outputs.end }} |" + echo "| Level 4 | \`${RVS_BIN} -r 4\` (on \`${TARGET_HOSTNAME}\`) | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" echo "" echo "## Logs" echo "" @@ -377,6 +557,19 @@ jobs: retention-days: 30 if-no-files-found: warn + - name: Cleanup remote work dir and local SSH state + if: always() + run: | + set +e + if [ -n "${REMOTE_WORK_DIR:-}" ] && [ -f "$SSH_CONFIG_FILE" ]; then + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "rm -rf '${REMOTE_WORK_DIR}'" || \ + echo "::warning::Failed to clean up ${REMOTE_WORK_DIR} on target node." + fi + # Scrub the private key + config from the runner so they cannot linger + # between jobs on a shared self-hosted runner. runner.temp is also + # cleaned automatically by the runner, this is just defense in depth. + rm -f "$SSH_KEY_FILE" "$SSH_CONFIG_FILE" "${SSH_CONFIG_FILE}.known_hosts" + - name: Fail the job if any level failed if: steps.report.outputs.overall == 'FAIL' run: | From 418b773a01599dda181f5034eca12ec735e7956a Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 19 May 2026 12:15:31 -0400 Subject: [PATCH 158/275] Removed the userID and IPs from the files Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 14 +++++++------- .github/workflows/rvs-nightly-tests.yml | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index e1b4800bb..0a2a91c74 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -58,7 +58,7 @@ adjust the cron string in the workflow if your publish cadence is different. | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | | `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | | `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | -| `target_user` | _(empty → `vars.RVS_TARGET_USER`, then `urtiwari`)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | +| `target_user` | _(empty → `vars.RVS_TARGET_USER`)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | Workflow inputs **win over repo variables**, so individual `workflow_dispatch` @@ -69,8 +69,8 @@ Example — point a single run at a specific node: ```bash gh workflow run rvs-nightly-tests.yml \ -f tarball_url="/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ - -f target_node="10.245.134.83" \ - -f target_user="urtiwari" \ + -f target_node="x.x.x.x" \ + -f target_user="userID" \ -f force=true ``` @@ -88,7 +88,7 @@ gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" |---|---|---| | `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | -| `RVS_TARGET_USER` | optional (default `urtiwari`) | SSH user on the target node. | +| `RVS_TARGET_USER` | optional | SSH user on the target node. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | @@ -248,7 +248,7 @@ e.g.: | Run | `1234567890` | | Trigger | `schedule` | | Orchestrator (GitHub runner) | `gha-orchestrator-01` | -| Target node (test execution) | `e16u07` (`urtiwari@10.245.134.83`) | +| Target node (test execution) | `hostname` (`user@x.x.x.x`) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | @@ -259,8 +259,8 @@ e.g.: | Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | |---------|------------------------------------------------------|:------:|-----:|-----------------------|-----------------------| -| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` (on `e16u07`) | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | -| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` (on `e16u07`) | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | +| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` (on `hostname`) | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | +| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` (on `hostname`) | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | ``` The full artifact contents: diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 882be41bd..c33447517 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -16,7 +16,7 @@ name: RVS Nightly Tests # RVS_TARBALL_INDEX_URL HTTP listing the published amdrocm*-rvs-*.tar.gz files. # RVS_TARGET_NODE Default hostname/IP of the node that runs RVS. # Can be overridden per-run via workflow_dispatch input. -# RVS_TARGET_USER (Optional) SSH user on the target node. Default: urtiwari. +# RVS_TARGET_USER (Optional) SSH user on the target node. # RVS_REMOTE_WORK_DIR (Optional) Working dir on the target node. # Default: /tmp/rvs-nightly-. # RVS_TEST_RUNNER_LABEL (Optional) Label of the GitHub runner. Default: self-hosted. @@ -46,7 +46,7 @@ on: required: false default: '' target_user: - description: 'SSH user on the target node (default: vars.RVS_TARGET_USER or "urtiwari")' + description: 'SSH user on the target node (default: vars.RVS_TARGET_USER)' required: false default: '' remote_work_dir: @@ -164,7 +164,7 @@ jobs: # Target node where install + tests actually run. Inputs win over repo vars # so individual runs can be retargeted via workflow_dispatch. TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} - TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER || 'urtiwari' }} + TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER }} # Workflow-scoped SSH state (in runner.temp so we never touch the runner # user's own ~/.ssh on a shared self-hosted runner). SSH_KEY_FILE: ${{ runner.temp }}/rvs_target_key From 5235f39d65b9bc77238faf72737373aba7413d5b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 15 May 2026 16:49:46 -0500 Subject: [PATCH 159/275] Update README and user guide with additions and improvements Update Readme and Userguide cli example and missing common config. Update PBQT and PEBB config. table. Update GST config. table. Update IET config. table. Minor corrections Add Babel and Mem module in userguide. Added Table of contents Update missing parameters --- README.md | 4 +- docs/install/installation.rst | 6 +- docs/ug1main.md | 900 ++++++++++++++++++++++++++++++---- 3 files changed, 818 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 5bdb1bbae..60ea7d049 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,11 @@ cmake -B ./build -DROCM_PATH=/opt/rocm -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_ ### Build binary ``` -make -C ./build +make -C ./build -j $(nproc) ``` **Note:** -Use the `-j` option with the build command to enable parallel compilation, which can significantly speed up the build process. +`$(nproc)` automatically uses all available CPU cores for parallel compilation, which can significantly speed up the build process. You can replace it with a specific number (e.g., `-j 8`) to limit core usage. ### Build package diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 6a0d24b00..e3f80e3c3 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -154,7 +154,11 @@ For example, if ROCm 5.5 was installed, run the following command: .. code-block:: - make -C ./build + make -C ./build -j $(nproc) + +.. Note:: + + ``$(nproc)`` automatically uses all available CPU cores for parallel compilation, which can significantly speed up the build process. You can replace it with a specific number (e.g., ``-j 8``) to limit core usage. 4. Build the package. diff --git a/docs/ug1main.md b/docs/ug1main.md index 1aee88909..635a5ea86 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -1,5 +1,32 @@ # User Guide +## Table of Contents + +- [Introduction](#introduction) +- [Installing RVS](#installing-rvs) + - [Building from Source Code](#building-from-source-code) + - [Installing from Package](#installing-from-package) + - [Running RVS](#running-rvs) +- [Basic Concepts](#basic-concepts) + - [RVS Architecture](#rvs-architecture) + - [Available Modules](#available-modules) + - [Command Line Options](#command-line-options) + - [Configuration Files](#configuration-files) + - [Common Configuration Keys](#common-configuration-keys) +- [GPUP Module](#gpup-module) +- [GM Module](#gm-module) +- [PESM Module](#pesm-module) +- [RCQT Module](#rcqt-module) +- [PEQT Module](#peqt-module) +- [SMQT Module](#smqt-module) +- [PBQT Module](#pbqt-module) +- [PEBB Module](#pebb-module) +- [GST Module](#gst-module) +- [IET Module](#iet-module) +- [Pulse Module](#pulse-module) +- [MEM Module](#mem-module) +- [BABEL Module](#babel-module) + ## Introduction The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that @@ -152,6 +179,147 @@ The Memory module tests the GPU memory for hardware errors and soft errors using #### BABEL benchmark Test - BABEL module The Babel module executes BabelStream (synthetic GPU benchmark based on the original STREAM benchmark for CPUs) benchmark that measures memory transfer rates (bandwidth) to and from global device memory. Various benchmark tests are implemented using GPU kernels in HIP (Heterogeneous Interface for Portability) programming language. +### Command Line Options + +Command line options are summarized in the table below: + +> **Note:** Command line options take precedence over the same parameters set in the configuration file. For example, if `parallel: false` is specified in the configuration file but `-p true` is passed on the command line, parallel execution will be enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Short optionLong option Description
-a--appendLogWhen generating a debug logfile, do not overwrite the content +of the current log. Use in conjuction with -d and -l options. +
-c--configSpecify the test configuration file to use. +This is a mandatory field for test execution. +
-r--runSpecify the test level to run. +Valid range is 1 to 5, with 5 indicating the highest stress test level. +
-d--debugLevelSpecify the debug level for the output log. +The range is 0-5 with 5 being the highest verbose level. +
-g--listGpusList all the GPUs available in the machine, +that RVS supports and has visibility. +
-i--indexesComma separated list of GPU ids/indexes to run test on. +This overrides the device/device_index parameter values specified for every actions in the +configuration file, including the all value. +
-s--selectActionsComma separated list of action names or 0-based action +index numbers to run from the configuration file. Only the matching actions will be executed. +All other actions are skipped. +
-j--jsonGenerate output file in JSON format. +if a path follows this argument, that will be used as json log file; +else a file created in /var/tmp/ with timestamp in name. +
-l--debugLogFileGenerate log file with output and debug information. +
-m--moduleSpecify a module name to run the corresponding +platform-specific (MI-series GPUs) module configuration file. Valid modules: babel, gpup, +gst, iet, mem, pebb, peqt, pbqt, rcqt. +
-t--listTestsList the test modules present in RVS. +
-v--verboseEnable detailed logging. Equivalent to specifying -d 5 option. +
-p--parallelEnables or Disables parallel execution across multiple GPUs. +Use this option in conjunction with -c option. +Accepted Values: +true – Enables parallel execution. +false – Disables parallel execution. +If no value is provided for the option, it defaults to true. +
-n--numTimesNumber of times the test repeatedly executes. +Use this option in conjunction with -c option. +
--quietNo console output given. See logs and return +code for errors.
--versionDisplays the version information and exits. +
-h--helpDisplay usage information and exit. +
+ +#### Examples + +Print version information and exit: +```bash +./rvs --version +``` + +List all available test modules: +```bash +./rvs -t +``` +List all GPUs visible to RVS: +```bash +./rvs -g +``` + +Run a specific configuration file: +```bash +./rvs -c conf/gst_single.conf +``` + +Repeat a test 5 times in sequence (soak/stability testing): +```bash +./rvs -c conf/gst_single.conf -n 5 +``` + +Run only the GST module using the built-in platform configuration: +```bash +./rvs -m gst +``` + +Run a configuration file at stress level 3: +```bash +./rvs -c conf/gst_single.conf -r 3 +``` + +Run a configuration file on specific GPUs (by index) with parallel execution enabled: +```bash +./rvs -c conf/gst_single.conf -i 0,1 -p true +``` + +Run only selected actions from a configuration file (by name or 0-based index): +```bash +./rvs -c conf/iet_single.conf -s action_1,action_2 +./rvs -c conf/iet_single.conf -s 0,2 +``` + +Generate JSON output to a specific file: +```bash +./rvs -c conf/gst_single.conf -j /tmp/rvs_results.json +``` + +Run with verbose logging and save the log to a file: +```bash +./rvs -c conf/gst_single.conf -v -l /tmp/rvs_debug.log +``` + +Suppress console output and write results to a JSON file (useful in CI pipelines): +```bash +./rvs -c conf/gst_single.conf --quiet -j /tmp/rvs_results.json +``` ### Configuration Files @@ -240,86 +408,14 @@ modules will ignore this parameter. will be used in the execution of the action. Each module has a set of sub-tests or sub-actions that can be configured based on its specific parameters. - - -### Command Line Options - -Command line options are summarized in the table below: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Short optionLong option Description
-a--appendLogWhen generating a debug logfile, do not overwrite the content -of the current log. Use in conjuction with -d and -l options. -
-c--configSpecify the test configuration file to use. -This is a mandatory field for test execution. -
-r--runSpecify the test level to run. -Valid range is 1 to 5, with 5 indicating the highest stress test level. -
-d--debugLevelSpecify the debug level for the output log. -The range is 0-5 with 5 being the highest verbose level. -
-g--listGpusList all the GPUs available in the machine, -that RVS supports and has visibility. -
-i--indexesComma separated list of GPU ids/indexes to run test on. -This overrides the device/device_index parameter values specified for every actions in the -configuration file, including the all value. -
-s--selectActionsComma separated list of action names or 0-based action -index numbers to run from the configuration file. Only the matching actions will be executed. -All other actions are skipped. -
-j--jsonGenerate output file in JSON format. -if a path follows this argument, that will be used as json log file; -else a file created in /var/tmp/ with timestamp in name. -
-l--debugLogFileGenerate log file with output and debug information. -
-m--moduleSpecify a module name to run the corresponding -platform-specific (MI-series GPUs) module configuration file. Valid modules: babel, gpup, -gst, iet, mem, pebb, peqt, pbqt, rcqt. -
-t--listTestsList the test modules present in RVS. -
-v--verboseEnable detailed logging. Equivalent to specifying -d 5 option. -
-p--parallelEnables or Disables parallel execution across multiple GPUs. -Use this option in conjunction with -c option. -Accepted Values: -true – Enables parallel execution. -false – Disables parallel execution. -If no value is provided for the option, it defaults to true. -
-n--numTimesNumber of times the test repeatedly executes. -Use this option in conjunction with -c option. -
--quietNo console output given. See logs and return -code for errors.
--versionDisplays the version information and exits. -
-h--helpDisplay usage information and exit. -
log_intervalIntegerThis specifies how often, in +milliseconds, the module emits a progress or status log message during a +running test. If a value isn't specified the default is 1000 ms. Some modules +will ignore this parameter.
+ ## GPUP Module The GPU properties module provides an interface to easily dump the static characteristics of a GPU. This information is stored in the sysfs file system @@ -790,7 +886,11 @@ Monitoring is performed by polling respective PCIe registers roughly every 1ms monitorBoolThis key is set to true, the PESM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring will be stopped for all devices. - + +debugwaitIntegerDebug wait period in milliseconds +inserted before monitoring begins. Intended for development and debugging use. +The default value is 0 (no wait). + ### Output @@ -1513,6 +1613,75 @@ key will be performed. This is a positive integer indicating type of link to be included in bandwidth test. Numbering follows that listed in **hsa\_amd\_link\_info\_type\_t** in **hsa\_ext\_amd.h** file. + +b2bBool +If true, transfers are run back-to-back continuously for the full test +duration. Only applicable when using the native transfer method. If not +specified the default value is false. + +hot_callsInteger +Number of timed transfer iterations used to measure bandwidth. If not +specified the default value is 1. + +warm_callsInteger +Number of warm-up transfer iterations run before timing begins. Warm-up +iterations are not included in the bandwidth measurement. If not specified +the default value is 1. + +transfer_methodString +Transfer backend to use. Accepted values: +native – Use the ROCm native SDMA transfer path (default). +transferbench – Use the TransferBench library as the transfer backend. +If not specified the default is native. + +transferbench_testString +TransferBench test type. Only applicable when +transfer_method: transferbench. Accepted values: +p2p – Point-to-point transfer test (default). +alltoall – All-to-all transfer test across all participating GPUs. +If not specified the default is p2p. + +executorString +Execution engine used by TransferBench. Only applicable when +transfer_method: transferbench. Accepted values: +gfx – Use GPU shader kernels (default). +dma – Use the DMA engine. +If not specified the default is gfx. + +subexecutorInteger +Number of sub-executors (wavefronts or threads) per transfer. Only +applicable when transfer_method: transferbench. If not specified the +default value is 1. + +gfx_unrollInteger +Unroll factor for the GFX shader kernel. Only applicable when +transfer_method: transferbench and executor: gfx. If not +specified the default value is 4. + +use_remote_readInteger +If set to 1, transfers use remote read instead of remote write. If not +specified the default value is 0 (remote write). + +a2a_modeInteger +All-to-all transfer pattern mode. Only applicable when +transferbench_test: alltoall. If not specified the default value is +0. + +a2a_directInteger +If set to 1, enables direct peer-to-peer transfers in the all-to-all +test. Only applicable when transferbench_test: alltoall. If not +specified the default value is 1. + +a2a_localInteger +If set to 1, includes local (same-GPU) transfers in the all-to-all test. +Only applicable when transferbench_test: alltoall. If not specified +the default value is 0. + +a2a_num_gpusInteger +Number of GPUs to include in the all-to-all test. A value of 0 means all +detected GPUs are included. Only applicable when +transferbench_test: alltoall. If not specified the default value is +0. Please note that suitable values for **log\_interval** and **duration** depend @@ -1862,6 +2031,59 @@ key will be performed. This is a positive integer indicating type of link to be included in bandwidth test. Numbering follows that listed in **hsa\_amd\_link\_info\_type\_t** in **hsa\_ext\_amd.h** file. + +b2bBool +If true, transfers are run back-to-back continuously for the full test +duration. Only applicable when using the native transfer method. If not +specified the default value is false. + +hot_callsInteger +Number of timed transfer iterations used to measure bandwidth. If not +specified the default value is 1. + +warm_callsInteger +Number of warm-up transfer iterations run before timing begins. Warm-up +iterations are not included in the bandwidth measurement. If not specified +the default value is 1. + +transfer_methodString +Transfer backend to use. Accepted values: +native – Use the ROCm native SDMA transfer path (default). +transferbench – Use the TransferBench library as the transfer backend. +If not specified the default is native. + +executorString +Execution engine used by TransferBench. Only applicable when +transfer_method: transferbench. Accepted values: +gfx – Use GPU shader kernels (default). +dma – Use the DMA engine. +If not specified the default is gfx. + +subexecutorInteger +Number of sub-executors (wavefronts or threads) per transfer. Only +applicable when transfer_method: transferbench. If not specified the +default value is 1. + +gfx_unrollInteger +Unroll factor for the GFX shader kernel. Only applicable when +transfer_method: transferbench and executor: gfx. If not +specified the default value is 4. + +source_memoryString +Memory type for the transfer source. Only applicable when +transfer_method: transferbench. Accepted values: +cpu – System (host) memory. +gpu – GPU device memory. +null – No explicit memory allocation; let TransferBench decide (default). +If not specified the default is null. + +destination_memoryString +Memory type for the transfer destination. Only applicable when +transfer_method: transferbench. Accepted values: +cpu – System (host) memory. +gpu – GPU device memory. +null – No explicit memory allocation; let TransferBench decide (default). +If not specified the default is null. Please note that suitable values for **log\_interval** and **duration** depend @@ -1918,8 +2140,8 @@ Module specific output keys are described in the table below: interval_bandwidthFloat -The average bandwidth of a p2p transfer, during the log_interval time -period.\n This field may also take values: +The average bandwidth of a CPU-to-GPU or GPU-to-CPU transfer, during the +log_interval time period.\n This field may also take values: - (pending) - this means that no measurement has taken place yet. - xxxGBps (*) - this means no measurement within current log_interval but @@ -1927,8 +2149,8 @@ average from previous measurements is displayed. bandwidthFloat -The average bandwidth of a p2p transfer, averaged over the entire test -duration of the interval. This field may also take value: +The average bandwidth of a CPU-to-GPU or GPU-to-CPU transfer, averaged +over the entire test duration. This field may also take value: - (not measured) - this means no test transfer completed for those peers. You may need to increase test duration. @@ -2115,7 +2337,7 @@ duration specified by the action, sustaining the stress load during that time. toleranceFloat A value indicating how much the target_stress can fluctuate after the ramp -period for the test to succeed. The default value is 0.1 or 10%. +period for the test to succeed. The default value is 0.05 (5%). max_violationsInteger The number of tolerance violations that can occur after the ramp_interval for the test to still pass. The default value is 0. @@ -2124,8 +2346,151 @@ for the test to still pass. The default value is 0. interval over which the moving average of the bandwidth will be calculated and logged. matrix_sizeInteger -Size of the matrices of the SGEMM operations. The default value is +Sets all three matrix dimensions (M, N, and K) to the same value. Equivalent +to setting matrix_size_a, matrix_size_b, and matrix_size_c +to the same value. The default value is 5760. +matrix_size_aInteger +Number of rows of matrix A (the M dimension in GEMM). Overrides +matrix_size for this dimension. The default value is 5760. +matrix_size_bInteger +Number of columns of matrix B (the N dimension in GEMM). Overrides +matrix_size for this dimension. The default value is 5760. +matrix_size_cInteger +Inner (shared) dimension K of the GEMM operation (columns of A / rows of B). +Overrides matrix_size for this dimension. The default value is 5760. + +ops_typeString +GEMM operation type. Accepted values: sgemm, dgemm, +hgemm. If neither ops_type nor data_type is set, the +module defaults to sgemm. Mutually exclusive with data_type. + +data_typeString +Data type for the GEMM computation. Accepted values include: +fp4_r, fp6_r, fp8_r, bf16_r, fp16_r, +fp32_r, tf32_r (xf32_r), i8_r. If not specified +the module falls back to the type implied by ops_type. + +out_data_typeString +Output (result) data type, e.g. fp16_r, fp32_r. Only +applicable when using hipBLASLt. If not specified the default matches the +compute type. + +compute_typeString +Accumulation/compute type used internally by the BLAS library. If not +specified the default is fp32_r. + +blas_sourceString +BLAS library backend to use. Accepted values: +rocblas (default), hipblaslt. + +hot_callsInteger +Number of GEMM kernel invocations per measurement window used to amortise +launch overhead. The default value is 1. + +matrix_initString +Matrix initialization method. Accepted values: +default – Initialize with default pattern (default). +trig – Initialize with trigonometric (sine/cosine) values. +random – Initialize with random values. + +transaInteger +Transpose operation applied to matrix A before the GEMM call. +0 = no transpose (default), 1 = transpose. + +transbInteger +Transpose operation applied to matrix B before the GEMM call. +0 = no transpose, 1 = transpose (default). + +alphaFloat +Scalar multiplier applied to the product of matrices A and B in the GEMM +operation (C = alpha * A * B + beta * C). The default value is 1. + +betaFloat +Scalar multiplier applied to matrix C in the GEMM operation. The default +value is 1. + +ldaInteger +Leading dimension offset added to the computed leading dimension of matrix +A. The default value is 0. + +ldbInteger +Leading dimension offset added to the computed leading dimension of matrix +B. The default value is 0. + +ldcInteger +Leading dimension offset added to the computed leading dimension of matrix +C. The default value is 0. + +lddInteger +Leading dimension offset added to the computed leading dimension of matrix +D (output). The default value is 0. + +scale_aString +Scaling mode applied to matrix A. Used with low-precision types such as +fp8. Accepted values include block. If not specified no scaling is +applied. + +scale_bString +Scaling mode applied to matrix B. Used with low-precision types such as +fp8. Accepted values include block. If not specified no scaling is +applied. + +rotatingInteger +Size of the rotating buffer (in elements) used to prevent data from +residing in cache between iterations, enabling cache-cold benchmarking. A +value of 0 disables rotating buffers. The default value is 0. + +gemm_modeString +GEMM execution mode. Accepted values: +"" or unset – Standard (single) GEMM (default). +batched – Batched GEMM; use with batch_size. +strided_batched – Strided batched GEMM; use with batch_size and +stride_* keys. + +batch_sizeInteger +Number of GEMM operations in a batched or strided-batched call. Only +applicable when gemm_mode is batched or +strided_batched. The default value is 0. + +stride_aInteger +Stride (in elements) between consecutive matrices A in a strided-batched +GEMM. Only applicable when gemm_mode: strided_batched. The default +value is 0. + +stride_bInteger +Stride (in elements) between consecutive matrices B in a strided-batched +GEMM. The default value is 0. + +stride_cInteger +Stride (in elements) between consecutive matrices C in a strided-batched +GEMM. The default value is 0. + +stride_dInteger +Stride (in elements) between consecutive output matrices D in a +strided-batched GEMM. The default value is 0. + +self_checkBool +If true, validates the GEMM result for correctness after each operation. +Adds overhead; intended for debugging. The default value is false. + +accuracy_checkBool +If true, runs a numerical accuracy check after each GEMM operation. The +default value is false. + +error_injectBool +If true, enables error injection mode to deliberately introduce errors +into the computation for testing error detection. The default value is +false. + +error_freqInteger +Frequency of error injection; specifies how often (every N operations) an +error is injected. Only applicable when error_inject: true. The +default value is 0. + +error_countInteger +Number of errors to inject per injection event. Only applicable when +error_inject: true. The default value is 0. ### Output @@ -2146,8 +2511,8 @@ the ramp interval. Flops (floating point operations) per operation queued to the GPU queue. One operation is one call to SGEMM/DGEMM. bytes_copied_per_opInteger -Calculated number of ops/second necessary to achieve target -gigaflops. +Number of bytes copied to the GPU per GEMM operation when +copy_matrix is true. try_ops_per_secFloat Calculated number of ops/second necessary to achieve target gigaflops. @@ -2392,19 +2757,150 @@ is 5000 (5 seconds). This time is counted against the duration of the test. toleranceFloat A value indicating how much the target_power can fluctuate after the ramp -period for the test to succeed. The default value is 0.1 or 10%. +period for the test to succeed. The default value is 0 (any violation +immediately fails the test). max_violationsInteger The number of tolerance violations that can occur after the ramp_interval for the test to still pass. The default value is 0. sample_intervalInteger The sampling rate for target_power values given in milliseconds. The default -value is 100 (.1 seconds). +value is 1000 (1 second). log_intervalInteger This is a positive integer, given in milliseconds, that specifies an interval over which the moving average of the bandwidth will be calculated and logged. + +cp_workloadBool +If true, enables the GEMM compute workload to drive GPU power. This is the +primary workload used to reach the target power level. The default value is +true. + +bw_workloadBool +If true, enables a memory bandwidth kernel workload in addition to or +instead of the GEMM workload. The default value is false. + +wg_countInteger +Number of GPU workgroups used for the bandwidth kernel. Only applicable +when bw_workload: true. The default value is 80. + +nt_loadsBool +If true, the bandwidth kernel uses non-temporal loads that bypass the L2 +cache, exercising memory bandwidth more directly. Only applicable when +bw_workload: true. The default value is false. + +matrix_sizeInteger +Sets all three GEMM matrix dimensions (M, N, and K) to the same value. +Equivalent to setting matrix_size_a, matrix_size_b, and +matrix_size_c to the same value. The default value is 5760. + +matrix_size_aInteger +Number of rows of matrix A (the M dimension in GEMM). Overrides +matrix_size for this dimension. Default is 0 (uses +matrix_size). + +matrix_size_bInteger +Number of columns of matrix B (the N dimension in GEMM). Overrides +matrix_size for this dimension. Default is 0 (uses +matrix_size). + +matrix_size_cInteger +Inner (shared) dimension K of the GEMM operation. Overrides +matrix_size for this dimension. Default is 0 (uses +matrix_size). + +ops_typeString +GEMM operation type. Accepted values: sgemm, dgemm, +hgemm. If neither ops_type nor data_type is set, the +module defaults to sgemm. Mutually exclusive with +data_type. + +data_typeString +Data type for the GEMM computation. Accepted values include: +fp4_r, fp6_r, fp8_r, bf16_r, fp16_r, +fp32_r, tf32_r (xf32_r), i8_r. If not specified +the module falls back to the type implied by ops_type. + +out_data_typeString +Output (result) data type, e.g. fp16_r, fp32_r. Only +applicable when using hipBLASLt. If not specified the default matches the +compute type. + +compute_typeString +Accumulation/compute type used internally by the BLAS library. If not +specified the default is fp32_r. + +blas_sourceString +BLAS library backend to use. Accepted values: +rocblas (default), hipblaslt. + +hot_callsInteger +Number of GEMM kernel invocations per measurement window used to amortise +launch overhead. The default value is 1. + +matrix_initString +Matrix initialization method. Accepted values: +default – Initialize with default pattern (default). +trig – Initialize with trigonometric (sine/cosine) values. +random – Initialize with random values. + +transaInteger +Transpose operation applied to matrix A before the GEMM call. +0 = no transpose (default), 1 = transpose. + +transbInteger +Transpose operation applied to matrix B before the GEMM call. +0 = no transpose, 1 = transpose (default). + +alphaFloat +Scalar multiplier applied to the product of matrices A and B +(C = alpha * A * B + beta * C). The default value is 1. + +betaFloat +Scalar multiplier applied to matrix C in the GEMM operation. The default +value is 1. + +ldaInteger +Leading dimension offset for matrix A. The default value is 0. + +ldbInteger +Leading dimension offset for matrix B. The default value is 0. + +ldcInteger +Leading dimension offset for matrix C. The default value is 0. + +lddInteger +Leading dimension offset for matrix D (output). The default value is +0. + +gemm_modeString +GEMM execution mode. Accepted values: +"" or unset – Standard (single) GEMM (default). +batched – Batched GEMM; use with batch_size. +strided_batched – Strided batched GEMM; use with batch_size +and stride_* keys. + +batch_sizeInteger +Number of GEMM operations in a batched or strided-batched call. Only +applicable when gemm_mode is batched or +strided_batched. The default value is 0. + +stride_aInteger +Stride (in elements) between consecutive matrices A in a +strided-batched GEMM. The default value is 0. + +stride_bInteger +Stride (in elements) between consecutive matrices B in a +strided-batched GEMM. The default value is 0. + +stride_cInteger +Stride (in elements) between consecutive matrices C in a +strided-batched GEMM. The default value is 0. + +stride_dInteger +Stride (in elements) between consecutive output matrices D in a +strided-batched GEMM. The default value is 0. @@ -2417,7 +2913,7 @@ Module specific output keys are described in the table below: current_powerTime Series Floats The current measured power of the GPU. power_violationsInteger -The number of power reading that violated the tolerance of the test after +The number of power readings that violated the tolerance of the test after the ramp interval. passBool @@ -2633,6 +3129,7 @@ Keys below are in addition to **common** keys (**name**, **module**, **device**, halt_on_errorBoolIf **true**, stop the GPU thread on first BLAS or thermal error. Default false. hot_callsIntegerBLAS “hot call” / warmup-related parameter forwarded to **rvs_blas**. Default 1. gpu_sync_waitIntegerDefault 10000. Parsed from configuration; **not** referenced by the current barrier implementation (placeholder for future timeout behavior). +max_temp_cFloatJunction temperature ceiling in degrees Celsius. If the GPU junction temperature exceeds this threshold during the run, the worker logs a thermal-violation error and, when halt_on_error is true, terminates that GPU thread. Default 105.0. ### Output @@ -2680,3 +3177,228 @@ Run from the build or package **bin** directory, for example: - Tune **matrix_size**, **pulse_rate**, and **high_phase_ratio** to match GPU class and the transient behavior you want to stress. - **hipBLASLt** often delivers higher GEMM throughput than rocBLAS on supported GPUs; **fp16_r** / **hgemm** with **compute_type: fp32_r** is a common high-throughput choice (as in the **pulse_stress_fp16** action in **pulse_single.conf**). + +## MEM Module + +The Memory module tests GPU memory for hardware errors and soft errors using +HIP. It executes a configurable suite of memory test algorithms that exercise +various data patterns and access sequences. Each test can be individually +included or excluded. The module reports errors found per test and passes only +if no memory errors are detected. + +The following tests are available (referenced by index in `exclude`): + +| Index | Test Name | +|---|---| +| 0 | Walking 1 bit | +| 1 | Own address test | +| 2 | Moving inversions, ones & zeros | +| 3 | Moving inversions, 8-bit pattern | +| 4 | Moving inversions, random pattern | +| 5 | Block move, 64 moves | +| 6 | Moving inversions, 32-bit pattern | +| 7 | Random number sequence | +| 8 | Modulo 20, random pattern | +| 9 | Bit fade test | +| 10 | Memory stress test | + +### Module Specific Keys + + + + + + + + + + + + + + + + + +
Config Key Type Description
mem_blocksIntegerNumber of GPU memory blocks used per test iteration. The default value is +256.
num_passesIntegerNumber of passes (repeats) per block in each test. The default value is +1.
thrds_per_blkIntegerNumber of HIP threads per block launched for each test kernel. The default +value is 128.
stressBoolIf true, enables the memory stress test (Test 10) in addition to the +standard tests. The default value is false.
mapped_memoryBoolIf true, uses host-mapped (pinned) memory instead of device memory for the +test buffers. The default value is false.
num_iterIntegerNumber of iterations to run per test. The default value is 1.
excludeCollection of IntegersSpace-separated list of test indices (0–10) to skip. All tests not listed +here will be executed. For example, exclude: 9 10 skips the bit fade +and memory stress tests.
+ +### Output + + + + + + + + + + + +
Output Key Type Description
TestStringName of the memory test that was executed.
Time TakenFloatTime in seconds taken to complete the test on this GPU.
errorsIntegerNumber of memory errors detected during the test. A value of 0 indicates +no errors.
passBoolTrue if no memory errors were detected for this test.
+ +### Examples + +**Example 1:** + +Run all tests in parallel on all GPUs, excluding bit fade (9) and stress (10): + + actions: + - name: action_1 + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 50000 + exclude: 9 10 + +Run with: + + ./rvs -c conf/mem.conf -d 3 + +The test passes if no memory errors are detected on any GPU. A typical result +message looks like: + + [RESULT][][action_1] mem Test 1 [Walking 1 bit] : pass: true errors: 0 Time Taken: 0.652 s + [RESULT][][action_1] mem Test 2 [Own address test] : pass: true errors: 0 Time Taken: 0.423 s + + +## BABEL Module + +The BABEL module executes BabelStream benchmark tests that measure GPU memory +bandwidth. BabelStream is a synthetic benchmark based on the STREAM benchmark +for CPUs. It runs configurable memory kernels (Copy, Mul, Add, Triad, Dot, +Read, Write) using HIP and reports the achieved bandwidth in GB/s or GiB/s for +each kernel. The benchmark is useful for characterizing peak memory bandwidth +and detecting bandwidth regressions. + +### Module Specific Keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Config Key Type Description
array_sizeIntegerSize of the test buffer in bytes (or in mebibytes if mibibytes: true). +The default value is 33554432 (32 MB).
test_typeIntegerData precision used for the benchmark. Accepted values: +1 – Float (32-bit, default). +2 – Double (64-bit). +3 – Triad float. +4 – Triad double.
num_iterIntegerNumber of kernel launch iterations. Used when duration is 0. The +default value is 100.
durationIntegerDuration of the test in milliseconds. When greater than 0, the test runs +for this time instead of a fixed number of iterations. A value of 0 means use +num_iter. The default value is 0.
mibibytesBoolIf true, array_size is interpreted in mebibytes (MiB) and bandwidth +is reported in GiB/s. If false, bytes and GB/s are used. The default value is +false.
o/p_csvBoolIf true, outputs results in CSV format in addition to the standard log. +The default value is false.
readBoolIf true, enables the Read kernel (measures read-only bandwidth). The +default value is false.
writeBoolIf true, enables the Write kernel (measures write-only bandwidth). The +default value is false.
copyBoolIf true, enables the Copy kernel (a[i] = b[i]). The default value is +false.
mulBoolIf true, enables the Mul kernel (a[i] = scalar * b[i]). The default value +is false.
addBoolIf true, enables the Add kernel (a[i] = b[i] + c[i]). The default value +is false.
dotBoolIf true, enables the Dot kernel (sum of a[i] * b[i]). The default value +is false.
triadBoolIf true, enables the Triad kernel (a[i] = b[i] + scalar * c[i]). The +default value is false.
data_initStringData initialization method for the test arrays. Accepted values: +default – Initialize with default constant values (default). +Other values may be supported depending on the build.
nontemporalStringNon-temporal (streaming) memory access mode for the kernels. Non-temporal +stores bypass the cache and can be useful for measuring true memory bandwidth. +Accepted values: +all – Apply non-temporal accesses to all kernels (default). +none – Disable non-temporal accesses. +read – Apply only to read accesses. +write – Apply only to write accesses.
dwords_per_laneIntegerNumber of 32-bit words processed per GPU lane per kernel invocation. The +default value is 4.
chunks_per_blockIntegerNumber of data chunks processed per GPU thread block. The default value +is 2.
tb_sizeIntegerThread block size (number of threads per block). The default value is +1024.
+ +### Output + + + + + + + + + + + +
Output Key Type Description
Array sizeIntegerSize of the test array used for the measurement, in bytes or MiB depending +on the mibibytes setting.
FunctionStringName of the BabelStream kernel executed (e.g., Copy, Mul, Add, Triad, +Dot, Read, Write).
bandwidthFloatMeasured memory bandwidth for this kernel in GB/s (or GiB/s if +mibibytes: true).
passBoolTrue if the kernel completed successfully.
+ +### Examples + +**Example 1:** + +Run all BABEL kernels with a 32 MB buffer, 5000 iterations, double precision: + + actions: + - name: action_1 + device: all + module: babel + parallel: true + count: 1 + num_iter: 5000 + duration: 0 + array_size: 33554432 + test_type: 2 + mibibytes: false + o/p_csv: false + copy: true + read: true + write: true + mul: true + add: true + dot: true + triad: true + +Run with: + + ./rvs -c conf/babel.conf -d 3 From 1b959a22daf46903a2f1a4888a2de0926a7657a1 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 19 May 2026 16:26:45 -0400 Subject: [PATCH 160/275] Removed the two offending entries (SSH_KEY_FILE/SSH_CONFIG_FILE) from job-level env and Added a small block to the existing Validate target node configuration Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 6 +++--- .github/workflows/rvs-nightly-tests.yml | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 0a2a91c74..6e3f0a73c 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -58,7 +58,7 @@ adjust the cron string in the workflow if your publish cadence is different. | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | | `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | | `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | -| `target_user` | _(empty → `vars.RVS_TARGET_USER`)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | +| `target_user` | _(empty → `vars.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | Workflow inputs **win over repo variables**, so individual `workflow_dispatch` @@ -88,7 +88,7 @@ gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" |---|---|---| | `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | -| `RVS_TARGET_USER` | optional | SSH user on the target node. | +| `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this var explicitly to avoid surprises. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | @@ -338,7 +338,7 @@ Watch the Actions tab for: There are three ways to point the workflow at a different node, in increasing order of permanence: -1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir`). Anything left blank falls back to the repo variable, then to the hard-coded default. This is the right path for "test this tarball on host X today". +1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir`). Anything left blank falls back to the matching repo variable. `target_node` has no hard-coded default (workflow fails fast), `target_user` falls through to the orchestrator runner's local user, and `remote_work_dir` falls through to `/tmp/rvs-nightly-`. This is the right path for "test this tarball on host X today". 2. **Single run, from `gh` CLI:** ```bash gh workflow run rvs-nightly-tests.yml -f target_node="" diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index c33447517..bbbf38581 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -165,10 +165,10 @@ jobs: # so individual runs can be retargeted via workflow_dispatch. TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER }} - # Workflow-scoped SSH state (in runner.temp so we never touch the runner - # user's own ~/.ssh on a shared self-hosted runner). - SSH_KEY_FILE: ${{ runner.temp }}/rvs_target_key - SSH_CONFIG_FILE: ${{ runner.temp }}/rvs_target_ssh_config + # SSH_KEY_FILE / SSH_CONFIG_FILE are derived from $RUNNER_TEMP in the + # validate step and exported via $GITHUB_ENV so every subsequent step + # inherits them. We can't reference runner.temp here because the + # `runner.*` context is only available inside steps, not in job-level env. steps: - name: Validate target node configuration env: @@ -198,11 +198,20 @@ jobs: INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" + # Workflow-scoped SSH state under $RUNNER_TEMP so we never touch the + # runner user's own ~/.ssh on a shared self-hosted runner. $RUNNER_TEMP + # is set automatically by the runner; fall back to /tmp if absent. + SSH_BASE="${RUNNER_TEMP:-/tmp}" + SSH_KEY_FILE_PATH="${SSH_BASE}/rvs_target_key" + SSH_CONFIG_FILE_PATH="${SSH_BASE}/rvs_target_ssh_config" + { echo "REMOTE_WORK_DIR=$REMOTE_WORK_DIR" echo "ROCM_MAJOR=$ROCM_MAJOR" echo "INSTALL_DIR=$INSTALL_DIR" echo "RVS_BIN=$RVS_BIN_PATH" + echo "SSH_KEY_FILE=$SSH_KEY_FILE_PATH" + echo "SSH_CONFIG_FILE=$SSH_CONFIG_FILE_PATH" } >> "$GITHUB_ENV" echo "Orchestrator runner : $(hostname)" @@ -210,6 +219,8 @@ jobs: echo "Remote work dir : $REMOTE_WORK_DIR" echo "ROCm major : $ROCM_MAJOR" echo "Expected RVS binary : $RVS_BIN_PATH" + echo "SSH key file : $SSH_KEY_FILE_PATH" + echo "SSH config file : $SSH_CONFIG_FILE_PATH" - name: Setup SSH key for target node env: From 70342e5f9e54eab9654946ceaf804333bfebb379 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 19 May 2026 22:52:00 -0400 Subject: [PATCH 161/275] Fixed LD Library Path Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 196 ++++++++++++++++++---- .github/workflows/rvs-nightly-tests.yml | 151 +++++++++++++---- 2 files changed, 280 insertions(+), 67 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 6e3f0a73c..a7cc50601 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -60,6 +60,7 @@ adjust the cron string in the workflow if your publish cadence is different. | `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | | `target_user` | _(empty → `vars.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | +| `target_rocm_path` | _(empty → `vars.RVS_TARGET_ROCM_PATH`, then `/opt/rocm`)_ | Which ROCm install on the target node to run RVS against, e.g. `/opt/rocm-7.13`. RVS is installed into `/extras-/` and `LD_LIBRARY_PATH` is set to `/lib:...` so it wins over the binary's RUNPATH-derived `/opt/rocm/lib`. Use this to pick a specific version on hosts with multiple ROCm installs side-by-side. | Workflow inputs **win over repo variables**, so individual `workflow_dispatch` runs can be retargeted from the Actions UI without changing repo settings. @@ -80,6 +81,14 @@ Example — keep the default tarball but run on a different host today: gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" ``` +Example — point at a specific ROCm install on a multi-ROCm host: + +```bash +gh workflow run rvs-nightly-tests.yml \ + -f target_node="10.245.128.41" \ + -f target_rocm_path="/opt/rocm-7.13" +``` + ## Repository configuration **Variables** (Settings → Secrets and variables → Actions → Variables): @@ -90,6 +99,7 @@ gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this var explicitly to avoid surprises. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | +| `RVS_TARGET_ROCM_PATH` | optional (default `/opt/rocm`) | ROCm install on the target node that RVS should run against, e.g. `/opt/rocm-7.13`. Required on hosts where `/opt/rocm` symlinks to the "wrong" version — without it the binary's RUNPATH will silently pull libs from the system default. The `Verify RVS binary library resolution` step fails fast if any lib resolves from a different ROCm install. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | **Secrets** (Settings → Secrets and variables → Actions → Secrets): @@ -117,27 +127,138 @@ suffixes like `1.4.21-9` and `1.4.21-100` compare correctly. The ## How the tarball is installed (on the target node) The runner derives the ROCm major version from the tarball filename -(e.g. `amdrocm7-rvs-1.4.21-…-Linux.tar.gz` → `7`), writes the derived -paths to `$GITHUB_ENV`, then SSHes into the target with those values -exported so the install runs against the matching `extras-` -directory. The same workflow handles ROCm 6, 7, etc. without code changes: +(e.g. `amdrocm7-rvs-1.4.21-…-Linux.tar.gz` → `7`), combines it with +`TARGET_ROCM_PATH` (which selects *which* ROCm install to use), writes +the derived paths to `$GITHUB_ENV`, then SSHes into the target with those +values exported so the install runs against the matching `extras-` +directory under the chosen ROCm. The same workflow handles ROCm 6, 7, +etc., and any version inside `7.x` without code changes: ```bash # On the runner (Validate target node configuration step): # Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] ROCM_MAJOR=7 -INSTALL_DIR=/opt/rocm/extras-${ROCM_MAJOR} # /opt/rocm/extras-7 +# TARGET_ROCM_PATH comes from inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH +# (default: /opt/rocm). E.g. /opt/rocm-7.13 on a multi-ROCm host. +INSTALL_DIR=${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR} # /opt/rocm-7.13/extras-7 RVS_BIN=${INSTALL_DIR}/bin/rvs # On the target node (Install RVS on target node step), via SSH: -sudo -n mkdir -p "$INSTALL_DIR" -sudo -n tar -xzf "$REMOTE_WORK_DIR/pkg/.tar.gz" -C "$INSTALL_DIR" - -export LD_LIBRARY_PATH="$INSTALL_DIR/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" +# sudo is used only when $INSTALL_DIR isn't user-writable (e.g. under +# /opt/rocm-*). For TheRock tarball installs in $HOME, plain mkdir/tar is used. +mkdir -p "$INSTALL_DIR" # (with `sudo -n` if needed) +tar -xzf "$REMOTE_WORK_DIR/pkg/.tar.gz" -C "$INSTALL_DIR" + +# LD_LIBRARY_PATH for the rvs binary is currently HARDCODED to match the +# layout the RVS team uses manually. If you point target_rocm_path at a +# non-/opt/rocm install (e.g. TheRock under $HOME), update the literal +# strings in the workflow's install / verify-ldd / level-3 / level-4 / +# report steps to match — see the "Hardcoded LD_LIBRARY_PATH" note below. +export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" "$RVS_BIN" --version ``` +### Hardcoded `LD_LIBRARY_PATH` (current temporary state) + +To stay 1:1 with the manual sequence the RVS team uses today, the workflow +hardcodes the runtime `LD_LIBRARY_PATH` for every step that executes the +`rvs` binary (install, ldd-verify, level 3, level 4, and the report's +`--version` query) to exactly: + +```bash +LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:$LD_LIBRARY_PATH +``` + +That mirrors the manual flow: + +```bash +sudo mkdir -p /opt/rocm/extras-7 +sudo tar -xzf amdrocm7-rvs-1.4.21-288-Linux.tar.gz -C /opt/rocm/extras-7 +export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:$LD_LIBRARY_PATH +``` + +Consequences and trade-offs: + +- The default `target_rocm_path=/opt/rocm` case "just works" — `INSTALL_DIR` resolves to `/opt/rocm/extras-7`, which is exactly what the hardcoded path points at. +- If you set `target_rocm_path` to something else (e.g. `/opt/rocm-7.13` or a TheRock home-dir install), RVS will install into the new path but the hardcoded `LD_LIBRARY_PATH` will still point at `/opt/rocm/extras-7/lib`. The `Verify RVS binary library resolution` step will catch this and fail with a clear error listing the offending paths — so it's loud, not silent. To actually retarget at a different ROCm, edit the five `LD_LIBRARY_PATH=` lines in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to the corresponding paths under the new install. +- This is a deliberate temporary state. When the team is ready for full multi-ROCm support, replace those five literals with `"${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${INSTALL_DIR}/lib/rocm_sysdeps/lib:${INSTALL_DIR}/lib:${LD_LIBRARY_PATH:-}"` — the prereq-check step already uses that dynamic form as a reference. + +### Multi-ROCm hosts (`/opt/rocm-7.0.2`, `/opt/rocm-7.13`, …) + +When the target node has several versioned ROCm installs side-by-side, +`/opt/rocm` is typically a symlink to one of them and the RVS binary's +RUNPATH resolves to `/opt/rocm/lib`. Without `target_rocm_path`/ +`RVS_TARGET_ROCM_PATH`, the dynamic linker will silently pull libraries +from whichever ROCm the symlink happens to point at — which may not be +the one you want to test. Symptom: `ldd $RVS_BIN` shows paths like +`/opt/rocm-7.2.0/lib/libamd_smi.so.26` when you expected 7.13. + +Find the right path on the node: + +```bash +ssh urtiwari@ ' + ls -d /opt/rocm* 2>/dev/null + echo "/opt/rocm -> $(readlink /opt/rocm 2>/dev/null || echo "(not a symlink)")" + for d in /opt/rocm-*; do + v=$(cat "$d/.info/version" 2>/dev/null || echo "?") + printf " %-30s version=%s\n" "$d" "$v" + done +' +``` + +Then either set `vars.RVS_TARGET_ROCM_PATH=/opt/rocm-7.13` once for all +runs, or pass `-f target_rocm_path=/opt/rocm-7.13` for a single dispatch. +The workflow's `Verify RVS binary library resolution` step explicitly +fails the job if any resolved library lives in a `/opt/rocm-*` other +than `TARGET_ROCM_PATH`, so cross-contamination can't go unnoticed. + +### TheRock-style tarball ROCm installs (no `/opt/rocm-`) + +The [official ROCm 7.12+ "tarball" install method](https://rocm.docs.amd.com/en/7.12.0-preview/install/rocm.html?fam=instinct&gpu=mi350x&os=ubuntu&os-version=24.04&i=tar) +doesn't drop ROCm under `/opt/rocm-/`. Instead you extract a +single distribution archive (e.g. +`therock-dist-linux-gfx94X-dcgpu-7.13.0.dev0+.tar.gz`) into an +arbitrary directory, set `ROCM_PATH=$(pwd)/install`, and source the +env. So the layout looks like: + +``` +/home///install/ +├── bin/ ← rocm-smi, rocminfo, hipcc, … +├── lib/ +│ ├── rocm_sysdeps/lib/ ← ROCm runtime libs live HERE in TheRock builds +│ └── llvm/lib/ +├── share/ +└── … +``` + +This works with the workflow as-is, with two things to be aware of: + +1. **Find the absolute path of the install on the target node** — there's no canonical location, you pick it at install time. Either ask whoever installed it, or search: + ```bash + ssh urtiwari@ ' + for cand in ~/install ~/*/install ~/rocm*/install /opt/therock*/install; do + [ -x "$cand/bin/rocminfo" ] && echo " found ROCm install: $cand" + done + ' + ``` +2. **Pass that absolute path as `target_rocm_path`.** Example: + ```bash + gh workflow run rvs-nightly-tests.yml \ + -f target_node=10.245.128.41 \ + -f target_rocm_path=/home/urtiwari/rocm-7.13/install + ``` + +What the workflow handles automatically for tarball installs: + +- The install step **skips `sudo`** when the destination is user-writable (TheRock installs in `$HOME` don't need root); only system `/opt/rocm-*` installs trigger `sudo -n`. +- The prereq check uses whatever `rocm-smi` / `rocminfo` are first on `PATH` (system package installs land them in `/usr/bin/`; versioned installs typically register them via `/etc/profile.d/rocm.sh`). The binaries' RPATH locates the matching ROCm runtime libs, so no `LD_LIBRARY_PATH` setup is needed for the prereq tools. +- Tarball installs typically don't ship a `.info/version` file, so the version-string row in the report may show `unknown` — the major-version cross-check is automatically skipped in that case (no false failure). + +**What you have to do manually right now** to actually run RVS against a TheRock-style install: + +Because `LD_LIBRARY_PATH` for the rvs binary itself is currently [hardcoded](#hardcoded-ld_library_path-current-temporary-state) to `/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:...`, simply pointing `target_rocm_path` at e.g. `/home/urtiwari/rocm-7.13/install` is **not enough** — RVS will install into the right place, but the loader won't see the libs and the `Verify RVS binary library resolution` step will hard-fail. To use a non-`/opt/rocm` ROCm install today, edit the five `LD_LIBRARY_PATH=` literals in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to point at the matching paths under your install. Or revert those literals to the dynamic form documented above so the workflow follows `TARGET_ROCM_PATH` automatically. + `sudo -n` is non-interactive — it fails fast instead of hanging if `NOPASSWD` isn't configured. There's no PTY over the SSH channel anyway, so an interactive sudo prompt would deadlock the job. @@ -168,20 +289,20 @@ Before downloading or installing the tarball, the workflow runs **`Verify ROCm p | Sub-check | Action on failure | Catches | |---|---|---| -| `/opt/rocm/` directory exists | hard fail (`exit 1`) | ROCm not installed on target | -| Read ROCm version from `/opt/rocm/.info/version` (fallback `/opt/rocm/share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | -| Major version match (regex on tarball name vs target's ROCm version) | hard fail on mismatch | RVS-7 tarball on a ROCm-6 host | +| `$TARGET_ROCM_PATH` directory exists | hard fail (`exit 1`, also prints the available `/opt/rocm*` installs to ease debugging) | ROCm not installed on target, or the configured path is wrong (e.g. typo, `/opt/rocm-7.13.0` vs `/opt/rocm-7.13`) | +| Read ROCm version from `$TARGET_ROCM_PATH/.info/version` (fallback `share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | +| Major version match (regex on tarball name vs target's ROCm version) | hard fail on mismatch | RVS-7 tarball pointed at a ROCm-6 install | | `rocm-smi --showid` runs and exits 0 | hard fail | `amdgpu` driver not loaded, or `rocm-smi` missing | | `rocminfo` enumerates ≥ 1 GPU | hard fail | "ROCm installed but no GPU exposed" (group/permissions, BIOS IOMMU, etc.) | -| `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Missing/broken `ldconfig` cache (RPATH usually compensates) | +| `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Covers both system-package installs (libs in `/usr/lib/x86_64-linux-gnu`) and properly-registered versioned `/opt/rocm-*` installs. Warn-only because TheRock-style tarball installs that aren't registered with `ldconfig` still resolve at runtime via the binaries' RPATH. | -A typical successful log: +A typical successful log (with `target_rocm_path=/opt/rocm-7.13`): ``` -=== /opt/rocm/ === -/opt/rocm -> /opt/rocm-7.11.0 -=== ROCm version === -/opt/rocm/.info/version : 7.11.0 +=== Target ROCm path: /opt/rocm-7.13 === +/opt/rocm-7.13 -> /opt/rocm-7.13.0 +=== ROCm version (under /opt/rocm-7.13) === +/opt/rocm-7.13/.info/version : 7.13.0 === Major version match (tarball vs target node) === tarball expects ROCm major : 7 target has ROCm major : 7 @@ -189,13 +310,16 @@ target has ROCm major : 7 GPU[0] : ID : 0x74a1 === rocminfo (GPU enumeration) === GPU agents enumerated: 8 -=== Key ROCm runtime libraries === - OK : libhsa-runtime64.so.1 - OK : libamdhip64.so -::notice::ROCm prerequisites OK on target node (version 7.11.0) +=== Key ROCm runtime libraries (via ldconfig) === + OK : libhsa-runtime64.so.1 (/opt/rocm-7.13/lib/libhsa-runtime64.so.1) + OK : libamdhip64.so (/opt/rocm-7.13/lib/libamdhip64.so) +::notice::ROCm prerequisites OK on target node at /opt/rocm-7.13 (version 7.13.0) ``` -After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`) and fails the job if any library shows up as `not found` — preventing the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. +After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR}/bin/rvs`) and fails the job in two cases: + +- **Unresolved deps:** any library shows up as `not found` — prevents the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. +- **Wrong-ROCm contamination:** any resolved library lives in a `/opt/rocm-` whose `realpath` differs from `$TARGET_ROCM_PATH` (e.g. `ldd` shows `/opt/rocm-7.2.0/lib/libamd_smi.so.26` while you asked for `/opt/rocm-7.13`). The step prints which paths leaked and suggests setting `target_rocm_path` to fix it. ### Manual one-liner (validate a candidate target node) @@ -249,6 +373,7 @@ e.g.: | Trigger | `schedule` | | Orchestrator (GitHub runner) | `gha-orchestrator-01` | | Target node (test execution) | `hostname` (`user@x.x.x.x`) | +| Target ROCm path | `/opt/rocm-7.13` (version `7.13.0`) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | @@ -303,11 +428,11 @@ Watch the Actions tab for: 1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). 2. `test` job picks up on your orchestrator runner. -3. **Validate target node configuration** prints the resolved `Target node`, `Remote work dir`, and `Expected RVS binary` path. +3. **Validate target node configuration** prints the resolved `Target node`, `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` path. 4. **Setup SSH key for target node** prints the target's `hostname` / `id` / `uptime` from the connectivity probe. -5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node`. -6. **Install RVS on target node** prints the detected `ROCM_MAJOR` and `Installed RVS at: /opt/rocm/extras-/bin/rvs`. -7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target`. +5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. +6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. +7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target, all from `. 8. Two RVS level steps complete; the run summary shows the results table with both **Orchestrator** and **Target node** rows. ## Debugging a failed run @@ -322,13 +447,14 @@ Watch the Actions tab for: | **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify by `ssh -i $TARGET_USER@$TARGET_NODE hostname` from a workstation. | | **Setup SSH key for target node** fails: `Connection timed out` / `Connection refused` | Network reachability problem between the orchestrator runner and the target node. Check firewall / VPN / bastion routing. | | **Setup SSH key for target node** fails: `Host key verification failed` | `ssh-keyscan` couldn't pre-seed the key and `accept-new` rejected it (rare). Remove any stale entry for the target in the runner's `known_hosts`, or pre-populate it manually. | -| **Verify ROCm prerequisites on target node** fails: `/opt/rocm/ does not exist` | Target node has no ROCm install. Install ROCm or pick a different `target_node`. | -| **Verify ROCm prerequisites on target node** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but the target has ROCm ``. Either pin a matching tarball with `tarball_url`, or upgrade the target's ROCm. | +| **Verify ROCm prerequisites on target node** fails: ` does not exist on the target node` | The configured `target_rocm_path` / `vars.RVS_TARGET_ROCM_PATH` doesn't point at a real directory on the target. The step prints all `/opt/rocm*` installs that *do* exist — pick one of those (or fix the symlink). | +| **Verify ROCm prerequisites on target node** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but `$TARGET_ROCM_PATH` is a ROCm `` install. Either pin a matching tarball with `tarball_url`, or change `target_rocm_path`. | +| **Verify RVS binary library resolution on target node** fails: `RVS is resolving libraries from a ROCm install OTHER than ...` | RVS picked up libraries from a different ROCm than the one you targeted (typical on hosts where `/opt/rocm` symlinks to the "wrong" version). The step lists the offending paths. Set `target_rocm_path` to the specific versioned path you want (e.g. `/opt/rocm-7.13`). | | **Verify ROCm prerequisites on target node** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded on the target. SSH in and `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | | **Verify ROCm prerequisites on target node** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to `$TARGET_USER`. Add the user to `video` and `render` groups, log out and back in. | | **Install RVS on target node** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | -| **Install RVS on target node** fails: `sudo: a password is required` | `$TARGET_USER` doesn't have `NOPASSWD` sudo on the target. Add a sudoers entry permitting `mkdir` and `tar` into `/opt/rocm/extras-*` without a password. | -| **Install RVS on target node** fails: `rvs binary not found or not executable at /opt/rocm/extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `/opt/rocm/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | +| **Install RVS on target node** fails: `sudo: a password is required` | `$TARGET_USER` doesn't have `NOPASSWD` sudo on the target. Add a sudoers entry permitting `mkdir` and `tar` into `$TARGET_ROCM_PATH/extras-*` without a password. | +| **Install RVS on target node** fails: `rvs binary not found or not executable at /extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `$TARGET_ROCM_PATH/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | | **Verify RVS binary library resolution on target node** fails with `not found` | A ROCm runtime library is missing or not in `RPATH` on the target. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | | **Run RVS level N on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check the level log for the specific error. | | **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | @@ -338,12 +464,14 @@ Watch the Actions tab for: There are three ways to point the workflow at a different node, in increasing order of permanence: -1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir`). Anything left blank falls back to the matching repo variable. `target_node` has no hard-coded default (workflow fails fast), `target_user` falls through to the orchestrator runner's local user, and `remote_work_dir` falls through to `/tmp/rvs-nightly-`. This is the right path for "test this tarball on host X today". +1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir` / `target_rocm_path`). Anything left blank falls back to the matching repo variable. `target_node` has no hard-coded default (workflow fails fast), `target_user` falls through to the orchestrator runner's local user, `remote_work_dir` falls through to `/tmp/rvs-nightly-`, and `target_rocm_path` falls through to `/opt/rocm`. This is the right path for "test this tarball on host X today". 2. **Single run, from `gh` CLI:** ```bash - gh workflow run rvs-nightly-tests.yml -f target_node="" + gh workflow run rvs-nightly-tests.yml \ + -f target_node="" \ + -f target_rocm_path="/opt/rocm-7.13" # only needed on multi-ROCm hosts ``` -3. **Permanent change:** update repo variable `RVS_TARGET_NODE` (and optionally `RVS_TARGET_USER` / `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick this up unless an input overrides it. +3. **Permanent change:** update repo variable `RVS_TARGET_NODE` (and optionally `RVS_TARGET_USER` / `RVS_REMOTE_WORK_DIR` / `RVS_TARGET_ROCM_PATH`). All subsequent scheduled and manual runs will pick this up unless an input overrides it. The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index bbbf38581..c26d0dfaf 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -53,6 +53,10 @@ on: description: 'Working dir on the target node (default: vars.RVS_REMOTE_WORK_DIR or /tmp/rvs-nightly-)' required: false default: '' + target_rocm_path: + description: 'ROCm install dir on the target node to run RVS against, e.g. /opt/rocm-7.13 (default: vars.RVS_TARGET_ROCM_PATH or /opt/rocm)' + required: false + default: '' permissions: contents: read @@ -165,6 +169,11 @@ jobs: # so individual runs can be retargeted via workflow_dispatch. TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER }} + # ROCm install on the target node that RVS should run against. Lets the + # workflow target a specific ROCm (e.g. /opt/rocm-7.13) on hosts that + # have multiple ROCm versions side-by-side; defaults to the system + # /opt/rocm symlink for single-ROCm hosts. + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH || '/opt/rocm' }} # SSH_KEY_FILE / SSH_CONFIG_FILE are derived from $RUNNER_TEMP in the # validate step and exported via $GITHUB_ENV so every subsequent step # inherits them. We can't reference runner.temp here because the @@ -195,7 +204,11 @@ jobs: echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" exit 1 fi - INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + # Install RVS into the *selected* ROCm's extras dir so it lives + # alongside the matching ROCm runtime; this also makes the RUNPATH- + # derived /opt/rocm/lib lookup harmless because LD_LIBRARY_PATH below + # will point at $TARGET_ROCM_PATH/lib first. + INSTALL_DIR="${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR}" RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" # Workflow-scoped SSH state under $RUNNER_TEMP so we never touch the @@ -216,6 +229,7 @@ jobs: echo "Orchestrator runner : $(hostname)" echo "Target node : $TARGET_USER@$TARGET_NODE" + echo "Target ROCm path : $TARGET_ROCM_PATH" echo "Remote work dir : $REMOTE_WORK_DIR" echo "ROCm major : $ROCM_MAJOR" echo "Expected RVS binary : $RVS_BIN_PATH" @@ -270,34 +284,43 @@ jobs: - name: Verify ROCm prerequisites on target node run: | set -euo pipefail - ssh -q -F "$SSH_CONFIG_FILE" rvs-target "TARBALL_NAME='$TARBALL_NAME' bash -s" <<'REMOTE' + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARBALL_NAME='$TARBALL_NAME' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set -uo pipefail fail=0 + # rocm-smi / rocminfo are expected to already be on PATH (system + # package install lands them in /usr/bin; versioned installs put + # them under $TARGET_ROCM_PATH/bin and are typically added to PATH + # via /etc/profile.d). Their RPATH/RUNPATH locates ROCm runtime + # libs, so no LD_LIBRARY_PATH gymnastics needed here. + echo "=== System ===" uname -a echo - echo "=== /opt/rocm/ ===" - if [ -d /opt/rocm ]; then - ls -la /opt/rocm | head -20 - [ -L /opt/rocm ] && echo "/opt/rocm -> $(readlink /opt/rocm)" + echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" + if [ -d "${TARGET_ROCM_PATH}" ]; then + ls -la "${TARGET_ROCM_PATH}" | head -20 + [ -L "${TARGET_ROCM_PATH}" ] && echo "${TARGET_ROCM_PATH} -> $(readlink "${TARGET_ROCM_PATH}")" else - echo "::error::/opt/rocm/ does not exist; ROCm is not installed on the target node." + echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." + echo "::error::Available ROCm installs:" + ls -d /opt/rocm* 2>/dev/null || echo " (none in /opt/)" fail=1 fi echo - echo "=== ROCm version ===" - if [ -f /opt/rocm/.info/version ]; then - ROCM_VERSION=$(cat /opt/rocm/.info/version) - echo "/opt/rocm/.info/version : $ROCM_VERSION" - elif [ -f /opt/rocm/share/doc/rocm-core/version ]; then - ROCM_VERSION=$(cat /opt/rocm/share/doc/rocm-core/version) + echo "=== ROCm version (under ${TARGET_ROCM_PATH}) ===" + if [ -f "${TARGET_ROCM_PATH}/.info/version" ]; then + ROCM_VERSION=$(cat "${TARGET_ROCM_PATH}/.info/version") + echo "${TARGET_ROCM_PATH}/.info/version : $ROCM_VERSION" + elif [ -f "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" ]; then + ROCM_VERSION=$(cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version") echo "rocm-core version : $ROCM_VERSION" else ROCM_VERSION="" - echo "::warning::no ROCm version file found at /opt/rocm/.info/version or /opt/rocm/share/doc/rocm-core/version" + echo "::warning::no ROCm version file found under ${TARGET_ROCM_PATH}/.info/ or share/doc/rocm-core/" fi echo @@ -341,12 +364,18 @@ jobs: fi echo - echo "=== Key ROCm runtime libraries ===" + echo "=== Key ROCm runtime libraries (via ldconfig) ===" + # ldconfig -p covers both system-package installs (libs in + # /usr/lib/x86_64-linux-gnu) and properly-registered versioned + # installs (libs in /opt/rocm-*/lib with a matching ld.so.conf.d + # entry). For TheRock-style tarball installs that aren't + # registered with ldconfig, the binaries' RPATH still resolves + # them at runtime — so this is best-effort, warn-only. for lib in libhsa-runtime64.so.1 libamdhip64.so; do if ldconfig -p 2>/dev/null | grep -q "$lib"; then - echo " OK : $lib" + echo " OK : $lib ($(ldconfig -p 2>/dev/null | grep "$lib" | head -1 | awk -F'=> ' '{print $2}'))" else - echo "::warning::library $lib not found in ldconfig cache" + echo "::warning::library $lib not found in ldconfig cache (RPATH may still resolve it at runtime)" fi done echo @@ -355,7 +384,7 @@ jobs: echo "::error::ROCm prerequisites check FAILED on target node — refusing to install RVS." exit 1 fi - echo "::notice::ROCm prerequisites OK on target node${ROCM_VERSION:+ (version $ROCM_VERSION)}" + echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}${ROCM_VERSION:+ (version $ROCM_VERSION)}" REMOTE - name: Download tarball on runner @@ -378,10 +407,11 @@ jobs: run: | set -euo pipefail ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' bash -s" <<'REMOTE' + "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set -euo pipefail PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + echo "Target ROCm path : ${TARGET_ROCM_PATH}" echo "Detected ROCm major version : ${ROCM_MAJOR}" echo "Install target : ${INSTALL_DIR}" echo "Expected RVS binary : ${RVS_BIN}" @@ -391,8 +421,21 @@ jobs: exit 1 fi - sudo -n mkdir -p "$INSTALL_DIR" - sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" + # Use sudo only when needed. For system ROCm installs under /opt/rocm + # we need root to write into /opt; for TheRock-style tarball installs + # in the user's home dir, sudo is unnecessary (and would fail if the + # user doesn't have NOPASSWD configured). + probe="$INSTALL_DIR" + while [ ! -d "$probe" ] && [ "$probe" != "/" ]; do probe=$(dirname "$probe"); done + if [ -w "$probe" ]; then + echo "Installing into $INSTALL_DIR without sudo (writable path)" + mkdir -p "$INSTALL_DIR" + tar -xzf "$PKG" -C "$INSTALL_DIR" + else + echo "Installing into $INSTALL_DIR via sudo -n (path not user-writable)" + sudo -n mkdir -p "$INSTALL_DIR" + sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" + fi if [ ! -x "$RVS_BIN" ]; then echo "::error::rvs binary not found or not executable at $RVS_BIN after install" @@ -401,7 +444,13 @@ jobs: exit 1 fi - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + # Hardcoded LD_LIBRARY_PATH that matches the manual workflow currently + # used by the RVS team. Kept literal (with /install/* paths) because + # the team relies on a known-working layout on the target node. If + # this needs to vary per ROCm install (e.g. TheRock tarball under + # $HOME), switch back to a $TARGET_ROCM_PATH-derived version here + # and in the verify/run/report steps below. + export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" echo "Installed RVS at: $RVS_BIN" "$RVS_BIN" --version || true REMOTE @@ -410,21 +459,45 @@ jobs: run: | set -euo pipefail ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' bash -s" <<'REMOTE' + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set -euo pipefail if [ ! -x "$RVS_BIN" ]; then echo "::error::$RVS_BIN was not produced by tarball extraction on target." exit 1 fi - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" echo "=== ldd $RVS_BIN ===" LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) echo "$LDD_OUTPUT" + if echo "$LDD_OUTPUT" | grep -q "not found"; then echo "::error::RVS binary has unresolved library dependencies on target (see above)." exit 1 fi - echo "::notice::RVS binary's library dependencies resolved OK on target." + + # Catch the "wrong ROCm leaked in" case: any /opt/rocm- path in + # the resolved libs must match TARGET_ROCM_PATH. A bare /opt/rocm/ + # is fine (it follows the system symlink) only when that symlink + # resolves to the same realpath as TARGET_ROCM_PATH. + TARGET_REAL=$(readlink -f "$TARGET_ROCM_PATH" 2>/dev/null || echo "$TARGET_ROCM_PATH") + BAD=$(echo "$LDD_OUTPUT" \ + | grep -oE '/opt/rocm[^ ]*' \ + | sort -u \ + | while read -r p; do + preal=$(readlink -f "$p" 2>/dev/null || echo "$p") + case "$preal" in + "$TARGET_REAL"|"$TARGET_REAL"/*) ;; + *) echo "$p -> $preal" ;; + esac + done) + if [ -n "$BAD" ]; then + echo "::error::RVS is resolving libraries from a ROCm install OTHER than ${TARGET_ROCM_PATH} (realpath: ${TARGET_REAL}):" + echo "$BAD" | sed 's/^/ /' + echo "::error::Set inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH to the right versioned path, or fix the system /opt/rocm symlink." + exit 1 + fi + + echo "::notice::RVS binary's library dependencies resolved OK on target, all from ${TARGET_ROCM_PATH}." REMOTE - name: Run RVS level 3 on target node @@ -432,11 +505,11 @@ jobs: run: | set +e START=$(date -u +%FT%TZ) - echo "::group::RVS level 3 (${RVS_BIN} -r 3) on $TARGET_NODE" + echo "::group::RVS level 3 (${RVS_BIN} -r 3) on $TARGET_NODE against $TARGET_ROCM_PATH" ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' bash -s" <<'REMOTE' + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set +e - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" mkdir -p "${REMOTE_WORK_DIR}/reports" "$RVS_BIN" -r 3 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_3.log" RC=${PIPESTATUS[0]} @@ -456,11 +529,11 @@ jobs: run: | set +e START=$(date -u +%FT%TZ) - echo "::group::RVS level 4 (${RVS_BIN} -r 4) on $TARGET_NODE" + echo "::group::RVS level 4 (${RVS_BIN} -r 4) on $TARGET_NODE against $TARGET_ROCM_PATH" ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' bash -s" <<'REMOTE' + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set +e - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" mkdir -p "${REMOTE_WORK_DIR}/reports" "$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" RC=${PIPESTATUS[0]} @@ -509,12 +582,23 @@ jobs: # binary the tests ran against, not a stale local copy. RVS_VERSION=$( ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" + export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" "$RVS_BIN" --version 2>/dev/null REMOTE ) + # Also fetch the target's actual ROCm version string so the report + # shows what RVS ran against, not just the path. + TARGET_ROCM_VERSION=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null || echo "unknown" + cat "${TARGET_ROCM_PATH}/.info/version" 2>/dev/null \ + || cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" 2>/dev/null \ + || echo "unknown" + REMOTE + ) + TARGET_HOSTNAME=$(ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'hostname' 2>/dev/null || echo "$TARGET_NODE") REPORT=./reports/SUMMARY.md @@ -527,6 +611,7 @@ jobs: echo "| Trigger | \`${{ github.event_name }}\` |" echo "| Orchestrator (GitHub runner) | \`$(hostname)\` |" echo "| Target node (test execution) | \`${TARGET_HOSTNAME}\` (\`${TARGET_USER}@${TARGET_NODE}\`) |" + echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${TARGET_ROCM_VERSION}\`) |" echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" echo "| Tarball | \`${TARBALL_NAME}\` |" echo "| Source URL | ${TARBALL_URL} |" From f30c9a3291feb6f2cc82c07a9f62d9849912ef40 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 20 May 2026 00:47:43 -0400 Subject: [PATCH 162/275] Replace all node-specific values like IPs usernames, docs/comments are portable across hosts and install styles. The target_rocm_path / RVS_TARGET_ROCM_PATH descriptions now cover both versioned and tarball Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 80 +++++++++++------------ .github/workflows/rvs-nightly-tests.yml | 9 +-- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index a7cc50601..25b753ccd 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -60,7 +60,7 @@ adjust the cron string in the workflow if your publish cadence is different. | `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | | `target_user` | _(empty → `vars.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | -| `target_rocm_path` | _(empty → `vars.RVS_TARGET_ROCM_PATH`, then `/opt/rocm`)_ | Which ROCm install on the target node to run RVS against, e.g. `/opt/rocm-7.13`. RVS is installed into `/extras-/` and `LD_LIBRARY_PATH` is set to `/lib:...` so it wins over the binary's RUNPATH-derived `/opt/rocm/lib`. Use this to pick a specific version on hosts with multiple ROCm installs side-by-side. | +| `target_rocm_path` | _(empty → `vars.RVS_TARGET_ROCM_PATH`, then `/opt/rocm`)_ | Which ROCm install on the target node to run RVS against. Could be the default `/opt/rocm`, a versioned `/opt/rocm-/` (only present on hosts that use the AMD multi-ROCm apt repos), or a TheRock-style tarball install rooted anywhere (e.g. `$HOME//install`). RVS is installed into `/extras-/` and the prereq tools probe under ``. | Workflow inputs **win over repo variables**, so individual `workflow_dispatch` runs can be retargeted from the Actions UI without changing repo settings. @@ -70,23 +70,23 @@ Example — point a single run at a specific node: ```bash gh workflow run rvs-nightly-tests.yml \ -f tarball_url="/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ - -f target_node="x.x.x.x" \ - -f target_user="userID" \ + -f target_node="" \ + -f target_user="" \ -f force=true ``` Example — keep the default tarball but run on a different host today: ```bash -gh workflow run rvs-nightly-tests.yml -f target_node="e17u13.maas" +gh workflow run rvs-nightly-tests.yml -f target_node="" ``` Example — point at a specific ROCm install on a multi-ROCm host: ```bash gh workflow run rvs-nightly-tests.yml \ - -f target_node="10.245.128.41" \ - -f target_rocm_path="/opt/rocm-7.13" + -f target_node="" \ + -f target_rocm_path="" ``` ## Repository configuration @@ -99,7 +99,7 @@ gh workflow run rvs-nightly-tests.yml \ | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this var explicitly to avoid surprises. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | -| `RVS_TARGET_ROCM_PATH` | optional (default `/opt/rocm`) | ROCm install on the target node that RVS should run against, e.g. `/opt/rocm-7.13`. Required on hosts where `/opt/rocm` symlinks to the "wrong" version — without it the binary's RUNPATH will silently pull libs from the system default. The `Verify RVS binary library resolution` step fails fast if any lib resolves from a different ROCm install. | +| `RVS_TARGET_ROCM_PATH` | optional (default `/opt/rocm`) | ROCm install on the target node that RVS should run against. Set this when `/opt/rocm` isn't what you want — e.g. when running against a versioned `/opt/rocm-/` on a multi-ROCm-package host, or a TheRock-style tarball install under `$HOME`. The `Verify RVS binary library resolution` step fails fast if any lib resolves from a different ROCm install. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | **Secrets** (Settings → Secrets and variables → Actions → Secrets): @@ -139,8 +139,8 @@ etc., and any version inside `7.x` without code changes: # Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] ROCM_MAJOR=7 # TARGET_ROCM_PATH comes from inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH -# (default: /opt/rocm). E.g. /opt/rocm-7.13 on a multi-ROCm host. -INSTALL_DIR=${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR} # /opt/rocm-7.13/extras-7 +# (default: /opt/rocm). +INSTALL_DIR=${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR} # /extras-7 RVS_BIN=${INSTALL_DIR}/bin/rvs # On the target node (Install RVS on target node step), via SSH: @@ -181,10 +181,10 @@ export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sys Consequences and trade-offs: - The default `target_rocm_path=/opt/rocm` case "just works" — `INSTALL_DIR` resolves to `/opt/rocm/extras-7`, which is exactly what the hardcoded path points at. -- If you set `target_rocm_path` to something else (e.g. `/opt/rocm-7.13` or a TheRock home-dir install), RVS will install into the new path but the hardcoded `LD_LIBRARY_PATH` will still point at `/opt/rocm/extras-7/lib`. The `Verify RVS binary library resolution` step will catch this and fail with a clear error listing the offending paths — so it's loud, not silent. To actually retarget at a different ROCm, edit the five `LD_LIBRARY_PATH=` lines in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to the corresponding paths under the new install. +- If you set `target_rocm_path` to something else (a versioned `/opt/rocm-/` or a TheRock home-dir install), RVS will install into the new path but the hardcoded `LD_LIBRARY_PATH` will still point at `/opt/rocm/extras-7/lib`. The `Verify RVS binary library resolution` step will catch this and fail with a clear error listing the offending paths — so it's loud, not silent. To actually retarget at a different ROCm, edit the five `LD_LIBRARY_PATH=` lines in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to the corresponding paths under the new install. - This is a deliberate temporary state. When the team is ready for full multi-ROCm support, replace those five literals with `"${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${INSTALL_DIR}/lib/rocm_sysdeps/lib:${INSTALL_DIR}/lib:${LD_LIBRARY_PATH:-}"` — the prereq-check step already uses that dynamic form as a reference. -### Multi-ROCm hosts (`/opt/rocm-7.0.2`, `/opt/rocm-7.13`, …) +### Multi-ROCm hosts (`/opt/rocm-`, `/opt/rocm-`, …) When the target node has several versioned ROCm installs side-by-side, `/opt/rocm` is typically a symlink to one of them and the RVS binary's @@ -192,12 +192,12 @@ RUNPATH resolves to `/opt/rocm/lib`. Without `target_rocm_path`/ `RVS_TARGET_ROCM_PATH`, the dynamic linker will silently pull libraries from whichever ROCm the symlink happens to point at — which may not be the one you want to test. Symptom: `ldd $RVS_BIN` shows paths like -`/opt/rocm-7.2.0/lib/libamd_smi.so.26` when you expected 7.13. +`/opt/rocm-/lib/libamd_smi.so.` when you expected a different version. Find the right path on the node: ```bash -ssh urtiwari@ ' +ssh @ ' ls -d /opt/rocm* 2>/dev/null echo "/opt/rocm -> $(readlink /opt/rocm 2>/dev/null || echo "(not a symlink)")" for d in /opt/rocm-*; do @@ -207,18 +207,18 @@ ssh urtiwari@ ' ' ``` -Then either set `vars.RVS_TARGET_ROCM_PATH=/opt/rocm-7.13` once for all -runs, or pass `-f target_rocm_path=/opt/rocm-7.13` for a single dispatch. -The workflow's `Verify RVS binary library resolution` step explicitly -fails the job if any resolved library lives in a `/opt/rocm-*` other -than `TARGET_ROCM_PATH`, so cross-contamination can't go unnoticed. +Then either set `vars.RVS_TARGET_ROCM_PATH=` once for +all runs, or pass `-f target_rocm_path=` for a single +dispatch. The workflow's `Verify RVS binary library resolution` step +explicitly fails the job if any resolved library lives in a `/opt/rocm-*` +other than `TARGET_ROCM_PATH`, so cross-contamination can't go unnoticed. ### TheRock-style tarball ROCm installs (no `/opt/rocm-`) The [official ROCm 7.12+ "tarball" install method](https://rocm.docs.amd.com/en/7.12.0-preview/install/rocm.html?fam=instinct&gpu=mi350x&os=ubuntu&os-version=24.04&i=tar) doesn't drop ROCm under `/opt/rocm-/`. Instead you extract a single distribution archive (e.g. -`therock-dist-linux-gfx94X-dcgpu-7.13.0.dev0+.tar.gz`) into an +`therock-dist-linux--dcgpu-.tar.gz`) into an arbitrary directory, set `ROCM_PATH=$(pwd)/install`, and source the env. So the layout looks like: @@ -236,7 +236,7 @@ This works with the workflow as-is, with two things to be aware of: 1. **Find the absolute path of the install on the target node** — there's no canonical location, you pick it at install time. Either ask whoever installed it, or search: ```bash - ssh urtiwari@ ' + ssh @ ' for cand in ~/install ~/*/install ~/rocm*/install /opt/therock*/install; do [ -x "$cand/bin/rocminfo" ] && echo " found ROCm install: $cand" done @@ -245,8 +245,8 @@ This works with the workflow as-is, with two things to be aware of: 2. **Pass that absolute path as `target_rocm_path`.** Example: ```bash gh workflow run rvs-nightly-tests.yml \ - -f target_node=10.245.128.41 \ - -f target_rocm_path=/home/urtiwari/rocm-7.13/install + -f target_node= \ + -f target_rocm_path=$HOME//install ``` What the workflow handles automatically for tarball installs: @@ -257,7 +257,7 @@ What the workflow handles automatically for tarball installs: **What you have to do manually right now** to actually run RVS against a TheRock-style install: -Because `LD_LIBRARY_PATH` for the rvs binary itself is currently [hardcoded](#hardcoded-ld_library_path-current-temporary-state) to `/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:...`, simply pointing `target_rocm_path` at e.g. `/home/urtiwari/rocm-7.13/install` is **not enough** — RVS will install into the right place, but the loader won't see the libs and the `Verify RVS binary library resolution` step will hard-fail. To use a non-`/opt/rocm` ROCm install today, edit the five `LD_LIBRARY_PATH=` literals in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to point at the matching paths under your install. Or revert those literals to the dynamic form documented above so the workflow follows `TARGET_ROCM_PATH` automatically. +Because `LD_LIBRARY_PATH` for the rvs binary itself is currently [hardcoded](#hardcoded-ld_library_path-current-temporary-state) to `/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:...`, simply pointing `target_rocm_path` at a tarball install root is **not enough** — RVS will install into the right place, but the loader won't see the libs and the `Verify RVS binary library resolution` step will hard-fail. To use a non-`/opt/rocm` ROCm install today, edit the five `LD_LIBRARY_PATH=` literals in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to point at the matching paths under your install. Or revert those literals to the dynamic form documented above so the workflow follows `TARGET_ROCM_PATH` automatically. `sudo -n` is non-interactive — it fails fast instead of hanging if `NOPASSWD` isn't configured. There's no PTY over the SSH channel anyway, @@ -289,37 +289,37 @@ Before downloading or installing the tarball, the workflow runs **`Verify ROCm p | Sub-check | Action on failure | Catches | |---|---|---| -| `$TARGET_ROCM_PATH` directory exists | hard fail (`exit 1`, also prints the available `/opt/rocm*` installs to ease debugging) | ROCm not installed on target, or the configured path is wrong (e.g. typo, `/opt/rocm-7.13.0` vs `/opt/rocm-7.13`) | +| `$TARGET_ROCM_PATH` directory exists | hard fail (`exit 1`, also prints the available `/opt/rocm*` installs to ease debugging) | ROCm not installed on target, or the configured path is wrong (typo, point-release suffix mismatch, etc.) | | Read ROCm version from `$TARGET_ROCM_PATH/.info/version` (fallback `share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | | Major version match (regex on tarball name vs target's ROCm version) | hard fail on mismatch | RVS-7 tarball pointed at a ROCm-6 install | | `rocm-smi --showid` runs and exits 0 | hard fail | `amdgpu` driver not loaded, or `rocm-smi` missing | | `rocminfo` enumerates ≥ 1 GPU | hard fail | "ROCm installed but no GPU exposed" (group/permissions, BIOS IOMMU, etc.) | | `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Covers both system-package installs (libs in `/usr/lib/x86_64-linux-gnu`) and properly-registered versioned `/opt/rocm-*` installs. Warn-only because TheRock-style tarball installs that aren't registered with `ldconfig` still resolve at runtime via the binaries' RPATH. | -A typical successful log (with `target_rocm_path=/opt/rocm-7.13`): +A typical successful log (with `target_rocm_path=`): ``` -=== Target ROCm path: /opt/rocm-7.13 === -/opt/rocm-7.13 -> /opt/rocm-7.13.0 -=== ROCm version (under /opt/rocm-7.13) === -/opt/rocm-7.13/.info/version : 7.13.0 +=== Target ROCm path: === + -> . +=== ROCm version (under ) === +/.info/version : === Major version match (tarball vs target node) === tarball expects ROCm major : 7 target has ROCm major : 7 === rocm-smi === -GPU[0] : ID : 0x74a1 +GPU[0] : ID : 0xXXXX === rocminfo (GPU enumeration) === -GPU agents enumerated: 8 +GPU agents enumerated: === Key ROCm runtime libraries (via ldconfig) === - OK : libhsa-runtime64.so.1 (/opt/rocm-7.13/lib/libhsa-runtime64.so.1) - OK : libamdhip64.so (/opt/rocm-7.13/lib/libamdhip64.so) -::notice::ROCm prerequisites OK on target node at /opt/rocm-7.13 (version 7.13.0) + OK : libhsa-runtime64.so.1 (/libhsa-runtime64.so.1) + OK : libamdhip64.so (/libamdhip64.so) +::notice::ROCm prerequisites OK on target node at (version ) ``` After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR}/bin/rvs`) and fails the job in two cases: - **Unresolved deps:** any library shows up as `not found` — prevents the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. -- **Wrong-ROCm contamination:** any resolved library lives in a `/opt/rocm-` whose `realpath` differs from `$TARGET_ROCM_PATH` (e.g. `ldd` shows `/opt/rocm-7.2.0/lib/libamd_smi.so.26` while you asked for `/opt/rocm-7.13`). The step prints which paths leaked and suggests setting `target_rocm_path` to fix it. +- **Wrong-ROCm contamination:** any resolved library lives in a `/opt/rocm-` whose `realpath` differs from `$TARGET_ROCM_PATH` (e.g. `ldd` shows a library under a different `/opt/rocm-/` than the one you targeted). The step prints which paths leaked and suggests setting `target_rocm_path` to fix it. ### Manual one-liner (validate a candidate target node) @@ -371,9 +371,9 @@ e.g.: |---|---| | Run | `1234567890` | | Trigger | `schedule` | -| Orchestrator (GitHub runner) | `gha-orchestrator-01` | -| Target node (test execution) | `hostname` (`user@x.x.x.x`) | -| Target ROCm path | `/opt/rocm-7.13` (version `7.13.0`) | +| Orchestrator (GitHub runner) | `` | +| Target node (test execution) | `` (`@`) | +| Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | | Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | @@ -449,7 +449,7 @@ Watch the Actions tab for: | **Setup SSH key for target node** fails: `Host key verification failed` | `ssh-keyscan` couldn't pre-seed the key and `accept-new` rejected it (rare). Remove any stale entry for the target in the runner's `known_hosts`, or pre-populate it manually. | | **Verify ROCm prerequisites on target node** fails: ` does not exist on the target node` | The configured `target_rocm_path` / `vars.RVS_TARGET_ROCM_PATH` doesn't point at a real directory on the target. The step prints all `/opt/rocm*` installs that *do* exist — pick one of those (or fix the symlink). | | **Verify ROCm prerequisites on target node** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but `$TARGET_ROCM_PATH` is a ROCm `` install. Either pin a matching tarball with `tarball_url`, or change `target_rocm_path`. | -| **Verify RVS binary library resolution on target node** fails: `RVS is resolving libraries from a ROCm install OTHER than ...` | RVS picked up libraries from a different ROCm than the one you targeted (typical on hosts where `/opt/rocm` symlinks to the "wrong" version). The step lists the offending paths. Set `target_rocm_path` to the specific versioned path you want (e.g. `/opt/rocm-7.13`). | +| **Verify RVS binary library resolution on target node** fails: `RVS is resolving libraries from a ROCm install OTHER than ...` | RVS picked up libraries from a different ROCm than the one you targeted (typical on hosts where `/opt/rocm` symlinks to the "wrong" version). The step lists the offending paths. Set `target_rocm_path` to the specific install path you want (a versioned `/opt/rocm-/` on multi-rocm-package hosts, or a tarball install root). | | **Verify ROCm prerequisites on target node** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded on the target. SSH in and `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | | **Verify ROCm prerequisites on target node** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to `$TARGET_USER`. Add the user to `video` and `render` groups, log out and back in. | | **Install RVS on target node** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | @@ -469,7 +469,7 @@ There are three ways to point the workflow at a different node, in increasing or ```bash gh workflow run rvs-nightly-tests.yml \ -f target_node="" \ - -f target_rocm_path="/opt/rocm-7.13" # only needed on multi-ROCm hosts + -f target_rocm_path="" # only needed on multi-ROCm hosts ``` 3. **Permanent change:** update repo variable `RVS_TARGET_NODE` (and optionally `RVS_TARGET_USER` / `RVS_REMOTE_WORK_DIR` / `RVS_TARGET_ROCM_PATH`). All subsequent scheduled and manual runs will pick this up unless an input overrides it. diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index c26d0dfaf..74fd9928f 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -54,7 +54,7 @@ on: required: false default: '' target_rocm_path: - description: 'ROCm install dir on the target node to run RVS against, e.g. /opt/rocm-7.13 (default: vars.RVS_TARGET_ROCM_PATH or /opt/rocm)' + description: 'ROCm install dir on the target node to run RVS against, e.g. a versioned /opt/rocm- or a tarball install root (default: vars.RVS_TARGET_ROCM_PATH or /opt/rocm)' required: false default: '' @@ -170,9 +170,10 @@ jobs: TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER }} # ROCm install on the target node that RVS should run against. Lets the - # workflow target a specific ROCm (e.g. /opt/rocm-7.13) on hosts that - # have multiple ROCm versions side-by-side; defaults to the system - # /opt/rocm symlink for single-ROCm hosts. + # workflow target a specific ROCm install (a versioned /opt/rocm- on + # multi-rocm-package hosts, or a tarball install root anywhere) when the + # default /opt/rocm isn't what you want. Single-ROCm hosts can leave it + # at the default. TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH || '/opt/rocm' }} # SSH_KEY_FILE / SSH_CONFIG_FILE are derived from $RUNNER_TEMP in the # validate step and exported via $GITHUB_ENV so every subsequent step From 005c27ebb647abd977463560e5d736e05678c001 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 20 May 2026 17:08:24 -0400 Subject: [PATCH 163/275] - Move RVS_TARGET_NODE and RVS_TARGET_USER from repo Variables to Secrets so they're masked in run logs. - Require RVS_TARGET_ROCM_PATH (no /opt/rocm default); decouple INSTALL_DIR (always /opt/rocm/extras-) from TARGET_ROCM_PATH (drives LD_LIBRARY_PATH only), wire LD_LIBRARY_PATH dynamically off TARGET_ROCM_PATH instead of hardcoding /install/* literals. - Simplify prereq check to /bin/rocminfo + /bin/amd-smi version, remove RVS level 3, keep only level 4. Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 238 ++++++++++---------- .github/workflows/rvs-nightly-tests.yml | 250 +++++++--------------- 2 files changed, 186 insertions(+), 302 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 25b753ccd..2ed4fb7df 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -4,11 +4,11 @@ This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightl which picks up the **latest RVS tarball** from the index URL configured in `vars.RVS_TARBALL_INDEX_URL` (e.g. `https://repo.amd.com/rocm/rvs/tarball/`) once per day, copies it to a **configurable remote target node** over SSH, -installs it there, and runs RVS levels 3 and 4 on that node. +installs it there, and runs RVS level 4 on that node. The GitHub Actions runner ("RVS Runner") is only an **orchestrator** — it doesn't need a GPU or ROCm installed locally. All RVS install, binary -verification, and `rvs -r 3` / `rvs -r 4` execution happens on the target +verification, and `rvs -r 4` execution happens on the target node. The target node is configurable so the same workflow can be pointed at any GPU host without code changes. @@ -27,12 +27,11 @@ test [GitHub runner = orchestrator] ──ssh──▶ [target node = │ validate target_node / target_user │ │ write SSH key + config to $RUNNER_TEMP │ │ ssh rvs-target hostname; id ─────────────────────────────▶ │ connectivity check - │ ssh rvs-target ─────────────────────────────▶ │ /opt/rocm, rocm-smi, rocminfo, libs + │ ssh rvs-target ─────────────────────────────▶ │ rocminfo + amd-smi version on $TARGET_ROCM_PATH │ curl → ./pkg/.tar.gz │ │ scp ./pkg/.tar.gz rvs-target:… ─────────────────────────────▶ │ $REMOTE_WORK_DIR/pkg/ │ ssh rvs-target ─────────────────────────────▶ │ sudo -n tar -xzf → /opt/rocm/extras-/ │ ssh rvs-target ─────────────────────────────▶ │ verify RVS lib resolution - │ ssh rvs-target rvs -r 3 ─────────────────────────────▶ │ writes $REMOTE_WORK_DIR/reports/rvs_level_3.log │ ssh rvs-target rvs -r 4 ─────────────────────────────▶ │ writes $REMOTE_WORK_DIR/reports/rvs_level_4.log │ scp rvs-target:…/reports/*.log ./reports/ ◀───────────────────────────── │ │ build Markdown SUMMARY.md → GitHub job summary + artifact │ @@ -57,10 +56,10 @@ adjust the cron string in the workflow if your publish cadence is different. |---|---|---| | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | | `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | -| `target_node` | _(empty → `vars.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the variable that retargets the test execution.** | -| `target_user` | _(empty → `vars.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). | +| `target_node` | _(empty → `secrets.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the value that retargets the test execution.** Stored as a secret so the lab node identity isn't visible in repo settings or run logs (GitHub Actions automatically masks secret values as `***` in step output). | +| `target_user` | _(empty → `secrets.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). Stored as a secret so the lab account name isn't visible in repo settings or run logs (GitHub Actions automatically masks secret values as `***` in step output). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | -| `target_rocm_path` | _(empty → `vars.RVS_TARGET_ROCM_PATH`, then `/opt/rocm`)_ | Which ROCm install on the target node to run RVS against. Could be the default `/opt/rocm`, a versioned `/opt/rocm-/` (only present on hosts that use the AMD multi-ROCm apt repos), or a TheRock-style tarball install rooted anywhere (e.g. `$HOME//install`). RVS is installed into `/extras-/` and the prereq tools probe under ``. | +| `target_rocm_path` | _(empty → `vars.RVS_TARGET_ROCM_PATH`)_ — **required**, no hard-coded default | Absolute path to the ROCm tarball install root on the target node. This is the directory containing `bin/rocminfo`, `bin/amd-smi`, `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/` (the layout produced by the ROCm tarball install method). The workflow fails fast in the validate step if neither the input nor the variable is set. | Workflow inputs **win over repo variables**, so individual `workflow_dispatch` runs can be retargeted from the Actions UI without changing repo settings. @@ -96,16 +95,16 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| | `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | -| `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Default hostname/IP of the node where RVS is installed and tests run. Workflow fails fast on `schedule` if neither this var nor `target_node` input is set. | -| `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this var explicitly to avoid surprises. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | -| `RVS_TARGET_ROCM_PATH` | optional (default `/opt/rocm`) | ROCm install on the target node that RVS should run against. Set this when `/opt/rocm` isn't what you want — e.g. when running against a versioned `/opt/rocm-/` on a multi-ROCm-package host, or a TheRock-style tarball install under `$HOME`. The `Verify RVS binary library resolution` step fails fast if any lib resolves from a different ROCm install. | +| `RVS_TARGET_ROCM_PATH` | **Required** *(unless every run sets `target_rocm_path` input)* | Absolute path to the ROCm tarball install root on the target node — the directory that contains `bin/rocminfo`, `bin/amd-smi`, `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/`. The workflow doesn't assume any conventional path (no `/opt/rocm` default), since tarball installs land wherever you extracted them. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | **Secrets** (Settings → Secrets and variables → Actions → Secrets): | Name | Required? | Purpose | |---|---|---| +| `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast on `schedule` if neither this secret nor `target_node` input is set. | +| `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | ## How the latest tarball is picked @@ -138,39 +137,57 @@ etc., and any version inside `7.x` without code changes: # On the runner (Validate target node configuration step): # Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] ROCM_MAJOR=7 -# TARGET_ROCM_PATH comes from inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH -# (default: /opt/rocm). -INSTALL_DIR=${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR} # /extras-7 +# INSTALL_DIR is always /opt/rocm/extras-/ — it's where the RVS +# tarball gets extracted. This is decoupled from TARGET_ROCM_PATH so the +# install location matches the manual command verbatim regardless of +# which ROCm install the workflow is told to run *against*. +INSTALL_DIR=/opt/rocm/extras-${ROCM_MAJOR} # /opt/rocm/extras-7 RVS_BIN=${INSTALL_DIR}/bin/rvs +# TARGET_ROCM_PATH (from inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH; +# required, no default) is *where the ROCm runtime libraries live*. Set +# the repo variable to the absolute install root of the ROCm tarball you +# want RVS to run against (the directory that contains bin/, lib/, etc.). + # On the target node (Install RVS on target node step), via SSH: -# sudo is used only when $INSTALL_DIR isn't user-writable (e.g. under -# /opt/rocm-*). For TheRock tarball installs in $HOME, plain mkdir/tar is used. +# sudo is used only when $INSTALL_DIR isn't user-writable. /opt/rocm/* is +# typically root-owned so this picks up sudo -n automatically. mkdir -p "$INSTALL_DIR" # (with `sudo -n` if needed) tar -xzf "$REMOTE_WORK_DIR/pkg/.tar.gz" -C "$INSTALL_DIR" -# LD_LIBRARY_PATH for the rvs binary is currently HARDCODED to match the -# layout the RVS team uses manually. If you point target_rocm_path at a -# non-/opt/rocm install (e.g. TheRock under $HOME), update the literal -# strings in the workflow's install / verify-ldd / level-3 / level-4 / -# report steps to match — see the "Hardcoded LD_LIBRARY_PATH" note below. -export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" +# LD_LIBRARY_PATH is wired off INSTALL_DIR (for RVS's own libs) plus the +# three TheRock-style subdirs of TARGET_ROCM_PATH (matches the official +# ROCm tarball-install docs). This is what makes a non-/opt/rocm +# TARGET_ROCM_PATH actually do something useful. +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" "$RVS_BIN" --version ``` -### Hardcoded `LD_LIBRARY_PATH` (current temporary state) +### Install location vs. ROCm runtime path + +Two paths in the workflow look similar but mean very different things, and +keeping them straight is what made the multi-ROCm-host case finally work: + +| Variable | What it is | Default | How to override | +|---|---|---|---| +| `INSTALL_DIR` | Where the RVS tarball gets extracted on the target node. Always under `/opt/rocm/`, matching the manual command. | `/opt/rocm/extras-${ROCM_MAJOR}` | Not configurable by design — the install location is canonical, decoupled from where ROCm itself lives. | +| `TARGET_ROCM_PATH` | Where the ROCm runtime libraries live (the directory containing `bin/`, `lib/`, `lib/llvm/lib/`, `lib/rocm_sysdeps/lib/`). Drives `LD_LIBRARY_PATH`, the prereq-check probe, and the version row in the report. | **(no default — required)** | `inputs.target_rocm_path` (workflow_dispatch) or `vars.RVS_TARGET_ROCM_PATH` (repo Variables tab). Workflow fails fast in the validate step if neither is set. | -To stay 1:1 with the manual sequence the RVS team uses today, the workflow -hardcodes the runtime `LD_LIBRARY_PATH` for every step that executes the -`rvs` binary (install, ldd-verify, level 3, level 4, and the report's -`--version` query) to exactly: +This split exists because hosts that have multiple ROCm installs side-by-side +(or that installed ROCm via a TheRock tarball under `$HOME`) almost never +keep the runtime libs at `/opt/rocm/lib/`. The workflow needs to know where +`/lib/`, `/lib/llvm/lib/`, and `/lib/rocm_sysdeps/lib/` actually are; the +install location of RVS itself should not — and does not — care. + +The runtime `LD_LIBRARY_PATH` for every step that executes `rvs` (install, +ldd-verify, level 4, report `--version` query) is now: ```bash -LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:$LD_LIBRARY_PATH +LD_LIBRARY_PATH=$INSTALL_DIR/lib:$TARGET_ROCM_PATH/lib/rocm_sysdeps/lib:$TARGET_ROCM_PATH/lib/llvm/lib:$TARGET_ROCM_PATH/lib:$LD_LIBRARY_PATH ``` -That mirrors the manual flow: +Mapping back to the manual sequence the RVS team uses today: ```bash sudo mkdir -p /opt/rocm/extras-7 @@ -178,42 +195,20 @@ sudo tar -xzf amdrocm7-rvs-1.4.21-288-Linux.tar.gz -C /opt/rocm/extras-7 export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:$LD_LIBRARY_PATH ``` -Consequences and trade-offs: - -- The default `target_rocm_path=/opt/rocm` case "just works" — `INSTALL_DIR` resolves to `/opt/rocm/extras-7`, which is exactly what the hardcoded path points at. -- If you set `target_rocm_path` to something else (a versioned `/opt/rocm-/` or a TheRock home-dir install), RVS will install into the new path but the hardcoded `LD_LIBRARY_PATH` will still point at `/opt/rocm/extras-7/lib`. The `Verify RVS binary library resolution` step will catch this and fail with a clear error listing the offending paths — so it's loud, not silent. To actually retarget at a different ROCm, edit the five `LD_LIBRARY_PATH=` lines in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to the corresponding paths under the new install. -- This is a deliberate temporary state. When the team is ready for full multi-ROCm support, replace those five literals with `"${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${INSTALL_DIR}/lib/rocm_sysdeps/lib:${INSTALL_DIR}/lib:${LD_LIBRARY_PATH:-}"` — the prereq-check step already uses that dynamic form as a reference. - -### Multi-ROCm hosts (`/opt/rocm-`, `/opt/rocm-`, …) - -When the target node has several versioned ROCm installs side-by-side, -`/opt/rocm` is typically a symlink to one of them and the RVS binary's -RUNPATH resolves to `/opt/rocm/lib`. Without `target_rocm_path`/ -`RVS_TARGET_ROCM_PATH`, the dynamic linker will silently pull libraries -from whichever ROCm the symlink happens to point at — which may not be -the one you want to test. Symptom: `ldd $RVS_BIN` shows paths like -`/opt/rocm-/lib/libamd_smi.so.` when you expected a different version. +| Manual entry | Workflow equivalent | Notes | +|---|---|---| +| `/opt/rocm/extras-7/lib` | `${INSTALL_DIR}/lib` | Same path — `INSTALL_DIR` is literally `/opt/rocm/extras-`. | +| `/install/lib` | `${TARGET_ROCM_PATH}/lib` | The manual command's `/install/` was a literal filesystem path that only existed on the RVS build container. The workflow replaces it with the configurable `TARGET_ROCM_PATH/lib`, which is what "the ROCm install's lib directory" actually means on a real host. | +| `/install/lib/rocm_sysdeps/` | `${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib` | Same fix, plus the trailing `/lib` that the official ROCm tarball docs include and the manual command was missing. | +| `/install/lib/llvm/lib` | `${TARGET_ROCM_PATH}/lib/llvm/lib` | Where `libomp.so` lives in TheRock builds. | -Find the right path on the node: +### What to set `RVS_TARGET_ROCM_PATH` to -```bash -ssh @ ' - ls -d /opt/rocm* 2>/dev/null - echo "/opt/rocm -> $(readlink /opt/rocm 2>/dev/null || echo "(not a symlink)")" - for d in /opt/rocm-*; do - v=$(cat "$d/.info/version" 2>/dev/null || echo "?") - printf " %-30s version=%s\n" "$d" "$v" - done -' -``` +Set it to the absolute path of the ROCm **tarball install root** on the target node — i.e. the directory you (or whoever provisioned the node) chose when extracting the ROCm distribution tarball. That directory must contain at least `bin/rocminfo`, `bin/amd-smi`, `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/`. There is no hard-coded default; the workflow fails fast in the validate step if `RVS_TARGET_ROCM_PATH` and the per-run `target_rocm_path` input are both empty. -Then either set `vars.RVS_TARGET_ROCM_PATH=` once for -all runs, or pass `-f target_rocm_path=` for a single -dispatch. The workflow's `Verify RVS binary library resolution` step -explicitly fails the job if any resolved library lives in a `/opt/rocm-*` -other than `TARGET_ROCM_PATH`, so cross-contamination can't go unnoticed. +The RVS tarball itself still always lands in `/opt/rocm/extras-/` regardless — that part is invariant. -### TheRock-style tarball ROCm installs (no `/opt/rocm-`) +### TheRock-style tarball ROCm installs The [official ROCm 7.12+ "tarball" install method](https://rocm.docs.amd.com/en/7.12.0-preview/install/rocm.html?fam=instinct&gpu=mi350x&os=ubuntu&os-version=24.04&i=tar) doesn't drop ROCm under `/opt/rocm-/`. Instead you extract a @@ -252,12 +247,10 @@ This works with the workflow as-is, with two things to be aware of: What the workflow handles automatically for tarball installs: - The install step **skips `sudo`** when the destination is user-writable (TheRock installs in `$HOME` don't need root); only system `/opt/rocm-*` installs trigger `sudo -n`. -- The prereq check uses whatever `rocm-smi` / `rocminfo` are first on `PATH` (system package installs land them in `/usr/bin/`; versioned installs typically register them via `/etc/profile.d/rocm.sh`). The binaries' RPATH locates the matching ROCm runtime libs, so no `LD_LIBRARY_PATH` setup is needed for the prereq tools. -- Tarball installs typically don't ship a `.info/version` file, so the version-string row in the report may show `unknown` — the major-version cross-check is automatically skipped in that case (no false failure). - -**What you have to do manually right now** to actually run RVS against a TheRock-style install: +- The prereq check invokes `${TARGET_ROCM_PATH}/bin/rocminfo` and `${TARGET_ROCM_PATH}/bin/amd-smi version` directly by absolute path. TheRock tarball binaries have RPATH/RUNPATH baked in relative to `${TARGET_ROCM_PATH}/lib`, so they resolve their own ROCm libs without needing `PATH` or `LD_LIBRARY_PATH` setup. +- The version-string row in the report uses what `rvs --version` prints, so it always reflects the RVS tarball — not the underlying ROCm. The major-version cross-check the workflow used to do against `.info/version` is gone (TheRock installs don't ship one). -Because `LD_LIBRARY_PATH` for the rvs binary itself is currently [hardcoded](#hardcoded-ld_library_path-current-temporary-state) to `/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:...`, simply pointing `target_rocm_path` at a tarball install root is **not enough** — RVS will install into the right place, but the loader won't see the libs and the `Verify RVS binary library resolution` step will hard-fail. To use a non-`/opt/rocm` ROCm install today, edit the five `LD_LIBRARY_PATH=` literals in `.github/workflows/rvs-nightly-tests.yml` (grep for `/opt/rocm/extras-7/lib`) to point at the matching paths under your install. Or revert those literals to the dynamic form documented above so the workflow follows `TARGET_ROCM_PATH` automatically. +**To use a TheRock-style install just set `vars.RVS_TARGET_ROCM_PATH` (or pass `-f target_rocm_path=...`) to the absolute install root, e.g. `$HOME//install`. The workflow's `LD_LIBRARY_PATH` is wired off `TARGET_ROCM_PATH` (see [Install location vs. ROCm runtime path](#install-location-vs-rocm-runtime-path)), so the loader picks up `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/` from the install you point at — no file edits required. `sudo -n` is non-interactive — it fails fast instead of hanging if `NOPASSWD` isn't configured. There's no PTY over the SSH channel anyway, @@ -279,88 +272,83 @@ if `$RVS_BIN` isn't executable after extraction. **On the target node** (all enforced by the **Pre-flight ROCm checks** below — the workflow fails fast if any are missing): - SSH server reachable from the runner, with the public counterpart of `secrets.RVS_TARGET_SSH_KEY` authorized for `$TARGET_USER`. -- `$TARGET_USER` has **`NOPASSWD` sudo** for `mkdir` + `tar` into `/opt/rocm/extras-` — the install step uses `sudo -n` and aborts otherwise. -- ROCm base stack already installed at `/opt/rocm/` with a major version that matches the tarball name (e.g. `amdrocm7-rvs-…` requires ROCm 7.x). The TGZ only ships RVS, not a full ROCm install; the RVS binary depends on ROCm libraries resolved via `RPATH` to the system ROCm. -- Working kernel driver (`amdgpu`) and at least one GPU enumerated by `rocm-smi` and `rocminfo`. +- `$TARGET_USER` has **`NOPASSWD` sudo** for `mkdir` + `tar` into `/opt/rocm/extras-` — the install step uses `sudo -n` (when the path isn't user-writable) and aborts otherwise. +- A ROCm tarball install at `$TARGET_ROCM_PATH` (configured via `vars.RVS_TARGET_ROCM_PATH` or the per-run `target_rocm_path` input) that provides at least `bin/rocminfo` and `bin/amd-smi`. The RVS tarball only ships RVS, not the rest of ROCm, so the runtime libs under `$TARGET_ROCM_PATH/lib`, `$TARGET_ROCM_PATH/lib/llvm/lib`, and `$TARGET_ROCM_PATH/lib/rocm_sysdeps/lib` must be present. +- Working kernel driver (`amdgpu`) and at least one GPU enumerated by `rocminfo` / `amd-smi`. ## Pre-flight ROCm checks -Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites on target node`** — the same checks as before, but executed remotely via SSH on the target node, not on the GitHub runner. The step accumulates failures and reports all of them in a single log so the cause is obvious: +Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites on target node`** over SSH. It's deliberately minimal — two probes against the actual install at `$TARGET_ROCM_PATH`: | Sub-check | Action on failure | Catches | |---|---|---| -| `$TARGET_ROCM_PATH` directory exists | hard fail (`exit 1`, also prints the available `/opt/rocm*` installs to ease debugging) | ROCm not installed on target, or the configured path is wrong (typo, point-release suffix mismatch, etc.) | -| Read ROCm version from `$TARGET_ROCM_PATH/.info/version` (fallback `share/doc/rocm-core/version`) | warn if missing | Partial install, dev pkgs only | -| Major version match (regex on tarball name vs target's ROCm version) | hard fail on mismatch | RVS-7 tarball pointed at a ROCm-6 install | -| `rocm-smi --showid` runs and exits 0 | hard fail | `amdgpu` driver not loaded, or `rocm-smi` missing | -| `rocminfo` enumerates ≥ 1 GPU | hard fail | "ROCm installed but no GPU exposed" (group/permissions, BIOS IOMMU, etc.) | -| `libhsa-runtime64.so.1` and `libamdhip64.so` present in `ldconfig -p` | warn only | Covers both system-package installs (libs in `/usr/lib/x86_64-linux-gnu`) and properly-registered versioned `/opt/rocm-*` installs. Warn-only because TheRock-style tarball installs that aren't registered with `ldconfig` still resolve at runtime via the binaries' RPATH. | +| `$TARGET_ROCM_PATH` directory exists | hard fail (`exit 1`) | ROCm not installed on target, or the configured path is wrong (typo, missing trailing component, etc.) | +| `$TARGET_ROCM_PATH/bin/rocminfo` exits 0 | hard fail (via `set -euo pipefail`) | Driver not loaded, no GPU exposed, runtime libs under `$TARGET_ROCM_PATH/lib` missing/broken, group permissions wrong | +| `$TARGET_ROCM_PATH/bin/amd-smi version` exits 0 | hard fail | `amd-smi` missing from the install, ROCm SMI library mismatch, or driver/runtime broken | + +Both binaries are invoked by absolute path (`${TARGET_ROCM_PATH}/bin/...`), so the workflow doesn't depend on `PATH` or `LD_LIBRARY_PATH` being set up — the binaries' baked-in RPATH/RUNPATH resolves the runtime libs from `${TARGET_ROCM_PATH}/lib`. If either probe fails, the step fails fast with the binary's own error message in the log, which is usually more diagnostic than anything the workflow could add on top. A typical successful log (with `target_rocm_path=`): ``` +=== System === +Linux 6.x.x-x-generic ... + === Target ROCm path: === - -> . -=== ROCm version (under ) === -/.info/version : -=== Major version match (tarball vs target node) === -tarball expects ROCm major : 7 -target has ROCm major : 7 -=== rocm-smi === -GPU[0] : ID : 0xXXXX -=== rocminfo (GPU enumeration) === -GPU agents enumerated: -=== Key ROCm runtime libraries (via ldconfig) === - OK : libhsa-runtime64.so.1 (/libhsa-runtime64.so.1) - OK : libamdhip64.so (/libamdhip64.so) -::notice::ROCm prerequisites OK on target node at (version ) -``` -After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR}/bin/rvs`) and fails the job in two cases: +=== /bin/rocminfo === +ROCk module version is loaded +HSA Agents +========== +Agent 1 + Name: AMD Instinct ... + ... +Agent 2..N: (one per GPU) -- **Unresolved deps:** any library shows up as `not found` — prevents the workflow from spending hours on `rvs -r 3`/`-r 4` only to discover a `dlopen` error in the level log. -- **Wrong-ROCm contamination:** any resolved library lives in a `/opt/rocm-` whose `realpath` differs from `$TARGET_ROCM_PATH` (e.g. `ldd` shows a library under a different `/opt/rocm-/` than the one you targeted). The step prints which paths leaked and suggests setting `target_rocm_path` to fix it. +=== /bin/amd-smi version === +AMDSMI Tool: | AMDSMI Library version: | ROCm version: + +::notice::ROCm prerequisites OK on target node at +``` + +After install, **`Verify RVS binary library resolution on target node`** runs `ldd "$RVS_BIN"` over SSH (where `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`) and **hard-fails** the job if any library shows up as `not found`. This prevents the workflow from spending hours on `rvs -r 4` only to discover a `dlopen` error in the level log. The full `ldd` output is printed for diagnostic purposes — useful for spotting which `$TARGET_ROCM_PATH/lib/...` paths each library resolved from. ### Manual one-liner (validate a candidate target node) -To verify a node is viable before pointing the workflow at it, SSH into the candidate and run: +To verify a node is viable before pointing the workflow at it, SSH into the candidate and run the same two probes the workflow runs (substituting `` with what you plan to set `target_rocm_path` to): ```bash -set -uo pipefail -[ -d /opt/rocm ] || { echo "no /opt/rocm"; exit 1; } -echo "version: $(cat /opt/rocm/.info/version 2>/dev/null || \ - cat /opt/rocm/share/doc/rocm-core/version 2>/dev/null || \ - echo unknown)" -rocm-smi --showid >/dev/null && echo "rocm-smi OK" -N=$(rocminfo 2>/dev/null | grep -c 'Device Type:.*GPU' || echo 0) -[ "$N" -ge 1 ] && echo "rocminfo OK ($N GPU agents)" || { echo "no GPU"; exit 1; } -ldconfig -p | grep -q libhsa-runtime64.so.1 && echo "libhsa-runtime64 OK" || echo "warn: libhsa-runtime64 missing" +ROCM_PATH= +set -euo pipefail +[ -d "$ROCM_PATH" ] || { echo "$ROCM_PATH does not exist"; exit 1; } +"$ROCM_PATH/bin/rocminfo" +"$ROCM_PATH/bin/amd-smi" version sudo -n true 2>/dev/null && echo "NOPASSWD sudo OK" || echo "warn: sudo requires password (install step will fail)" echo "Target node OK" ``` -## The tests +If both `rocminfo` and `amd-smi version` exit zero, the workflow's prereq step will pass on this node. + +## The test Run verbatim on the target node (with `$RVS_BIN` = `/opt/rocm/extras-${ROCM_MAJOR}/bin/rvs`, populated by the validate step — for an `amdrocm7-…` tarball this resolves to `/opt/rocm/extras-7/bin/rvs`): ```bash -"$RVS_BIN" -r 3 "$RVS_BIN" -r 4 ``` -Both commands are executed sequentially over SSH. Each step captures full -stdout/stderr to `$REMOTE_WORK_DIR/reports/rvs_level_.log` on the -target, then the **`Collect logs from target node`** step `scp`s the -`*.log` files back to `./reports/` on the runner. Each command's exit -code is propagated through SSH and recorded in a step output. Neither -failure short-circuits the other — both levels always run, and the job -is marked failed at the end if either exited non-zero. +The command is executed over SSH. The step captures full stdout/stderr to +`$REMOTE_WORK_DIR/reports/rvs_level_4.log` on the target, then the +**`Collect logs from target node`** step `scp`s the log file back to +`./reports/` on the runner. The command's exit code is propagated through +SSH and recorded in a step output, and the job is marked failed at the end +if level 4 exited non-zero. ## Test report -After both RVS commands finish and logs are collected, the `Build test report` +After RVS finishes and the log is collected, the `Build test report` step generates `reports/SUMMARY.md` (also written to the GitHub job summary), e.g.: @@ -384,7 +372,6 @@ e.g.: | Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | |---------|------------------------------------------------------|:------:|-----:|-----------------------|-----------------------| -| Level 3 | `/opt/rocm/extras-7/bin/rvs -r 3` (on `hostname`) | PASS | 0 | 2026-05-19T15:01:00Z | 2026-05-19T15:25:11Z | | Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` (on `hostname`) | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | ``` @@ -393,7 +380,6 @@ The full artifact contents: ``` rvs-nightly-report-/ ├── SUMMARY.md -├── rvs_level_3.log └── rvs_level_4.log ``` @@ -433,7 +419,7 @@ Watch the Actions tab for: 5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. 6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. 7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target, all from `. -8. Two RVS level steps complete; the run summary shows the results table with both **Orchestrator** and **Target node** rows. +8. RVS level 4 step completes; the run summary shows the results table with both **Orchestrator** and **Target node** rows. ## Debugging a failed run @@ -442,21 +428,21 @@ Watch the Actions tab for: | `detect` job exits with `vars.RVS_TARBALL_INDEX_URL is not set` | The required variable is unset. Set it in the repo Variables (e.g. to `https://repo.amd.com/rocm/rvs/tarball/`), or pass `tarball_url` via `workflow_dispatch`. | | `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the URL in `vars.RVS_TARBALL_INDEX_URL` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | | `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | -| **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `vars.RVS_TARGET_NODE` is set. Set the variable, or pass `target_node` via `workflow_dispatch`. | +| **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | | **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | | **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify by `ssh -i $TARGET_USER@$TARGET_NODE hostname` from a workstation. | | **Setup SSH key for target node** fails: `Connection timed out` / `Connection refused` | Network reachability problem between the orchestrator runner and the target node. Check firewall / VPN / bastion routing. | | **Setup SSH key for target node** fails: `Host key verification failed` | `ssh-keyscan` couldn't pre-seed the key and `accept-new` rejected it (rare). Remove any stale entry for the target in the runner's `known_hosts`, or pre-populate it manually. | -| **Verify ROCm prerequisites on target node** fails: ` does not exist on the target node` | The configured `target_rocm_path` / `vars.RVS_TARGET_ROCM_PATH` doesn't point at a real directory on the target. The step prints all `/opt/rocm*` installs that *do* exist — pick one of those (or fix the symlink). | -| **Verify ROCm prerequisites on target node** fails: `ROCm major version mismatch` | The tarball is for ROCm `` but `$TARGET_ROCM_PATH` is a ROCm `` install. Either pin a matching tarball with `tarball_url`, or change `target_rocm_path`. | -| **Verify RVS binary library resolution on target node** fails: `RVS is resolving libraries from a ROCm install OTHER than ...` | RVS picked up libraries from a different ROCm than the one you targeted (typical on hosts where `/opt/rocm` symlinks to the "wrong" version). The step lists the offending paths. Set `target_rocm_path` to the specific install path you want (a versioned `/opt/rocm-/` on multi-rocm-package hosts, or a tarball install root). | -| **Verify ROCm prerequisites on target node** fails: `rocm-smi … exited non-zero` | `amdgpu` kernel driver is not loaded on the target. SSH in and `lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`. | -| **Verify ROCm prerequisites on target node** fails: `rocminfo enumerated 0 GPU agents` | Driver loaded but no GPU exposed to `$TARGET_USER`. Add the user to `video` and `render` groups, log out and back in. | +| **Verify ROCm prerequisites on target node** fails: ` does not exist on the target node` | The configured `target_rocm_path` / `vars.RVS_TARGET_ROCM_PATH` doesn't point at a real directory on the target. Verify by `ssh @ 'ls -d '`. | +| **Verify ROCm prerequisites on target node** fails: `/bin/rocminfo: No such file or directory` | The install at `$TARGET_ROCM_PATH` is incomplete — missing `bin/rocminfo`. Either pick a different `target_rocm_path` (one that contains a complete ROCm distribution) or reinstall ROCm at the configured path. | +| **Verify ROCm prerequisites on target node** fails: `rocminfo` exits non-zero | Driver issue or runtime libs missing. Common causes: `amdgpu` kernel driver not loaded (`lsmod \| grep amdgpu`, then `sudo modprobe amdgpu` and check `dmesg`); `$TARGET_USER` not in `video`/`render` groups; `$TARGET_ROCM_PATH/lib` missing or broken. The `rocminfo` error message in the log usually pinpoints the cause. | +| **Verify ROCm prerequisites on target node** fails: `amd-smi version` exits non-zero | Either `amd-smi` is missing from `$TARGET_ROCM_PATH/bin/`, or the AMDSMI library under `$TARGET_ROCM_PATH/lib` is broken/missing. Reinstall or repoint `target_rocm_path` at a complete install. | +| **Verify RVS binary library resolution on target node** fails: `RVS binary has unresolved library dependencies on target` | One or more libraries showed up as `not found` in `ldd` output. The `LD_LIBRARY_PATH` (built from `$INSTALL_DIR/lib` + `$TARGET_ROCM_PATH/{lib,lib/llvm/lib,lib/rocm_sysdeps/lib}`) didn't have them, RUNPATH didn't have them, and `ldconfig` didn't have them either. Usually means `$TARGET_ROCM_PATH` is incomplete (missing libraries under `lib/`, `lib/llvm/lib/`, or `lib/rocm_sysdeps/lib/`). The step's `ldd` output above the error names the specific missing library. | | **Install RVS on target node** fails: `Cannot parse ROCm major version from tarball name` | The tarball doesn't match `^amdrocm-`. Either pin a correctly-named tarball with `tarball_url`, or fix the upstream filename. | | **Install RVS on target node** fails: `sudo: a password is required` | `$TARGET_USER` doesn't have `NOPASSWD` sudo on the target. Add a sudoers entry permitting `mkdir` and `tar` into `$TARGET_ROCM_PATH/extras-*` without a password. | | **Install RVS on target node** fails: `rvs binary not found or not executable at /extras-/bin/rvs after install` | The tarball isn't rooted at `./bin/`, `./lib/`, etc. The extraction landed `bin/rvs` somewhere else inside `$TARGET_ROCM_PATH/extras-/`. Inspect the step log (`ls -la` output) to see the actual layout; the workflow may need `--strip-components=` added to the `tar` invocation. | | **Verify RVS binary library resolution on target node** fails with `not found` | A ROCm runtime library is missing or not in `RPATH` on the target. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | -| **Run RVS level N on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check the level log for the specific error. | +| **Run RVS level 4 on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check `rvs_level_4.log` in the artifact for the specific error. | | **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | | Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually with `force=true` to validate. | @@ -464,14 +450,14 @@ Watch the Actions tab for: There are three ways to point the workflow at a different node, in increasing order of permanence: -1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` (and optionally `target_user` / `remote_work_dir` / `target_rocm_path`). Anything left blank falls back to the matching repo variable. `target_node` has no hard-coded default (workflow fails fast), `target_user` falls through to the orchestrator runner's local user, `remote_work_dir` falls through to `/tmp/rvs-nightly-`, and `target_rocm_path` falls through to `/opt/rocm`. This is the right path for "test this tarball on host X today". +1. **Single run, from the Actions UI:** Run workflow → fill in `target_node` and `target_rocm_path` (and optionally `target_user` / `remote_work_dir`). Anything left blank falls back to the matching repo configuration value — `target_node` and `target_user` read from the **secrets** `RVS_TARGET_NODE` / `RVS_TARGET_USER` (both masked as `***` in run logs); `target_rocm_path` / `remote_work_dir` read from repo Variables. `target_node` and `target_rocm_path` have no hard-coded defaults — the workflow fails fast if neither input nor stored value is set for either. `target_user` falls through to the orchestrator runner's local user; `remote_work_dir` falls through to `/tmp/rvs-nightly-`. 2. **Single run, from `gh` CLI:** ```bash gh workflow run rvs-nightly-tests.yml \ -f target_node="" \ - -f target_rocm_path="" # only needed on multi-ROCm hosts + -f target_rocm_path="" ``` -3. **Permanent change:** update repo variable `RVS_TARGET_NODE` (and optionally `RVS_TARGET_USER` / `RVS_REMOTE_WORK_DIR` / `RVS_TARGET_ROCM_PATH`). All subsequent scheduled and manual runs will pick this up unless an input overrides it. +3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick these up unless an input overrides them. The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 74fd9928f..e8bcd8628 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -2,11 +2,11 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball published at the index URL configured in # vars.RVS_TARBALL_INDEX_URL once per day, copies it to a configurable target -# node, installs it there, runs RVS levels 3 and 4 on that node, and uploads a -# Markdown report + per-level logs as an artifact from the GitHub runner. +# node, installs it there, runs RVS level 4 on that node, and uploads a +# Markdown report + per-level log as an artifact from the GitHub runner. # # The GitHub Actions runner ("RVS Runner") only orchestrates. All RVS install, -# binary verification, and rvs -r 3 / -r 4 execution happens on the target node +# binary verification, and rvs -r 4 execution happens on the target node # reached over SSH. The target node is configurable so the same workflow can be # pointed at any GPU host without code changes. # @@ -14,14 +14,23 @@ name: RVS Nightly Tests # --------------------------- # Variables (Settings → Secrets and variables → Actions → Variables): # RVS_TARBALL_INDEX_URL HTTP listing the published amdrocm*-rvs-*.tar.gz files. -# RVS_TARGET_NODE Default hostname/IP of the node that runs RVS. -# Can be overridden per-run via workflow_dispatch input. -# RVS_TARGET_USER (Optional) SSH user on the target node. # RVS_REMOTE_WORK_DIR (Optional) Working dir on the target node. # Default: /tmp/rvs-nightly-. +# RVS_TARGET_ROCM_PATH Default absolute path to the ROCm tarball install +# root on the target node. Can be overridden per-run +# via workflow_dispatch input target_rocm_path. # RVS_TEST_RUNNER_LABEL (Optional) Label of the GitHub runner. Default: self-hosted. # # Secrets (Settings → Secrets and variables → Actions → Secrets): +# RVS_TARGET_NODE Default hostname/IP of the node that runs RVS. Stored +# as a secret to avoid leaking the lab node identity in +# repo settings / run logs (only the workflow accesses +# it). Can be overridden per-run via workflow_dispatch +# input target_node. +# RVS_TARGET_USER (Optional) SSH user on the target node. Stored as a +# secret so the lab account name isn't visible in repo +# settings or run logs. Can be overridden per-run via +# workflow_dispatch input target_user. # RVS_TARGET_SSH_KEY Private SSH key (in PEM/OpenSSH format) authorized on # the target node for RVS_TARGET_USER. The user on the # target node must have NOPASSWD sudo for installs into @@ -42,11 +51,11 @@ on: type: boolean default: false target_node: - description: 'Hostname/IP of node to install RVS on and run tests (default: vars.RVS_TARGET_NODE)' + description: 'Hostname/IP of node to install RVS on and run tests (default: secrets.RVS_TARGET_NODE)' required: false default: '' target_user: - description: 'SSH user on the target node (default: vars.RVS_TARGET_USER)' + description: 'SSH user on the target node (default: secrets.RVS_TARGET_USER)' required: false default: '' remote_work_dir: @@ -54,7 +63,7 @@ on: required: false default: '' target_rocm_path: - description: 'ROCm install dir on the target node to run RVS against, e.g. a versioned /opt/rocm- or a tarball install root (default: vars.RVS_TARGET_ROCM_PATH or /opt/rocm)' + description: 'ROCm tarball install root on the target node to run RVS against (default: vars.RVS_TARGET_ROCM_PATH)' required: false default: '' @@ -157,7 +166,7 @@ jobs: key: rvs-nightly-tarball-${{ steps.resolve.outputs.tarball_name }} test: - name: Install RVS and run levels 3 + 4 (on remote target node) + name: Install RVS and run level 4 (on remote target node) needs: detect if: needs.detect.outputs.should_run == 'true' runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} @@ -167,14 +176,16 @@ jobs: TARBALL_NAME: ${{ needs.detect.outputs.tarball_name }} # Target node where install + tests actually run. Inputs win over repo vars # so individual runs can be retargeted via workflow_dispatch. - TARGET_NODE: ${{ inputs.target_node || vars.RVS_TARGET_NODE }} - TARGET_USER: ${{ inputs.target_user || vars.RVS_TARGET_USER }} - # ROCm install on the target node that RVS should run against. Lets the - # workflow target a specific ROCm install (a versioned /opt/rocm- on - # multi-rocm-package hosts, or a tarball install root anywhere) when the - # default /opt/rocm isn't what you want. Single-ROCm hosts can leave it - # at the default. - TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH || '/opt/rocm' }} + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + # ROCm tarball install root on the target node that RVS should run + # against. This is the directory containing bin/, lib/, lib/llvm/lib/, + # lib/rocm_sysdeps/lib/, etc. (as produced by the ROCm tarball install + # method). Set vars.RVS_TARGET_ROCM_PATH to the absolute path of that + # install on the target node, or pass target_rocm_path per-run. No + # default — the validate step fails fast if neither is set, since + # there is no sensible system-wide default for tarball installs. + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} # SSH_KEY_FILE / SSH_CONFIG_FILE are derived from $RUNNER_TEMP in the # validate step and exported via $GITHUB_ENV so every subsequent step # inherits them. We can't reference runner.temp here because the @@ -188,7 +199,12 @@ jobs: set -euo pipefail if [ -z "${TARGET_NODE:-}" ]; then - echo "::error::No target node configured. Set workflow_dispatch input 'target_node' or repo variable 'RVS_TARGET_NODE'." + echo "::error::No target node configured. Set workflow_dispatch input 'target_node' or repo secret 'RVS_TARGET_NODE'." + exit 1 + fi + + if [ -z "${TARGET_ROCM_PATH:-}" ]; then + echo "::error::No ROCm tarball install root configured. Set workflow_dispatch input 'target_rocm_path' or repo variable 'RVS_TARGET_ROCM_PATH' to the absolute path of the ROCm tarball install on the target node." exit 1 fi @@ -205,11 +221,16 @@ jobs: echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" exit 1 fi - # Install RVS into the *selected* ROCm's extras dir so it lives - # alongside the matching ROCm runtime; this also makes the RUNPATH- - # derived /opt/rocm/lib lookup harmless because LD_LIBRARY_PATH below - # will point at $TARGET_ROCM_PATH/lib first. - INSTALL_DIR="${TARGET_ROCM_PATH}/extras-${ROCM_MAJOR}" + # RVS is always installed into /opt/rocm/extras-/ — this is + # decoupled from TARGET_ROCM_PATH. INSTALL_DIR is *where the RVS + # tarball gets extracted*; TARGET_ROCM_PATH is *where the ROCm + # runtime libraries live* (for LD_LIBRARY_PATH). The two concepts + # are intentionally separate so the install location matches the + # manual sequence (sudo tar -xzf ... -C /opt/rocm/extras-) + # while the runtime lib path can be retargeted at any ROCm install + # on the host (e.g. a TheRock tarball under $HOME) via the repo + # variable RVS_TARGET_ROCM_PATH. + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" # Workflow-scoped SSH state under $RUNNER_TEMP so we never touch the @@ -286,106 +307,33 @@ jobs: run: | set -euo pipefail ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "TARBALL_NAME='$TARBALL_NAME' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set -uo pipefail - fail=0 - - # rocm-smi / rocminfo are expected to already be on PATH (system - # package install lands them in /usr/bin; versioned installs put - # them under $TARGET_ROCM_PATH/bin and are typically added to PATH - # via /etc/profile.d). Their RPATH/RUNPATH locates ROCm runtime - # libs, so no LD_LIBRARY_PATH gymnastics needed here. + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' + set -euo pipefail echo "=== System ===" uname -a echo echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" - if [ -d "${TARGET_ROCM_PATH}" ]; then - ls -la "${TARGET_ROCM_PATH}" | head -20 - [ -L "${TARGET_ROCM_PATH}" ] && echo "${TARGET_ROCM_PATH} -> $(readlink "${TARGET_ROCM_PATH}")" - else + if [ ! -d "${TARGET_ROCM_PATH}" ]; then echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." - echo "::error::Available ROCm installs:" - ls -d /opt/rocm* 2>/dev/null || echo " (none in /opt/)" - fail=1 - fi - echo - - echo "=== ROCm version (under ${TARGET_ROCM_PATH}) ===" - if [ -f "${TARGET_ROCM_PATH}/.info/version" ]; then - ROCM_VERSION=$(cat "${TARGET_ROCM_PATH}/.info/version") - echo "${TARGET_ROCM_PATH}/.info/version : $ROCM_VERSION" - elif [ -f "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" ]; then - ROCM_VERSION=$(cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version") - echo "rocm-core version : $ROCM_VERSION" - else - ROCM_VERSION="" - echo "::warning::no ROCm version file found under ${TARGET_ROCM_PATH}/.info/ or share/doc/rocm-core/" - fi - echo - - echo "=== Major version match (tarball vs target node) ===" - EXPECTED_MAJOR=$(echo "$TARBALL_NAME" | grep -oE '^amdrocm[0-9]+' | grep -oE '[0-9]+' | head -1) - INSTALLED_MAJOR=$(echo "$ROCM_VERSION" | grep -oE '^[0-9]+' | head -1) - echo "tarball expects ROCm major : ${EXPECTED_MAJOR:-?}" - echo "target has ROCm major : ${INSTALLED_MAJOR:-?}" - if [ -n "$EXPECTED_MAJOR" ] && [ -n "$INSTALLED_MAJOR" ] && [ "$EXPECTED_MAJOR" != "$INSTALLED_MAJOR" ]; then - echo "::error::ROCm major version mismatch (tarball=$EXPECTED_MAJOR, target=$INSTALLED_MAJOR)" - fail=1 + exit 1 fi - echo - echo "=== rocm-smi ===" - if command -v rocm-smi >/dev/null 2>&1; then - if rocm-smi --showid 2>&1 | tee /tmp/rocm-smi.out; then - echo "rocm-smi OK" - else - echo "::error::rocm-smi is on PATH but exited non-zero; check that the amdgpu kernel driver is loaded." - fail=1 - fi - else - echo "::error::rocm-smi not found on PATH; ROCm runtime tools are missing on target." - fail=1 - fi - echo + # The TheRock tarball's bin/ binaries have RPATH/RUNPATH baked in + # relative to ${TARGET_ROCM_PATH}/lib, so we can invoke them + # directly via their absolute path without any PATH or + # LD_LIBRARY_PATH setup. - echo "=== rocminfo (GPU enumeration) ===" - if command -v rocminfo >/dev/null 2>&1; then - rocminfo 2>&1 | head -40 || true - N_GPU=$(rocminfo 2>/dev/null | grep -c 'Device Type:.*GPU' || true) - N_GPU=${N_GPU:-0} - echo "GPU agents enumerated: $N_GPU" - if [ "$N_GPU" -lt 1 ]; then - echo "::error::rocminfo enumerated 0 GPU agents; the target node does not have a usable GPU." - fail=1 - fi - else - echo "::warning::rocminfo not found on PATH; skipping GPU enumeration check." - fi + echo "=== ${TARGET_ROCM_PATH}/bin/rocminfo ===" + "${TARGET_ROCM_PATH}/bin/rocminfo" echo - echo "=== Key ROCm runtime libraries (via ldconfig) ===" - # ldconfig -p covers both system-package installs (libs in - # /usr/lib/x86_64-linux-gnu) and properly-registered versioned - # installs (libs in /opt/rocm-*/lib with a matching ld.so.conf.d - # entry). For TheRock-style tarball installs that aren't - # registered with ldconfig, the binaries' RPATH still resolves - # them at runtime — so this is best-effort, warn-only. - for lib in libhsa-runtime64.so.1 libamdhip64.so; do - if ldconfig -p 2>/dev/null | grep -q "$lib"; then - echo " OK : $lib ($(ldconfig -p 2>/dev/null | grep "$lib" | head -1 | awk -F'=> ' '{print $2}'))" - else - echo "::warning::library $lib not found in ldconfig cache (RPATH may still resolve it at runtime)" - fi - done + echo "=== ${TARGET_ROCM_PATH}/bin/amd-smi version ===" + "${TARGET_ROCM_PATH}/bin/amd-smi" version echo - if [ "$fail" -ne 0 ]; then - echo "::error::ROCm prerequisites check FAILED on target node — refusing to install RVS." - exit 1 - fi - echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}${ROCM_VERSION:+ (version $ROCM_VERSION)}" + echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}" REMOTE - name: Download tarball on runner @@ -445,13 +393,15 @@ jobs: exit 1 fi - # Hardcoded LD_LIBRARY_PATH that matches the manual workflow currently - # used by the RVS team. Kept literal (with /install/* paths) because - # the team relies on a known-working layout on the target node. If - # this needs to vary per ROCm install (e.g. TheRock tarball under - # $HOME), switch back to a $TARGET_ROCM_PATH-derived version here - # and in the verify/run/report steps below. - export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + # LD_LIBRARY_PATH is now derived from INSTALL_DIR (where RVS's own + # libs live) and TARGET_ROCM_PATH (where the ROCm runtime libs live). + # Order matches the official ROCm tarball-install docs: + # $ROCM_PATH/lib/rocm_sysdeps/lib ← TheRock-style runtime deps + # $ROCM_PATH/lib/llvm/lib ← libomp.so and friends + # $ROCM_PATH/lib ← core ROCm libs (libamd_smi, + # libhsa-runtime64, libamdhip64, …) + # Plus $INSTALL_DIR/lib first so librvslib.so resolves. + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" echo "Installed RVS at: $RVS_BIN" "$RVS_BIN" --version || true REMOTE @@ -466,7 +416,7 @@ jobs: echo "::error::$RVS_BIN was not produced by tarball extraction on target." exit 1 fi - export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" echo "=== ldd $RVS_BIN ===" LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) echo "$LDD_OUTPUT" @@ -475,55 +425,8 @@ jobs: echo "::error::RVS binary has unresolved library dependencies on target (see above)." exit 1 fi - - # Catch the "wrong ROCm leaked in" case: any /opt/rocm- path in - # the resolved libs must match TARGET_ROCM_PATH. A bare /opt/rocm/ - # is fine (it follows the system symlink) only when that symlink - # resolves to the same realpath as TARGET_ROCM_PATH. - TARGET_REAL=$(readlink -f "$TARGET_ROCM_PATH" 2>/dev/null || echo "$TARGET_ROCM_PATH") - BAD=$(echo "$LDD_OUTPUT" \ - | grep -oE '/opt/rocm[^ ]*' \ - | sort -u \ - | while read -r p; do - preal=$(readlink -f "$p" 2>/dev/null || echo "$p") - case "$preal" in - "$TARGET_REAL"|"$TARGET_REAL"/*) ;; - *) echo "$p -> $preal" ;; - esac - done) - if [ -n "$BAD" ]; then - echo "::error::RVS is resolving libraries from a ROCm install OTHER than ${TARGET_ROCM_PATH} (realpath: ${TARGET_REAL}):" - echo "$BAD" | sed 's/^/ /' - echo "::error::Set inputs.target_rocm_path / vars.RVS_TARGET_ROCM_PATH to the right versioned path, or fix the system /opt/rocm symlink." - exit 1 - fi - - echo "::notice::RVS binary's library dependencies resolved OK on target, all from ${TARGET_ROCM_PATH}." - REMOTE - - - name: Run RVS level 3 on target node - id: rvs3 - run: | - set +e - START=$(date -u +%FT%TZ) - echo "::group::RVS level 3 (${RVS_BIN} -r 3) on $TARGET_NODE against $TARGET_ROCM_PATH" - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set +e - export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" - mkdir -p "${REMOTE_WORK_DIR}/reports" - "$RVS_BIN" -r 3 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_3.log" - RC=${PIPESTATUS[0]} - echo "remote_rc=$RC" - exit $RC + echo "::notice::RVS binary's library dependencies resolved OK on target." REMOTE - RC=$? - echo "::endgroup::" - END=$(date -u +%FT%TZ) - echo "rc=$RC" >> "$GITHUB_OUTPUT" - echo "start=$START" >> "$GITHUB_OUTPUT" - echo "end=$END" >> "$GITHUB_OUTPUT" - exit 0 - name: Run RVS level 4 on target node id: rvs4 @@ -534,7 +437,7 @@ jobs: ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set +e - export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" mkdir -p "${REMOTE_WORK_DIR}/reports" "$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" RC=${PIPESTATUS[0]} @@ -569,11 +472,9 @@ jobs: set -euo pipefail mkdir -p ./reports - RC3=${{ steps.rvs3.outputs.rc }} RC4=${{ steps.rvs4.outputs.rc }} - [ "$RC3" -eq 0 ] && S3=PASS || S3=FAIL [ "$RC4" -eq 0 ] && S4=PASS || S4=FAIL - if [ "$RC3" -eq 0 ] && [ "$RC4" -eq 0 ]; then + if [ "$RC4" -eq 0 ]; then OVERALL=PASS else OVERALL=FAIL @@ -584,7 +485,7 @@ jobs: RVS_VERSION=$( ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" - export LD_LIBRARY_PATH="/opt/rocm/extras-7/lib:/install/lib:/install/lib/rocm_sysdeps/:/install/lib/llvm/lib:${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" "$RVS_BIN" --version 2>/dev/null REMOTE ) @@ -623,15 +524,13 @@ jobs: echo "" echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" echo "|---|---|:--:|---:|---|---|" - echo "| Level 3 | \`${RVS_BIN} -r 3\` (on \`${TARGET_HOSTNAME}\`) | ${S3} | ${RC3} | ${{ steps.rvs3.outputs.start }} | ${{ steps.rvs3.outputs.end }} |" echo "| Level 4 | \`${RVS_BIN} -r 4\` (on \`${TARGET_HOSTNAME}\`) | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" echo "" echo "## Logs" echo "" - echo "Full per-level stdout/stderr is attached to the run artifact" + echo "Full stdout/stderr from the level-4 run is attached to the artifact" echo "\`rvs-nightly-report-${{ github.run_id }}\`:" echo "" - echo "- \`rvs_level_3.log\`" echo "- \`rvs_level_4.log\`" echo "- \`SUMMARY.md\` (this file)" } > "$REPORT" @@ -641,7 +540,6 @@ jobs: { echo "overall=$OVERALL" - echo "rc3=$RC3" echo "rc4=$RC4" } >> "$GITHUB_OUTPUT" @@ -670,5 +568,5 @@ jobs: - name: Fail the job if any level failed if: steps.report.outputs.overall == 'FAIL' run: | - echo "::error::RVS test failure — level3 rc=${{ steps.report.outputs.rc3 }}, level4 rc=${{ steps.report.outputs.rc4 }}" + echo "::error::RVS test failure — level4 rc=${{ steps.report.outputs.rc4 }}" exit 1 From 691da811717d1265caaa829aa6713623db587abc Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 20 May 2026 18:22:49 -0400 Subject: [PATCH 164/275] Removed the hostname from result summary Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 10 ++++------ .github/workflows/rvs-nightly-tests.yml | 6 +----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 2ed4fb7df..e2e7e9b60 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -359,8 +359,6 @@ e.g.: |---|---| | Run | `1234567890` | | Trigger | `schedule` | -| Orchestrator (GitHub runner) | `` | -| Target node (test execution) | `` (`@`) | | Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | @@ -370,9 +368,9 @@ e.g.: ## Results -| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | -|---------|------------------------------------------------------|:------:|-----:|-----------------------|-----------------------| -| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` (on `hostname`) | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | +| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) | +|---------|--------------------------------------|:------:|-----:|-----------------------|-----------------------| +| Level 4 | `/opt/rocm/extras-7/bin/rvs -r 4` | PASS | 0 | 2026-05-19T15:25:12Z | 2026-05-19T16:02:47Z | ``` The full artifact contents: @@ -419,7 +417,7 @@ Watch the Actions tab for: 5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. 6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. 7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target, all from `. -8. RVS level 4 step completes; the run summary shows the results table with both **Orchestrator** and **Target node** rows. +8. RVS level 4 step completes; the run summary shows the results table with the Level 4 row and overall PASS/FAIL. ## Debugging a failed run diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index e8bcd8628..a89469787 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -501,8 +501,6 @@ jobs: REMOTE ) - TARGET_HOSTNAME=$(ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'hostname' 2>/dev/null || echo "$TARGET_NODE") - REPORT=./reports/SUMMARY.md { echo "# RVS Nightly Test Report" @@ -511,8 +509,6 @@ jobs: echo "|---|---|" echo "| Run | [\`${{ github.run_id }}\`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |" echo "| Trigger | \`${{ github.event_name }}\` |" - echo "| Orchestrator (GitHub runner) | \`$(hostname)\` |" - echo "| Target node (test execution) | \`${TARGET_HOSTNAME}\` (\`${TARGET_USER}@${TARGET_NODE}\`) |" echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${TARGET_ROCM_VERSION}\`) |" echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" echo "| Tarball | \`${TARBALL_NAME}\` |" @@ -524,7 +520,7 @@ jobs: echo "" echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" echo "|---|---|:--:|---:|---|---|" - echo "| Level 4 | \`${RVS_BIN} -r 4\` (on \`${TARGET_HOSTNAME}\`) | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" + echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" echo "" echo "## Logs" echo "" From 8cb0aa5dfd5d86303f9cf87c00a41fceda904333 Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Wed, 20 May 2026 19:54:16 -0400 Subject: [PATCH 165/275] Style edit pr 1155 (#1158) * style edits * fix formatting * more fixes --- docs/ug1main.md | 1019 +++++++++++++++++++++++++++-------------------- 1 file changed, 586 insertions(+), 433 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index 635a5ea86..75406538d 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -1,33 +1,5 @@ -# User Guide - -## Table of Contents - -- [Introduction](#introduction) -- [Installing RVS](#installing-rvs) - - [Building from Source Code](#building-from-source-code) - - [Installing from Package](#installing-from-package) - - [Running RVS](#running-rvs) -- [Basic Concepts](#basic-concepts) - - [RVS Architecture](#rvs-architecture) - - [Available Modules](#available-modules) - - [Command Line Options](#command-line-options) - - [Configuration Files](#configuration-files) - - [Common Configuration Keys](#common-configuration-keys) -- [GPUP Module](#gpup-module) -- [GM Module](#gm-module) -- [PESM Module](#pesm-module) -- [RCQT Module](#rcqt-module) -- [PEQT Module](#peqt-module) -- [SMQT Module](#smqt-module) -- [PBQT Module](#pbqt-module) -- [PEBB Module](#pebb-module) -- [GST Module](#gst-module) -- [IET Module](#iet-module) -- [Pulse Module](#pulse-module) -- [MEM Module](#mem-module) -- [BABEL Module](#babel-module) - -## Introduction +# User guide + The ROCm Validation Suite (RVS) is a system validation and diagnostics tool for monitoring, stress testing, detecting and troubleshooting issues that affect the functionality and performance of AMD GPU(s) operating in a @@ -47,7 +19,7 @@ of options that it defines and a configuration file that supports its execution. RVS can be obtained by building it from source code base or by installing from pre-built package. -### Building from Source Code +### Building from source code RVS has been developed as open source solution. Its source code and belonging documentation can be found at AMD's GitHub page. @@ -56,19 +28,19 @@ In order to build RVS from source code, refer site](https://github.com/ROCm/ROCmValidationSuite) and follow instructions in README file. -### Installing from Package +### Installing from package Based on the OS, use the appropriate package manager to install the **rocm-validation-suite** package. -For more details, refer [ROCm Validation Suite GitHub site](https://github.com/ROCm/ROCmValidationSuite). +For more details, refer to the [ROCm Validation Suite GitHub site](https://github.com/ROCm/ROCmValidationSuite). RVS package components are installed in `/opt/rocm`. Package contains: -- executable binary (located in _install-base_/bin/rvs) -- public shared libraries (located in _install-base_/lib) -- module specific shared libraries (located in _install-base_/lib/rvs) -- default configuration files (located in _install-base_/share/rocm-validation-suite/conf) -- GPU specific configuration files (located in _install-base_/share/rocm-validation-suite/conf/) -- testscripts (located in _install-base_/share/rocm-validation-suite/testscripts) -- user guide (located in _install-base_/share/rocm-validation-suite/userguide) -- man page (located in _install-base_/share/man) +- executable binary (located in `_install-base_/bin/rvs`) +- public shared libraries (located in `_install-base_/lib`) +- module specific shared libraries (located in `_install-base_/lib/rvs`) +- default configuration files (located in `_install-base_/share/rocm-validation-suite/conf`) +- GPU specific configuration files (located in `_install-base_/share/rocm-validation-suite/conf/`) +- testscripts (located in `_install-base_/share/rocm-validation-suite/testscripts`) +- user guide (located in `_install-base_/share/rocm-validation-suite/userguide`) +- man page (located in `_install-base_/share/man`) ### Running RVS @@ -99,11 +71,13 @@ To run GPU specific test configuration, use configuration files from GPU folders ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration -Note: If present, always use GPU specific configurations instead of default test configurations. +```{note} +If present, always use GPU specific configurations instead of default test configurations. +``` -## Basic Concepts +## Basic concepts -### RVS Architecture +### RVS architecture RVS is implemented as a set of modules each implementing particular test functionality. Modules are invoked from one central place (aka Launcher) which @@ -113,9 +87,9 @@ architecture is built around concept of Linux shared objects, thus allowing for easy addition of new modules in the future. -### Available Modules +### Available modules -#### GPU Properties – GPUP +#### GPU Properties – GPUP module The GPU Properties module queries the configuration of a target device and returns the device’s static characteristics. These static values can be used to debug issues such as device support, performance and firmware problems. #### GPU Monitor – GM module @@ -160,7 +134,9 @@ The Input EDPp Test runs GEMM workloads to stress the GPU power (that is, TGP). #### GPU Power Pulse Test - PULSE module The Pulse test drives repeating **high-power** (GEMM compute) and **low-power** (idle, minimum clocks) phases at a configurable rate so that GPU power swings over time. That pattern stresses the power supply and voltage regulators with transients rather than a single sustained power level. With **parallel: true** on multiple GPUs, the module uses a CPU-side barrier and a GPU-side fine-grained barrier so that devices tend to enter the heavy phase together, increasing aggregate current steps. Power and temperature are read through **AMD SMI**. GEMM execution uses the same **rvs_blas** stack as GST/IET (**rocBLAS** or **hipBLASLt**). -**PS: Beta version — not intended for production use. Pass/fail criteria are still being tuned.** +```{Warning} +This is a beta feature and is not intended for production use. Pass/fail criteria are still being refined. +``` #### Memory Test - MEM module The Memory module tests the GPU memory for hardware errors and soft errors using HIP. It consists of various tests that use algorithms like Walking 1 bit, Moving inversion and Modulo 20. The module executes the following memory tests [Algorithm, data pattern] @@ -176,17 +152,20 @@ The Memory module tests the GPU memory for hardware errors and soft errors using 9. Modulo 20, random pattern 10. Memory stress test -#### BABEL benchmark Test - BABEL module +#### BABEL Benchmark Test - BABEL module The Babel module executes BabelStream (synthetic GPU benchmark based on the original STREAM benchmark for CPUs) benchmark that measures memory transfer rates (bandwidth) to and from global device memory. Various benchmark tests are implemented using GPU kernels in HIP (Heterogeneous Interface for Portability) programming language. -### Command Line Options +### Command line options Command line options are summarized in the table below: -> **Note:** Command line options take precedence over the same parameters set in the configuration file. For example, if `parallel: false` is specified in the configuration file but `-p true` is passed on the command line, parallel execution will be enabled. +```{note} +Command line options take precedence over the same parameters set in the configuration file. For example, if `parallel: false` is specified in the configuration file but `-p true` is passed on the command line, parallel execution will be enabled. +``` - - +
+
Short optionLong option Description
+ @@ -258,6 +237,7 @@ code for errors.
Short optionLong option Description
-a--appendLogWhen generating a debug logfile, do not overwrite the content of the current log. Use in conjuction with -d and -l options.
+ #### Examples @@ -321,7 +301,7 @@ Suppress console output and write results to a JSON file (useful in CI pipelines ./rvs -c conf/gst_single.conf --quiet -j /tmp/rvs_results.json ``` -### Configuration Files +### Configuration files The RVS tool will allow the user to indicate a configuration file, adhering to the YAML 1.2 specification, which details the validation tests to run and the @@ -364,12 +344,14 @@ An example of RVS configuration file is given here: ... -### Common Configuration Keys +### Common configuration keys Common configuration keys applicable to most module are summarized in the -table below:\n - - +table below: + +
+
Config Key Type Description
+
Config Key Type Description
nameStringThe name of the defined action.
deviceCollection of String This is a list of device indexes (gpu ids), or the keyword “all”. The @@ -414,9 +396,9 @@ milliseconds, the module emits a progress or status log message during a running test. If a value isn't specified the default is 1000 ms. Some modules will ignore this parameter.
+ - -## GPUP Module +## GPUP module The GPU properties module provides an interface to easily dump the static characteristics of a GPU. This information is stored in the sysfs file system for the kfd, with the following path: @@ -427,66 +409,90 @@ Each of the GPU nodes in the directory is identified with a number, indicating the device index of the GPU. This module will ignore count, duration or wait key values. -### Module Specific Keys - - - - - - +### Module specific keys + +
+
Config Key Type Description
propertiesCollection of StringsThe properties key specifies what configuration property or properties the -query is interested in. Possible values are:\n -all - collect all settings\n -gpu_id\n -cpu_cores_count\n -simd_count\n -mem_banks_count\n -caches_count\n -io_links_count\n -cpu_core_id_base\n -simd_id_base\n -max_waves_per_simd\n -lds_size_in_kb\n -gds_size_in_kb\n -wave_front_size\n -array_count\n -simd_arrays_per_engine\n -cu_per_simd_array\n -simd_per_cu\n -max_slots_scratch_cu\n -vendor_id\n -device_id\n -location_id\n -drm_render_minor\n -max_engine_clk_fcompute\n -local_mem_size\n -fw_version\n -capability\n -max_engine_clk_ccompute\n -
io_links-propertiesCollection of StringsThe properties key specifies what configuration -property or properties the query is interested in. -Possible values are:\n -all - collect all settings\n -count - the number of io_links\n -type\n -version_major\n -version_minor\n -node_from\n -node_to\n -weight\n -min_latency\n -max_latency\n -min_bandwidth\n -max_bandwidth\n -recommended_transfer_size\n -flags\n -
+ + + + + + + + + + + + + + + + + + +
Config KeyTypeDescription
propertiesCollection of Strings + The properties key specifies what configuration property or properties the + query is interested in. Possible values are: +
    +
  • all - collect all settings
  • +
  • gpu_id
  • +
  • cpu_cores_count
  • +
  • simd_count
  • +
  • mem_banks_count
  • +
  • caches_count
  • +
  • io_links_count
  • +
  • cpu_core_id_base
  • +
  • simd_id_base
  • +
  • max_waves_per_simd
  • +
  • lds_size_in_kb
  • +
  • gds_size_in_kb
  • +
  • wave_front_size
  • +
  • array_count
  • +
  • simd_arrays_per_engine
  • +
  • cu_per_simd_array
  • +
  • simd_per_cu
  • +
  • max_slots_scratch_cu
  • +
  • vendor_id
  • +
  • device_id
  • +
  • location_id
  • +
  • drm_render_minor
  • +
  • max_engine_clk_fcompute
  • +
  • local_mem_size
  • +
  • fw_version
  • +
  • capability
  • +
  • max_engine_clk_ccompute
  • +
+
io_links-propertiesCollection of Strings + The properties key specifies what configuration property or properties the + query is interested in. Possible values are: +
    +
  • all - collect all settings
  • +
  • count - the number of io_links
  • +
  • type
  • +
  • version_major
  • +
  • version_minor
  • +
  • node_from
  • +
  • node_to
  • +
  • weight
  • +
  • min_latency
  • +
  • max_latency
  • +
  • min_bandwidth
  • +
  • max_bandwidth
  • +
  • recommended_transfer_size
  • +
  • flags
  • +
+
+ ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+ @@ -494,6 +500,8 @@ properties specified in the properties config key.
Output Key Type Description
properties-valuesCollection of Integers The collection will contain a positive integer value for each of the valid properties specified in the properties config key.
The collection will contain a positive integer value for each of the valid properties specified in the io_links-properties config key.
+ + Each of the settings specified has a positive integer value. For each setting requested in the properties key a message with the following format will be returned: @@ -646,58 +654,109 @@ Output for such configuration is: RVS-GPUP: action: action_1 invalid 'deviceid' key value - - -## GM Module +## GM module The GPU monitor module can be used monitor and characterize the response of a GPU to different levels of use. This module is intended to run concurrently with -other actions, and provides a ‘start’ and ‘stop’ configuration key to start the +other actions, and provides a start and stop configuration key to start the monitoring and then stop it after testing has completed. The module can also be configured with bounding box values for interested GPU parameters. If any of the GPU’s parameters exceed the bounding values on a specific GPU an INFO warning message will be printed to stdout while the bounding value is still exceeded. -### Module Specific Keys +### Module specific keys - - - - - - - - - - - - - +
+
Config Key Type Description
monitorBoolIf this key is set to true, the GM module will start monitoring on -specified devices. If this key is set to false, all other keys are ignored and -monitoring of the specified device will be stopped.
metricsCollection of Structures, specifying the metric, if there are bounds and the -bound values. The structures have the following format:\n{String, Bool, Integer, -Integer}The set of metrics to monitor during the monitoring period. Example values -are:\n{‘temp’, ‘true’, max_temp, min_temp}\n {‘clock’, ‘false’, max_clock, -min_clock}\n {‘mem_clock’, ‘true’, max_mem_clock, min_mem_clock}\n {‘fan’, -‘true’, max_fan, min_fan}\n {‘power’, ‘true’, max_power, min_power}\n The set of -upper bounds for each metric are specified as an integer. The units and values -for each metric are:\n temp - degrees Celsius\n clock - MHz \n mem_clock - MHz -\n fan - Integer between 0 and 255 \n power - Power in Watts
sample_intervalIntegerIf this key is specified metrics will be sampled at the given rate. The -units for the sample_interval are milliseconds. The default value is 1000. -
log_intervalIntegerIf this key is specified informational messages will be emitted at the given -interval, providing the current values of all parameters specified. This -parameter must be equal to or greater than the sample rate. If this value is not -specified, no logging will occur.
terminateBool If the terminate key is true the GM -monitor will terminate the RVS process when a bounds violation is encountered on -any of the metrics specified.
forceBool If 'true' and terminate key is also 'true' -the RVS process will terminate immediately. **Note:** this may cause resource leaks -within GPUs.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Config KeyTypeDescription
monitorBool + If this key is set to true, the GM module will start monitoring on + specified devices. If this key is set to false, all other keys are ignored + and monitoring of the specified device will be stopped. +
metrics + Collection of Structures, specifying the metric, if there are bounds and the + bound values. The structures have the following format: +
{String, Bool, Integer, Integer}
+
+ The set of metrics to monitor during the monitoring period. Example values are: +
    +
  • {'temp', 'true', max_temp, min_temp}
  • +
  • {'clock', 'false', max_clock, min_clock}
  • +
  • {'mem_clock', 'true', max_mem_clock, min_mem_clock}
  • +
  • {'fan', 'true', max_fan, min_fan}
  • +
  • {'power', 'true', max_power, min_power}
  • +
+ The set of upper bounds for each metric are specified as an integer. The units and + values for each metric are: +
    +
  • temp - degrees Celsius
  • +
  • clock - MHz
  • +
  • mem_clock - MHz
  • +
  • fan - Integer between 0 and 255
  • +
  • power - Power in Watts
  • +
+
sample_intervalInteger + If this key is specified metrics will be sampled at the given rate. The units for + the sample_interval are milliseconds. The default value is 1000. +
log_intervalInteger + If this key is specified informational messages will be emitted at the given + interval, providing the current values of all parameters specified. This parameter + must be equal to or greater than the sample rate. If this value is not specified, + no logging will occur. +
terminateBool + If the terminate key is true the GM monitor will terminate + the RVS process when a bounds violation is encountered on any of the metrics specified. +
forceBool + If true and terminate key is also true the + RVS process will terminate immediately. Note: this may cause + resource leaks within GPUs. +
+ ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+ @@ -706,6 +765,7 @@ collection of integers containing the violation count for each of the metrics being monitored.
Output Key Type Description
metric_valuesTime Series Collection of Result IntegersA collection of integers containing the result values for each of the metrics being monitored.
metric_averageCollection of Result Integers
+ When monitoring is started for a target GPU, a result message is logged with the following format: @@ -861,7 +921,7 @@ Output for such configuration is: RVS-GM: action: action_1 Log interval has the lower value than the sample interval -## PESM Module +## PESM module The PCIe State Monitor (PESM) tool is used to actively monitor the PCIe interconnect between the host platform and the GPU. The module registers “listener” on a target GPUs PCIe interconnect, and log a message whenever it @@ -872,17 +932,18 @@ detects a state change. The PESM is able to detect the following state changes: This module is intended to run concurrently with other actions, and provides a ‘start’ and ‘stop’ configuration key to start the monitoring and then stop it -after testing has completed. For information on GPU power state monitoring -please consult the 7.6. PCI Power Management Capability Structure, Gen 3 spec, -page 601, device states D0-D3. For information on link status changes please -consult the 7.8.8. Link Status Register (Offset 12h), Gen 3 spec, page 635. +after testing has completed. For information on GPU power state monitoring, +see PCI Power Management Capability Structure, Gen 3 spec, device states D0-D3. +For information on link status changes see Status Register (Offset 12h), Gen 3 spec. Monitoring is performed by polling respective PCIe registers roughly every 1ms (one millisecond). ### Module Specific Keys - - + +
+
Config Key Type Description
+ @@ -891,15 +952,19 @@ all other keys are ignored and monitoring will be stopped for all devices. inserted before monitoring begins. Intended for development and debugging use. The default value is 0 (no wait).
Config Key Type Description
monitorBoolThis key is set to true, the PESM module will start monitoring on specified devices. If this key is set to false, all other keys are ignored and monitoring will be stopped for all devices.
+ ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+
Output Key Type Description
stateStringA string detailing the current power state of the GPU or the speed of the PCIe link.
+ When monitoring is started for a target GPU, a result message is logged with the following format: @@ -947,9 +1012,9 @@ Here is a typical check utilizing PESM functionality: module: pesm monitor: false -- **action_1** will initiate monitoring on all devices by setting key **monitor** to **true**\n -- **action_2** will start GPU stress test -- **action_3** will stop monitoring +- `action_1` will initiate monitoring on all devices by setting key `monitor` to `true` +- `action_2` will start GPU stress test +- `action_3` will stop monitoring If executed like this: @@ -993,13 +1058,13 @@ Consider this file: monitor: true -This file has an invalid entry in **deviceid** key. +This file has an invalid entry in `deviceid` key. If execute, an error will be reported: RVS-PESM: action: act1 invalide 'deviceid' key value: xxx -## RCQT Module +## RCQT module RCQT ensures the platform is capable of running ROCm applications and is @@ -1016,11 +1081,11 @@ Two types of actions are performed by RCQT. 1) Metapackage Check metapackage-validation: This will check the installation of the mentioned metapackages and their dependencies and their respective versions as required -by metapackage. List of metapackages are provided with key **package** +by metapackage. List of metapackages are provided with key `package` 2) Packages installation check packagelist-install-validation: This action checks if the package is installed. - Packages are provided against key **rpmpackagelist** and **debpackagelist** + Packages are provided against key `rpmpackagelist` and `debpackagelist` This feature is used to check installed packages on the system. It provides checks for installed packages and the currently available package versions, if @@ -1030,19 +1095,22 @@ applicable. Input keys are described in the table below: - - +
+
Config Key Type Description
+
Config Key Type Description
packageCollection of Strings Specifies the list of metapackages to check. This key is required.
+ #### Output Output keys are described in the table below for each metapackage along with versions of each sub package: - - +
+
Output Key Type Description
+ @@ -1056,8 +1124,10 @@ along with versions of each sub package:
Output Key Type Description
Total packages validatedInteger total dependency packages under the said metapackage
installed dependency packages but with wrong versions
+ The check will emit a result message with the following format: + Meta package : Package installed version is Package installed version is @@ -1080,6 +1150,7 @@ In this example, given package has all dependencies installed. package: rocm-ml-sdk The output for such configuration is: + [RESULT] [3648664.1164 ] Action name :metapackage-validation [RESULT] [3648664.1363 ] Module name :rcqt @@ -1101,27 +1172,30 @@ with respective count ### Packages installation check This action checks if the package is installed. - Packages are provided against key **rpmpackagelist** and **debpackagelist** + Packages are provided against key `rpmpackagelist` and `debpackagelist` #### Packages installation Specific Keys Input keys are described in the table below: - - +
+
Config Key Type Description
+
Config Key Type Description
rpmpackagelistCollection of Strings Specifies the packages checked if installed on system for rhel family.
debpackagelistCollection of Strings Specifies the packages checked if installed on system for ubuntu family.
+ #### Output Output keys are described in the table below: - - +
+
Output Key Type Description
+ @@ -1135,6 +1209,7 @@ Output keys are described in the table below:
Output Key Type Description
PackageString Name of checked package
Number of packages installed.
+ #### Examples @@ -1160,7 +1235,7 @@ The output for such configuration is: Installed packages : 2 -## PEQT Module +## PEQT module PCI Express Qualification Tool module targets and qualifies the configuration of the platforms PCIe connections to the GPUs. The purpose of the PEQT module is to @@ -1172,52 +1247,73 @@ control, status and capabilities registers. These registers are specified in the PCI Express Base Specification, Revision 3. Iteration keys, i.e. count, wait and duration will be ignored for actions using the PEQT module. -### Module Specific Keys +### Module specific keys Module specific output keys are described in the table below: - - - - -
Config Key Type Description
capabilityCollection of Structures with the -following format:\n{String,String}The PCIe capability key contains a collection of structures that specify -which PCIe capability to check and the expected value of the capability. A check -structure must contain the PCIe capability value, but an expected value may be -omitted. The value of all valid capabilities that are a part of this collection -will be entered into the capability_value field. Possible capabilities, and -their value types are:\n\n -link_cap_max_speed\n -link_cap_max_width\n -link_stat_cur_speed\n -link_stat_neg_width\n -slot_pwr_limit_value\n -slot_physical_num\n -bus_id\n -atomic_op_32_completer\n -atomic_op_64_completer\n -atomic_op_128_CAS_completer\n -atomic_op_routing\n -dev_serial_num\n -kernel_driver\n -pwr_base_pwr\n -pwr_rail_type\n -device_id\n -vendor_id\n\n + +
+ + + + + + + + + + + + + + + +
Config KeyTypeDescription
capability + Collection of Structures with the following format: +
{String, String}
+
+ The PCIe capability key contains a collection of structures that specify + which PCIe capability to check and the expected value of the capability. A check + structure must contain the PCIe capability value, but an expected value may be + omitted. The value of all valid capabilities that are a part of this collection + will be entered into the capability_value field. Possible capabilities, + and their value types are: +
    +
  • link_cap_max_speed
  • +
  • link_cap_max_width
  • +
  • link_stat_cur_speed
  • +
  • link_stat_neg_width
  • +
  • slot_pwr_limit_value
  • +
  • slot_physical_num
  • +
  • bus_id
  • +
  • atomic_op_32_completer
  • +
  • atomic_op_64_completer
  • +
  • atomic_op_128_CAS_completer
  • +
  • atomic_op_routing
  • +
  • dev_serial_num
  • +
  • kernel_driver
  • +
  • pwr_base_pwr
  • +
  • pwr_rail_type
  • +
  • device_id
  • +
  • vendor_id
  • +
+
+
The expected value String is a regular expression that is used to check the actual value of the capability. -
- ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+
Output Key Type Description
capability_valueCollection of Strings For each of the capabilities specified in the capability key, the actual value of the capability will be returned, represented as a String.
passString 'true' if all of the properties match the values given, 'false' otherwise.
+ The qualification check queries the specified PCIe capabilities and properties and checks that their actual values satisfy the regular expression @@ -1262,16 +1358,16 @@ A regular PEQT configuration file looks like this: atomic_op_128_CAS_completer: device: all -Please note: -- when setting the 'device' configuration key to 'all', the RVS will detect all the AMD compatible GPUs and run the test on all of them - -- there are no regular expression for this .conf file, therefore RVS will report TRUE if at least one AMD compatible GPU is registered within the system. Otherwise it will report FALSE. +```{note} +- When setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them +- There are no regular expression for this `.conf` file, therefore RVS will report `TRUE` if at least one AMD compatible GPU is registered within the system. Otherwise it will report `FALSE`. +``` -Please note that the Power Budgeting capability is a dynamic one, having the following form: +The Power Budgeting capability is a dynamic one, having the following form: __ -where: +Where: PM_State = D0/D1/D2/D3 Type=PMEAux/Auxiliary/Idle/Sustained/Maximum @@ -1343,15 +1439,15 @@ Another example of a configuration file, which queries for a smaller subset of P kernel_driver: device: all -For this example, the expected PEQT check result is TRUE if: +For this example, the expected PEQT check result is `TRUE` if: -- at least one AMD compatible GPU is registered within the system and: -- all \ values for all AMD compatible GPUs match the given regular expression and -- all \ values for all AMD compatible GPUs match the given regular expression +- At least one AMD compatible GPU is registered within the system and: +- All `` values for all AMD compatible GPUs match the given regular expression and +- All `` values for all AMD compatible GPUs match the given regular expression -Please note that the \ regular expression is not valid and -will be skipped without affecting the PEQT module's check RESULT (however, an -error will be logged out) +Please note that the `` regular expression is not valid and +will be skipped without affecting the PEQT module's check result, however, an +error will be logged out. **Example 3:** @@ -1376,41 +1472,54 @@ match their corresponding regular expressions. atomic_op_128_CAS_completer: ^((TRUE|FALSE){1})$ device: 3254 33367 -## SMQT Module +## SMQT module The GPU SBIOS mapping qualification tool is designed to verify that a platform’s SBIOS has satisfied the BAR mapping requirements for VDI and Radeon Instinct -products for ROCm support. These are the current BAR requirements:\n\n +products for ROCm support. These are the current BAR requirements: -BAR 1: GPU Frame Buffer BAR – In this example it happens to be 256M, but +**BAR 1: GPU Frame Buffer BAR** + +In this example it happens to be 256M, but typically this will be size of the GPU memory (typically 4GB+). This BAR has to be placed < 2^40 to allow peer- to-peer access from other GFX8 AMD GPUs. For GFX9 (Vega GPU) the BAR has to be placed < 2^44 to allow peer-to-peer access -from other GFX9 AMD GPUs.\n\n +from other GFX9 AMD GPUs. + +**BAR 2: Doorbell BAR** -BAR 2: Doorbell BAR – The size of the BAR is typically will be < 10MB (currently +The size of the BAR is typically will be < 10MB (currently fixed at 2MB) for this generation GPUs. This BAR has to be placed < 2^40 to -allow peer-to-peer access from other current generation AMD GPUs.\n\n -BAR 3: IO BAR - This is for legacy VGA and boot device support, but since this +allow peer-to-peer access from other current generation AMD GPUs. + +**BAR 3: IO BAR** + +This is for legacy VGA and boot device support, but since this the GPUs in this project are not VGA devices (headless), this is not a concern -even if the SBIOS does not setup.\n\n +even if the SBIOS does not setup. + +**BAR 4: MMIO BAR** -BAR 4: MMIO BAR – This is required for the AMD Driver SW to access the +This is required for the AMD Driver SW to access the configuration registers. Since the reminder of the BAR available is only 1 DWORD -(32bit), this is placed < 4GB. This is fixed at 256KB.\n\n +(32bit), this is placed < 4GB. This is fixed at 256KB. -BAR 5: Expansion ROM – This is required for the AMD Driver SW to access the -GPU’s video-BIOS. This is currently fixed at 128KB.\n\n +**BAR 5: Expansion ROM** + +This is required for the AMD Driver SW to access the +GPU’s video-BIOS. This is currently fixed at 128KB. Refer to the ROCm Use of Advanced PCIe Features and Overview of How BAR Memory -is Used In ROCm Enabled System web page for more information about how BAR -memory is initialized by VDI and Radeon products. Iteration keys, i.e. count, +is Used In ROCm Enabled System page for more information about how BAR +memory is initialized by VDI and Radeon products. Iteration keys, for example, count, wait and duration will be ignored. -### Module Specific Keys +### Module specific keys Module specific output keys are described in the table below: - - + +
+
Config Key Type Description
+ @@ -1442,12 +1551,15 @@ be.
Config Key Type Description
bar1_req_sizeInteger This is an integer specifying the required size of the BAR1 frame buffer region.
This is an integer specifying the required size of the BAR5 frame buffer region.
+ ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+ @@ -1461,6 +1573,7 @@ memory.
Output Key Type Description
bar1_sizeIntegerThe actual size of BAR1.
bar1_base_addrIntegerThe actual base address of BAR1 memory.
passString 'true' if all of the properties match the values given, 'false' otherwise.
+ The qualification check will query the specified bar properties and check that they satisfy the give parameters. The pass output key will be true and the test @@ -1528,7 +1641,7 @@ Results for three GPUs are: In this example, BAR sizes reported by GPUs match those listed in configuration key except for the BAR5, hence the test fails. -## PBQT Module +## PBQT module The P2P Qualification Tool is designed to provide the list of all GPUs that support P2P and characterize the P2P links between peers. In addition to testing @@ -1537,10 +1650,11 @@ between all unique P2P pairs for performance evaluation. These are known as device-to-device transfers, and can be either uni-directional or bi-directional. The average bandwidth obtained is reported to help debug low bandwidth issues. -### Module Specific Keys +### Module specific keys - - +
+
Config Key Type Description
+
Config Key Type Description
peersCollection of Strings This is a required key, and specifies the set of GPU(s) considered being peers of the GPU specified in the action. If ‘all’ is specified, all other @@ -1683,16 +1797,17 @@ detected GPUs are included. Only applicable when transferbench_test: alltoall. If not specified the default value is 0.
+ -Please note that suitable values for **log\_interval** and **duration** depend +Suitable values for **log\_interval** and **duration** depend on your system. -- **log_interval**, in sequential mode, should be long enough to allow all +- `log_interval`, in sequential mode, should be long enough to allow all transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. -- **duration**, regardless of mode should be at least, 4 * log_interval. +- `duration`, regardless of mode should be at least, 4 * `log_interval`. You may obtain indication of how long single transfer between two NUMA nodes take by running test with "-d 4" switch and observing DEBUG messages for @@ -1712,13 +1827,15 @@ transfer start/finish. An output may look like this: [DEBUG ] [183944.700868] [action_1] pbqt transfer 6 4 finish From this printout, it can be concluded that single transfer takes on average -800ms. Values for **log\_interval** and **duration** should be set accordingly. +800ms. Values for `log_interval` and `duration` should be set accordingly. ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+
Output Key Type Description
p2p_resultBool Indicates if the gpu and the specified peer have P2P capabilities. If this quantity is true, the GPU pair tested has p2p capabilities. If false, they are @@ -1755,6 +1872,7 @@ peers. You may need to increase test duration.
durationFloat Cumulative duration of all transfers between the two particular nodes
+ If the value of test_bandwidth key is false, the tool will only try to determine if the GPU(s) in the peers key are P2P to the action’s GPU. In this case the @@ -1770,7 +1888,7 @@ each of its peers will take place in parallel or in sequence, depending on the value of the parallel flag. During the duration of bandwidth benchmarking, informational output providing the moving average of the transfer’s bandwidth will be calculated and logged at every time increment specified by the -log_interval parameter. The messages will have the following output: +`log_interval` parameter. The messages will have the following output: [INFO ][][] p2p-bandwidth [] bidirectional: @@ -1961,16 +2079,17 @@ It can be seen that transfers [2/6] and [5/6] did not take place in the second log interval so average from the previous cycle is displayed instead and marked with "(*)" -## PEBB Module +## PEBB module The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA transfers between system memory and a target GPU card’s memory. These are known as host-to-device or device- to-host transfers, and can be either unidirectional or bidirectional transfers. The maximum bandwidth obtained is reported. -### Module Specific Keys +### Module specific keys - - +
+
Config Key Type Description
+ @@ -2085,16 +2204,17 @@ If not specified the default is null.null – No explicit memory allocation; let TransferBench decide (default). If not specified the default is null.
Config Key Type Description
host_to_deviceBool This key indicates if host to device transfers will be considered. The default value is true.
+ -Please note that suitable values for **log\_interval** and **duration** depend +Suitable values for `log_interval` and `duration` depend on your system. -- **log_interval**, in sequential mode, should be long enough to allow all +- `log_interval`, in sequential mode, should be long enough to allow all transfer tests to finish at least once or "(pending)" and "(*)" will be displayed (see below). Number of transfers depends on number of peer NUMA nodes in your system. In parallel mode, it should be roughly 1.5 times the duration of single longest individual test. -- **duration**, regardless of mode should be at least, 4 * log_interval. +- `duration`, regardless of mode should be at least, 4 * `log_interval`. You may obtain indication of how long single transfer between two NUMA nodes take by running test with "-d 4" switch and observing DEBUG messages for @@ -2116,14 +2236,16 @@ transfer start/finish. An output may look like this: [DEBUG ] [187031.605326] [action_1] pebb transfer 0 5 finish From this printout, it can be concluded that single transfer takes on average -5500ms. Values for **log\_interval** and **duration** should be set accordingly. +5500ms. Values for `log_interval` and `duration` should be set accordingly. ### Output Module specific output keys are described in the table below: - - + +
+
Output Key Type Description
+ @@ -2158,6 +2280,7 @@ peers. You may need to increase test duration.
Output Key Type Description
CPU nodeInteger Particular CPU node involved in transfer
distanceInteger
durationFloat Cumulative duration of all transfers between the two particular nodes
+ At the beginning, the test will display link info for every CPU/GPU pair: @@ -2194,7 +2317,8 @@ Consider action: parallel: false This will initiate host to device transfer to all GPUs with immediate output -(**parallel: false**, **log_interval: 0**)\n +(`parallel: false`, `log_interval: 0`) + Output from this action might look like: [RESULT] [1658774.978614] [action_1] pcie-bandwidth 0 4 3254 distance:36 HyperTransport:36 @@ -2295,7 +2419,8 @@ Please note that in link information results, some records could be marked with (R). This means, that communication is possible if initiated by the destination NUMA node HSA agent. -## GST Module +## GST module + The GPU Stress Test drives and measures the specified GPU(s) performance (GFLOPS) - by means of large matrix multiplications using GEMM operation types based computations like SGEMM/DGEMM/HGEMM (Single/Double-precision/Half-precision General Matrix Multiplication) @@ -2315,12 +2440,13 @@ of the generated stats can also show variations in the required power, clocks or temperatures to reach these targets, and thus highlight GPUs or nodes that are operating less efficiently. -### Module Specific Keys +### Module specific keys Module specific keys are described in the table below: - - +
+
Config Key Type Description
+ @@ -2492,13 +2618,15 @@ default value is 0.
Config Key Type Description
target_stressFloat The maximum relative performance the GPU will attempt to achieve in gigaflops. This parameter is required.
Number of errors to inject per injection event. Only applicable when error_inject: true. The default value is 0.
+ ### Output Module specific output keys are described in the table below: - - +
+
Output Key Type Description
+ @@ -2520,6 +2648,7 @@ gigaflops.
Output Key Type Description
target_stressTime Series Floats The average gflops over the last log interval.
max_gflopsFloat
'true' if the GPU achieves its desired sustained performance level.
+ An informational message will be emitted when the test starts execution: @@ -2528,7 +2657,7 @@ execution: During the execution of the test, informational output providing the moving -average the GPU(s) gflops will be logged at each log_interval: +average the GPU(s) gflops will be logged at each `log_interval`: [INFO ][][] gst Gflops: @@ -2536,7 +2665,7 @@ When the target gflops is achieved, the following message will be logged: [INFO ][][] gst target achieved -If the target gflops, or stress, is not achieved in the “ramp_interval” +If the target gflops, or stress, is not achieved in the `ramp_interval` provided, the test will terminate and the following message will be logged: [INFO ][][] gst ramp time exceeded @@ -2555,12 +2684,12 @@ When the test completes, the following result message will be printed: [RESULT][][] gst Gflop: flops_per_op: bytes_copied_per_op: try_ops_per_sec: pass: The test will pass if the target_stress is reached before the end of the -ramp_interval and the stress_violations value is less than the given -max_violations value. Otherwise, the test will fail. +`ramp_interval` and the `stress_violations` value is less than the given +`max_violations` value. Otherwise, the test will fail. ### Examples -When running the __GST__ module, users should provide at least an action name, +When running the GST module, users should provide at least an action name, the module name (gst), a list of GPU IDs, the test duration and a target stress value (gigaflops). Thus, the most basic configuration file looks like this: @@ -2573,53 +2702,64 @@ value (gigaflops). Thus, the most basic configuration file looks like this: For the above configuration file, all the missing configuration keys will have their default -values (e.g.: __copy_matrix=true__, __matrix_size=5760__ etc.). For more +values (for example: `copy_matrix=true`, `matrix_size=5760`). For more information about the default -values please consult the dedicated sections (__3.3 Common Configuration Keys__ -and __5.1 Configuration keys__). +values, see Common configuration keys +and Configuration keys. -When the __RVS__ tool runs against such a configuration file, it will do the +When the RVS tool runs against such a configuration file, it will do the following: - run the stress test on all available (and compatible) AMD GPUs, one after the other - - log a start message containing the GPU ID, the __target_stress__ and the -value of the __copy_matrix__:
+ - log a start message containing the GPU ID, the `target_stress` and the +value of the `copy_matrix`: + ``` [INFO ] [164337.932824] action_gst_1 gst 50599 start 3500.000000 copy matrix:true + ``` - - emit, each __log_interval__ (e.g.: 1000ms), a message containing the -gigaflops value that the current GPU achieved:
+ - emit, each `log_interval` (for example: 1000ms), a message containing the +gigaflops value that the current GPU achieved: + ``` [INFO ] [164355.111207] action_gst_1 gst 33367 Gflops 3535.670231 + ``` - - log a message as soon as the current GPU reaches the given __target_stress__: + - log a message as soon as the current GPU reaches the given `target_stress`: + ``` [INFO ] [164350.804843] action_gst_1 gst 33367 target achieved 500.000000 + ``` - - log a __ramp time exceeded__ message if the GPU was not able to reach the -__target_stress__ in the __ramp_interval__ time frame (e.g.: 5000). In such a -case, the test will also terminate:
+ - log a ramp time exceeded message if the GPU was not able to reach the +`target_stress` in the `ramp_interval` time frame (for example: 5000). In such a +case, the test will also terminate: + ``` [INFO ] [164013.788870] action_gst_1 gst 3254 ramp time exceeded 5000 + ``` - log the test result, when the stress test completes. The message contains -the test's overall result and some other statistics according to __5.2 Output -keys__:
+the test's overall result and some other statistics according in Output +keys: + ``` [RESULT] [164355.647523] action_gst_1 gst 33367 Gflop: 4066.020766 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 9.157367 pass: TRUE + ``` - - log a __stress violation__ message when the current gigaflops (for the last -__log_interval__, e.g.; 1000ms) violates the bounds set by the __tolerance__ -configuration key (e.g.: 0.1). Please note that this message is not logged -during the __ramp_interval__ time frame:
+ - log a stress violation message when the current gigaflops (for the last +`log_interval`, for example: 1000ms) violates the bounds set by the `tolerance` +configuration key (for example: 0.1). Note that this message is not logged +during the `ramp_interval` time frame: + ``` [INFO ] [164013.788870] action_gst_1 gst 3254 stress violation 2500 + ``` -If a mandatory configuration key is missing, the __RVS__ tool will log an error +If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, the -following configuration file will cause the __RVS__ to terminate with the -following error message:
__RVS-GST: action: action_gst_1 key -'target_stress' was not found__ +following configuration file will cause the RVS to terminate with the +following error message: `RVS-GST: action: action_gst_1 key 'target_stress' was not found` actions: - name: action_gst_1 @@ -2645,85 +2785,81 @@ A more complex configuration file looks like this: tolerance: 0.07 matrix_size: 5760 -For this configuration file, the RVS tool: - - will run the stress test only for the GPUs having the ID 50599 or 33367. To +For this configuration file, the RVS tool will: + - run the stress test only for the GPUs having the ID 50599 or 33367. To get all the available GPU IDs, run __RVS__ tool with __-g__ option - - will run the test on the selected GPUs, one after the other - - will run each test, 12 times - - will only copy the matrices to the GPUs at the beginning of the test - - will wait 100ms before each test execution - - will try to reach 5000 gflops in maximum 3000ms - - if __target_stress__ (5000) is achieved in the __ramp_interval__ (3000 ms) + - run the test on the selected GPUs, one after the other + - run each test, 12 times + - only copy the matrices to the GPUs at the beginning of the test + - wait 100ms before each test execution + - try to reach 5000 gflops in maximum 3000ms + - if `target_stress` (5000) is achieved in the `ramp_interval` (3000 ms) it will attempt to run the test for the rest of the duration, sustaining the stress load during that time - - will allow a 7% __target_stress__ __tolerance__ (each __target_stress__ -violation will generate a __stress violation__ message as shown in the first + - allow a 7% `target_stress` tolerance (each `target_stress` +violation will generate a stress violation message as shown in the first example) - - will allow only 2 __target_stress__ violations. Exceeding the -__max_violations__ will not terminate the test, but the __RVS__ will mark the + - allow only 2 `target_stress` violations. Exceeding the +`max_violations` will not terminate the test, but RVS will mark the test result as "fail". The output for such a configuration key may look like this: -__[INFO ] [172061.758830] action_1 gst 50599 start 5000.000000 copy -matrix:false__
-__[INFO ] [172063.547668] action_1 gst 50599 Gflops 6471.614725__
-__[INFO ] [172064.577715] action_1 gst 50599 target achieved 5000.000000__
-__[INFO ] [172065.609224] action_1 gst 50599 Gflops 5189.993529__
-__[INFO ] [172066.634360] action_1 gst 50599 Gflops 5220.373979__
-__[INFO ] [172067.659262] action_1 gst 50599 Gflops 5225.472000__
-__[INFO ] [172068.694305] action_1 gst 50599 Gflops 5169.935583__
-__[RESULT] [172069.573967] action_1 gst 50599 Gflop: 6471.614725 flops_per_op: -382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: -TRUE__
-__[INFO ] [172069.574369] action_1 gst 33367 start 5000.000000 copy -matrix:false__
-__[INFO ] [172071.409483] action_1 gst 33367 Gflops 6558.348080__
-__[INFO ] [172072.438104] action_1 gst 33367 target achieved 5000.000000__
-__[INFO ] [172073.465033] action_1 gst 33367 Gflops 5215.285895__
-__[INFO ] [172074.501571] action_1 gst 33367 Gflops 5164.945297__
-__[INFO ] [172075.529468] action_1 gst 33367 Gflops 5210.207720__
-__[INFO ] [172076.558102] action_1 gst 33367 Gflops 5205.139424__
-__[RESULT] [172077.448182] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: -382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: -TRUE__
- -When setting the __parallel__ to true, the __RVS__ will run the stress tests on + [INFO ] [172061.758830] action_1 gst 50599 start 5000.000000 copy + matrix:false + [INFO ] [172063.547668] action_1 gst 50599 Gflops 6471.614725 + [INFO ] [172064.577715] action_1 gst 50599 target achieved 5000.000000 + [INFO ] [172065.609224] action_1 gst 50599 Gflops 5189.993529 + [INFO ] [172066.634360] action_1 gst 50599 Gflops 5220.373979 + [INFO ] [172067.659262] action_1 gst 50599 Gflops 5225.472000 + [INFO ] [172068.694305] action_1 gst 50599 Gflops 5169.935583 + [RESULT] [172069.573967] action_1 gst 50599 Gflop: 6471.614725 flops_per_op: + 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: + TRUE + [INFO ] [172069.574369] action_1 gst 33367 start 5000.000000 copy + matrix:false + [INFO ] [172071.409483] action_1 gst 33367 Gflops 6558.348080 + [INFO ] [172072.438104] action_1 gst 33367 target achieved 5000.000000 + [INFO ] [172073.465033] action_1 gst 33367 Gflops 5215.285895 + [INFO ] [172074.501571] action_1 gst 33367 Gflops 5164.945297 + [INFO ] [172075.529468] action_1 gst 33367 Gflops 5210.207720 + [INFO ] [172076.558102] action_1 gst 33367 Gflops 5205.139424 + [RESULT] [172077.448182] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: + 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: + TRUE + +When setting the parallel to true, RVS will run the stress tests on all selected GPUs in parallel and the output may look like this: -__[INFO ] [173381.407428] action_1 gst 50599 start 5000.000000 copy -matrix:false__
-__[INFO ] [173381.407744] action_1 gst 33367 start 5000.000000 copy -matrix:false__
-__[INFO ] [173383.245771] action_1 gst 33367 Gflops 6558.348080__
-__[INFO ] [173383.256935] action_1 gst 50599 Gflops 6484.532120__
-__[INFO ] [173384.274202] action_1 gst 33367 target achieved 5000.000000__
-__[INFO ] [173384.286014] action_1 gst 50599 target achieved 5000.000000__
-__[INFO ] [173385.301038] action_1 gst 33367 Gflops 5215.285895__
-__[INFO ] [173385.315794] action_1 gst 50599 Gflops 5200.080980__
-__[INFO ] [173386.337638] action_1 gst 33367 Gflops 5164.945297__
-__[INFO ] [173386.353274] action_1 gst 50599 Gflops 5159.964636__
-__[INFO ] [173387.365494] action_1 gst 33367 Gflops 5210.207720__
-__[INFO ] [173387.383437] action_1 gst 50599 Gflops 5195.032357__
-__[INFO ] [173388.401250] action_1 gst 33367 Gflops 5169.935583__
-__[INFO ] [173388.421599] action_1 gst 50599 Gflops 5154.993572__
-__[RESULT] [173389.282710] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: -382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: -TRUE__
-__[RESULT] [173389.305479] action_1 gst 50599 Gflop: 6484.532120 flops_per_op: -382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: -TRUE__
+ [INFO ] [173381.407428] action_1 gst 50599 start 5000.000000 copy + matrix:false + [INFO ] [173381.407744] action_1 gst 33367 start 5000.000000 copy + matrix:false + [INFO ] [173383.245771] action_1 gst 33367 Gflops 6558.348080 + [INFO ] [173383.256935] action_1 gst 50599 Gflops 6484.532120 + [INFO ] [173384.274202] action_1 gst 33367 target achieved 5000.000000 + [INFO ] [173384.286014] action_1 gst 50599 target achieved 5000.000000 + [INFO ] [173385.301038] action_1 gst 33367 Gflops 5215.285895 + [INFO ] [173385.315794] action_1 gst 50599 Gflops 5200.080980 + [INFO ] [173386.337638] action_1 gst 33367 Gflops 5164.945297 + [INFO ] [173386.353274] action_1 gst 50599 Gflops 5159.964636 + [INFO ] [173387.365494] action_1 gst 33367 Gflops 5210.207720 + [INFO ] [173387.383437] action_1 gst 50599 Gflops 5195.032357 + [INFO ] [173388.401250] action_1 gst 33367 Gflops 5169.935583 + [INFO ] [173388.421599] action_1 gst 50599 Gflops 5154.993572 + [RESULT] [173389.282710] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: + 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: + TRUE + [RESULT] [173389.305479] action_1 gst 50599 Gflop: 6484.532120 flops_per_op: + 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: + TRUE It is important that all the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. For example, a matrix size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 GPUs. -## IET Module +## IET module The Input EDPp Test can be used to characterize the peak power capabilities of a GPU (that is, TGP) for a sustained duration of time. This tool leverage GEMM workload @@ -2741,12 +2877,13 @@ of the generated stats can also show variations in the required power, clocks or temperatures to reach these targets, and thus highlight GPUs or nodes that are operating less efficiently. -### Module Specific Keys +### Module specific keys Module specific keys are described in the table below: - - +
+
Config Key Type Description
+ @@ -2902,14 +3039,16 @@ strided-batched GEMM. The default value is 0.
Config Key Type Description
target_powerFloat This is a floating point value specifying the target sustained power level for the test.
Stride (in elements) between consecutive output matrices D in a strided-batched GEMM. The default value is 0.
+ ### Output Module specific output keys are described in the table below: - - +
+
Output Key Type Description
+ @@ -2920,6 +3059,7 @@ the ramp interval.
Output Key Type Description
current_powerTime Series Floats The current measured power of the GPU.
power_violationsInteger'true' if the GPU achieves its desired sustained power level in the ramp interval.
+ ### Examples @@ -2943,37 +3083,51 @@ A regular IET configuration file looks like this: tolerance: 0.1 matrix_size: 5760 -*Please note:* -- when setting the 'device' configuration key to 'all', the RVS will detect all the AMD compatible GPUs and run the test on all of them +```{note} +- when setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them - the test will run 2 times on each GPU (count = 2) -- only one power violation is allowed. If the total number of violations is bigger than 1 the IET test result will be marked as 'failed' +- only one power violation is allowed. If the total number of violations is bigger than 1 the IET test result will be marked as `failed` +``` When the RVS tool runs against such a configuration file, it will do the following: + - run the test on all AMD compatible GPUs -- log a start message containing the GPU ID and the target_power, e.g.: +- log a start message containing the GPU ID and the `target_power`, for example: + ``` [INFO ] [167316.308057] action_1 iet 50599 start 135.000000 + ``` -- emit, each log_interval (e.g.: 500ms), a message containing the power for the current GPU +- emit, each log_interval (for example: 500ms), a message containing the power for the current GPU + ``` [INFO ] [167319.266707] action_1 iet 50599 current power 136.878342 + ``` -- log a message as soon as the current GPU reaches the given target_power +- log a message as soon as the current GPU reaches the given `target_power` + ``` [INFO ] [167318.793062] action_1 iet 50599 target achieved 135.000000 + ``` -- log a 'ramp time exceeded' message if the GPU was not able to reach the target_power in the ramp_interval time frame (e.g.: 5000ms). In such a case, the test will also terminate +- log a 'ramp time exceeded' message if the GPU was not able to reach the `target_power` in the `ramp_interval` time frame (for example: 5000ms). In such a case, the test will also terminate + ``` [INFO ] [167648.832413] action_1 iet 50599 ramp time exceeded 5000 + ``` -- log a 'power violation message' when the current power (for the last sample_interval, e.g.; 500ms) violates the bounds set by the tolerance configuration key (e.g.: 0.1). Please note that this message is never logged during the ramp_interval time frame +- log a 'power violation message' when the current power (for the last `sample_interval`, for example: 500ms) violates the bounds set by the tolerance configuration key (for example: 0.1). Please note that this message is never logged during the `ramp_interval` time frame + ``` [INFO ] [161251.971277] action_1 iet 3254 power violation 73.783211 + ``` - log the test result, when the stress test completes. + ``` [RESULT] [167305.260051] action_1 iet 33367 pass: TRUE + ``` The output for such a configuration file may look like this: @@ -3051,34 +3205,20 @@ The output for such a configuration file may look like this: [RESULT] [161263.771631] action_1 iet 50599 pass: TRUE -*Important notes:* - - -- all the missing configuration keys (if any) will have their default values. For more information about the default values please consult the dedicated sections (3.3 Common Configuration Keys and 13.1 Module specific keys). - - -- if a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, if the target_power is missing, the RVS to terminate with the following error message: "RVS-IET: action: action_1 key 'target_power' was not found" - - -- it is important that all the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. - - -*) for example, a matrix size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 GPUs - - -*) for small target_power values (e.g.: 30-40W), the sample_interval should be increased, otherwise the IET may fail either to achieve the given target_power or to sustain it (e.g.: ramp_interval = 1500 for target_power = 40) - - -*) in case there are problems reaching/sustaining the given target_power - -**) please increase the ramp_interval and/or the tolerance value(s) and try again (in case of a 'ramp time exceeded' message) - -**) please increase the tolerance value (in case too many 'power violation message' are logged out) +- All the missing configuration keys (if any) will have their default values. For more information about the default values please consult the dedicated sections (3.3 Common Configuration Keys and 13.1 Module specific keys). +- If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, if the target_power is missing, the RVS to terminate with the following error message: "RVS-IET: action: action_1 key 'target_power' was not found" +- All the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. + - For example, a matrix size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 GPUs + - For small` target_power` values (for example: 30-40W), the `sample_interval` should be increased, otherwise the IET may fail either to achieve the given `target_power` or to sustain it (for example: `ramp_interval = 1500` for `target_power = 40`). In case there are problems reaching/sustaining the given `target_power`: + - Increase the `ramp_interval` and/or the tolerance value(s) and try again (in case of a 'ramp time exceeded' message) + - Increase the tolerance value (in case too many 'power violation message' are logged out) ## Pulse Module -> **PS: Beta version.** This module is in beta and is **not intended for production use**. Pass/fail criteria (especially around power-delta enforcement, clock-pinning verification, and throttle detection) are still being tuned and may change between releases. +```{warning} +This module is in beta and is not intended for production use. Pass/fail criteria (especially around power-delta enforcement, clock-pinning verification, and throttle detection) are still being tuned and may change between releases. +``` The **Pulse** module is intended for **time-varying** GPU power stress: it alternates **high** phases (maximum clocks plus continuous GEMM) and **low** phases (minimum clocks plus idle/sleep), repeating for the action **duration**. That produces periodic power swings useful for exercising PSU transient response and platform power delivery, complementing **IET** (which targets a sustained power level). @@ -3086,25 +3226,26 @@ GEMM type, matrix size, and BLAS backend follow the same concepts as **GST** / * ### Behavior summary -- Each **pulse cycle** is one high phase followed by one low phase. Phase lengths derive from **pulse_rate** (Hz) and **high_phase_ratio**; each phase is at least **10 ms** after rounding. -- **High phase:** sets GPU clocks high, runs GEMM in a loop (**workload_iterations** per inner batch) until the high-phase time budget elapses, samples power, checks junction temperature (**failure if above 105°C**). -- After the high phase, the module calls **hipDeviceSynchronize** so work drains before the low phase (clearer separation of high vs. low power). -- **Low phase:** sets clocks low, sleeps briefly between **sample_interval**-style sampling (5 ms sleep steps in the implementation), samples power. -- With **parallel: true** and **more than one GPU**, threads coordinate with a **std::barrier** and a small **GPU kernel** using **fine-grained coherent** host memory so all GPUs synchronize across the pulse loop (avoids deadlock on shutdown via a shared **done** flag). -- **Pass:** for primary MCM dies, the action passes if **at least one** pulse completed, there was **no** BLAS enqueue/sync failure (unless **halt_on_error** stops earlier), and **no** thermal violation; **secondary MCM** GPUs are treated as pass by default. **Fail** otherwise. +- Each **pulse cycle** is one high phase followed by one low phase. Phase lengths derive from `pulse_rate` (Hz) and `high_phase_ratio`; each phase is at least 10 ms after rounding. +- **High phase:** sets GPU clocks high, runs GEMM in a loop (`workload_iterations` per inner batch) until the high-phase time budget elapses, samples power, checks junction temperature (**failure if above 105°C**). +- After the high phase, the module calls `hipDeviceSynchronize` so work drains before the low phase (clearer separation of high vs. low power). +- **Low phase:** sets clocks low, sleeps briefly between `sample_interval`-style sampling (5 ms sleep steps in the implementation), samples power. +- With `parallel: true` and more than one GPU, threads coordinate with a `std::barrier` and a small GPU kernel using fine-grained coherent host memory so all GPUs synchronize across the pulse loop (avoids deadlock on shutdown via a shared done flag). +- **Pass:** for primary MCM dies, the action passes if at least one pulse completed, there was **no** BLAS enqueue/sync failure (unless `halt_on_error` stops earlier), and no thermal violation; secondary MCM GPUs are treated as pass by default. Fail otherwise. ### Prerequisites -- **ROCm** with **hipBLASLt** and **rocBLAS** available as for the rest of RVS (the `rvs` binary links **hipblaslt**; GEMM code lives in **rvslib**). -- **AMD SMI** initialized for power and temperature queries (same family of requirements as other SMI-based modules). Elevated privileges are often required for clock control and power metrics. -- For **hipBLASLt**, **data_type** must be valid (e.g. **fp32_r** with **sgemm**, **fp16_r** with **hgemm** and **compute_type** such as **fp32_r**). If **data_type** is omitted with **blas_source: hipblaslt**, the module infers **fp32_r** / **fp64_r** / **fp16_r** from **ops_type** **sgemm** / **dgemm** / **hgemm** respectively; for **dgemm** with hipBLASLt, if **compute_type** is still the default **fp32_r**, it is adjusted to **fp64_r**. +- ROCm with hipBLASLt and rocBLAS available as for the rest of RVS (the `rvs` binary links hipblaslt; GEMM code lives in rvslib). +- AMD SMI initialized for power and temperature queries (same family of requirements as other SMI-based modules). Elevated privileges are often required for clock control and power metrics. +- For hipBLASLt, `data_type` must be valid (for example, `fp32_r` with `sgemm`, `fp16_r` with `hgemm` and `compute_type` such as `fp32_r`). If `data_type` is omitted with `blas_source: hipblaslt`, the module infers `fp32_r`/`fp64_r`/`fp16_r` from `ops_type`/`sgemm`/`dgemm`/`hgemm` respectively; for `dgemm` with hipBLASLt, if `compute_type` is still the default `fp32_r`, it is adjusted to `fp64_r`. ### Module specific keys -Keys below are in addition to **common** keys (**name**, **module**, **device**, **duration**, **parallel**, **log_interval**, **count**, **wait**, etc.—see **Common Configuration Keys**). +Keys below are in addition to common keys (`name`, `module`, `device`, `duration`, `parallel`, `log_interval`, `count`, `wait` and so on. For more information, see Common configuration keys. - - +
+
Config Key TypeDescription
+ @@ -3126,18 +3267,20 @@ Keys below are in addition to **common** keys (**name**, **module**, **device**, - +
Config Key TypeDescription
pulse_rateIntegerPulse frequency in **Hertz** (cycles per second). Default 2. Use roughly **1–5 Hz** if you want power readings to show clear high/low separation; very high rates shorten phases below typical GPU power-state and SMI averaging windows, so reported averages may converge.
high_phase_ratioFloatFraction of each cycle spent in the **high** (GEMM) phase, **0.0–1.0**. Default 0.5. Lower values spend more time in the low phase.
matrix_sizeIntegerSquare GEMM dimension **M = N = K**. Default 4096. Larger matrices increase compute and power draw during the high phase.
sample_intervalIntegerReserved sampling interval (ms) for pulse-specific logic; values below **50** are raised to **50**. Default 100.
toleranceFloatDefault 10.0. Parsed and passed to the worker; **not** currently used in pass/fail logic (reserved for future checks).
verify_modeStringe.g. diff / crc. Default diff. Parsed; **not** currently used in pass/fail logic (reserved for future GEMM verification).
halt_on_errorBoolIf **true**, stop the GPU thread on first BLAS or thermal error. Default false.
halt_on_errorBoolIf true, stop the GPU thread on first BLAS or thermal error. Default false.
hot_callsIntegerBLAS “hot call” / warmup-related parameter forwarded to **rvs_blas**. Default 1.
gpu_sync_waitIntegerDefault 10000. Parsed from configuration; **not** referenced by the current barrier implementation (placeholder for future timeout behavior).
max_temp_cFloatJunction temperature ceiling in degrees Celsius. If the GPU junction temperature exceeds this threshold during the run, the worker logs a thermal-violation error and, when halt_on_error is true, terminates that GPU thread. Default 105.0.
+ ### Output -Log lines use the action **name**, module tag **pulse**, and GPU id. +Log lines use the action name, module tag pulse, and GPU ID. - - +
+
Output / log Description
+ @@ -3145,12 +3288,13 @@ Log lines use the action **name**, module tag **pulse**, and GPU id.
Output / log Description
Start[INFO] ... pulse <gpu_id> start pulse_rate=<hz>
Parameters[INFO] ... pulse_rate=... Hz period=...ms high=...ms low=...ms
Thermal error[ERROR] ... thermal violation: <temp>C (junction > 105°C)
CompletionSummary over the run: pulse count, average high/low power, delta, max high, min low.
pass[RESULT] ... pass: TRUE or FALSE per GPU.
+ -With **JSON** logging enabled, per-pulse records can include **power_high_w**, **power_low_w**, **power_delta_w**, phase durations, **temp_c**, **gemm_count**, and a final **summary** with **pass**. +With JSON logging enabled, per-pulse records can include `power_high_w`, `power_low_w`, `power_delta_w`, phase durations, `temp_c`, `gemm_count`, and a final summary with pass. ### Example -Minimal illustration (see **pulse_single.conf** for full examples including **hipblaslt** + **fp16_r**): +Minimal illustration (see `pulse_single.conf` for full examples including hipblaslt + `fp16_r`): actions: - name: pulse_stress_basic @@ -3169,16 +3313,17 @@ Minimal illustration (see **pulse_single.conf** for full examples including **hi workload_iterations: 128 halt_on_error: false -Run from the build or package **bin** directory, for example: +Run from the build or package `bin` directory, for example: ./rvs -c conf/pulse_single.conf -d 3 -### Notes -- Tune **matrix_size**, **pulse_rate**, and **high_phase_ratio** to match GPU class and the transient behavior you want to stress. -- **hipBLASLt** often delivers higher GEMM throughput than rocBLAS on supported GPUs; **fp16_r** / **hgemm** with **compute_type: fp32_r** is a common high-throughput choice (as in the **pulse_stress_fp16** action in **pulse_single.conf**). +```{note} +- Tune `matrix_size`, `pulse_rate`, and `high_phase_ratio` to match GPU class and the transient behavior you want to stress. +- hipBLASLt often delivers higher GEMM throughput than rocBLAS on supported GPUs; `fp16_r`/`hgemm` with `compute_type`: `fp32_r` is a common high-throughput choice (as in the `pulse_stress_fp16` action in `pulse_single.conf`). +``` -## MEM Module +## MEM module The Memory module tests GPU memory for hardware errors and soft errors using HIP. It executes a configurable suite of memory test algorithms that exercise @@ -3202,10 +3347,11 @@ The following tests are available (referenced by index in `exclude`): | 9 | Bit fade test | | 10 | Memory stress test | -### Module Specific Keys +### Module specific keys - - +
+
Config Key Type Description
+ @@ -3228,11 +3374,13 @@ test buffers. The default value is false. here will be executed. For example, exclude: 9 10 skips the bit fade and memory stress tests.
Config Key Type Description
mem_blocksInteger Number of GPU memory blocks used per test iteration. The default value is 256.
+ ### Output - - +
+
Output Key Type Description
+ @@ -3243,6 +3391,7 @@ no errors.
Output Key Type Description
TestString Name of the memory test that was executed.
Time TakenFloat
passBool True if no memory errors were detected for this test.
+ ### Examples @@ -3276,7 +3425,7 @@ message looks like: [RESULT][][action_1] mem Test 2 [Own address test] : pass: true errors: 0 Time Taken: 0.423 s -## BABEL Module +## BABEL module The BABEL module executes BabelStream benchmark tests that measure GPU memory bandwidth. BabelStream is a synthetic benchmark based on the STREAM benchmark @@ -3285,10 +3434,11 @@ Read, Write) using HIP and reports the achieved bandwidth in GB/s or GiB/s for each kernel. The benchmark is useful for characterizing peak memory bandwidth and detecting bandwidth regressions. -### Module Specific Keys +### Module specific keys - - +
+
Config Key Type Description
+ @@ -3355,11 +3505,13 @@ is 2.
Config Key Type Description
array_sizeInteger Size of the test buffer in bytes (or in mebibytes if mibibytes: true). The default value is 33554432 (32 MB).
Thread block size (number of threads per block). The default value is 1024.
+ ### Output - - +
+
Output Key Type Description
+ @@ -3372,6 +3524,7 @@ Dot, Read, Write).
Output Key Type Description
Array sizeInteger Size of the test array used for the measurement, in bytes or MiB depending on the mibibytes setting.
passBool True if the kernel completed successfully.
+ ### Examples From af9f1b0aa0a311c7e45bd84118d045a7307b938c Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 21 May 2026 09:17:58 +0000 Subject: [PATCH 166/275] update config parameters --- rvs/conf/MI350P-450W/gst_single.conf | 42 ++++++++++++++++------------ rvs/conf/MI350P-600W/gst_single.conf | 30 ++++++++++++-------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/rvs/conf/MI350P-450W/gst_single.conf b/rvs/conf/MI350P-450W/gst_single.conf index d062c56d1..52ac0686a 100644 --- a/rvs/conf/MI350P-450W/gst_single.conf +++ b/rvs/conf/MI350P-450W/gst_single.conf @@ -43,13 +43,13 @@ # Else test on the GPU fails (FALSE). actions: -- name: gst-8K12K4K-trig-bf16 +- name: gst-8K8K16K-trig-bf16 device: all module: gst log_interval: 3000 ramp_interval: 5000 duration: 15000 - hot_calls: 50 + hot_calls: 10000 copy_matrix: false target_stress: 0 matrix_size_a: 8192 @@ -57,32 +57,36 @@ actions: matrix_size_c: 16384 matrix_init: trig data_type: bf16_r + out_data_type: bf16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt -- name: gst-8K12K4K-trig-fp16 +- name: gst-8K8K16K-trig-fp16 device: all module: gst log_interval: 3000 ramp_interval: 5000 duration: 15000 + hot_calls: 10000 copy_matrix: false target_stress: 0 - hot_calls: 100 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 matrix_init: trig data_type: fp16_r + out_data_type: fp16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt - name: gst-8K8K16K-trig-fp8 @@ -91,19 +95,21 @@ actions: log_interval: 3000 ramp_interval: 5000 duration: 15000 + hot_calls: 10000 copy_matrix: false target_stress: 0 - hot_calls: 100 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 matrix_init: trig data_type: fp8_e4m3_r + out_data_type: bf16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt - name: gst-Tflops-4K4K32K-trig-fp4 @@ -131,10 +137,10 @@ actions: blas_source: hipblaslt - name: gst-Tflops-4K4K16K-trig-bf8 - device: all module: gst - matrix_init: trig - target_stress: 0 + device: all + matrix_init: trig + target_stress: 0 data_type: fp8_e5m2_r # BF8 (OCP E5M2) -> HIP_R_8F_E5M2 out_data_type: bf16_r compute_type: fp32_r @@ -150,8 +156,8 @@ actions: blas_source: hipblaslt - name: gst-Tflops-4K4K32K-trig-fp6 - device: all module: gst + device: all target_stress: 0 matrix_init: trig data_type: fp6_e3m2_r # MX FP6 E3M2 -> HIP_R_6F_E3M2 diff --git a/rvs/conf/MI350P-600W/gst_single.conf b/rvs/conf/MI350P-600W/gst_single.conf index c0509435f..52ac0686a 100644 --- a/rvs/conf/MI350P-600W/gst_single.conf +++ b/rvs/conf/MI350P-600W/gst_single.conf @@ -49,7 +49,7 @@ actions: log_interval: 3000 ramp_interval: 5000 duration: 15000 - hot_calls: 50 + hot_calls: 10000 copy_matrix: false target_stress: 0 matrix_size_a: 8192 @@ -57,11 +57,13 @@ actions: matrix_size_c: 16384 matrix_init: trig data_type: bf16_r + out_data_type: bf16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt - name: gst-8K8K16K-trig-fp16 @@ -70,19 +72,21 @@ actions: log_interval: 3000 ramp_interval: 5000 duration: 15000 + hot_calls: 10000 copy_matrix: false target_stress: 0 - hot_calls: 100 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 matrix_init: trig data_type: fp16_r + out_data_type: fp16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt - name: gst-8K8K16K-trig-fp8 @@ -91,19 +95,21 @@ actions: log_interval: 3000 ramp_interval: 5000 duration: 15000 + hot_calls: 10000 copy_matrix: false target_stress: 0 - hot_calls: 100 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 matrix_init: trig data_type: fp8_e4m3_r + out_data_type: bf16_r compute_type: fp32_r - transa: 0 + transa: 1 transb: 0 - alpha: 1 - beta: 1 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 blas_source: hipblaslt - name: gst-Tflops-4K4K32K-trig-fp4 From 0fc8c17559d2b33205f581e0aa8ec863c74998db Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 21 May 2026 14:54:24 +0000 Subject: [PATCH 167/275] update target stress --- rvs/conf/MI350P-600W/gst_single.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rvs/conf/MI350P-600W/gst_single.conf b/rvs/conf/MI350P-600W/gst_single.conf index 52ac0686a..40698056c 100644 --- a/rvs/conf/MI350P-600W/gst_single.conf +++ b/rvs/conf/MI350P-600W/gst_single.conf @@ -51,7 +51,7 @@ actions: duration: 15000 hot_calls: 10000 copy_matrix: false - target_stress: 0 + target_stress: 694000 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 @@ -74,7 +74,7 @@ actions: duration: 15000 hot_calls: 10000 copy_matrix: false - target_stress: 0 + target_stress: 665000 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 @@ -97,7 +97,7 @@ actions: duration: 15000 hot_calls: 10000 copy_matrix: false - target_stress: 0 + target_stress: 1513000 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 16384 @@ -120,7 +120,7 @@ actions: duration: 15000 hot_calls: 1000 copy_matrix: false - target_stress: 0 + target_stress: 2113200 matrix_size_a: 4096 matrix_size_b: 4096 matrix_size_c: 32768 From a91afa5dae9aa6d8c911b615a1bb58ca9f3daf78 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 21 May 2026 16:56:13 -0500 Subject: [PATCH 168/275] Steps for TheROCK RVS installation Co-Authored-By: yugang-amd --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 60ea7d049..306279bb0 100644 --- a/README.md +++ b/README.md @@ -13,25 +13,25 @@ Please do this before compilation/installing compiled package. Ubuntu : ``` -sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unzip cmake git libyaml-cpp-dev +sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unzip cmake git libyaml-cpp-dev libnuma-dev ``` CentOS : ``` -sudo yum install -y cmake3 doxygen pciutils-devel rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static +sudo yum install -y cmake3 doxygen pciutils-devel rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static numactl-devel ``` RHEL : ``` -sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static pciutils-devel +sudo yum install -y cmake3 doxygen rpm rpm-build git gcc-c++ yaml-cpp-devel yaml-cpp-static pciutils-devel numactl-devel ``` SLES : ``` -sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel +sudo zypper install -y cmake doxygen pciutils-devel libpci3 rpm git rpm-build gcc-c++ yaml-cpp-devel numactl-devel ``` ## Install ROCm stack, rocBLAS, and SMI library @@ -200,6 +200,56 @@ SUSE : sudo zypper install rocm-validation-suite ``` +## Install RVS from Tarball - for TheRock based ROCm installation + +Follow these steps to install RVS from a prebuilt tarball on top of an existing ROCm Core SDK installation using the TheRock build system. + +### Download the RVS tarball + +``` +wget https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz +``` + +### Extract the tarball + +Set `ROCM_PATH` to your ROCm Core SDK location. For a package manager installation, the default is `/opt/rocm`: + +``` +export ROCM_PATH=/opt/rocm +sudo mkdir -p $ROCM_PATH/extras-7 +sudo tar -xzf amdrocm7-rvs-1.4.21-288-Linux.tar.gz -C $ROCM_PATH/extras-7 +``` + +### Set up your environment + +**User setup** + +Add the following to `~/.bashrc`, then run `source ~/.bashrc`: + +``` +export ROCM_PATH=/opt/rocm +export PATH=$ROCM_PATH/extras-7/bin:$ROCM_PATH/bin:$PATH +export LD_LIBRARY_PATH=$ROCM_PATH/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:$LD_LIBRARY_PATH +``` + +**System-wide setup:** + +``` +sudo tee /etc/profile.d/set-rocm-env.sh << EOF +export ROCM_PATH=/opt/rocm +export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH +export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH +EOF +sudo chmod +x /etc/profile.d/set-rocm-env.sh +source /etc/profile.d/set-rocm-env.sh +``` + +### Verify the installation + +``` +rvs -h +``` + ## Running RVS ### Run version built from source code From e15254e892c5c0fb8dea5fb04cc89afef2632376 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 26 May 2026 14:38:43 -0500 Subject: [PATCH 169/275] Add test levels table and update examples. Co-Authored-By: yugang-amd --- docs/ug1main.md | 98 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 76 insertions(+), 22 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index 75406538d..634ed5faa 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -46,30 +46,41 @@ RVS package components are installed in `/opt/rocm`. Package contains: #### Run version built from source code - cd /build/bin +```bash +cd /build/bin +``` Command examples - ./rvs --help # Lists all options to run RVS test suite - ./rvs -g # Lists supported GPUs available in the machine - ./rvs -c conf/gst_single.conf # Run GST module default test configuration - ./rvs -m gst # Run GST module using platform-detected config - ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected + +```bash +./rvs --help # List all options +./rvs -g # List supported GPUs available in the machine +./rvs -c conf/gst_single.conf # Run GST module default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run predefined level 3 tests (range: 1–5, 5 = highest stress) +``` #### Run version pre-compiled and packaged with ROCm release - cd /opt/rocm/bin +```bash +cd /opt/rocm/bin +``` Command examples - ./rvs --help # Lists all options to run RVS test suite - ./rvs -g # Lists supported GPUs available in the machine - ./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration - ./rvs -m gst # Run GST module using platform-detected config - ./rvs -r 3 # Run RVS level 3 (range: 1–5, 5 = highest) tests for the platform-detected +```bash +./rvs --help # List all options +./rvs -g # List supported GPUs available in the machine +./rvs -c ../share/rocm-validation-suite/conf/gst_single.conf # Run GST default test configuration +./rvs -m gst # Run GST module using platform-detected config +./rvs -r 3 # Run predefined level 3 tests (range: 1–5, 5 = highest stress) +``` -To run GPU specific test configuration, use configuration files from GPU folders in "/opt/rocm/share/rocm-validation-suite/conf" +To run a GPU-specific test configuration, use configuration files from the GPU subfolders under `/opt/rocm/share/rocm-validation-suite/conf/`: - ./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X specific GST test configuration - ./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32 specific GST test configuration +```bash +./rvs -c ../share/rocm-validation-suite/conf/MI300X/gst_single.conf # Run MI300X-specific GST test configuration +./rvs -c ../share/rocm-validation-suite/conf/nv32/gst_single.conf # Run Navi 32-specific GST test configuration +``` ```{note} If present, always use GPU specific configurations instead of default test configurations. @@ -174,8 +185,9 @@ of the current log. Use in conjuction with -d and -l options. This is a mandatory field for test execution. --r--runSpecify the test level to run. -Valid range is 1 to 5, with 5 indicating the highest stress test level. +-r--runSpecify the predefined test level to run (1–5). +Each level selects a GPU-specific configuration file without requiring a -c argument. +See Test Levels for details. -d--debugLevelSpecify the debug level for the output log. @@ -186,9 +198,8 @@ The range is 0-5 with 5 being the highest verbose level. that RVS supports and has visibility. --i--indexesComma separated list of GPU ids/indexes to run test on. -This overrides the device/device_index parameter values specified for every actions in the -configuration file, including the all value. +-i--indexesComma-separated list of GPU IDs or SMI-based indexes to run tests on. +Overrides the device and device_index values specified in all actions of the configuration file, including the all value. -s--selectActionsComma separated list of action names or 0-based action @@ -239,6 +250,23 @@ code for errors. +### Test Levels + +When using the `-r` option, RVS automatically selects a predefined configuration file based on the detected GPU platform (for example, `conf/MI300X/levels/rvs_level_N.conf`). No `-c` argument is needed. The five levels represent progressively increasing test coverage and duration: + +
+ + + + + + + +
LevelTestDescriptionModulesTypical Duration
1Software validationVerifies that all required ROCm packages and metapackages are correctly installed.rcqtShort (seconds)
2Hardware capability checksChecks PCIe link speed and width, performs a quick HBM read/write pass, and verifies basic PCIe and XGMI interface connectivity.peqt, babel, pebb, pbqtShort (seconds)
3Basic performanceMeasures HBM bandwidth across common operations, PCIe host-to-device and device-to-host throughput, bidirectional XGMI bandwidth, and limited gemm compute performance runs.babel, pebb, pbqt, gstMinutes
4Extended performanceSame coverage as level 3 with longer test durations, full HBM operation set, bidirectional PCIe transfers, a basic memory test pass, and full gemm compute performance runs.babel, pebb, pbqt, mem, gst, ietTens of minutes
5Full stress testRuns all tests from level 4 at maximum duration, adds high-iteration memory stress testing, and includes a sustained power stress test targeting peak GPU TDP. Intended for thorough pre-production validation.babel, pebb, pbqt, mem, gst, ietHours
+
+ +The exact tests and thresholds within each level vary by GPU platform. + #### Examples Print version information and exit: @@ -260,6 +288,11 @@ Run a specific configuration file: ./rvs -c conf/gst_single.conf ``` +Run a platform-specific configuration file (for example, MI350X GST): +```bash +./rvs -c conf/MI350X/gst_single.conf +``` + Repeat a test 5 times in sequence (soak/stability testing): ```bash ./rvs -c conf/gst_single.conf -n 5 @@ -270,9 +303,15 @@ Run only the GST module using the built-in platform configuration: ./rvs -m gst ``` -Run a configuration file at stress level 3: + +Run the predefined level 3 test suite (basic performance): ```bash -./rvs -c conf/gst_single.conf -r 3 +./rvs -r 3 +``` + +Run the predefined level 5 (full stress) test suite on specific GPUs only: +```bash +./rvs -r 5 -i 0,1 ``` Run a configuration file on specific GPUs (by index) with parallel execution enabled: @@ -301,6 +340,21 @@ Suppress console output and write results to a JSON file (useful in CI pipelines ./rvs -c conf/gst_single.conf --quiet -j /tmp/rvs_results.json ``` +The configuration files in the top-level `conf/` folder are generic samples and may not reflect the correct thresholds or parameters for your hardware. For accurate results, use the platform-specific configuration files under `conf//` (for example, `conf/MI350X/`), or use the `-r` or `-m` option, which automatically selects the appropriate platform configuration. + +### GPU-Specific Configurations + +RVS includes optimized test configurations for a range of GPU families, organized under `conf//`. +Level-based configurations (usable with `-r`) are available for: MI300X, MI300X-HF, MI308X, MI308X-HF, MI325X, MI350X, MI355X. + +**AMD Instinct Series:** +- MI210, MI250X, MI300A, MI300X, MI308X, MI325X, MI350X, MI355X +- High-frequency variants: MI300X-HF, MI308X-HF + +**AMD Radeon Series:** +- nv21, nv31, nv32, gfx1200, gfx1201 +- RX9060, RX9070, RX9070GRE, R9600D + ### Configuration files The RVS tool will allow the user to indicate a configuration file, adhering to From 4bbcca640821eea2b0c79215e9c17060a7e65736 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 27 May 2026 18:32:10 -0500 Subject: [PATCH 170/275] Minor memory and error return bug fixes. --- mem.so/src/rvs_memtest.cpp | 11 +++++++---- mem.so/src/rvs_memworker.cpp | 9 +++++++++ rvs/conf/mem.conf | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/mem.so/src/rvs_memtest.cpp b/mem.so/src/rvs_memtest.cpp index 9e4deffd8..d8793d9ec 100644 --- a/mem.so/src/rvs_memtest.cpp +++ b/mem.so/src/rvs_memtest.cpp @@ -147,10 +147,9 @@ unsigned int error_checking(const std::string& pmsg, unsigned int blockidx) hipMemset(ptCntOfError, 0, sizeof(unsigned int)); hipMemset((void*)&ptFailedAdress[0], 0, sizeof(unsigned long)*MAX_ERR_RECORD_COUNT);; hipMemset((void*)&ptExpectedValue[0], 0, sizeof(unsigned long)*MAX_ERR_RECORD_COUNT);; - hipMemset((void*)&ptCurrentValue[0], 0, sizeof(unsigned long)*MAX_ERR_RECORD_COUNT);; + hipMemset((void*)&ptCurrentValue[0], 0, sizeof(unsigned long)*MAX_ERR_RECORD_COUNT);; - hipDeviceReset(); - exit(ERR_BAD_STATE); + return numOfErrors; } @@ -1639,14 +1638,18 @@ void allocate_small_mem(void) void free_small_mem(void) { - //Initialize memory hipFree((void*)ptCntOfError); + ptCntOfError = nullptr; hipFree((void*)ptFailedAdress); + ptFailedAdress = nullptr; hipFree((void*)ptExpectedValue); + ptExpectedValue = nullptr; hipFree((void*)ptCurrentValue); + ptCurrentValue = nullptr; hipFree((void*)ptValueOfSecondRead); + ptValueOfSecondRead = nullptr; } diff --git a/mem.so/src/rvs_memworker.cpp b/mem.so/src/rvs_memworker.cpp index a4ebf6c71..efdacfbe0 100644 --- a/mem.so/src/rvs_memworker.cpp +++ b/mem.so/src/rvs_memworker.cpp @@ -233,6 +233,7 @@ void MemWorker::run() { std::to_string(tot_num_blocks); rvs::lp::Log(msg, rvs::logtrace); + free_small_mem(); return; } @@ -280,6 +281,14 @@ void MemWorker::run() { run_tests(ptr, tot_num_blocks); + if (useMappedMemory) { + hipHostFree(mappedHostPtr); + mappedHostPtr = nullptr; + } else { + hipFree(ptr); + ptr = nullptr; + } + free_small_mem(); } diff --git a/rvs/conf/mem.conf b/rvs/conf/mem.conf index 9901c2b63..599c6abf9 100644 --- a/rvs/conf/mem.conf +++ b/rvs/conf/mem.conf @@ -66,3 +66,4 @@ actions: stress: true num_iter: 50000 exclude : 9 10 + From 327b3f864c8acdff1e73d3510260e24a79009104 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 27 May 2026 15:39:19 -0700 Subject: [PATCH 171/275] enable nightly for all active branches By enabling nightly build for all branch is to make sure build is working with latest ROCm for all supported branches. Particularly for release branches build need to continue and working till end of support for a particular release series. --- .github/workflows/README_BUILD_PACKAGES.md | 23 +- .../workflows/build-relocatable-packages.yml | 197 ++++++++++++++++-- 2 files changed, 196 insertions(+), 24 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index d84765aaf..e95b4ee44 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -16,10 +16,23 @@ All packages are built with relocatable RPATH settings, meaning they can be inst The workflow runs automatically on: - Push to `master`, `main`, or `release/**` branches - Pull requests to `master` or `main` branches -- **Scheduled**: Daily at **5:00 AM PST** (13:00 UTC); **latest ROCm nightly** from [ROCm SDK nightly tarballs](https://rocm.nightlies.amd.com/tarball-multi-arch/) (or repo variable overrides). -- **Pull requests** and **pushes** to `master`, `main`, or `release/**` (including merges): **latest ROCm release** (**X.Y.Z**) from [repo.amd.com ROCm tarballs](https://repo.amd.com/rocm/tarball/). +- **Scheduled**: Daily at **5:00 AM PST** (13:00 UTC); **latest ROCm nightly** from [ROCm SDK nightly tarballs](https://rocm.nightlies.amd.com/tarball-multi-arch/) (or repo variable overrides). The cron fans out to the **default branch** plus every branch matched by the repository variable **`ACTIVE_BRANCHES`** (comma-separated literals/globs, e.g. `npi/**,release/**` — do not list the default branch there). - **Manual** (`workflow_dispatch`): if **`ROCM_VERSION`** is pinned (**workflow input** and/or **`vars.ROCM_VERSION`**), the tarball is chosen by **version format** (nightly `x.y.za…` vs release `X.Y.Z`). If no version is pinned, the job uses **latest nightly** (same as schedule). +### Scheduled multi-branch nightly (`ACTIVE_BRANCHES`) + +| Branch source | Built on schedule? | S3 upload on schedule? | S3 path (under bucket) | +|---------------|-------------------|------------------------|-------------------------| +| **Default branch** (`master` / `main`) | Always | Yes | Unchanged: `nightly/rvs/deb/`, `nightly/rvs/rpm/`, `nightly/rvs/tar/` (+ APT/YUM metadata) | +| **`ACTIVE_BRANCHES`** matches (non-default) | Yes | Yes (except `release*`) | `{branch_prefix}/{branch}/nightly/deb/`, `…/rpm/`, `…/tar/` | +| **`release*`** matches from `ACTIVE_BRANCHES` | Yes | **No** | Packages are built and verified only | + +- **`branch_prefix`**: first path segment of the branch name (`npi` for `npi/foo`; for a branch with no `/`, the full branch name). +- **`push` / `pull_request` / `workflow_dispatch`**: single-branch matrix; S3 routing is unchanged from the table below. +- Set **`ACTIVE_BRANCHES`** under **Settings → Secrets and variables → Actions → Variables** (example: `npi/**,release/**`). + +- **Pull requests** and **pushes** to `master`, `main`, or `release/**` (including merges): **latest ROCm release** (**X.Y.Z**) from [repo.amd.com ROCm tarballs](https://repo.amd.com/rocm/tarball/). + ### ROCm SDK: nightly vs release in CI The workflow sets `ROCM_SDK_CHANNEL` and SDK URLs before calling `build_packages_local.sh`: @@ -146,6 +159,7 @@ The workflow uses GitHub repository variables to control which runners execute e | Variable | Default | Used by | |----------|---------|---------| +| `ACTIVE_BRANCHES` | _(unset)_ | **Scheduled** nightly only: comma-separated branch literals/globs (`npi/**`, `release/**`). Default branch is always built; do not list it here. `release*` matches build but do not upload on schedule. | | `RUNNER_LABEL` | `ubuntu-22.04` | Ubuntu build job | | `RUNNER_LABEL_CONTAINER` | `ubuntu-latest` | CentOS/manylinux build job (container) | | `RUNNER_LABEL_UTILITY` | `ubuntu-latest` | Release summary job | @@ -169,7 +183,10 @@ To use a self-hosted runner, set the variable to your runner's label (e.g., `sel | Trigger | Path | Contents | |--------|------|----------| | **`release/*` branch** (`push` or `workflow_dispatch`) | `release/rvs/deb/`, `release/rvs/rpm/`, `release/rvs/tar/` | DEB → `.../deb` (Ubuntu job); RPM and TGZ → `.../rpm` and `.../tar` (manylinux job). Only PR merges into release branches or manual dispatch on release branches write here. | -| **Scheduled**, **push to `master`/`main`**, or **`workflow_dispatch` on non-release branch** | `nightly/rvs/deb/`, `nightly/rvs/rpm/`, `nightly/rvs/tar/` | Same split by type. All non-release builds go to nightly. | +| **Scheduled** (default branch only) | `nightly/rvs/deb/`, `nightly/rvs/rpm/`, `nightly/rvs/tar/` | Same as before; APT/YUM metadata generated here. | +| **Scheduled** (`ACTIVE_BRANCHES`, non-default, not `release*`) | `{branch_prefix}/{branch}/nightly/deb/`, `…/rpm/`, `…/tar/` | No shared `rvs/` segment; no repo metadata on these paths. | +| **Scheduled** (`release*` from `ACTIVE_BRANCHES`) | _(none)_ | Build only; upload skipped. | +| **Push to `master`/`main`**, or **`workflow_dispatch` on non-release branch** | `nightly/rvs/deb/`, `nightly/rvs/rpm/`, `nightly/rvs/tar/` | Same split by type. | | **Pull request** (same-repo) | `rvs///ubuntu-22.04/` or `.../manylinux_2_28/` | DEB only (Ubuntu job); RPM+TGZ (manylinux job). One-off path, no repo metadata generated. | If `AWS_S3_BUCKET` is not set, the upload step is skipped with a warning (the workflow still succeeds). diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 28f0a78a7..185b5d88c 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -47,14 +47,124 @@ env: RVS_AUTO_DETECT_LOCAL_UPLOAD: ${{ vars.RVS_AUTO_DETECT_LOCAL_UPLOAD }} jobs: + prepare-nightly-branches: + name: Prepare nightly branch matrix + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + outputs: + branches_json: ${{ steps.branches.outputs.branches_json }} + steps: + - name: Checkout (for remote branch list) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Resolve branch matrix + id: branches + env: + ACTIVE_BRANCHES: ${{ vars.ACTIVE_BRANCHES }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + EVENT_NAME: ${{ github.event_name }} + REF_NAME: ${{ github.ref_name }} + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + run: | + python3 <<'PY' + import json + import os + import re + import subprocess + + def branch_prefix(name: str) -> str: + return name.split("/", 1)[0] if "/" in name else name + + def glob_match(name: str, pattern: str) -> bool: + regex_parts = [] + i = 0 + while i < len(pattern): + if pattern[i : i + 2] == "**": + regex_parts.append(".*") + i += 2 + elif pattern[i] == "*": + regex_parts.append("[^/]*") + i += 1 + else: + regex_parts.append(re.escape(pattern[i])) + i += 1 + return re.fullmatch("".join(regex_parts), name) is not None + + def skip_upload_schedule(branch: str) -> bool: + return branch == "release" or branch.startswith("release/") + + event = os.environ["EVENT_NAME"] + default = os.environ["DEFAULT_BRANCH"] + + if event != "schedule": + if event == "pull_request": + branch = os.environ.get("PR_HEAD_REF") or os.environ["REF_NAME"] + else: + branch = os.environ["REF_NAME"] + branches = [{ + "branch": branch, + "is_default": branch == default, + "skip_upload": False, + "branch_prefix": branch_prefix(branch), + }] + else: + patterns = [ + p.strip() + for p in os.environ.get("ACTIVE_BRANCHES", "").split(",") + if p.strip() + ] + subprocess.run(["git", "fetch", "origin", "--prune"], check=True) + result = subprocess.run( + ["git", "branch", "-r"], + capture_output=True, + text=True, + check=True, + ) + remote_names = [] + for line in result.stdout.splitlines(): + line = line.strip() + if not line or "->" in line: + continue + if line.startswith("origin/"): + remote_names.append(line[len("origin/"):]) + + matched = set() + for pattern in patterns: + for name in remote_names: + if glob_match(name, pattern) and name != default: + matched.add(name) + + branches = [{ + "branch": default, + "is_default": True, + "skip_upload": False, + "branch_prefix": branch_prefix(default), + }] + for name in sorted(matched): + branches.append({ + "branch": name, + "is_default": False, + "skip_upload": skip_upload_schedule(name), + "branch_prefix": branch_prefix(name), + }) + + payload = json.dumps(branches) + print(payload) + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as out: + out.write(f"branches_json={payload}\n") + PY + build-ubuntu: - name: Build Ubuntu Packages + name: Build Ubuntu Packages (${{ matrix.branch }}) + needs: prepare-nightly-branches runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} container: - image: ubuntu:${{ matrix.ubuntu_version }} + image: ubuntu:22.04 strategy: + fail-fast: false matrix: - ubuntu_version: ['22.04'] + include: ${{ fromJson(needs.prepare-nightly-branches.outputs.branches_json) }} # Apply to every step in the job so apt never drops into an interactive # frontend (tzdata, libssl, etc.) — each Actions step runs in a fresh # shell, so an `export` inside one step does not propagate to the next. @@ -84,9 +194,17 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: + ref: ${{ matrix.branch }} submodules: recursive fetch-depth: 0 + - name: Set build branch context + run: | + echo "RVS_BUILD_REF_NAME=${{ matrix.branch }}" >> "$GITHUB_ENV" + echo "RVS_IS_DEFAULT_BRANCH=${{ matrix.is_default }}" >> "$GITHUB_ENV" + echo "RVS_SKIP_UPLOAD=${{ matrix.skip_upload }}" >> "$GITHUB_ENV" + echo "RVS_BRANCH_PREFIX=${{ matrix.branch_prefix }}" >> "$GITHUB_ENV" + - name: Set ROCm Version and GPU Family run: | if [ "${{ github.event_name }}" = "schedule" ]; then @@ -198,11 +316,11 @@ jobs: # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs: OIDC token response is empty → JSON parse fails) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: apt-get update && apt-get install -y awscli - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -220,10 +338,10 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific + # S3 routing: schedule non-default → {prefix}/{branch}/nightly/; schedule default → nightly/rvs/; release/* push/manual → release/ - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -231,7 +349,19 @@ jobs: exit 0 fi BASE="rvs" - if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then + if [ "${RVS_SKIP_UPLOAD}" = "true" ]; then + echo "Skipping S3 upload (scheduled release* branch)." + exit 0 + fi + if [ "${{ github.event_name }}" = "schedule" ] && [ "${RVS_IS_DEFAULT_BRANCH}" != "true" ]; then + S3_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly" + echo "Scheduled ACTIVE_BRANCHES build: uploading to ${S3_PREFIX}/deb" + aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress + echo "Listing s3://${BUCKET}/${S3_PREFIX}/deb/" + aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/deb/" --human-readable || true + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=Ubuntu DEB|${S3_PREFIX}/deb" >> $GITHUB_OUTPUT + elif [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then echo "Release branch build: uploading to release/rvs/deb" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/release/${BASE}/deb/" @@ -246,7 +376,7 @@ jobs: echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT else - PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-${{ matrix.ubuntu_version }}" + PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-22.04" echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" @@ -260,7 +390,7 @@ jobs: # can be consumed directly as a DEB repository by apt. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload DEB repo metadata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -304,13 +434,15 @@ jobs: aws s3 ls "s3://${BUCKET}/${DEB_PREFIX}/" --human-readable || true build-centos: - name: Build CentOS/RHEL Packages (manylinux_2_28) + name: Build CentOS/RHEL Packages (${{ matrix.branch }}) + needs: prepare-nightly-branches runs-on: ${{ vars.RUNNER_LABEL_CONTAINER || 'ubuntu-latest' }} container: image: quay.io/pypa/manylinux_2_28_x86_64 strategy: + fail-fast: false matrix: - distro: ['manylinux_2_28'] + include: ${{ fromJson(needs.prepare-nightly-branches.outputs.branches_json) }} outputs: s3_bucket_centos: ${{ steps.upload-s3-centos.outputs.bucket }} s3_paths_centos: ${{ steps.upload-s3-centos.outputs.paths }} @@ -323,9 +455,17 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: + ref: ${{ matrix.branch }} submodules: recursive fetch-depth: 0 + - name: Set build branch context + run: | + echo "RVS_BUILD_REF_NAME=${{ matrix.branch }}" >> "$GITHUB_ENV" + echo "RVS_IS_DEFAULT_BRANCH=${{ matrix.is_default }}" >> "$GITHUB_ENV" + echo "RVS_SKIP_UPLOAD=${{ matrix.skip_upload }}" >> "$GITHUB_ENV" + echo "RVS_BRANCH_PREFIX=${{ matrix.branch_prefix }}" >> "$GITHUB_ENV" + - name: Set ROCm Version and GPU Family run: | if [ "${{ github.event_name }}" = "schedule" ]; then @@ -437,12 +577,12 @@ jobs: # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs — OIDC not usable) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -460,10 +600,10 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # S3 routing: release/* (push/manual) → release/; schedule/push/manual → nightly/; else → ref-specific + # S3 routing: schedule non-default → {prefix}/{branch}/nightly/; schedule default → nightly/rvs/; release/* push/manual → release/ - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" if [ -z "$BUCKET" ]; then @@ -471,7 +611,22 @@ jobs: exit 0 fi BASE="rvs" - if [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then + if [ "${RVS_SKIP_UPLOAD}" = "true" ]; then + echo "Skipping S3 upload (scheduled release* branch)." + exit 0 + fi + if [ "${{ github.event_name }}" = "schedule" ] && [ "${RVS_IS_DEFAULT_BRANCH}" != "true" ]; then + S3_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly" + echo "Scheduled ACTIVE_BRANCHES build: uploading to ${S3_PREFIX}/rpm and ${S3_PREFIX}/tar" + aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${S3_PREFIX}/rpm/" + aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/rpm/" --human-readable || true + echo "Listing s3://${BUCKET}/${S3_PREFIX}/tar/" + aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/tar/" --human-readable || true + echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT + echo "paths=CentOS/RHEL RPM|${S3_PREFIX}/rpm||CentOS/RHEL TGZ|${S3_PREFIX}/tar" >> $GITHUB_OUTPUT + elif [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then echo "Release branch build: uploading to release/rvs/rpm and release/rvs/tar" aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress @@ -492,7 +647,7 @@ jobs: echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT else - PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/${{ matrix.distro }}" + PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/manylinux_2_28" echo "Uploading to s3://${BUCKET}/${PREFIX}/" aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --include "amdrocm*-rvs*.tar.gz" --no-progress echo "Listing s3://${BUCKET}/${PREFIX}/" @@ -506,7 +661,7 @@ jobs: # directly as an RPM repository by yum/dnf. # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. - name: Generate and upload RPM repodata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') + if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -539,8 +694,8 @@ jobs: name: Create Release Summary needs: [build-ubuntu, build-centos] runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - # Only runs when the workflow is not cancelled and always() is true - if: always() && !cancelled() + # Skip on schedule: matrix builds do not aggregate job outputs reliably + if: always() && !cancelled() && github.event_name != 'schedule' steps: - name: Generate Build Report From 26c1fff02df0f57b1442ba09d73832051323753e Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 29 May 2026 09:03:33 +0000 Subject: [PATCH 172/275] add rand init to fp8 action --- rvs/conf/MI350P-450W/gst_single.conf | 23 +++++++++++++++++++++++ rvs/conf/MI350P-600W/gst_single.conf | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/rvs/conf/MI350P-450W/gst_single.conf b/rvs/conf/MI350P-450W/gst_single.conf index 52ac0686a..0827963b8 100644 --- a/rvs/conf/MI350P-450W/gst_single.conf +++ b/rvs/conf/MI350P-450W/gst_single.conf @@ -175,3 +175,26 @@ actions: duration: 15000 blas_source: hipblaslt +- name: gst-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + diff --git a/rvs/conf/MI350P-600W/gst_single.conf b/rvs/conf/MI350P-600W/gst_single.conf index 40698056c..ccc49e4bb 100644 --- a/rvs/conf/MI350P-600W/gst_single.conf +++ b/rvs/conf/MI350P-600W/gst_single.conf @@ -175,3 +175,25 @@ actions: duration: 15000 blas_source: hipblaslt +- name: gst-8K8K16K-rand-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 15000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: rand + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt From f815f65ed47bdf788a6c70cdb3e1614f9e2ef98d Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 29 May 2026 08:52:57 -0700 Subject: [PATCH 173/275] use api to fetch and generate active branch matrix using api instead of regular checkout and fetch reduces risk of permission issue on local runner if any at prepare nightly branch matrix stage. --- .../workflows/build-relocatable-packages.yml | 53 ++++++++++++------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 185b5d88c..5164ff96d 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -53,11 +53,6 @@ jobs: outputs: branches_json: ${{ steps.branches.outputs.branches_json }} steps: - - name: Checkout (for remote branch list) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Resolve branch matrix id: branches env: @@ -66,12 +61,43 @@ jobs: EVENT_NAME: ${{ github.event_name }} REF_NAME: ${{ github.ref_name }} PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + GITHUB_TOKEN: ${{ github.token }} + GITHUB_REPOSITORY: ${{ github.repository }} run: | python3 <<'PY' import json import os import re - import subprocess + import urllib.request + + def list_remote_branches() -> list[str]: + token = os.environ["GITHUB_TOKEN"] + repo = os.environ["GITHUB_REPOSITORY"] + names: list[str] = [] + page = 1 + while True: + url = ( + f"https://api.github.com/repos/{repo}/branches" + f"?per_page=100&page={page}" + ) + req = urllib.request.Request( + url, + headers={ + "Authorization": f"Bearer {token}", + "Accept": "application/vnd.github+json", + "User-Agent": "rvs-build-relocatable-packages", + }, + ) + with urllib.request.urlopen(req) as resp: + batch = json.loads(resp.read().decode()) + if not batch: + break + for item in batch: + names.append(item["name"]) + if len(batch) < 100: + break + page += 1 + return names def branch_prefix(name: str) -> str: return name.split("/", 1)[0] if "/" in name else name @@ -114,20 +140,7 @@ jobs: for p in os.environ.get("ACTIVE_BRANCHES", "").split(",") if p.strip() ] - subprocess.run(["git", "fetch", "origin", "--prune"], check=True) - result = subprocess.run( - ["git", "branch", "-r"], - capture_output=True, - text=True, - check=True, - ) - remote_names = [] - for line in result.stdout.splitlines(): - line = line.strip() - if not line or "->" in line: - continue - if line.startswith("origin/"): - remote_names.append(line[len("origin/"):]) + remote_names = list_remote_branches() matched = set() for pattern in patterns: From b2d03fc6611be18162b136707957edb0c6828d1b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 29 May 2026 13:36:22 -0500 Subject: [PATCH 174/275] Update prerequisites --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 306279bb0..0dbd57513 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,14 @@ Ubuntu : sudo apt-get -y update && sudo apt-get install -y libpci3 libpci-dev doxygen unzip cmake git libyaml-cpp-dev libnuma-dev ``` +**Note:** RVS requires CMake >= 3.25. Ubuntu 22.04 and earlier ship with an older version (3.22). If you are on Ubuntu 22.04 or earlier, install a newer CMake from Kitware's official APT repository before proceeding: + +``` +wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add - +sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ jammy main' +sudo apt-get update && sudo apt-get install cmake +``` + CentOS : ``` From 45a9edab5e36d81e175cd1ddc605b00d97fc036c Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Mon, 1 Jun 2026 02:33:07 -0700 Subject: [PATCH 175/275] Add levels based configs to MI350P config space --- CHANGELOG.md | 1 + docs/ug1main.md | 4 +- rvs/conf/MI350P-450W/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI350P-450W/levels/rvs_level_2.conf | 79 +++++ rvs/conf/MI350P-450W/levels/rvs_level_3.conf | 252 ++++++++++++++ rvs/conf/MI350P-450W/levels/rvs_level_4.conf | 335 +++++++++++++++++++ rvs/conf/MI350P-450W/levels/rvs_level_5.conf | 335 +++++++++++++++++++ rvs/conf/MI350P-600W/levels/rvs_level_1.conf | 38 +++ rvs/conf/MI350P-600W/levels/rvs_level_2.conf | 79 +++++ rvs/conf/MI350P-600W/levels/rvs_level_3.conf | 252 ++++++++++++++ rvs/conf/MI350P-600W/levels/rvs_level_4.conf | 335 +++++++++++++++++++ rvs/conf/MI350P-600W/levels/rvs_level_5.conf | 335 +++++++++++++++++++ src/gpu_util.cpp | 35 +- 13 files changed, 2116 insertions(+), 2 deletions(-) create mode 100644 rvs/conf/MI350P-450W/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI350P-450W/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI350P-450W/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI350P-450W/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI350P-450W/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI350P-600W/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI350P-600W/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI350P-600W/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI350P-600W/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI350P-600W/levels/rvs_level_5.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c174ec6..327b9acc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added - Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** +- Test-level configurations for MI350P-450W and MI350P-600W (`conf/MI350P-450W/levels/`, `conf/MI350P-600W/levels/`), auto-selected by `-r N` via amdsmi power-cap disambiguation (PCI device ID `0x75a8`). ## RVS 1.4.0 diff --git a/docs/ug1main.md b/docs/ug1main.md index 634ed5faa..b13bfab3b 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -345,7 +345,9 @@ The configuration files in the top-level `conf/` folder are generic samples and ### GPU-Specific Configurations RVS includes optimized test configurations for a range of GPU families, organized under `conf//`. -Level-based configurations (usable with `-r`) are available for: MI300X, MI300X-HF, MI308X, MI308X-HF, MI325X, MI350X, MI355X. +Level-based configurations (usable with `-r`) are available for: MI300X, MI300X-HF, MI308X, MI308X-HF, MI325X, MI350X, MI355X, MI350P-450W, MI350P-600W. + +For MI350P, the 450W and 600W SKUs share a single PCI device ID (`0x75a8`); RVS disambiguates between them at runtime by reading the GPU's hardware power cap via amdsmi (~450 W → `MI350P-450W`, ~600 W → `MI350P-600W`). If the power cap cannot be read, RVS falls back to `MI350P-450W` and prints a warning; use `-c conf/MI350P-600W/levels/rvs_level_N.conf` explicitly if your card is the 600W SKU. **AMD Instinct Series:** - MI210, MI250X, MI300A, MI300X, MI308X, MI325X, MI350X, MI355X diff --git a/rvs/conf/MI350P-450W/levels/rvs_level_1.conf b/rvs/conf/MI350P-450W/levels/rvs_level_1.conf new file mode 100644 index 000000000..14b8d6c62 --- /dev/null +++ b/rvs/conf/MI350P-450W/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI350P-450W/levels/rvs_level_2.conf b/rvs/conf/MI350P-450W/levels/rvs_level_2.conf new file mode 100644 index 000000000..f34ed405f --- /dev/null +++ b/rvs/conf/MI350P-450W/levels/rvs_level_2.conf @@ -0,0 +1,79 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + subtest: 0 + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI350P-450W/levels/rvs_level_3.conf b/rvs/conf/MI350P-450W/levels/rvs_level_3.conf new file mode 100644 index 000000000..4e4ac05d8 --- /dev/null +++ b/rvs/conf/MI350P-450W/levels/rvs_level_3.conf @@ -0,0 +1,252 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-450W test level 3 - basic performance +# GST target_stress values are 0 (measurement-only). Calibrated MI350P-450W +# thresholds will be set once they are characterized for this SKU. + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + diff --git a/rvs/conf/MI350P-450W/levels/rvs_level_4.conf b/rvs/conf/MI350P-450W/levels/rvs_level_4.conf new file mode 100644 index 000000000..196091fdd --- /dev/null +++ b/rvs/conf/MI350P-450W/levels/rvs_level_4.conf @@ -0,0 +1,335 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-450W test level 4 - extended performance +# GST target_stress = 0 (measurement-only) until 450W thresholds are calibrated. +# IET target_power = 438 W (per MI350P-450W TDP, matching iet_stress.conf). + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 438 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI350P-450W/levels/rvs_level_5.conf b/rvs/conf/MI350P-450W/levels/rvs_level_5.conf new file mode 100644 index 000000000..ddb3e1ece --- /dev/null +++ b/rvs/conf/MI350P-450W/levels/rvs_level_5.conf @@ -0,0 +1,335 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-450W test level 5 - full stress test (long duration) +# GST target_stress = 0 (measurement-only) until 450W thresholds are calibrated. +# IET target_power = 438 W (per MI350P-450W TDP). + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 438 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI350P-600W/levels/rvs_level_1.conf b/rvs/conf/MI350P-600W/levels/rvs_level_1.conf new file mode 100644 index 000000000..14b8d6c62 --- /dev/null +++ b/rvs/conf/MI350P-600W/levels/rvs_level_1.conf @@ -0,0 +1,38 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev + diff --git a/rvs/conf/MI350P-600W/levels/rvs_level_2.conf b/rvs/conf/MI350P-600W/levels/rvs_level_2.conf new file mode 100644 index 000000000..f34ed405f --- /dev/null +++ b/rvs/conf/MI350P-600W/levels/rvs_level_2.conf @@ -0,0 +1,79 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + subtest: 0 + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 + diff --git a/rvs/conf/MI350P-600W/levels/rvs_level_3.conf b/rvs/conf/MI350P-600W/levels/rvs_level_3.conf new file mode 100644 index 000000000..6a8a400ac --- /dev/null +++ b/rvs/conf/MI350P-600W/levels/rvs_level_3.conf @@ -0,0 +1,252 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-600W test level 3 - basic performance +# Calibrated GST target_stress values (fp8/fp16/bf16) sourced from +# MI350P-600W/gst_single.conf. Uncalibrated dtypes/shapes use 0. + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1513000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 665000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 694000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + diff --git a/rvs/conf/MI350P-600W/levels/rvs_level_4.conf b/rvs/conf/MI350P-600W/levels/rvs_level_4.conf new file mode 100644 index 000000000..3c40f7b6a --- /dev/null +++ b/rvs/conf/MI350P-600W/levels/rvs_level_4.conf @@ -0,0 +1,335 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-600W test level 4 - extended performance +# Calibrated GST target_stress (fp8/fp16/bf16) sourced from MI350P-600W/gst_single.conf. +# IET target_power = 580 W (per MI350P-600W TDP, matching iet_stress.conf). + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1513000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 665000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 694000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 580 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI350P-600W/levels/rvs_level_5.conf b/rvs/conf/MI350P-600W/levels/rvs_level_5.conf new file mode 100644 index 000000000..4fe4ad4a4 --- /dev/null +++ b/rvs/conf/MI350P-600W/levels/rvs_level_5.conf @@ -0,0 +1,335 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# MI350P-600W test level 5 - full stress test (long duration) +# Calibrated GST target_stress (fp8/fp16/bf16) sourced from MI350P-600W/gst_single.conf. +# IET target_power = 580 W (per MI350P-600W TDP). + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 865075200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1513000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 665000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 694000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 580 + tolerance: 0.01 + matrix_size: 8192 + ops_type: dgemm + lda: 8192 + ldb: 8192 + ldc: 8192 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index 2c0a147f5..d4a09b31f 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -55,7 +55,8 @@ const std::map gpu_dev_map = { {0x74a8, "MI308X-HF"}, // MI308X-HF {0x74a5, "MI325X"}, // MI325X {0x75a0, "MI350X"}, // MI350X AC - {0x75a3, "MI355X"} // MI355X LC + {0x75a3, "MI355X"}, // MI355X LC + {0x75a8, "MI350P"} // MI350P workstation (450W / 600W disambiguated by power cap) }; using std::vector; @@ -856,6 +857,38 @@ std::string rvs::gpulist::gpu_get_platform_name (void) { return ""; } + /* MI350P (0x75a8) shares one PCI device ID across the 450W and 600W SKUs; + differentiate by reading the hardware power cap reported by amdsmi. The + two SKUs ship with distinct TDP caps (~450 W vs ~600 W) Prefer max_power_cap from + amdsmi_get_power_cap_info (the hardware limit, in microwatts on Linux + bare metal) */ + if (it->second == "MI350P") { + constexpr uint64_t MI350P_TDP_SPLIT_UW = 525000000ULL; // 525 W in microwatts + constexpr uint32_t MI350P_TDP_SPLIT_W = 525; // 525 W + auto smi_map = rvs::get_smi_pci_map(); + if (!smi_map.empty()) { + amdsmi_processor_handle hdl = smi_map.begin()->second; + amdsmi_power_cap_info_t cap_info{}; + if (amdsmi_get_power_cap_info(hdl, 0, &cap_info) == AMDSMI_STATUS_SUCCESS + && cap_info.max_power_cap > 0) { + return (cap_info.max_power_cap < MI350P_TDP_SPLIT_UW) + ? std::string("MI350P-450W") + : std::string("MI350P-600W"); + } + amdsmi_power_info_t pwr_info{}; + if (amdsmi_get_power_info(hdl, &pwr_info) == AMDSMI_STATUS_SUCCESS + && pwr_info.power_limit > 0) { + return (pwr_info.power_limit < MI350P_TDP_SPLIT_W) + ? std::string("MI350P-450W") + : std::string("MI350P-600W"); + } + } + std::cout << "MI350P detected but power cap could not be read via amdsmi; " + "falling back to MI350P-450W. Use -c explicitly if this is " + "incorrect." << std::endl; + return "MI350P-450W"; + } + return it->second; } From db0a71c0faca435e4212516bf38ce8eea77b50a7 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 31 May 2026 22:27:25 -0700 Subject: [PATCH 176/275] fix typerror on local runner with older python TypeError: 'type' object is not subscriptable on line 6 of the inline script is from list[str] annotations. That syntax needs Python 3.9+. Removing Python 3.9+ type hints (list[str]) the self-hosted runner uses Python 3.8. --- .github/workflows/build-relocatable-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 5164ff96d..8ed6ea8a3 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -70,10 +70,10 @@ jobs: import re import urllib.request - def list_remote_branches() -> list[str]: + def list_remote_branches(): token = os.environ["GITHUB_TOKEN"] repo = os.environ["GITHUB_REPOSITORY"] - names: list[str] = [] + names = [] page = 1 while True: url = ( From 88dd2619f26012dc7bee5d418ecb22e23b0b3cad Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 1 Jun 2026 13:45:51 -0400 Subject: [PATCH 177/275] Running even if the latest tarball matches the last run Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 14 ++++++-------- .github/workflows/rvs-nightly-tests.yml | 20 ++++++-------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index e2e7e9b60..45ef485f3 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -21,7 +21,7 @@ schedule (or manual) detect [ubuntu-latest] │ curl $RVS_TARBALL_INDEX_URL │ → grep amdrocm*-rvs-*-Linux.tar.gz, sort -V, pick newest - │ → compare with cached marker (skip if unchanged) + │ → compare with cached marker (notice only; tests always run) ▼ test [GitHub runner = orchestrator] ──ssh──▶ [target node = GPU host] │ validate target_node / target_user │ @@ -44,8 +44,8 @@ artifact: rvs-nightly-report- | Trigger | Cadence | What fires | |---|---|---| -| `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index. If the latest filename matches the previous run's, the run is **skipped** to avoid re-testing the same package. | -| `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL, forcing a re-run, and **retargeting at any node** without editing the workflow. | +| `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index and always runs install + level 4, even when the latest tarball filename matches the previous run (a notice is logged when unchanged). | +| `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and **retargeting at any node** without editing the workflow. | The cron deliberately runs after AMD's typical nightly publish window; adjust the cron string in the workflow if your publish cadence is different. @@ -55,7 +55,6 @@ adjust the cron string in the workflow if your publish cadence is different. | Input | Default | Description | |---|---|---| | `tarball_url` | _(empty)_ | If set, the workflow downloads this exact URL instead of scraping the index. Useful for re-running an older build. | -| `force` | `false` | When `true`, runs even if the latest tarball filename matches the cached marker. | | `target_node` | _(empty → `secrets.RVS_TARGET_NODE`)_ | Hostname or IP of the node to install RVS on and run tests against. **This is the value that retargets the test execution.** Stored as a secret so the lab node identity isn't visible in repo settings or run logs (GitHub Actions automatically masks secret values as `***` in step output). | | `target_user` | _(empty → `secrets.RVS_TARGET_USER`; if both are unset, SSH defaults to the orchestrator runner's local user)_ | SSH user on the target node. Must have `NOPASSWD` sudo on the target (see prerequisites). Stored as a secret so the lab account name isn't visible in repo settings or run logs (GitHub Actions automatically masks secret values as `***` in step output). | | `remote_work_dir` | _(empty → `vars.RVS_REMOTE_WORK_DIR`, then `/tmp/rvs-nightly-`)_ | Working dir on the target node where the tarball is staged, logs are written, and which gets `rm -rf`'d at the end. | @@ -70,8 +69,7 @@ Example — point a single run at a specific node: gh workflow run rvs-nightly-tests.yml \ -f tarball_url="/amdrocm7-rvs-1.4.21-288-Linux.tar.gz" \ -f target_node="" \ - -f target_user="" \ - -f force=true + -f target_user="" ``` Example — keep the default tarball but run on a different host today: @@ -405,7 +403,7 @@ After committing the workflow file to `master`, the fastest sanity check is: ```bash -gh workflow run rvs-nightly-tests.yml -f force=true +gh workflow run rvs-nightly-tests.yml ``` Watch the Actions tab for: @@ -442,7 +440,7 @@ Watch the Actions tab for: | **Verify RVS binary library resolution on target node** fails with `not found` | A ROCm runtime library is missing or not in `RPATH` on the target. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | | **Run RVS level 4 on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check `rvs_level_4.log` in the artifact for the specific error. | | **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | -| Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually with `force=true` to validate. | +| Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually via `workflow_dispatch` to validate. | ## Retargeting at a different node diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index a89469787..2e9e5db95 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -46,10 +46,6 @@ on: description: 'Override tarball URL (default: latest from vars.RVS_TARBALL_INDEX_URL)' required: false default: '' - force: - description: 'Run even if the latest tarball matches the last run' - type: boolean - default: false target_node: description: 'Hostname/IP of node to install RVS on and run tests (default: secrets.RVS_TARGET_NODE)' required: false @@ -87,7 +83,6 @@ jobs: outputs: tarball_url: ${{ steps.resolve.outputs.tarball_url }} tarball_name: ${{ steps.resolve.outputs.tarball_name }} - should_run: ${{ steps.resolve.outputs.should_run }} steps: - name: Restore last-seen marker (cron path) if: github.event_name == 'schedule' @@ -103,7 +98,6 @@ jobs: env: INDEX_URL: ${{ env.TARBALL_INDEX_URL }} INPUT_URL: ${{ inputs.tarball_url }} - FORCE: ${{ inputs.force }} EVENT_NAME: ${{ github.event_name }} run: | set -euo pipefail @@ -139,11 +133,12 @@ jobs: NAME="$(basename "$URL")" - SHOULD_RUN=true - if [ "$EVENT_NAME" = "schedule" ] && [ "$FORCE" != "true" ] && [ -f last_tarball_marker.txt ]; then - if [ "$(cat last_tarball_marker.txt)" = "$NAME" ]; then - SHOULD_RUN=false - echo "Latest tarball ($NAME) unchanged since last run — skipping." + if [ "$EVENT_NAME" = "schedule" ] && [ -f last_tarball_marker.txt ]; then + LAST="$(cat last_tarball_marker.txt)" + if [ "$LAST" = "$NAME" ]; then + echo "::notice::Latest tarball ($NAME) unchanged since last scheduled run — running tests anyway." + else + echo "::notice::New tarball (previous: $LAST, now: $NAME)." fi fi echo "$NAME" > last_tarball_marker.txt @@ -151,12 +146,10 @@ jobs: { echo "tarball_url=$URL" echo "tarball_name=$NAME" - echo "should_run=$SHOULD_RUN" } >> "$GITHUB_OUTPUT" echo "Latest tarball : $NAME" echo "URL : $URL" - echo "Should run : $SHOULD_RUN" - name: Save marker (cron path) if: github.event_name == 'schedule' @@ -168,7 +161,6 @@ jobs: test: name: Install RVS and run level 4 (on remote target node) needs: detect - if: needs.detect.outputs.should_run == 'true' runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 180 env: From f065aa4622678a7e1dc4ea18de76acc6ccc55a81 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 1 Jun 2026 15:57:22 -0400 Subject: [PATCH 178/275] Trigger RVS tests if there is a successful build completion Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 2e9e5db95..992558b45 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -36,10 +36,21 @@ name: RVS Nightly Tests # target node must have NOPASSWD sudo for installs into # /opt/rocm/extras-. +# Triggers +# -------- +# - schedule: daily poll of vars.RVS_TARBALL_INDEX_URL +# - workflow_dispatch: manual run with optional overrides +# - workflow_run: after Build Relocatable Packages completes successfully +# (no changes required in build-relocatable-packages.yml) + on: schedule: # 15:00 UTC daily (08:00 PST / 07:00 PDT). Adjust to match your build cadence. - cron: '0 15 * * *' + workflow_run: + workflows: ["Build Relocatable Packages"] + types: + - completed workflow_dispatch: inputs: tarball_url: @@ -79,6 +90,7 @@ env: jobs: detect: name: Detect latest RVS tarball + if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest outputs: tarball_url: ${{ steps.resolve.outputs.tarball_url }} From 0279c500b2ae7b65f755879c3d30864e2fef6e26 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 3 Jun 2026 12:25:41 -0400 Subject: [PATCH 179/275] Refactored RVS nightly tests with a new rvs_nightly_test.sh script Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 39 +- .github/workflows/rvs-nightly-tests.yml | 550 ++++++---------------- rvs_nightly_test.sh | 444 +++++++++++++++++ 3 files changed, 618 insertions(+), 415 deletions(-) create mode 100755 rvs_nightly_test.sh diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 45ef485f3..98ec739da 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -15,36 +15,39 @@ at any GPU host without code changes. ## What it does ``` -schedule (or manual) +schedule / workflow_run / manual │ ▼ -detect [ubuntu-latest] - │ curl $RVS_TARBALL_INDEX_URL - │ → grep amdrocm*-rvs-*-Linux.tar.gz, sort -V, pick newest - │ → compare with cached marker (notice only; tests always run) +detect-tarball [utility runner] + │ curl $RVS_TARBALL_INDEX_URL → pick newest amdrocm*-rvs-*.tar.gz ▼ -test [GitHub runner = orchestrator] ──ssh──▶ [target node = GPU host] - │ validate target_node / target_user │ - │ write SSH key + config to $RUNNER_TEMP │ - │ ssh rvs-target hostname; id ─────────────────────────────▶ │ connectivity check - │ ssh rvs-target ─────────────────────────────▶ │ rocminfo + amd-smi version on $TARGET_ROCM_PATH - │ curl → ./pkg/.tar.gz │ - │ scp ./pkg/.tar.gz rvs-target:… ─────────────────────────────▶ │ $REMOTE_WORK_DIR/pkg/ - │ ssh rvs-target ─────────────────────────────▶ │ sudo -n tar -xzf → /opt/rocm/extras-/ - │ ssh rvs-target ─────────────────────────────▶ │ verify RVS lib resolution - │ ssh rvs-target rvs -r 4 ─────────────────────────────▶ │ writes $REMOTE_WORK_DIR/reports/rvs_level_4.log - │ scp rvs-target:…/reports/*.log ./reports/ ◀───────────────────────────── │ - │ build Markdown SUMMARY.md → GitHub job summary + artifact │ - │ ssh rvs-target rm -rf $REMOTE_WORK_DIR ─────────────────────────────▶ │ cleanup +prepare-test-context [utility runner] + │ rvs_nightly_test.sh validate-config → paths + remote work dir + ▼ +install-rvs-on-target [test runner] ──ssh──▶ [target GPU node] + │ rvs_nightly_test.sh: setup-ssh, verify-rocm, download, copy, + │ install-rvs, verify-rvs-binary + ▼ +run-rvs-level-4 [test runner] ──ssh──▶ [target GPU node] + │ rvs_nightly_test.sh: run-level4, collect-logs, capture-versions + │ upload intermediate logs artifact; cleanup remote work dir + ▼ +create-test-report [utility runner] + │ rvs_nightly_test.sh build-report → SUMMARY.md + final artifact ▼ artifact: rvs-nightly-report- ``` +Install, test, and report logic lives in [`rvs_nightly_test.sh`](../../rvs_nightly_test.sh) +at the repo root — the same split as `build-relocatable-packages.yml` + +`build_packages_local.sh`. + ## Triggers | Trigger | Cadence | What fires | |---|---|---| | `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index and always runs install + level 4, even when the latest tarball filename matches the previous run (a notice is logged when unchanged). | +| `workflow_run` | After **Build Relocatable Packages** completes | Runs only when that workflow's overall conclusion is **success**. No changes to the build workflow are required. | | `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and **retargeting at any node** without editing the workflow. | The cron deliberately runs after AMD's typical nightly publish window; diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 992558b45..cd8a3b0db 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,51 +1,23 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball published at the index URL configured in -# vars.RVS_TARBALL_INDEX_URL once per day, copies it to a configurable target -# node, installs it there, runs RVS level 4 on that node, and uploads a -# Markdown report + per-level log as an artifact from the GitHub runner. +# vars.RVS_TARBALL_INDEX_URL, copies it to a configurable target node, installs +# it there, runs RVS level 4 on that node, and uploads a Markdown report + logs. # -# The GitHub Actions runner ("RVS Runner") only orchestrates. All RVS install, -# binary verification, and rvs -r 4 execution happens on the target node -# reached over SSH. The target node is configurable so the same workflow can be -# pointed at any GPU host without code changes. +# Orchestration lives in this workflow; install/test/report steps run via +# rvs_nightly_test.sh (same pattern as build-relocatable-packages.yml + +# build_packages_local.sh). # -# Required repo configuration -# --------------------------- -# Variables (Settings → Secrets and variables → Actions → Variables): -# RVS_TARBALL_INDEX_URL HTTP listing the published amdrocm*-rvs-*.tar.gz files. -# RVS_REMOTE_WORK_DIR (Optional) Working dir on the target node. -# Default: /tmp/rvs-nightly-. -# RVS_TARGET_ROCM_PATH Default absolute path to the ROCm tarball install -# root on the target node. Can be overridden per-run -# via workflow_dispatch input target_rocm_path. -# RVS_TEST_RUNNER_LABEL (Optional) Label of the GitHub runner. Default: self-hosted. -# -# Secrets (Settings → Secrets and variables → Actions → Secrets): -# RVS_TARGET_NODE Default hostname/IP of the node that runs RVS. Stored -# as a secret to avoid leaking the lab node identity in -# repo settings / run logs (only the workflow accesses -# it). Can be overridden per-run via workflow_dispatch -# input target_node. -# RVS_TARGET_USER (Optional) SSH user on the target node. Stored as a -# secret so the lab account name isn't visible in repo -# settings or run logs. Can be overridden per-run via -# workflow_dispatch input target_user. -# RVS_TARGET_SSH_KEY Private SSH key (in PEM/OpenSSH format) authorized on -# the target node for RVS_TARGET_USER. The user on the -# target node must have NOPASSWD sudo for installs into -# /opt/rocm/extras-. +# Required repo configuration: see README_NIGHTLY_TESTS.md # Triggers # -------- # - schedule: daily poll of vars.RVS_TARBALL_INDEX_URL # - workflow_dispatch: manual run with optional overrides # - workflow_run: after Build Relocatable Packages completes successfully -# (no changes required in build-relocatable-packages.yml) on: schedule: - # 15:00 UTC daily (08:00 PST / 07:00 PDT). Adjust to match your build cadence. - cron: '0 15 * * *' workflow_run: workflows: ["Build Relocatable Packages"] @@ -70,7 +42,7 @@ on: required: false default: '' target_rocm_path: - description: 'ROCm tarball install root on the target node to run RVS against (default: vars.RVS_TARGET_ROCM_PATH)' + description: 'ROCm tarball install root on the target node (default: vars.RVS_TARGET_ROCM_PATH)' required: false default: '' @@ -82,16 +54,13 @@ concurrency: cancel-in-progress: false env: - # Required: configure per-repo under - # Settings → Secrets and variables → Actions → Variables. - # Workflow fails fast if unset. TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL }} jobs: - detect: + detect-tarball: name: Detect latest RVS tarball if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' - runs-on: ubuntu-latest + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} outputs: tarball_url: ${{ steps.resolve.outputs.tarball_url }} tarball_name: ${{ steps.resolve.outputs.tarball_name }} @@ -115,7 +84,7 @@ jobs: set -euo pipefail if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL:-}" ]; then - echo "::error::vars.RVS_TARBALL_INDEX_URL is not set (Settings → Secrets and variables → Actions → Variables); set it or pass workflow_dispatch.tarball_url" + echo "::error::vars.RVS_TARBALL_INDEX_URL is not set; set it or pass workflow_dispatch.tarball_url" exit 1 fi @@ -123,8 +92,6 @@ jobs: local idx="$1" local html html="$(curl -sL --max-time 30 "$idx" || true)" - # Match any amdrocm*-rvs-*-Linux.tar.gz filename in the listing HTML. - # `sort -V` picks the highest version (handles 1.4.21-9 vs 1.4.21-100 correctly). echo "$html" \ | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ | sort -uV \ @@ -170,378 +137,180 @@ jobs: path: last_tarball_marker.txt key: rvs-nightly-tarball-${{ steps.resolve.outputs.tarball_name }} - test: - name: Install RVS and run level 4 (on remote target node) - needs: detect - runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} - timeout-minutes: 180 - env: - TARBALL_URL: ${{ needs.detect.outputs.tarball_url }} - TARBALL_NAME: ${{ needs.detect.outputs.tarball_name }} - # Target node where install + tests actually run. Inputs win over repo vars - # so individual runs can be retargeted via workflow_dispatch. - TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} - TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} - # ROCm tarball install root on the target node that RVS should run - # against. This is the directory containing bin/, lib/, lib/llvm/lib/, - # lib/rocm_sysdeps/lib/, etc. (as produced by the ROCm tarball install - # method). Set vars.RVS_TARGET_ROCM_PATH to the absolute path of that - # install on the target node, or pass target_rocm_path per-run. No - # default — the validate step fails fast if neither is set, since - # there is no sensible system-wide default for tarball installs. - TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} - # SSH_KEY_FILE / SSH_CONFIG_FILE are derived from $RUNNER_TEMP in the - # validate step and exported via $GITHUB_ENV so every subsequent step - # inherits them. We can't reference runner.temp here because the - # `runner.*` context is only available inside steps, not in job-level env. + prepare-test-context: + name: Prepare test run context + needs: detect-tarball + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + outputs: + remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} + rocm_major: ${{ steps.prepare.outputs.rocm_major }} + install_dir: ${{ steps.prepare.outputs.install_dir }} + rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} + ssh_key_file: ${{ steps.prepare.outputs.ssh_key_file }} + ssh_config_file: ${{ steps.prepare.outputs.ssh_config_file }} steps: - - name: Validate target node configuration + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Validate configuration and derive paths + id: prepare env: + TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} VAR_REMOTE_WORK_DIR: ${{ vars.RVS_REMOTE_WORK_DIR }} + GITHUB_RUN_ID: ${{ github.run_id }} run: | - set -euo pipefail - - if [ -z "${TARGET_NODE:-}" ]; then - echo "::error::No target node configured. Set workflow_dispatch input 'target_node' or repo secret 'RVS_TARGET_NODE'." - exit 1 - fi - - if [ -z "${TARGET_ROCM_PATH:-}" ]; then - echo "::error::No ROCm tarball install root configured. Set workflow_dispatch input 'target_rocm_path' or repo variable 'RVS_TARGET_ROCM_PATH' to the absolute path of the ROCm tarball install on the target node." - exit 1 - fi + chmod +x rvs_nightly_test.sh + ./rvs_nightly_test.sh validate-config - if [ -n "${INPUT_REMOTE_WORK_DIR:-}" ]; then REMOTE_WORK_DIR="$INPUT_REMOTE_WORK_DIR" - elif [ -n "${VAR_REMOTE_WORK_DIR:-}" ]; then REMOTE_WORK_DIR="$VAR_REMOTE_WORK_DIR" - else REMOTE_WORK_DIR="/tmp/rvs-nightly-${{ github.run_id }}" - fi - - # Derive ROCm major (and therefore the install dir / RVS binary path) up - # front so every remote step can refer to it without re-parsing. - if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then - ROCM_MAJOR="${BASH_REMATCH[1]}" - else - echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" - exit 1 - fi - # RVS is always installed into /opt/rocm/extras-/ — this is - # decoupled from TARGET_ROCM_PATH. INSTALL_DIR is *where the RVS - # tarball gets extracted*; TARGET_ROCM_PATH is *where the ROCm - # runtime libraries live* (for LD_LIBRARY_PATH). The two concepts - # are intentionally separate so the install location matches the - # manual sequence (sudo tar -xzf ... -C /opt/rocm/extras-) - # while the runtime lib path can be retargeted at any ROCm install - # on the host (e.g. a TheRock tarball under $HOME) via the repo - # variable RVS_TARGET_ROCM_PATH. - INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" - RVS_BIN_PATH="${INSTALL_DIR}/bin/rvs" - - # Workflow-scoped SSH state under $RUNNER_TEMP so we never touch the - # runner user's own ~/.ssh on a shared self-hosted runner. $RUNNER_TEMP - # is set automatically by the runner; fall back to /tmp if absent. - SSH_BASE="${RUNNER_TEMP:-/tmp}" - SSH_KEY_FILE_PATH="${SSH_BASE}/rvs_target_key" - SSH_CONFIG_FILE_PATH="${SSH_BASE}/rvs_target_ssh_config" + install-rvs-on-target: + name: Install RVS on target node + needs: [detect-tarball, prepare-test-context] + runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 120 + env: + TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} + RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} + SSH_KEY_FILE: ${{ needs.prepare-test-context.outputs.ssh_key_file }} + SSH_CONFIG_FILE: ${{ needs.prepare-test-context.outputs.ssh_config_file }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 - { - echo "REMOTE_WORK_DIR=$REMOTE_WORK_DIR" - echo "ROCM_MAJOR=$ROCM_MAJOR" - echo "INSTALL_DIR=$INSTALL_DIR" - echo "RVS_BIN=$RVS_BIN_PATH" - echo "SSH_KEY_FILE=$SSH_KEY_FILE_PATH" - echo "SSH_CONFIG_FILE=$SSH_CONFIG_FILE_PATH" - } >> "$GITHUB_ENV" - - echo "Orchestrator runner : $(hostname)" - echo "Target node : $TARGET_USER@$TARGET_NODE" - echo "Target ROCm path : $TARGET_ROCM_PATH" - echo "Remote work dir : $REMOTE_WORK_DIR" - echo "ROCm major : $ROCM_MAJOR" - echo "Expected RVS binary : $RVS_BIN_PATH" - echo "SSH key file : $SSH_KEY_FILE_PATH" - echo "SSH config file : $SSH_CONFIG_FILE_PATH" - - - name: Setup SSH key for target node + - name: Setup SSH for target node env: SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} run: | - set -euo pipefail - if [ -z "${SSH_PRIVATE_KEY:-}" ]; then - echo "::error::secrets.RVS_TARGET_SSH_KEY is not set; cannot SSH to target node." - exit 1 - fi - - # Write key + config to workflow-scoped paths under runner.temp so we - # never modify the runner user's own ~/.ssh on a shared self-hosted runner. - install -m 600 /dev/null "$SSH_KEY_FILE" - printf '%s\n' "$SSH_PRIVATE_KEY" > "$SSH_KEY_FILE" - chmod 600 "$SSH_KEY_FILE" - - # known_hosts is local to this workflow run too. - KNOWN_HOSTS_FILE="${SSH_CONFIG_FILE}.known_hosts" - : > "$KNOWN_HOSTS_FILE" - chmod 600 "$KNOWN_HOSTS_FILE" - # Best-effort host key seeding; StrictHostKeyChecking=accept-new below - # still handles the case where keyscan fails (e.g. behind a bastion). - ssh-keyscan -T 15 -H "$TARGET_NODE" >> "$KNOWN_HOSTS_FILE" 2>/dev/null || true - - cat > "$SSH_CONFIG_FILE" <&1 | sed -n '/^__START__$/,$p' | tail -n +2 - - ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '$REMOTE_WORK_DIR/pkg' '$REMOTE_WORK_DIR/reports'" + chmod +x rvs_nightly_test.sh + ./rvs_nightly_test.sh setup-ssh - name: Verify ROCm prerequisites on target node - run: | - set -euo pipefail - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set -euo pipefail - - echo "=== System ===" - uname -a - echo - - echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" - if [ ! -d "${TARGET_ROCM_PATH}" ]; then - echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." - exit 1 - fi - - # The TheRock tarball's bin/ binaries have RPATH/RUNPATH baked in - # relative to ${TARGET_ROCM_PATH}/lib, so we can invoke them - # directly via their absolute path without any PATH or - # LD_LIBRARY_PATH setup. - - echo "=== ${TARGET_ROCM_PATH}/bin/rocminfo ===" - "${TARGET_ROCM_PATH}/bin/rocminfo" - echo - - echo "=== ${TARGET_ROCM_PATH}/bin/amd-smi version ===" - "${TARGET_ROCM_PATH}/bin/amd-smi" version - echo - - echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}" - REMOTE + run: ./rvs_nightly_test.sh verify-rocm - name: Download tarball on runner - run: | - set -euo pipefail - mkdir -p ./pkg - echo "Downloading: $TARBALL_URL" - curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" - ls -la ./pkg/ - file "./pkg/${TARBALL_NAME}" || true + run: ./rvs_nightly_test.sh download-tarball - name: Copy tarball to target node - run: | - set -euo pipefail - echo "Copying ./pkg/${TARBALL_NAME} -> rvs-target:${REMOTE_WORK_DIR}/pkg/" - scp -q -F "$SSH_CONFIG_FILE" "./pkg/${TARBALL_NAME}" "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" - ssh -q -F "$SSH_CONFIG_FILE" rvs-target "ls -la '${REMOTE_WORK_DIR}/pkg/'" + run: ./rvs_nightly_test.sh copy-to-target - name: Install RVS on target node - run: | - set -euo pipefail - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set -euo pipefail - PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" - - echo "Target ROCm path : ${TARGET_ROCM_PATH}" - echo "Detected ROCm major version : ${ROCM_MAJOR}" - echo "Install target : ${INSTALL_DIR}" - echo "Expected RVS binary : ${RVS_BIN}" + run: ./rvs_nightly_test.sh install-rvs - if [ ! -f "$PKG" ]; then - echo "::error::Tarball not found on target node at $PKG" - exit 1 - fi - - # Use sudo only when needed. For system ROCm installs under /opt/rocm - # we need root to write into /opt; for TheRock-style tarball installs - # in the user's home dir, sudo is unnecessary (and would fail if the - # user doesn't have NOPASSWD configured). - probe="$INSTALL_DIR" - while [ ! -d "$probe" ] && [ "$probe" != "/" ]; do probe=$(dirname "$probe"); done - if [ -w "$probe" ]; then - echo "Installing into $INSTALL_DIR without sudo (writable path)" - mkdir -p "$INSTALL_DIR" - tar -xzf "$PKG" -C "$INSTALL_DIR" - else - echo "Installing into $INSTALL_DIR via sudo -n (path not user-writable)" - sudo -n mkdir -p "$INSTALL_DIR" - sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" - fi + - name: Verify RVS binary library resolution on target node + run: ./rvs_nightly_test.sh verify-rvs-binary - if [ ! -x "$RVS_BIN" ]; then - echo "::error::rvs binary not found or not executable at $RVS_BIN after install" - ls -la "$INSTALL_DIR/" || true - ls -la "$INSTALL_DIR/bin/" || true - exit 1 - fi + - name: Cleanup local SSH state + if: always() + run: ./rvs_nightly_test.sh cleanup-local-ssh - # LD_LIBRARY_PATH is now derived from INSTALL_DIR (where RVS's own - # libs live) and TARGET_ROCM_PATH (where the ROCm runtime libs live). - # Order matches the official ROCm tarball-install docs: - # $ROCM_PATH/lib/rocm_sysdeps/lib ← TheRock-style runtime deps - # $ROCM_PATH/lib/llvm/lib ← libomp.so and friends - # $ROCM_PATH/lib ← core ROCm libs (libamd_smi, - # libhsa-runtime64, libamdhip64, …) - # Plus $INSTALL_DIR/lib first so librvslib.so resolves. - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" - echo "Installed RVS at: $RVS_BIN" - "$RVS_BIN" --version || true - REMOTE + run-rvs-level-4: + name: Run RVS level 4 on target node + needs: [detect-tarball, prepare-test-context, install-rvs-on-target] + runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 180 + outputs: + rc: ${{ steps.level4.outputs.rc }} + start: ${{ steps.level4.outputs.start }} + end: ${{ steps.level4.outputs.end }} + rvs_version: ${{ steps.versions.outputs.rvs_version }} + target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} + env: + TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} + RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} + SSH_KEY_FILE: ${{ needs.prepare-test-context.outputs.ssh_key_file }} + SSH_CONFIG_FILE: ${{ needs.prepare-test-context.outputs.ssh_config_file }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 - - name: Verify RVS binary library resolution on target node + - name: Setup SSH for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} run: | - set -euo pipefail - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set -euo pipefail - if [ ! -x "$RVS_BIN" ]; then - echo "::error::$RVS_BIN was not produced by tarball extraction on target." - exit 1 - fi - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" - echo "=== ldd $RVS_BIN ===" - LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) - echo "$LDD_OUTPUT" - - if echo "$LDD_OUTPUT" | grep -q "not found"; then - echo "::error::RVS binary has unresolved library dependencies on target (see above)." - exit 1 - fi - echo "::notice::RVS binary's library dependencies resolved OK on target." - REMOTE + chmod +x rvs_nightly_test.sh + ./rvs_nightly_test.sh setup-ssh - name: Run RVS level 4 on target node - id: rvs4 - run: | - set +e - START=$(date -u +%FT%TZ) - echo "::group::RVS level 4 (${RVS_BIN} -r 4) on $TARGET_NODE against $TARGET_ROCM_PATH" - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' - set +e - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" - mkdir -p "${REMOTE_WORK_DIR}/reports" - "$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" - RC=${PIPESTATUS[0]} - echo "remote_rc=$RC" - exit $RC - REMOTE - RC=$? - echo "::endgroup::" - END=$(date -u +%FT%TZ) - echo "rc=$RC" >> "$GITHUB_OUTPUT" - echo "start=$START" >> "$GITHUB_OUTPUT" - echo "end=$END" >> "$GITHUB_OUTPUT" - exit 0 + id: level4 + run: ./rvs_nightly_test.sh run-level4 - name: Collect logs from target node + if: always() + run: ./rvs_nightly_test.sh collect-logs + + - name: Capture RVS and ROCm versions from target + id: versions + if: always() + run: ./rvs_nightly_test.sh capture-versions + + - name: Upload test logs (intermediate) + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-nightly-logs-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Cleanup remote work dir and local SSH state if: always() run: | - set -euo pipefail - mkdir -p ./reports - if [ ! -f "$SSH_CONFIG_FILE" ]; then - echo "::warning::SSH config not present; skipping log collection." - exit 0 - fi - echo "Copying logs from rvs-target:${REMOTE_WORK_DIR}/reports/ -> ./reports/" - scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/*.log" ./reports/ || \ - echo "::warning::No log files retrieved from target node (tests may have failed before producing output)." - ls -la ./reports/ || true + ./rvs_nightly_test.sh cleanup-remote + ./rvs_nightly_test.sh cleanup-local-ssh + + create-test-report: + name: Create Test Report + needs: [detect-tarball, prepare-test-context, run-rvs-level-4] + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + if: always() && !cancelled() && needs.detect-tarball.result == 'success' && needs.run-rvs-level-4.result != 'skipped' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Download test logs + uses: actions/download-artifact@v4 + with: + name: rvs-nightly-logs-${{ github.run_id }} + path: ./reports + continue-on-error: true - name: Build test report id: report + env: + TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} + RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} + RVS_LEVEL4_RC: ${{ needs.run-rvs-level-4.outputs.rc }} + RVS_LEVEL4_START: ${{ needs.run-rvs-level-4.outputs.start }} + RVS_LEVEL4_END: ${{ needs.run-rvs-level-4.outputs.end }} + RVS_VERSION: ${{ needs.run-rvs-level-4.outputs.rvs_version }} + TARGET_ROCM_VERSION: ${{ needs.run-rvs-level-4.outputs.target_rocm_version }} + GITHUB_RUN_ID: ${{ github.run_id }} + GITHUB_SERVER_URL: ${{ github.server_url }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_EVENT_NAME: ${{ github.event_name }} run: | - set -euo pipefail + chmod +x rvs_nightly_test.sh mkdir -p ./reports - - RC4=${{ steps.rvs4.outputs.rc }} - [ "$RC4" -eq 0 ] && S4=PASS || S4=FAIL - if [ "$RC4" -eq 0 ]; then - OVERALL=PASS - else - OVERALL=FAIL - fi - - # Query the actual version from the target so the report reflects the - # binary the tests ran against, not a stale local copy. - RVS_VERSION=$( - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" - export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" - "$RVS_BIN" --version 2>/dev/null - REMOTE - ) - - # Also fetch the target's actual ROCm version string so the report - # shows what RVS ran against, not just the path. - TARGET_ROCM_VERSION=$( - ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null || echo "unknown" - cat "${TARGET_ROCM_PATH}/.info/version" 2>/dev/null \ - || cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" 2>/dev/null \ - || echo "unknown" - REMOTE - ) - - REPORT=./reports/SUMMARY.md - { - echo "# RVS Nightly Test Report" - echo "" - echo "| Field | Value |" - echo "|---|---|" - echo "| Run | [\`${{ github.run_id }}\`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |" - echo "| Trigger | \`${{ github.event_name }}\` |" - echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${TARGET_ROCM_VERSION}\`) |" - echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" - echo "| Tarball | \`${TARBALL_NAME}\` |" - echo "| Source URL | ${TARBALL_URL} |" - echo "| RVS version | \`${RVS_VERSION}\` |" - echo "| Overall result | **${OVERALL}** |" - echo "" - echo "## Results" - echo "" - echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" - echo "|---|---|:--:|---:|---|---|" - echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${S4} | ${RC4} | ${{ steps.rvs4.outputs.start }} | ${{ steps.rvs4.outputs.end }} |" - echo "" - echo "## Logs" - echo "" - echo "Full stdout/stderr from the level-4 run is attached to the artifact" - echo "\`rvs-nightly-report-${{ github.run_id }}\`:" - echo "" - echo "- \`rvs_level_4.log\`" - echo "- \`SUMMARY.md\` (this file)" - } > "$REPORT" - - cat "$REPORT" - cat "$REPORT" >> "$GITHUB_STEP_SUMMARY" - - { - echo "overall=$OVERALL" - echo "rc4=$RC4" - } >> "$GITHUB_OUTPUT" + ./rvs_nightly_test.sh build-report - name: Upload report and logs if: always() @@ -552,21 +321,8 @@ jobs: retention-days: 30 if-no-files-found: warn - - name: Cleanup remote work dir and local SSH state - if: always() - run: | - set +e - if [ -n "${REMOTE_WORK_DIR:-}" ] && [ -f "$SSH_CONFIG_FILE" ]; then - ssh -q -F "$SSH_CONFIG_FILE" rvs-target "rm -rf '${REMOTE_WORK_DIR}'" || \ - echo "::warning::Failed to clean up ${REMOTE_WORK_DIR} on target node." - fi - # Scrub the private key + config from the runner so they cannot linger - # between jobs on a shared self-hosted runner. runner.temp is also - # cleaned automatically by the runner, this is just defense in depth. - rm -f "$SSH_KEY_FILE" "$SSH_CONFIG_FILE" "${SSH_CONFIG_FILE}.known_hosts" - - - name: Fail the job if any level failed - if: steps.report.outputs.overall == 'FAIL' + - name: Fail the workflow if level 4 failed + if: steps.report.outputs.overall == 'FAIL' || needs.run-rvs-level-4.result == 'failure' run: | - echo "::error::RVS test failure — level4 rc=${{ steps.report.outputs.rc4 }}" + echo "::error::RVS test failure — level4 rc=${{ needs.run-rvs-level-4.outputs.rc }}" exit 1 diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh new file mode 100755 index 000000000..78b4edcd1 --- /dev/null +++ b/rvs_nightly_test.sh @@ -0,0 +1,444 @@ +#!/bin/bash +################################################################################ +# Remote RVS nightly install + test driver (used by rvs-nightly-tests.yml). +# Mirrors build_packages_local.sh: workflow orchestrates, this script executes. +################################################################################ + +set -euo pipefail + +usage() { + cat <<'EOF' +Usage: rvs_nightly_test.sh + +Commands (workflow order): + validate-config Fail fast; emit prepare job outputs to GITHUB_OUTPUT + setup-ssh Write SSH key/config under RUNNER_TEMP and verify connectivity + verify-rocm Remote rocminfo + amd-smi on TARGET_ROCM_PATH + download-tarball curl tarball to ./pkg/ on the orchestrator runner + copy-to-target scp tarball to REMOTE_WORK_DIR/pkg on target + install-rvs Extract tarball on target under INSTALL_DIR + verify-rvs-binary Remote ldd check on RVS_BIN + run-level4 Run rvs -r 4; write rc/start/end to GITHUB_OUTPUT if set + collect-logs scp remote logs to ./reports/ + capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT + build-report Write ./reports/SUMMARY.md from env + prior outputs + cleanup-remote rm -rf REMOTE_WORK_DIR on target + cleanup-local-ssh Remove workflow-scoped key/config files +EOF +} + +require_env() { + local name="$1" + if [ -z "${!name:-}" ]; then + echo "::error::Required environment variable $name is not set" >&2 + exit 1 + fi +} + +ld_path_export() { + echo "${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib" +} + +cmd_validate_config() { + require_env TARBALL_NAME + require_env TARGET_NODE + require_env TARGET_ROCM_PATH + + local input_remote="${INPUT_REMOTE_WORK_DIR:-}" + local var_remote="${VAR_REMOTE_WORK_DIR:-}" + local run_id="${GITHUB_RUN_ID:-local}" + + if [ -n "$input_remote" ]; then + REMOTE_WORK_DIR="$input_remote" + elif [ -n "$var_remote" ]; then + REMOTE_WORK_DIR="$var_remote" + else + REMOTE_WORK_DIR="/tmp/rvs-nightly-${run_id}" + fi + + if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then + ROCM_MAJOR="${BASH_REMATCH[1]}" + else + echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" >&2 + exit 1 + fi + + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + RVS_BIN="${INSTALL_DIR}/bin/rvs" + + SSH_BASE="${RUNNER_TEMP:-/tmp}" + SSH_KEY_FILE="${SSH_BASE}/rvs_target_key" + SSH_CONFIG_FILE="${SSH_BASE}/rvs_target_ssh_config" + + echo "Orchestrator runner : $(hostname)" + echo "Target node : ${TARGET_USER:-}@${TARGET_NODE}" + echo "Target ROCm path : $TARGET_ROCM_PATH" + echo "Remote work dir : $REMOTE_WORK_DIR" + echo "ROCm major : $ROCM_MAJOR" + echo "Expected RVS binary : $RVS_BIN" + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + { + echo "remote_work_dir=$REMOTE_WORK_DIR" + echo "rocm_major=$ROCM_MAJOR" + echo "install_dir=$INSTALL_DIR" + echo "rvs_bin=$RVS_BIN" + echo "ssh_key_file=$SSH_KEY_FILE" + echo "ssh_config_file=$SSH_CONFIG_FILE" + } >> "$GITHUB_OUTPUT" + fi + + export REMOTE_WORK_DIR ROCM_MAJOR INSTALL_DIR RVS_BIN SSH_KEY_FILE SSH_CONFIG_FILE +} + +cmd_setup_ssh() { + require_env TARGET_NODE + require_env SSH_KEY_FILE + require_env SSH_CONFIG_FILE + require_env REMOTE_WORK_DIR + + if [ -z "${SSH_PRIVATE_KEY:-}" ]; then + echo "::error::SSH_PRIVATE_KEY is not set; cannot SSH to target node." >&2 + exit 1 + fi + + install -m 600 /dev/null "$SSH_KEY_FILE" + printf '%s\n' "$SSH_PRIVATE_KEY" > "$SSH_KEY_FILE" + chmod 600 "$SSH_KEY_FILE" + + local known_hosts="${SSH_CONFIG_FILE}.known_hosts" + : > "$known_hosts" + chmod 600 "$known_hosts" + ssh-keyscan -T 15 -H "$TARGET_NODE" >> "$known_hosts" 2>/dev/null || true + + cat > "$SSH_CONFIG_FILE" <&1 | sed -n '/^__START__$/,$p' | tail -n +2 + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" +} + +cmd_verify_rocm() { + require_env SSH_CONFIG_FILE + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +echo "=== System ===" +uname -a +echo +echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" +if [ ! -d "${TARGET_ROCM_PATH}" ]; then + echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." + exit 1 +fi +echo "=== ${TARGET_ROCM_PATH}/bin/rocminfo ===" +"${TARGET_ROCM_PATH}/bin/rocminfo" +echo +echo "=== ${TARGET_ROCM_PATH}/bin/amd-smi version ===" +"${TARGET_ROCM_PATH}/bin/amd-smi" version +echo +echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}" +REMOTE +} + +cmd_download_tarball() { + require_env TARBALL_URL + require_env TARBALL_NAME + mkdir -p ./pkg + echo "Downloading: $TARBALL_URL" + curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" + ls -la ./pkg/ + file "./pkg/${TARBALL_NAME}" || true +} + +cmd_copy_to_target() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + echo "Copying ./pkg/${TARBALL_NAME} -> rvs-target:${REMOTE_WORK_DIR}/pkg/" + scp -q -F "$SSH_CONFIG_FILE" "./pkg/${TARBALL_NAME}" \ + "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "ls -la '${REMOTE_WORK_DIR}/pkg/'" +} + +cmd_install_rvs() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR + require_env INSTALL_DIR + require_env RVS_BIN + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" +echo "Target ROCm path : ${TARGET_ROCM_PATH}" +echo "Detected ROCm major version : ${ROCM_MAJOR}" +echo "Install target : ${INSTALL_DIR}" +echo "Expected RVS binary : ${RVS_BIN}" +if [ ! -f "$PKG" ]; then + echo "::error::Tarball not found on target node at $PKG" + exit 1 +fi +probe="$INSTALL_DIR" +while [ ! -d "$probe" ] && [ "$probe" != "/" ]; do probe=$(dirname "$probe"); done +if [ -w "$probe" ]; then + echo "Installing into $INSTALL_DIR without sudo (writable path)" + mkdir -p "$INSTALL_DIR" + tar -xzf "$PKG" -C "$INSTALL_DIR" +else + echo "Installing into $INSTALL_DIR via sudo -n (path not user-writable)" + sudo -n mkdir -p "$INSTALL_DIR" + sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" +fi +if [ ! -x "$RVS_BIN" ]; then + echo "::error::rvs binary not found or not executable at $RVS_BIN after install" + ls -la "$INSTALL_DIR/" || true + ls -la "$INSTALL_DIR/bin/" || true + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "Installed RVS at: $RVS_BIN" +"$RVS_BIN" --version || true +REMOTE +} + +cmd_verify_rvs_binary() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +if [ ! -x "$RVS_BIN" ]; then + echo "::error::$RVS_BIN was not produced by tarball extraction on target." + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "=== ldd $RVS_BIN ===" +LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) +echo "$LDD_OUTPUT" +if echo "$LDD_OUTPUT" | grep -q "not found"; then + echo "::error::RVS binary has unresolved library dependencies on target (see above)." + exit 1 +fi +echo "::notice::RVS binary's library dependencies resolved OK on target." +REMOTE +} + +cmd_run_level4() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env REMOTE_WORK_DIR + require_env TARGET_ROCM_PATH + require_env TARGET_NODE + + set +e + local start end rc + start=$(date -u +%FT%TZ) + echo "::group::RVS level 4 (${RVS_BIN} -r 4) on ${TARGET_NODE} against ${TARGET_ROCM_PATH}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set +e +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +mkdir -p "${REMOTE_WORK_DIR}/reports" +"$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" +RC=${PIPESTATUS[0]} +echo "remote_rc=$RC" +exit $RC +REMOTE + rc=$? + echo "::endgroup::" + end=$(date -u +%FT%TZ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rc=$rc" >> "$GITHUB_OUTPUT" + echo "start=$start" >> "$GITHUB_OUTPUT" + echo "end=$end" >> "$GITHUB_OUTPUT" + fi + # Caller workflow decides whether to fail the job on non-zero rc. + return 0 +} + +cmd_collect_logs() { + require_env SSH_CONFIG_FILE + require_env REMOTE_WORK_DIR + mkdir -p ./reports + if [ ! -f "$SSH_CONFIG_FILE" ]; then + echo "::warning::SSH config not present; skipping log collection." + return 0 + fi + echo "Copying logs from rvs-target:${REMOTE_WORK_DIR}/reports/ -> ./reports/" + scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/*.log" ./reports/ || \ + echo "::warning::No log files retrieved from target node." + ls -la ./reports/ || true +} + +cmd_capture_versions() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + local rvs_version target_rocm_version + rvs_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +"$RVS_BIN" --version 2>/dev/null +REMOTE + ) + target_rocm_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null || echo "unknown" +cat "${TARGET_ROCM_PATH}/.info/version" 2>/dev/null \ + || cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" 2>/dev/null \ + || echo "unknown" +REMOTE + ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rvs_version=$rvs_version" >> "$GITHUB_OUTPUT" + echo "target_rocm_version=$target_rocm_version" >> "$GITHUB_OUTPUT" + fi +} + +cmd_build_report() { + require_env TARBALL_NAME + require_env TARBALL_URL + require_env TARGET_ROCM_PATH + require_env REMOTE_WORK_DIR + require_env RVS_BIN + + local rc4="${RVS_LEVEL4_RC:-0}" + local start="${RVS_LEVEL4_START:-}" + local end="${RVS_LEVEL4_END:-}" + local rvs_version="${RVS_VERSION:-unknown}" + local target_rocm_version="${TARGET_ROCM_VERSION:-unknown}" + local run_id="${GITHUB_RUN_ID:-local}" + local server_url="${GITHUB_SERVER_URL:-https://github.com}" + local repository="${GITHUB_REPOSITORY:-local/repo}" + local event_name="${GITHUB_EVENT_NAME:-local}" + + mkdir -p ./reports + local s4 overall + if [ "$rc4" -eq 0 ]; then + s4=PASS + overall=PASS + else + s4=FAIL + overall=FAIL + fi + + local report=./reports/SUMMARY.md + { + echo "# RVS Nightly Test Report" + echo "" + echo "| Field | Value |" + echo "|---|---|" + echo "| Run | [\`${run_id}\`](${server_url}/${repository}/actions/runs/${run_id}) |" + echo "| Trigger | \`${event_name}\` |" + echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${target_rocm_version}\`) |" + echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" + echo "| Tarball | \`${TARBALL_NAME}\` |" + echo "| Source URL | ${TARBALL_URL} |" + echo "| RVS version | \`${rvs_version}\` |" + echo "| Overall result | **${overall}** |" + echo "" + echo "## Results" + echo "" + echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" + echo "|---|---|:--:|---:|---|---|" + echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${s4} | ${rc4} | ${start} | ${end} |" + echo "" + echo "## Logs" + echo "" + echo "Full stdout/stderr from the level-4 run is attached to the artifact" + echo "\`rvs-nightly-report-${run_id}\`:" + echo "" + echo "- \`rvs_level_4.log\`" + echo "- \`SUMMARY.md\` (this file)" + } > "$report" + + cat "$report" + if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then + cat "$report" >> "$GITHUB_STEP_SUMMARY" + fi + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "overall=$overall" >> "$GITHUB_OUTPUT" + echo "rc4=$rc4" >> "$GITHUB_OUTPUT" + fi +} + +cmd_cleanup_remote() { + set +e + if [ -z "${REMOTE_WORK_DIR:-}" ] || [ -z "${SSH_CONFIG_FILE:-}" ] || [ ! -f "$SSH_CONFIG_FILE" ]; then + return 0 + fi + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "rm -rf '${REMOTE_WORK_DIR}'" || \ + echo "::warning::Failed to clean up ${REMOTE_WORK_DIR} on target node." +} + +cmd_cleanup_local_ssh() { + set +e + if [ -n "${SSH_KEY_FILE:-}" ]; then + rm -f "$SSH_KEY_FILE" + fi + if [ -n "${SSH_CONFIG_FILE:-}" ]; then + rm -f "$SSH_CONFIG_FILE" "${SSH_CONFIG_FILE}.known_hosts" + fi +} + +main() { + if [ $# -lt 1 ]; then + usage + exit 1 + fi + case "$1" in + validate-config) cmd_validate_config ;; + setup-ssh) cmd_setup_ssh ;; + verify-rocm) cmd_verify_rocm ;; + download-tarball) cmd_download_tarball ;; + copy-to-target) cmd_copy_to_target ;; + install-rvs) cmd_install_rvs ;; + verify-rvs-binary) cmd_verify_rvs_binary ;; + run-level4) cmd_run_level4 ;; + collect-logs) cmd_collect_logs ;; + capture-versions) cmd_capture_versions ;; + build-report) cmd_build_report ;; + cleanup-remote) cmd_cleanup_remote ;; + cleanup-local-ssh) cmd_cleanup_local_ssh ;; + -h|--help) usage ;; + *) + echo "::error::Unknown command: $1" >&2 + usage + exit 1 + ;; + esac +} + +main "$@" From 129636f016c4a5c1c95049d9c73156a6200445e6 Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Wed, 3 Jun 2026 14:05:36 -0400 Subject: [PATCH 180/275] Update version list (#1182) * Add RVS version list * Apply generic flavor to update version list --- docs/conf.py | 19 ++++++++++++++++--- docs/versions.md | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 docs/versions.md diff --git a/docs/conf.py b/docs/conf.py index 1f8e60322..3b63f767e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ raise ValueError("VERSION not found!") version_number = match[1] -left_nav_title = f"RVS {version_number} Documentation" +left_nav_title = f"ROCm™ RVS {version_number} Documentation" exclude_patterns = [ 'conceptual/**', @@ -23,13 +23,26 @@ # for PDF output on Read the Docs project = "RVS Documentation" author = "Advanced Micro Devices, Inc." -copyright = "Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved." +copyright = "Copyright (c) 2023-2026 Advanced Micro Devices, Inc. All rights reserved." version = version_number release = version_number html_title = left_nav_title extensions = ["rocm_docs"] html_theme = "rocm_docs_theme" -html_theme_options = {"flavor": "rocm"} +html_theme_options = { + "flavor": "generic", + "header_title": f"ROCm™ RVS {version_number}", + "header_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/latest/", + "version_list_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/latest/versions.html", + "nav_secondary_items": { + "GitHub": "https://github.com/ROCm/ROCmValidationSuite", + "Community": "https://github.com/ROCm/ROCm/discussions", + "Blogs": "https://rocm.blogs.amd.com/", + "System and Infra Docs": "https://instinct.docs.amd.com/", + "Support": "https://github.com/ROCm/ROCmValidationSuite/issues/new/choose", + }, + "link_main_doc": False, +} external_projects_current_project = "rocmvalidationsuite" external_toc_path = "./sphinx/_toc.yml" diff --git a/docs/versions.md b/docs/versions.md new file mode 100644 index 000000000..b6500ce5d --- /dev/null +++ b/docs/versions.md @@ -0,0 +1,17 @@ +:orphan: + + + + + + + +# ROCm RVS release history + +| Version | Release date | +| ------- | ------------ | +| [1.4.21](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.4.21/) | May 15, 2026 | +| [1.3.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-7.1.1/) | November 26, 2025 | +| [1.2.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-7.1.0/) | September 16, 2025 | +| [1.1.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-6.3.0/) | December 3, 2024 | +| [1.0.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-6.1.0/) | Apr 16, 2024 | \ No newline at end of file From 36b32171e14f5c1c8042485d4a91ed4e6be6f675 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 3 Jun 2026 16:19:12 -0400 Subject: [PATCH 181/275] Fixed SSH path bug Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-tests.yml | 6 ----- rvs_nightly_test.sh | 33 ++++++++++++++++--------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index cd8a3b0db..7508342f7 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -146,8 +146,6 @@ jobs: rocm_major: ${{ steps.prepare.outputs.rocm_major }} install_dir: ${{ steps.prepare.outputs.install_dir }} rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} - ssh_key_file: ${{ steps.prepare.outputs.ssh_key_file }} - ssh_config_file: ${{ steps.prepare.outputs.ssh_config_file }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -180,8 +178,6 @@ jobs: ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} - SSH_KEY_FILE: ${{ needs.prepare-test-context.outputs.ssh_key_file }} - SSH_CONFIG_FILE: ${{ needs.prepare-test-context.outputs.ssh_config_file }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -233,8 +229,6 @@ jobs: ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} - SSH_KEY_FILE: ${{ needs.prepare-test-context.outputs.ssh_key_file }} - SSH_CONFIG_FILE: ${{ needs.prepare-test-context.outputs.ssh_config_file }} steps: - name: Checkout Repository uses: actions/checkout@v4 diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index 78b4edcd1..91a7c67f5 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -66,10 +66,6 @@ cmd_validate_config() { INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" RVS_BIN="${INSTALL_DIR}/bin/rvs" - SSH_BASE="${RUNNER_TEMP:-/tmp}" - SSH_KEY_FILE="${SSH_BASE}/rvs_target_key" - SSH_CONFIG_FILE="${SSH_BASE}/rvs_target_ssh_config" - echo "Orchestrator runner : $(hostname)" echo "Target node : ${TARGET_USER:-}@${TARGET_NODE}" echo "Target ROCm path : $TARGET_ROCM_PATH" @@ -83,20 +79,32 @@ cmd_validate_config() { echo "rocm_major=$ROCM_MAJOR" echo "install_dir=$INSTALL_DIR" echo "rvs_bin=$RVS_BIN" - echo "ssh_key_file=$SSH_KEY_FILE" - echo "ssh_config_file=$SSH_CONFIG_FILE" } >> "$GITHUB_OUTPUT" fi - export REMOTE_WORK_DIR ROCM_MAJOR INSTALL_DIR RVS_BIN SSH_KEY_FILE SSH_CONFIG_FILE + export REMOTE_WORK_DIR ROCM_MAJOR INSTALL_DIR RVS_BIN +} + +ssh_state_paths() { + local base="${RUNNER_TEMP:-/tmp}" + SSH_KEY_FILE="${base}/rvs_target_key" + SSH_CONFIG_FILE="${base}/rvs_target_ssh_config" + mkdir -p "$base" } cmd_setup_ssh() { require_env TARGET_NODE - require_env SSH_KEY_FILE - require_env SSH_CONFIG_FILE require_env REMOTE_WORK_DIR + ssh_state_paths + + if [ -n "${GITHUB_ENV:-}" ]; then + { + echo "SSH_KEY_FILE=$SSH_KEY_FILE" + echo "SSH_CONFIG_FILE=$SSH_CONFIG_FILE" + } >> "$GITHUB_ENV" + fi + if [ -z "${SSH_PRIVATE_KEY:-}" ]; then echo "::error::SSH_PRIVATE_KEY is not set; cannot SSH to target node." >&2 exit 1 @@ -127,8 +135,11 @@ EOF chmod 600 "$SSH_CONFIG_FILE" echo "Verifying SSH connectivity to ${TARGET_USER:-}@${TARGET_NODE}..." - ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'echo __START__; hostname; id; uptime' \ - 2>&1 | sed -n '/^__START__$/,$p' | tail -n +2 + if ! ssh -F "$SSH_CONFIG_FILE" rvs-target 'echo __START__; hostname; id; uptime' \ + 2>&1 | sed -n '/^__START__$/,$p' | tail -n +2; then + echo "::error::SSH connectivity check failed for ${TARGET_USER:-}@${TARGET_NODE}. Verify secrets RVS_TARGET_NODE, RVS_TARGET_USER, RVS_TARGET_SSH_KEY and network access from this runner." >&2 + exit 1 + fi ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" From a2f31db46fb1b404dfc9216466d8afcf972e60de Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 3 Jun 2026 15:20:26 -0500 Subject: [PATCH 182/275] Update MI300X CPX and DPX mode conf. --- rvs/conf/MI300X/NPS2/DPX/gst_single.conf | 54 ++++++++++++----------- rvs/conf/MI300X/NPS4/CPX/gst_single.conf | 56 +++++++++++++----------- 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/rvs/conf/MI300X/NPS2/DPX/gst_single.conf b/rvs/conf/MI300X/NPS2/DPX/gst_single.conf index 1f9cfa9f7..b525c5d7c 100644 --- a/rvs/conf/MI300X/NPS2/DPX/gst_single.conf +++ b/rvs/conf/MI300X/NPS2/DPX/gst_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -23,7 +23,7 @@ # # # ############################################################################### -# GST test - gst-719Tflops-4K4K8K-rand-fp8 +# GST test - gst-Tflops-4K4K8K-rand-fp8 # # Preconditions: # Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g @@ -33,15 +33,13 @@ # Set matrix data type as fp8 real number # Set matrix data initialization method as random integer # Set copy_matrix to false (the matrices will be copied to GPUs only once) -# Set target stress GFLOPS as 719000 (719 TFLOPS) # # Expected result: -# The test on each GPU passes (TRUE) if the GPU achieves 719 TFLOPS or more -# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# The test on each GPU passes (TRUE) if the GPU completes the operation successfully. # Else test on the GPU fails (FALSE). actions: -- name: gst-719Tflops-4K4K8K-rand-fp8 +- name: gst-Tflops-4K4K8K-rand-fp8 device: all module: gst log_interval: 2000 @@ -49,12 +47,14 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 719000 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 matrix_init: rand data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r lda: 8320 ldb: 8320 ldc: 4992 @@ -63,8 +63,9 @@ actions: transb: 0 alpha: 1 beta: 0 + blas_source: hipblaslt -- name: gst-491Tflops-4K4K8K-trig-fp8 +- name: gst-Tflops-4K4K8K-trig-fp8 device: all module: gst log_interval: 2000 @@ -72,12 +73,14 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 491000 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 matrix_init: trig data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r lda: 8320 ldb: 8320 ldc: 4992 @@ -86,8 +89,9 @@ actions: transb: 0 alpha: 1 beta: 0 + blas_source: hipblaslt -- name: gst-348Tflops-4K4K8K-rand-fp16 +- name: gst-Tflops-4K4K8K-rand-fp16 device: all module: gst log_interval: 2000 @@ -95,7 +99,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 348000 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -110,7 +114,7 @@ actions: alpha: 1 beta: 0 -- name: gst-261Tflops-4K4K8K-trig-fp16 +- name: gst-Tflops-4K4K8K-trig-fp16 device: all module: gst log_interval: 2000 @@ -118,7 +122,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 261500 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -133,7 +137,7 @@ actions: alpha: 1 beta: 0 -- name: gst-334Tflops-4K4K8K-rand-bf16 +- name: gst-Tflops-4K4K8K-rand-bf16 device: all module: gst log_interval: 2000 @@ -141,7 +145,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 334500 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -156,7 +160,7 @@ actions: alpha: 1 beta: 0 -- name: gst-276Tflops-4K4K8K-trig-bf16 +- name: gst-Tflops-4K4K8K-trig-bf16 device: all module: gst log_interval: 2000 @@ -164,7 +168,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 276500 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -179,7 +183,7 @@ actions: alpha: 1 beta: 0 -- name: gst-53Tflops-3K-trig-sgemm +- name: gst-Tflops-3K-trig-sgemm device: all module: gst log_interval: 2000 @@ -187,7 +191,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 53500 + target_stress: 0 matrix_size_a: 3072 matrix_size_b: 3072 matrix_size_c: 3072 @@ -201,7 +205,7 @@ actions: alpha: 1 beta: 0 -- name: gst-53Tflops-3K-rand-sgemm +- name: gst-Tflops-3K-rand-sgemm device: all module: gst log_interval: 2000 @@ -209,7 +213,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 53500 + target_stress: 0 matrix_size_a: 3072 matrix_size_b: 3072 matrix_size_c: 3072 @@ -223,7 +227,7 @@ actions: alpha: 1 beta: 0 -- name: gst-35Tflops-8K-trig-dgemm +- name: gst-Tflops-8K-trig-dgemm device: all module: gst log_interval: 2000 @@ -231,7 +235,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 35500 + target_stress: 0 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 8192 @@ -245,7 +249,7 @@ actions: alpha: 1 beta: 0 -- name: gst-35Tflops-8K-rand-dgemm +- name: gst-Tflops-8K-rand-dgemm device: all module: gst log_interval: 2000 @@ -253,7 +257,7 @@ actions: duration: 5000 hot_calls: 1000 copy_matrix: false - target_stress: 35500 + target_stress: 0 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 8192 diff --git a/rvs/conf/MI300X/NPS4/CPX/gst_single.conf b/rvs/conf/MI300X/NPS4/CPX/gst_single.conf index b59ba7fc1..c8d3de9d2 100644 --- a/rvs/conf/MI300X/NPS4/CPX/gst_single.conf +++ b/rvs/conf/MI300X/NPS4/CPX/gst_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -23,7 +23,7 @@ # # # ############################################################################### -# GST test - gst-179Tflops-4K4K8K-rand-fp8 +# GST test - gst-Tflops-4K4K8K-rand-fp8 # # Preconditions: # Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g @@ -33,15 +33,13 @@ # Set matrix data type as fp8 real number # Set matrix data initialization method as random integer # Set copy_matrix to false (the matrices will be copied to GPUs only once) -# Set target stress GFLOPS as 179750 (179 TFLOPS) # # Expected result: -# The test on each GPU passes (TRUE) if the GPU achieves 179 TFLOPS or more -# within the test duration of 15 seconds after ramp-up duration of 5 seconds. +# The test on each GPU passes (TRUE) if the GPU completes the operation successfully. # Else test on the GPU fails (FALSE). actions: -- name: gst-179Tflops-4K4K8K-rand-fp8 +- name: gst-Tflops-4K4K8K-rand-fp8 device: all module: gst log_interval: 1000 @@ -49,12 +47,14 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 179750 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 matrix_init: rand data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r lda: 8320 ldb: 8320 ldc: 4992 @@ -63,8 +63,9 @@ actions: transb: 0 alpha: 1 beta: 0 + blas_source: hipblaslt -- name: gst-122Tflops-4K4K8K-trig-fp8 +- name: gst-Tflops-4K4K8K-trig-fp8 device: all module: gst log_interval: 1000 @@ -72,12 +73,14 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 122750 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 matrix_init: trig data_type: fp8_r + out_data_type: fp8_r + compute_type: fp32_r lda: 8320 ldb: 8320 ldc: 4992 @@ -86,8 +89,9 @@ actions: transb: 0 alpha: 1 beta: 0 + blas_source: hipblaslt -- name: gst-87Tflops-4K4K8K-rand-fp16 +- name: gst-Tflops-4K4K8K-rand-fp16 device: all module: gst log_interval: 1000 @@ -95,7 +99,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 87000 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -110,7 +114,7 @@ actions: alpha: 1 beta: 0 -- name: gst-65Tflops-4K4K8K-trig-fp16 +- name: gst-Tflops-4K4K8K-trig-fp16 device: all module: gst log_interval: 1000 @@ -118,7 +122,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 65375 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -133,7 +137,7 @@ actions: alpha: 1 beta: 0 -- name: gst-83Tflops-4K4K8K-rand-bf16 +- name: gst-Tflops-4K4K8K-rand-bf16 device: all module: gst log_interval: 1000 @@ -141,7 +145,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 83625 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -156,14 +160,15 @@ actions: alpha: 1 beta: 0 -- name: gst-69Tflops-4K4K8K-trig-bf16 +- name: gst-Tflops-4K4K8K-trig-bf16 device: all module: gst + log_interval: 1000 ramp_interval: 500 duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 69125 + target_stress: 0 matrix_size_a: 4864 matrix_size_b: 4096 matrix_size_c: 8192 @@ -178,7 +183,7 @@ actions: alpha: 1 beta: 0 -- name: gst-13Tflops-3K-trig-sgemm +- name: gst-Tflops-3K-trig-sgemm device: all module: gst log_interval: 1000 @@ -186,7 +191,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 13375 + target_stress: 0 matrix_size_a: 3072 matrix_size_b: 3072 matrix_size_c: 3072 @@ -200,16 +205,15 @@ actions: alpha: 1 beta: 0 -- name: gst-13Tflops-3K-rand-sgemm +- name: gst-Tflops-3K-rand-sgemm device: all module: gst - hot_calls: 1000 log_interval: 1000 ramp_interval: 500 duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 13375 + target_stress: 0 matrix_size_a: 3072 matrix_size_b: 3072 matrix_size_c: 3072 @@ -223,7 +227,7 @@ actions: alpha: 1 beta: 0 -- name: gst-8Tflops-8K-trig-dgemm +- name: gst-Tflops-8K-trig-dgemm device: all module: gst log_interval: 1000 @@ -231,7 +235,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 8875 + target_stress: 0 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 8192 @@ -245,7 +249,7 @@ actions: alpha: 1 beta: 0 -- name: gst-8Tflops-8K-rand-dgemm +- name: gst-Tflops-8K-rand-dgemm device: all module: gst log_interval: 1000 @@ -253,7 +257,7 @@ actions: duration: 1000 hot_calls: 100 copy_matrix: false - target_stress: 8875 + target_stress: 0 matrix_size_a: 8192 matrix_size_b: 8192 matrix_size_c: 8192 From defe6dc4c16fffdd758c1b0eb23c0a465615e35a Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Thu, 4 Jun 2026 01:32:51 -0700 Subject: [PATCH 183/275] Instead of split at median, add a drift --- src/gpu_util.cpp | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index d4a09b31f..560aa1271 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -858,29 +858,53 @@ std::string rvs::gpulist::gpu_get_platform_name (void) { } /* MI350P (0x75a8) shares one PCI device ID across the 450W and 600W SKUs; - differentiate by reading the hardware power cap reported by amdsmi. The - two SKUs ship with distinct TDP caps (~450 W vs ~600 W) Prefer max_power_cap from - amdsmi_get_power_cap_info (the hardware limit, in microwatts on Linux - bare metal) */ + differentiate by reading the hardware power cap reported by amdsmi. Each + known SKU is classified only when the reported cap lies within a +/-50 W + band around its nominal TDP (allowing for firmware/sysfs reporting drift); + an out-of-band value is treated as unknown and routed to the safe-default + fallback rather than silently bucketed to the nearest neighbor, so any + future intermediate SKU using the same device ID surfaces a warning. + Prefer max_power_cap from amdsmi_get_power_cap_info (the hardware limit, + in microwatts on Linux bare metal) since it is independent of any runtime + power-cap override the user may have set via rocm-smi which is in Watts. */ if (it->second == "MI350P") { - constexpr uint64_t MI350P_TDP_SPLIT_UW = 525000000ULL; // 525 W in microwatts - constexpr uint32_t MI350P_TDP_SPLIT_W = 525; // 525 W + constexpr uint64_t W_TO_UW = 1000000ULL; + + auto classify_uw = [](uint64_t cap_uw) -> std::string { + if (cap_uw >= 400 * W_TO_UW && cap_uw <= 500 * W_TO_UW) return "MI350P-450W"; + if (cap_uw >= 550 * W_TO_UW && cap_uw <= 650 * W_TO_UW) return "MI350P-600W"; + return ""; + }; + auto classify_w = [](uint32_t cap_w) -> std::string { + if (cap_w >= 400 && cap_w <= 500) return "MI350P-450W"; + if (cap_w >= 550 && cap_w <= 650) return "MI350P-600W"; + return ""; + }; + auto smi_map = rvs::get_smi_pci_map(); if (!smi_map.empty()) { amdsmi_processor_handle hdl = smi_map.begin()->second; amdsmi_power_cap_info_t cap_info{}; if (amdsmi_get_power_cap_info(hdl, 0, &cap_info) == AMDSMI_STATUS_SUCCESS && cap_info.max_power_cap > 0) { - return (cap_info.max_power_cap < MI350P_TDP_SPLIT_UW) - ? std::string("MI350P-450W") - : std::string("MI350P-600W"); + std::string sku = classify_uw(cap_info.max_power_cap); + if (!sku.empty()) return sku; + std::cout << "MI350P max_power_cap " << (cap_info.max_power_cap / W_TO_UW) + << " W does not match any known SKU band (450 W / 600 W); " + "falling back to MI350P-450W. Use -c explicitly if this is " + "incorrect." << std::endl; + return "MI350P-450W"; } amdsmi_power_info_t pwr_info{}; if (amdsmi_get_power_info(hdl, &pwr_info) == AMDSMI_STATUS_SUCCESS && pwr_info.power_limit > 0) { - return (pwr_info.power_limit < MI350P_TDP_SPLIT_W) - ? std::string("MI350P-450W") - : std::string("MI350P-600W"); + std::string sku = classify_w(pwr_info.power_limit); + if (!sku.empty()) return sku; + std::cout << "MI350P power_limit " << pwr_info.power_limit + << " W does not match any known SKU band (450 W / 600 W); " + "falling back to MI350P-450W. Use -c explicitly if this is " + "incorrect." << std::endl; + return "MI350P-450W"; } } std::cout << "MI350P detected but power cap could not be read via amdsmi; " From 4dc4f39e50ab8d4ee02c0e8013c1eda4c2f284b2 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 3 Jun 2026 18:00:38 -0500 Subject: [PATCH 184/275] Update change logs for RVS v1.5.0 Co-Authored-By: yugang-amd --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c174ec6..71cedadce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,14 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added -- Pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not for production use.)** +- Added the pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not intended for production use.)** +- Added support for MI350X QPX mode. +- Added support for the MXFP8 data type. +- Added iterations-based GST hot run support. + +### Changed + +- Updated Babel output to report throughput instead of execution time. ## RVS 1.4.0 From 81f20b526c1c1c64af9c4fb59264946656f136a9 Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Thu, 4 Jun 2026 14:36:39 -0400 Subject: [PATCH 185/275] Revert "Update version list (#1182)" (#1191) This reverts commit 129636f016c4a5c1c95049d9c73156a6200445e6. --- docs/conf.py | 19 +++---------------- docs/versions.md | 17 ----------------- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 docs/versions.md diff --git a/docs/conf.py b/docs/conf.py index 3b63f767e..1f8e60322 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ raise ValueError("VERSION not found!") version_number = match[1] -left_nav_title = f"ROCm™ RVS {version_number} Documentation" +left_nav_title = f"RVS {version_number} Documentation" exclude_patterns = [ 'conceptual/**', @@ -23,26 +23,13 @@ # for PDF output on Read the Docs project = "RVS Documentation" author = "Advanced Micro Devices, Inc." -copyright = "Copyright (c) 2023-2026 Advanced Micro Devices, Inc. All rights reserved." +copyright = "Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved." version = version_number release = version_number html_title = left_nav_title extensions = ["rocm_docs"] html_theme = "rocm_docs_theme" -html_theme_options = { - "flavor": "generic", - "header_title": f"ROCm™ RVS {version_number}", - "header_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/latest/", - "version_list_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/latest/versions.html", - "nav_secondary_items": { - "GitHub": "https://github.com/ROCm/ROCmValidationSuite", - "Community": "https://github.com/ROCm/ROCm/discussions", - "Blogs": "https://rocm.blogs.amd.com/", - "System and Infra Docs": "https://instinct.docs.amd.com/", - "Support": "https://github.com/ROCm/ROCmValidationSuite/issues/new/choose", - }, - "link_main_doc": False, -} +html_theme_options = {"flavor": "rocm"} external_projects_current_project = "rocmvalidationsuite" external_toc_path = "./sphinx/_toc.yml" diff --git a/docs/versions.md b/docs/versions.md deleted file mode 100644 index b6500ce5d..000000000 --- a/docs/versions.md +++ /dev/null @@ -1,17 +0,0 @@ -:orphan: - - - - - - - -# ROCm RVS release history - -| Version | Release date | -| ------- | ------------ | -| [1.4.21](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.4.21/) | May 15, 2026 | -| [1.3.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-7.1.1/) | November 26, 2025 | -| [1.2.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-7.1.0/) | September 16, 2025 | -| [1.1.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-6.3.0/) | December 3, 2024 | -| [1.0.0](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-6.1.0/) | Apr 16, 2024 | \ No newline at end of file From a1591373509495e0e2fdf26644e7dc83bd6dcb26 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 3 Jun 2026 08:16:00 -0700 Subject: [PATCH 186/275] local upload changes in case we have hosted servers for packages --- .../workflows/build-relocatable-packages.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 8ed6ea8a3..02bd5f33e 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -45,6 +45,9 @@ env: # RVS_AUTO_DETECT_LOCAL_UPLOAD to "1" to probe localhost:8080 when UPLOAD_TARGET is unset. # Leave the variable undefined for default (no probe; S3 uses workflow steps only). RVS_AUTO_DETECT_LOCAL_UPLOAD: ${{ vars.RVS_AUTO_DETECT_LOCAL_UPLOAD }} + # Optional local package server upload (Step 6 of build_packages_local.sh). + # Disabled by default. To enable, set repo Actions variable + # LOCAL_PACKAGE_SERVER_URL to a reachable HTTP server that accepts PUT. jobs: prepare-nightly-branches: @@ -174,6 +177,8 @@ jobs: runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} container: image: ubuntu:22.04 + # Allow the build container to reach the runner host via host.docker.internal. + options: --add-host=host.docker.internal:host-gateway strategy: fail-fast: false matrix: @@ -307,12 +312,37 @@ jobs: echo "ROCm SDK channel: nightly (fallback)" fi + # Forward LOCAL_PACKAGE_SERVER_URL to the build script as UPLOAD_TARGET. + - name: Configure local package upload + if: vars.LOCAL_PACKAGE_SERVER_URL != '' + run: | + echo "UPLOAD_TARGET=${{ vars.LOCAL_PACKAGE_SERVER_URL }}" >> "$GITHUB_ENV" + - name: Build and Package RVS run: | chmod +x build_packages_local.sh # Container runs as root; ROCM_SDK_* come from "Configure ROCm SDK channel" via GITHUB_ENV. ./build_packages_local.sh + # Print the resulting download URL in the step log and run Summary. + - name: Print local package download URL + if: vars.LOCAL_PACKAGE_SERVER_URL != '' + run: | + REPO="${GITHUB_REPOSITORY##*/}" + BRANCH="${GITHUB_REF_NAME}" + SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') + DATE=$(date +%Y-%m-%d) + URL="${{ vars.LOCAL_PACKAGE_SERVER_URL }}/${REPO}/${SAFE_BRANCH}/${DATE}/" + echo "================================================================" + echo " Package downloads for this build (Ubuntu)" + echo " $URL" + echo "================================================================" + { + echo "## Package Downloads (Ubuntu)" + echo "" + echo "[$URL]($URL)" + } >> "$GITHUB_STEP_SUMMARY" + - name: Verify DEB Package run: | cd ./build @@ -452,6 +482,8 @@ jobs: runs-on: ${{ vars.RUNNER_LABEL_CONTAINER || 'ubuntu-latest' }} container: image: quay.io/pypa/manylinux_2_28_x86_64 + # Allow the build container to reach the runner host via host.docker.internal. + options: --add-host=host.docker.internal:host-gateway strategy: fail-fast: false matrix: @@ -566,11 +598,34 @@ jobs: echo "ROCm SDK channel: nightly (fallback)" fi + - name: Configure local package upload + if: vars.LOCAL_PACKAGE_SERVER_URL != '' + run: | + echo "UPLOAD_TARGET=${{ vars.LOCAL_PACKAGE_SERVER_URL }}" >> "$GITHUB_ENV" + - name: Build and Package RVS run: | chmod +x build_packages_local.sh ./build_packages_local.sh + - name: Print local package download URL + if: vars.LOCAL_PACKAGE_SERVER_URL != '' + run: | + REPO="${GITHUB_REPOSITORY##*/}" + BRANCH="${GITHUB_REF_NAME}" + SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') + DATE=$(date +%Y-%m-%d) + URL="${{ vars.LOCAL_PACKAGE_SERVER_URL }}/${REPO}/${SAFE_BRANCH}/${DATE}/" + echo "================================================================" + echo " Package downloads for this build (CentOS/RHEL)" + echo " $URL" + echo "================================================================" + { + echo "## Package Downloads (CentOS/RHEL)" + echo "" + echo "[$URL]($URL)" + } >> "$GITHUB_STEP_SUMMARY" + - name: Verify RPM Package run: | cd ./build From 84917941a735157f6a0c050571689740bcafc018 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 4 Jun 2026 19:01:15 -0500 Subject: [PATCH 187/275] Properly update datatype in gst json file. --- gst.so/src/gst_worker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index d6650b0f2..2b30d7c2b 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -369,7 +369,7 @@ void GSTWorker::check_target_stress(double gflops_interval) { if (bjson) log_to_json(desc ,rvs::logresults, TARGET_KEY, std::to_string(static_cast(target_stress)), - DTYPE_KEY, gst_ops_type, + DTYPE_KEY, !gst_data_type.empty() ? gst_data_type : gst_ops_type, "gflops", std::to_string(static_cast(gflops_interval)), "pass", result ? "true" : "false"); } From 438d4cfcc612cc75c9f8b30de88ab2e46b4c70f4 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 5 Jun 2026 17:44:06 -0700 Subject: [PATCH 188/275] S3 upload and ROCm download stream fix With recent addition to workflow release pipeline is not detecting ROCm download link correctly with ROCm version set as x.y.z in Ubuntu Job(RHEL no issues). Similarly for upload to S3 it gets pushed to nightly folder instead of release folder. Root cause of the issue is with the way script is run differently on Ubuntu/manylinux env. Solving by adding dedicated scripts for download and upload stream selection and run using sh to ensure identical behaviour on both. --- .github/scripts/configure-rocm-sdk-channel.sh | 99 ++++++ .github/scripts/rvs-s3-upload-route.sh | 170 +++++++++ .github/workflows/README_BUILD_PACKAGES.md | 6 +- .../workflows/build-relocatable-packages.yml | 326 +++--------------- 4 files changed, 313 insertions(+), 288 deletions(-) create mode 100644 .github/scripts/configure-rocm-sdk-channel.sh create mode 100644 .github/scripts/rvs-s3-upload-route.sh diff --git a/.github/scripts/configure-rocm-sdk-channel.sh b/.github/scripts/configure-rocm-sdk-channel.sh new file mode 100644 index 000000000..cf44570bc --- /dev/null +++ b/.github/scripts/configure-rocm-sdk-channel.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +# Configure ROCm SDK channel + ROCM_VERSION for build_packages_local.sh (CI). +# Uses POSIX case for release/* refs (safe under dash/sh and bash). +set -euo pipefail + +GITHUB_ENV="${GITHUB_ENV:-/dev/null}" + +NIGHTLY_BASE="${ROCM_SDK_NIGHTLY_BASE_URL:-}" +NIGHTLY_IDX="${ROCM_SDK_NIGHTLY_INDEX_URL:-}" +[ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' +[ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' + +REL_URL="${ROCM_SDK_RELEASE_URL:-}" +[ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' +REL_BASE="${ROCM_SDK_RELEASE_BASE_URL:-}" +[ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" + +EVENT="${GITHUB_EVENT_NAME:-}" +REF="${GITHUB_REF:-}" +IN_VER="${INPUT_ROCM_VERSION:-}" +VAR_VER="${VAR_ROCM_VERSION:-}" +IN_GPU="${INPUT_GPU_FAMILY:-}" + +release_build() { + { + echo "ROCM_SDK_CHANNEL=release" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_BASE_URL=$REL_BASE" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + echo "ROCM_SDK_INDEX_URL=" + } >> "$GITHUB_ENV" +} + +nightly_build() { + { + echo "ROCM_SDK_CHANNEL=nightly" + echo "ROCM_SDK_RELEASE_URL=" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + } >> "$GITHUB_ENV" +} + +format_build() { + { + echo "ROCM_SDK_CHANNEL=auto" + echo "ROCM_SDK_RELEASE_URL=$REL_URL" + echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" + echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" + echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" + } >> "$GITHUB_ENV" +} + +# ROCM_VERSION: schedule clears; dispatch input; push/PR use repo variable when set. +if [ "$EVENT" = "schedule" ]; then + echo "ROCM_VERSION=" >> "$GITHUB_ENV" + echo "Scheduled run: build script will auto-fetch latest ROCm version" +elif [ -n "$IN_VER" ]; then + echo "ROCM_VERSION=$IN_VER" >> "$GITHUB_ENV" + echo "Using workflow_dispatch ROCm version: $IN_VER" +elif [ -n "$VAR_VER" ]; then + echo "ROCM_VERSION=$VAR_VER" >> "$GITHUB_ENV" + echo "Using repository variable ROCM_VERSION: $VAR_VER" +fi + +if [ -n "$IN_GPU" ]; then + echo "GPU_FAMILY=$IN_GPU" >> "$GITHUB_ENV" +fi + +if [ "$EVENT" = "schedule" ]; then + nightly_build + echo "ROCm SDK channel: nightly (scheduled — latest nightly)" +elif [ "$EVENT" = "pull_request" ]; then + release_build + echo "ROCm SDK channel: release (pull request — latest X.Y.Z)" +elif [ "$EVENT" = "push" ]; then + case "$REF" in + refs/heads/master|refs/heads/main|refs/heads/release/*) + release_build + echo "ROCm SDK channel: release (push to main or release/* — includes merge)" + ;; + *) + nightly_build + echo "ROCm SDK channel: nightly (push to feature branch)" + ;; + esac +elif [ "$EVENT" = "workflow_dispatch" ]; then + if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then + format_build + echo "ROCm SDK: manual — tarball base chosen by version format (input or vars.ROCM_VERSION)" + else + nightly_build + echo "ROCm SDK channel: nightly (manual, no version pin)" + fi +else + nightly_build + echo "ROCm SDK channel: nightly (fallback)" +fi diff --git a/.github/scripts/rvs-s3-upload-route.sh b/.github/scripts/rvs-s3-upload-route.sh new file mode 100644 index 000000000..6182957b8 --- /dev/null +++ b/.github/scripts/rvs-s3-upload-route.sh @@ -0,0 +1,170 @@ +#!/bin/sh +# POSIX S3 path routing for RVS packages (ubuntu:22.04 container uses sh/dash). +# Usage: +# rvs-s3-upload-route.sh upload-deb +# rvs-s3-upload-route.sh upload-rpm-tar +# rvs-s3-upload-route.sh deb-repo-prefix +# rvs-s3-upload-route.sh rpm-repo-prefix +set -eu + +BASE="rvs" +EVENT="${GITHUB_EVENT_NAME:-}" +REF="${GITHUB_REF:-}" +REF_NAME="${GITHUB_REF_NAME:-}" +RUN_NUMBER="${GITHUB_RUN_NUMBER:-0}" +BUCKET="${AWS_S3_BUCKET:-}" +GITHUB_OUTPUT="${GITHUB_OUTPUT:-/dev/null}" + +RVS_SKIP_UPLOAD="${RVS_SKIP_UPLOAD:-false}" +RVS_IS_DEFAULT_BRANCH="${RVS_IS_DEFAULT_BRANCH:-false}" +RVS_BRANCH_PREFIX="${RVS_BRANCH_PREFIX:-}" +RVS_BUILD_REF_NAME="${RVS_BUILD_REF_NAME:-}" +RUNNER_SUFFIX="${RVS_RUNNER_SUFFIX:-ubuntu-22.04}" + +rvs_is_release_ref() { + case "$1" in + refs/heads/release/*) return 0 ;; + esac + return 1 +} + +rvs_resolve_route() { + RVS_S3_ROUTE="pr" + RVS_S3_DEB_PREFIX="" + RVS_S3_RPM_PREFIX="" + RVS_S3_TAR_PREFIX="" + RVS_APT_SUITE="rvs-nightly" + RVS_S3_OUTPUT_PATHS="" + + if [ "$RVS_SKIP_UPLOAD" = "true" ]; then + RVS_S3_ROUTE="skip" + return 0 + fi + + if [ "$EVENT" = "schedule" ] && [ "$RVS_IS_DEFAULT_BRANCH" != "true" ]; then + RVS_S3_ROUTE="scheduled_branch" + RVS_S3_DEB_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/deb" + RVS_S3_RPM_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/rpm" + RVS_S3_TAR_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/tar" + RVS_S3_OUTPUT_PATHS="Ubuntu DEB|${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/deb||CentOS/RHEL RPM|${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/rpm||CentOS/RHEL TGZ|${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly/tar" + return 0 + fi + + if rvs_is_release_ref "$REF" && { [ "$EVENT" = "push" ] || [ "$EVENT" = "workflow_dispatch" ]; }; then + RVS_S3_ROUTE="release" + RVS_S3_DEB_PREFIX="release/${BASE}/deb" + RVS_S3_RPM_PREFIX="release/${BASE}/rpm" + RVS_S3_TAR_PREFIX="release/${BASE}/tar" + RVS_APT_SUITE="rvs-release" + RVS_S3_OUTPUT_PATHS="Ubuntu DEB|release/${BASE}/deb||CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" + return 0 + fi + + if [ "$EVENT" = "schedule" ] || [ "$EVENT" = "push" ] || [ "$EVENT" = "workflow_dispatch" ]; then + RVS_S3_ROUTE="nightly" + RVS_S3_DEB_PREFIX="nightly/${BASE}/deb" + RVS_S3_RPM_PREFIX="nightly/${BASE}/rpm" + RVS_S3_TAR_PREFIX="nightly/${BASE}/tar" + RVS_APT_SUITE="rvs-nightly" + RVS_S3_OUTPUT_PATHS="Ubuntu DEB|nightly/${BASE}/deb||CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" + return 0 + fi + + RVS_S3_ROUTE="pr" + RVS_S3_DEB_PREFIX="${BASE}/${REF_NAME}/${RUN_NUMBER}/${RUNNER_SUFFIX}" + RVS_S3_RPM_PREFIX="${BASE}/${REF_NAME}/${RUN_NUMBER}/manylinux_2_28" + RVS_S3_TAR_PREFIX="${RVS_S3_RPM_PREFIX}" + RVS_S3_OUTPUT_PATHS="Ubuntu DEB|${RVS_S3_DEB_PREFIX}||CentOS/RHEL packages|${RVS_S3_RPM_PREFIX}" +} + +cmd="${1:-}" +rvs_resolve_route + +case "$cmd" in + upload-deb) + if [ -z "$BUCKET" ]; then + echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." + exit 0 + fi + if [ "$RVS_S3_ROUTE" = "skip" ]; then + echo "Skipping S3 upload (scheduled release* branch)." + exit 0 + fi + case "$RVS_S3_ROUTE" in + scheduled_branch) + echo "Scheduled ACTIVE_BRANCHES build: uploading to ${RVS_S3_DEB_PREFIX}" + ;; + release) + echo "Release branch build: uploading to ${RVS_S3_DEB_PREFIX}" + ;; + nightly) + echo "Nightly/push build: uploading to ${RVS_S3_DEB_PREFIX}" + ;; + *) + echo "Uploading to s3://${BUCKET}/${RVS_S3_DEB_PREFIX}/" + ;; + esac + aws s3 cp ./build "s3://${BUCKET}/${RVS_S3_DEB_PREFIX}/" \ + --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress + echo "Listing s3://${BUCKET}/${RVS_S3_DEB_PREFIX}/" + aws s3 ls "s3://${BUCKET}/${RVS_S3_DEB_PREFIX}/" --human-readable || true + echo "bucket=${BUCKET}" >> "$GITHUB_OUTPUT" + echo "paths=Ubuntu DEB|${RVS_S3_DEB_PREFIX}" >> "$GITHUB_OUTPUT" + echo "Done." + ;; + upload-rpm-tar) + if [ -z "$BUCKET" ]; then + echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." + exit 0 + fi + if [ "$RVS_S3_ROUTE" = "skip" ]; then + echo "Skipping S3 upload (scheduled release* branch)." + exit 0 + fi + case "$RVS_S3_ROUTE" in + scheduled_branch) + echo "Scheduled ACTIVE_BRANCHES build: uploading to ${RVS_S3_RPM_PREFIX} and ${RVS_S3_TAR_PREFIX}" + ;; + release) + echo "Release branch build: uploading to ${RVS_S3_RPM_PREFIX} and ${RVS_S3_TAR_PREFIX}" + ;; + nightly) + echo "Nightly/push build: uploading to ${RVS_S3_RPM_PREFIX} and ${RVS_S3_TAR_PREFIX}" + ;; + *) + echo "Uploading to s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" + ;; + esac + if [ "$RVS_S3_ROUTE" = "pr" ]; then + aws s3 cp ./build "s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" \ + --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --include "amdrocm*-rvs*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" + aws s3 ls "s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" --human-readable || true + echo "bucket=${BUCKET}" >> "$GITHUB_OUTPUT" + echo "paths=CentOS/RHEL packages|${RVS_S3_RPM_PREFIX}" >> "$GITHUB_OUTPUT" + else + aws s3 cp ./build "s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" \ + --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress + aws s3 cp ./build "s3://${BUCKET}/${RVS_S3_TAR_PREFIX}/" \ + --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress + echo "Listing s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" + aws s3 ls "s3://${BUCKET}/${RVS_S3_RPM_PREFIX}/" --human-readable || true + echo "Listing s3://${BUCKET}/${RVS_S3_TAR_PREFIX}/" + aws s3 ls "s3://${BUCKET}/${RVS_S3_TAR_PREFIX}/" --human-readable || true + echo "bucket=${BUCKET}" >> "$GITHUB_OUTPUT" + echo "paths=CentOS/RHEL RPM|${RVS_S3_RPM_PREFIX}||CentOS/RHEL TGZ|${RVS_S3_TAR_PREFIX}" >> "$GITHUB_OUTPUT" + fi + echo "Done." + ;; + deb-repo-prefix) + echo "$RVS_S3_DEB_PREFIX" + echo "$RVS_APT_SUITE" + ;; + rpm-repo-prefix) + echo "$RVS_S3_RPM_PREFIX" + ;; + *) + echo "Usage: $0 upload-deb|upload-rpm-tar|deb-repo-prefix|rpm-repo-prefix" >&2 + exit 1 + ;; +esac diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index e95b4ee44..8b90088b2 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -35,7 +35,9 @@ The workflow runs automatically on: ### ROCm SDK: nightly vs release in CI -The workflow sets `ROCM_SDK_CHANNEL` and SDK URLs before calling `build_packages_local.sh`: +The workflow runs [`.github/scripts/configure-rocm-sdk-channel.sh`](../scripts/configure-rocm-sdk-channel.sh) to set `ROCM_SDK_CHANNEL`, SDK URLs, and `ROCM_VERSION` (from `vars.ROCM_VERSION` on push/PR, or `workflow_dispatch` input) before calling `build_packages_local.sh`. Release-branch detection uses POSIX `case` (not bash `[[`), so it works in the Ubuntu `ubuntu:22.04` container where steps may run under `sh`. + +**ROCm pin vs S3 layout:** A nightly SDK pin (e.g. `7.14.0a20260528`) only affects **which tarball is downloaded**. **`workflow_dispatch` or `push` on a `release/**` branch** still uploads packages to **`release/rvs/`** (see S3 table below). | Trigger | SDK source | |---------|------------| @@ -178,7 +180,7 @@ To use a self-hosted runner, set the variable to your runner's label (e.g., `sel 3. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. -**S3 path layout:** +**S3 path layout** (resolved by [`.github/scripts/rvs-s3-upload-route.sh`](../scripts/rvs-s3-upload-route.sh), POSIX-safe for Ubuntu `sh`): | Trigger | Path | Contents | |--------|------|----------| diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 02bd5f33e..9a3bdd7dd 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -223,94 +223,17 @@ jobs: echo "RVS_SKIP_UPLOAD=${{ matrix.skip_upload }}" >> "$GITHUB_ENV" echo "RVS_BRANCH_PREFIX=${{ matrix.branch_prefix }}" >> "$GITHUB_ENV" - - name: Set ROCm Version and GPU Family - run: | - if [ "${{ github.event_name }}" = "schedule" ]; then - echo "ROCM_VERSION=" >> $GITHUB_ENV - echo "Scheduled run: build script will auto-fetch latest ROCm version" - elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then - echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV - fi - if [ -n "${{ github.event.inputs.gpu_family }}" ]; then - echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV - fi - - # Schedule → latest ROCm *nightly*. PR + merge (push to main/master/release/*) → latest ROCm *release*. - # Manual: if a version is pinned (workflow input or vars.ROCM_VERSION), tarball follows *format* (auto). - - name: Configure ROCm SDK channel (nightly vs release) - run: | - NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' - NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' - [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' - [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' - - REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' - [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' - REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' - [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" - - release_build() { - { - echo "ROCM_SDK_CHANNEL=release" - echo "ROCM_SDK_RELEASE_URL=$REL_URL" - echo "ROCM_SDK_BASE_URL=$REL_BASE" - echo "ROCM_SDK_INDEX_URL=" - } >> "$GITHUB_ENV" - } - - nightly_build() { - { - echo "ROCM_SDK_CHANNEL=nightly" - echo "ROCM_SDK_RELEASE_URL=" - echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" - } >> "$GITHUB_ENV" - } - - # Manual run with a pin: resolve tarball location by version format (nightly x.y.za… vs release X.Y.Z) - format_build() { - { - echo "ROCM_SDK_CHANNEL=auto" - echo "ROCM_SDK_RELEASE_URL=$REL_URL" - echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" - echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" - echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" - } >> "$GITHUB_ENV" - } - - EVENT='${{ github.event_name }}' - REF='${{ github.ref }}' - IN_VER='${{ github.event.inputs.rocm_version }}' - VAR_VER='${{ vars.ROCM_VERSION }}' - - if [ "$EVENT" = "schedule" ]; then - nightly_build - echo "ROCm SDK channel: nightly (scheduled — latest nightly)" - elif [ "$EVENT" = "pull_request" ]; then - release_build - echo "ROCm SDK channel: release (pull request — latest X.Y.Z)" - elif [ "$EVENT" = "push" ]; then - if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then - release_build - echo "ROCm SDK channel: release (push to main or release/* — includes merge)" - else - nightly_build - echo "ROCm SDK channel: nightly (push to feature branch)" - fi - elif [ "$EVENT" = "workflow_dispatch" ]; then - if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then - format_build - echo "ROCm SDK: manual — tarball base chosen by version format (input or vars.ROCM_VERSION)" - else - nightly_build - echo "ROCm SDK channel: nightly (manual, no version pin)" - fi - else - nightly_build - echo "ROCm SDK channel: nightly (fallback)" - fi + # Schedule → nightly SDK. PR/push main|release/* → release SDK. Manual pin → format (auto). + - name: Configure ROCm SDK channel and version + run: bash .github/scripts/configure-rocm-sdk-channel.sh + env: + INPUT_ROCM_VERSION: ${{ github.event.inputs.rocm_version }} + VAR_ROCM_VERSION: ${{ vars.ROCM_VERSION }} + INPUT_GPU_FAMILY: ${{ github.event.inputs.gpu_family }} + ROCM_SDK_RELEASE_URL: ${{ vars.ROCM_SDK_RELEASE_URL }} + ROCM_SDK_RELEASE_BASE_URL: ${{ vars.ROCM_SDK_RELEASE_BASE_URL }} + ROCM_SDK_NIGHTLY_BASE_URL: ${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }} + ROCM_SDK_NIGHTLY_INDEX_URL: ${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }} # Forward LOCAL_PACKAGE_SERVER_URL to the build script as UPLOAD_TARGET. - name: Configure local package upload @@ -381,53 +304,14 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # S3 routing: schedule non-default → {prefix}/{branch}/nightly/; schedule default → nightly/rvs/; release/* push/manual → release/ + # S3 routing: POSIX script (ubuntu:22.04 container uses sh — no bash [[). - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true - run: | - BUCKET="${{ vars.AWS_S3_BUCKET }}" - if [ -z "$BUCKET" ]; then - echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." - exit 0 - fi - BASE="rvs" - if [ "${RVS_SKIP_UPLOAD}" = "true" ]; then - echo "Skipping S3 upload (scheduled release* branch)." - exit 0 - fi - if [ "${{ github.event_name }}" = "schedule" ] && [ "${RVS_IS_DEFAULT_BRANCH}" != "true" ]; then - S3_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly" - echo "Scheduled ACTIVE_BRANCHES build: uploading to ${S3_PREFIX}/deb" - aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress - echo "Listing s3://${BUCKET}/${S3_PREFIX}/deb/" - aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/deb/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|${S3_PREFIX}/deb" >> $GITHUB_OUTPUT - elif [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then - echo "Release branch build: uploading to release/rvs/deb" - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress - echo "Listing s3://${BUCKET}/release/${BASE}/deb/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/deb/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|release/${BASE}/deb" >> $GITHUB_OUTPUT - elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "Nightly/push build: uploading to nightly/rvs/deb" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/deb/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress - echo "Listing s3://${BUCKET}/nightly/${BASE}/deb/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/deb/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|nightly/${BASE}/deb" >> $GITHUB_OUTPUT - else - PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/ubuntu-22.04" - echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.deb" --no-progress - echo "Listing s3://${BUCKET}/${PREFIX}/" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=Ubuntu DEB|${PREFIX}" >> $GITHUB_OUTPUT - fi - echo "Done." + run: sh .github/scripts/rvs-s3-upload-route.sh upload-deb + env: + AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} + RVS_RUNNER_SUFFIX: ubuntu-22.04 # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path # can be consumed directly as a DEB repository by apt. @@ -439,15 +323,9 @@ jobs: [ -z "$BUCKET" ] && exit 0 # dpkg-dev and apt-utils were installed in the Bootstrap container step. - - BASE="rvs" - if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - DEB_PREFIX="release/${BASE}/deb" - APT_SUITE="rvs-release" - else - DEB_PREFIX="nightly/${BASE}/deb" - APT_SUITE="rvs-nightly" - fi + set -- $(sh .github/scripts/rvs-s3-upload-route.sh deb-repo-prefix) + DEB_PREFIX="$1" + APT_SUITE="$2" STAGING=$(mktemp -d) @@ -475,6 +353,9 @@ jobs: echo "=== DEB repo metadata uploaded to s3://${BUCKET}/${DEB_PREFIX}/ ===" aws s3 ls "s3://${BUCKET}/${DEB_PREFIX}/" --human-readable || true + env: + AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} + RVS_RUNNER_SUFFIX: ubuntu-22.04 build-centos: name: Build CentOS/RHEL Packages (${{ matrix.branch }}) @@ -511,92 +392,16 @@ jobs: echo "RVS_SKIP_UPLOAD=${{ matrix.skip_upload }}" >> "$GITHUB_ENV" echo "RVS_BRANCH_PREFIX=${{ matrix.branch_prefix }}" >> "$GITHUB_ENV" - - name: Set ROCm Version and GPU Family - run: | - if [ "${{ github.event_name }}" = "schedule" ]; then - echo "ROCM_VERSION=" >> $GITHUB_ENV - echo "Scheduled run: build script will auto-fetch latest ROCm version" - elif [ -n "${{ github.event.inputs.rocm_version }}" ]; then - echo "ROCM_VERSION=${{ github.event.inputs.rocm_version }}" >> $GITHUB_ENV - fi - if [ -n "${{ github.event.inputs.gpu_family }}" ]; then - echo "GPU_FAMILY=${{ github.event.inputs.gpu_family }}" >> $GITHUB_ENV - fi - - # Schedule → nightly latest. PR + merge → release latest. Manual → format when version pinned. - - name: Configure ROCm SDK channel (nightly vs release) - run: | - NIGHTLY_BASE='${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }}' - NIGHTLY_IDX='${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }}' - [ -z "$NIGHTLY_BASE" ] && NIGHTLY_BASE='https://rocm.nightlies.amd.com/tarball-multi-arch' - [ -z "$NIGHTLY_IDX" ] && NIGHTLY_IDX='https://rocm.nightlies.amd.com/tarball-multi-arch/' - - REL_URL='${{ vars.ROCM_SDK_RELEASE_URL }}' - [ -z "$REL_URL" ] && REL_URL='https://repo.amd.com/rocm/tarball/' - REL_BASE='${{ vars.ROCM_SDK_RELEASE_BASE_URL }}' - [ -z "$REL_BASE" ] && REL_BASE="${REL_URL%/}" - - release_build() { - { - echo "ROCM_SDK_CHANNEL=release" - echo "ROCM_SDK_RELEASE_URL=$REL_URL" - echo "ROCM_SDK_BASE_URL=$REL_BASE" - echo "ROCM_SDK_INDEX_URL=" - } >> "$GITHUB_ENV" - } - - nightly_build() { - { - echo "ROCM_SDK_CHANNEL=nightly" - echo "ROCM_SDK_RELEASE_URL=" - echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" - } >> "$GITHUB_ENV" - } - - format_build() { - { - echo "ROCM_SDK_CHANNEL=auto" - echo "ROCM_SDK_RELEASE_URL=$REL_URL" - echo "ROCM_SDK_INDEX_URL=$NIGHTLY_IDX" - echo "ROCM_SDK_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_NIGHTLY_BASE_URL=$NIGHTLY_BASE" - echo "ROCM_SDK_NIGHTLY_INDEX_URL=$NIGHTLY_IDX" - echo "ROCM_SDK_RELEASE_BASE_URL=$REL_BASE" - } >> "$GITHUB_ENV" - } - - EVENT='${{ github.event_name }}' - REF='${{ github.ref }}' - IN_VER='${{ github.event.inputs.rocm_version }}' - VAR_VER='${{ vars.ROCM_VERSION }}' - - if [ "$EVENT" = "schedule" ]; then - nightly_build - echo "ROCm SDK channel: nightly (scheduled)" - elif [ "$EVENT" = "pull_request" ]; then - release_build - echo "ROCm SDK channel: release (pull request)" - elif [ "$EVENT" = "push" ]; then - if [ "$REF" = "refs/heads/master" ] || [ "$REF" = "refs/heads/main" ] || [[ "$REF" == refs/heads/release/* ]]; then - release_build - echo "ROCm SDK channel: release (push to main or release/*)" - else - nightly_build - echo "ROCm SDK channel: nightly (feature branch push)" - fi - elif [ "$EVENT" = "workflow_dispatch" ]; then - if [ -n "$IN_VER" ] || [ -n "$VAR_VER" ]; then - format_build - echo "ROCm SDK: manual — format-based tarball" - else - nightly_build - echo "ROCm SDK channel: nightly (manual, no version)" - fi - else - nightly_build - echo "ROCm SDK channel: nightly (fallback)" - fi + - name: Configure ROCm SDK channel and version + run: bash .github/scripts/configure-rocm-sdk-channel.sh + env: + INPUT_ROCM_VERSION: ${{ github.event.inputs.rocm_version }} + VAR_ROCM_VERSION: ${{ vars.ROCM_VERSION }} + INPUT_GPU_FAMILY: ${{ github.event.inputs.gpu_family }} + ROCM_SDK_RELEASE_URL: ${{ vars.ROCM_SDK_RELEASE_URL }} + ROCM_SDK_RELEASE_BASE_URL: ${{ vars.ROCM_SDK_RELEASE_BASE_URL }} + ROCM_SDK_NIGHTLY_BASE_URL: ${{ vars.ROCM_SDK_NIGHTLY_BASE_URL }} + ROCM_SDK_NIGHTLY_INDEX_URL: ${{ vars.ROCM_SDK_NIGHTLY_INDEX_URL }} - name: Configure local package upload if: vars.LOCAL_PACKAGE_SERVER_URL != '' @@ -668,62 +473,13 @@ jobs: env: AWS_DEFAULT_REGION: us-east-1 - # S3 routing: schedule non-default → {prefix}/{branch}/nightly/; schedule default → nightly/rvs/; release/* push/manual → release/ - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true - run: | - BUCKET="${{ vars.AWS_S3_BUCKET }}" - if [ -z "$BUCKET" ]; then - echo "::warning::AWS_S3_BUCKET not set. Skipping S3 upload." - exit 0 - fi - BASE="rvs" - if [ "${RVS_SKIP_UPLOAD}" = "true" ]; then - echo "Skipping S3 upload (scheduled release* branch)." - exit 0 - fi - if [ "${{ github.event_name }}" = "schedule" ] && [ "${RVS_IS_DEFAULT_BRANCH}" != "true" ]; then - S3_PREFIX="${RVS_BRANCH_PREFIX}/${RVS_BUILD_REF_NAME}/nightly" - echo "Scheduled ACTIVE_BRANCHES build: uploading to ${S3_PREFIX}/rpm and ${S3_PREFIX}/tar" - aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/${S3_PREFIX}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${S3_PREFIX}/rpm/" - aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/rpm/" --human-readable || true - echo "Listing s3://${BUCKET}/${S3_PREFIX}/tar/" - aws s3 ls "s3://${BUCKET}/${S3_PREFIX}/tar/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|${S3_PREFIX}/rpm||CentOS/RHEL TGZ|${S3_PREFIX}/tar" >> $GITHUB_OUTPUT - elif [[ "${{ github.ref }}" == refs/heads/release/* ]] && { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; }; then - echo "Release branch build: uploading to release/rvs/rpm and release/rvs/tar" - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/release/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/release/${BASE}/rpm/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/rpm/" --human-readable || true - echo "Listing s3://${BUCKET}/release/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/release/${BASE}/tar/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|release/${BASE}/rpm||CentOS/RHEL TGZ|release/${BASE}/tar" >> $GITHUB_OUTPUT - elif [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "Nightly/push build: uploading to nightly/rvs/rpm and nightly/rvs/tar" - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/rpm/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --no-progress - aws s3 cp ./build "s3://${BUCKET}/nightly/${BASE}/tar/" --recursive --exclude "*" --include "amdrocm*-rvs*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/nightly/${BASE}/rpm/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/rpm/" --human-readable || true - echo "Listing s3://${BUCKET}/nightly/${BASE}/tar/" - aws s3 ls "s3://${BUCKET}/nightly/${BASE}/tar/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL RPM|nightly/${BASE}/rpm||CentOS/RHEL TGZ|nightly/${BASE}/tar" >> $GITHUB_OUTPUT - else - PREFIX="${BASE}/${{ github.ref_name }}/${{ github.run_number }}/manylinux_2_28" - echo "Uploading to s3://${BUCKET}/${PREFIX}/" - aws s3 cp ./build "s3://${BUCKET}/${PREFIX}/" --recursive --exclude "*" --include "amdrocm*-rvs*.rpm" --include "amdrocm*-rvs*.tar.gz" --no-progress - echo "Listing s3://${BUCKET}/${PREFIX}/" - aws s3 ls "s3://${BUCKET}/${PREFIX}/" --human-readable || true - echo "bucket=${BUCKET}" >> $GITHUB_OUTPUT - echo "paths=CentOS/RHEL packages|${PREFIX}" >> $GITHUB_OUTPUT - fi - echo "Done." + run: sh .github/scripts/rvs-s3-upload-route.sh upload-rpm-tar + env: + AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} + RVS_RUNNER_SUFFIX: manylinux_2_28 # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed # directly as an RPM repository by yum/dnf. @@ -736,12 +492,7 @@ jobs: yum install -y createrepo_c || yum install -y createrepo - BASE="rvs" - if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then - RPM_PREFIX="release/${BASE}/rpm" - else - RPM_PREFIX="nightly/${BASE}/rpm" - fi + RPM_PREFIX=$(sh .github/scripts/rvs-s3-upload-route.sh rpm-repo-prefix) STAGING=$(mktemp -d) @@ -757,6 +508,9 @@ jobs: echo "=== RPM repodata uploaded to s3://${BUCKET}/${RPM_PREFIX}/repodata/ ===" aws s3 ls "s3://${BUCKET}/${RPM_PREFIX}/repodata/" --human-readable || true + env: + AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} + RVS_RUNNER_SUFFIX: manylinux_2_28 create-release: name: Create Release Summary From 133d741381c34b20b1f86cda91e2d7689c4df741 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Sun, 7 Jun 2026 23:23:43 -0700 Subject: [PATCH 189/275] fix the null to null string --- rvs/conf/MI350X/pebb_single.conf | 4 ++-- rvs/conf/MI355X/pebb_single.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rvs/conf/MI350X/pebb_single.conf b/rvs/conf/MI350X/pebb_single.conf index 6497399f0..a20fc9789 100644 --- a/rvs/conf/MI350X/pebb_single.conf +++ b/rvs/conf/MI350X/pebb_single.conf @@ -98,7 +98,7 @@ actions: warm_calls: 3 hot_calls: 10 source_memory: cpu - destination_memory: null + destination_memory: "null" # Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX - name: pcie_d2h_bandwidth_tb_gfx @@ -115,6 +115,6 @@ actions: subexecutor: 8 warm_calls: 3 hot_calls: 10 - source_memory: null + source_memory: "null" destination_memory: cpu diff --git a/rvs/conf/MI355X/pebb_single.conf b/rvs/conf/MI355X/pebb_single.conf index 6497399f0..a20fc9789 100644 --- a/rvs/conf/MI355X/pebb_single.conf +++ b/rvs/conf/MI355X/pebb_single.conf @@ -98,7 +98,7 @@ actions: warm_calls: 3 hot_calls: 10 source_memory: cpu - destination_memory: null + destination_memory: "null" # Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX - name: pcie_d2h_bandwidth_tb_gfx @@ -115,6 +115,6 @@ actions: subexecutor: 8 warm_calls: 3 hot_calls: 10 - source_memory: null + source_memory: "null" destination_memory: cpu From ab66c46a954b0c4f80d6a022eee10af1ff165957 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 9 Jun 2026 23:22:17 -0700 Subject: [PATCH 190/275] Ensuring right folder for non-master uploads Local uploads were posting to "master" folder even when run from other branches due to usage of GITHUB_REF_NAME instead of actual RVS_BUILD_REF_NAME variable whihc points to branch. This PR fixes the same and keeps / in name, as is the case with s3 uploads. --- .github/workflows/build-relocatable-packages.yml | 8 ++++---- build_packages_local.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 9a3bdd7dd..18262699c 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -252,8 +252,8 @@ jobs: if: vars.LOCAL_PACKAGE_SERVER_URL != '' run: | REPO="${GITHUB_REPOSITORY##*/}" - BRANCH="${GITHUB_REF_NAME}" - SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') + BRANCH="${RVS_BUILD_REF_NAME:-$GITHUB_REF_NAME}" + SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._/-]|-|g') DATE=$(date +%Y-%m-%d) URL="${{ vars.LOCAL_PACKAGE_SERVER_URL }}/${REPO}/${SAFE_BRANCH}/${DATE}/" echo "================================================================" @@ -417,8 +417,8 @@ jobs: if: vars.LOCAL_PACKAGE_SERVER_URL != '' run: | REPO="${GITHUB_REPOSITORY##*/}" - BRANCH="${GITHUB_REF_NAME}" - SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') + BRANCH="${RVS_BUILD_REF_NAME:-$GITHUB_REF_NAME}" + SAFE_BRANCH=$(echo "$BRANCH" | sed 's|[^a-zA-Z0-9._/-]|-|g') DATE=$(date +%Y-%m-%d) URL="${{ vars.LOCAL_PACKAGE_SERVER_URL }}/${REPO}/${SAFE_BRANCH}/${DATE}/" echo "================================================================" diff --git a/build_packages_local.sh b/build_packages_local.sh index 2c9c8abbd..0401e0228 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -641,7 +641,7 @@ BASE_PACKAGE_RELEASE="r${ROCM_LIBPATCH_VERSION}.${RELEASE_DATE}" if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ -n "${GITHUB_HEAD_REF:-}" ]; then GIT_BRANCH="${GITHUB_HEAD_REF}" else - GIT_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" + GIT_BRANCH="${RVS_BUILD_REF_NAME:-${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}}" fi if [ -n "$GITHUB_SHA" ]; then GIT_COMMIT_SHORT="${GITHUB_SHA:0:7}" @@ -895,8 +895,8 @@ if [ -n "$UPLOAD_TARGET" ]; then [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null) [ -z "$UPLOAD_REPO" ] && UPLOAD_REPO="unknown" fi - UPLOAD_BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}" - UPLOAD_BRANCH=$(echo "$UPLOAD_BRANCH" | sed 's|[^a-zA-Z0-9._-]|-|g') + UPLOAD_BRANCH="${RVS_BUILD_REF_NAME:-${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")}}" + UPLOAD_BRANCH=$(echo "$UPLOAD_BRANCH" | sed 's|[^a-zA-Z0-9._/-]|-|g') UPLOAD_DATE=$(date +%Y-%m-%d) UPLOAD_SUBPATH="${UPLOAD_REPO}/${UPLOAD_BRANCH}/${UPLOAD_DATE}" From a4cb59f90ef6ff11365dac338db7daddaad6c096 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 10 Jun 2026 12:59:41 -0400 Subject: [PATCH 191/275] Removed the hostname printed in the logs Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 2 +- rvs_nightly_test.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 98ec739da..f0e92f660 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -414,7 +414,7 @@ Watch the Actions tab for: 1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). 2. `test` job picks up on your orchestrator runner. 3. **Validate target node configuration** prints the resolved `Target node`, `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` path. -4. **Setup SSH key for target node** prints the target's `hostname` / `id` / `uptime` from the connectivity probe. +4. **Setup SSH key for target node** verifies SSH connectivity (no host identity printed to logs). 5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. 6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. 7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target, all from `. diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index 91a7c67f5..4677d4f8b 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -134,12 +134,12 @@ Host rvs-target EOF chmod 600 "$SSH_CONFIG_FILE" - echo "Verifying SSH connectivity to ${TARGET_USER:-}@${TARGET_NODE}..." - if ! ssh -F "$SSH_CONFIG_FILE" rvs-target 'echo __START__; hostname; id; uptime' \ - 2>&1 | sed -n '/^__START__$/,$p' | tail -n +2; then - echo "::error::SSH connectivity check failed for ${TARGET_USER:-}@${TARGET_NODE}. Verify secrets RVS_TARGET_NODE, RVS_TARGET_USER, RVS_TARGET_SSH_KEY and network access from this runner." >&2 + echo "Verifying SSH connectivity to target node..." + if ! ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'true'; then + echo "::error::SSH connectivity check failed. Verify secrets RVS_TARGET_NODE, RVS_TARGET_USER, RVS_TARGET_SSH_KEY and network access from this runner." >&2 exit 1 fi + echo "::notice::SSH connectivity OK." ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" From ab660fd905f89c1e3e311a840abfa8161ac9f6df Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 10 Jun 2026 15:54:26 -0400 Subject: [PATCH 192/275] removed all the node names printed in the log Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 28 ++++++++++++++++++++--- rvs_nightly_test.sh | 12 ++++++---- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index f0e92f660..748326301 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -293,7 +293,7 @@ A typical successful log (with `target_rocm_path=`): ``` === System === -Linux 6.x.x-x-generic ... +Linux 6.x.x-x-generic #... SMP ... x86_64 GNU/Linux === Target ROCm path: === @@ -384,6 +384,28 @@ rvs-nightly-report-/ Artifact retention is 30 days. +## Log privacy (runner vs target) + +GitHub Actions always prints **Runner name** and **Machine name** in the **Set up job** +log group before any step from this repository runs. That text is emitted by the +[actions/runner](https://github.com/actions/runner) application when it accepts a job; +it is **not** produced by `rvs_nightly_test.sh` or this workflow YAML. + +**There is no supported way to suppress or hide those two lines** from repository +code (no workflow flag, secret, `::add-mask::`, or script can remove them — masking +only affects output *after* a step registers a value, and does not rewrite the setup +header GitHub has already recorded). + +What you *can* do on the infrastructure side: + +| Goal | Practical option | +|---|---| +| The literal strings should not identify a lab asset | Register the self-hosted runner under a **generic** name in GitHub (**Settings → Actions → Runners**), and/or use a hostname that is not inventory-sensitive — the lines will still exist, but the values are less revealing. | +| Avoid self-hosted runner logs entirely for orchestration | Run the `install-rvs-on-target` / `run-rvs-level-4` jobs on **GitHub-hosted** runners (`ubuntu-latest`) **only if** the target node is reachable from the public internet on SSH (unusual for internal lab hosts). | + +`validate-config` intentionally does **not** print the orchestrator hostname so +we do not duplicate host identity in our own script output. + ## GitHub runner vs target node The `test` job runs on `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}`, @@ -413,7 +435,7 @@ Watch the Actions tab for: 1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). 2. `test` job picks up on your orchestrator runner. -3. **Validate target node configuration** prints the resolved `Target node`, `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` path. +3. **Validate target node configuration** prints `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` (SSH target host/user are **not** printed). 4. **Setup SSH key for target node** verifies SSH connectivity (no host identity printed to logs). 5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. 6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. @@ -429,7 +451,7 @@ Watch the Actions tab for: | `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | | **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | | **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | -| **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify by `ssh -i $TARGET_USER@$TARGET_NODE hostname` from a workstation. | +| **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify from a workstation with `ssh -i -o BatchMode=yes @ true` (use your real user, host, and key; exit code 0 means the key works). | | **Setup SSH key for target node** fails: `Connection timed out` / `Connection refused` | Network reachability problem between the orchestrator runner and the target node. Check firewall / VPN / bastion routing. | | **Setup SSH key for target node** fails: `Host key verification failed` | `ssh-keyscan` couldn't pre-seed the key and `accept-new` rejected it (rare). Remove any stale entry for the target in the runner's `known_hosts`, or pre-populate it manually. | | **Verify ROCm prerequisites on target node** fails: ` does not exist on the target node` | The configured `target_rocm_path` / `vars.RVS_TARGET_ROCM_PATH` doesn't point at a real directory on the target. Verify by `ssh @ 'ls -d '`. | diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index 4677d4f8b..f97b1142a 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -66,8 +66,10 @@ cmd_validate_config() { INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" RVS_BIN="${INSTALL_DIR}/bin/rvs" - echo "Orchestrator runner : $(hostname)" - echo "Target node : ${TARGET_USER:-}@${TARGET_NODE}" + # Do not print orchestrator or target host identity here (hostname/IP may be + # workflow inputs and must not appear in CI logs). GitHub may still log runner + # metadata in the job "Set up job" phase. + echo "SSH target : (omitted — use secrets RVS_TARGET_* / workflow inputs)" echo "Target ROCm path : $TARGET_ROCM_PATH" echo "Remote work dir : $REMOTE_WORK_DIR" echo "ROCm major : $ROCM_MAJOR" @@ -153,7 +155,8 @@ cmd_verify_rocm() { "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set -euo pipefail echo "=== System ===" -uname -a +# Omit nodename (uname -a prints hostname); -srvmo keeps kernel/OS/arch only. +uname -srvmo echo echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" if [ ! -d "${TARGET_ROCM_PATH}" ]; then @@ -265,12 +268,11 @@ cmd_run_level4() { require_env INSTALL_DIR require_env REMOTE_WORK_DIR require_env TARGET_ROCM_PATH - require_env TARGET_NODE set +e local start end rc start=$(date -u +%FT%TZ) - echo "::group::RVS level 4 (${RVS_BIN} -r 4) on ${TARGET_NODE} against ${TARGET_ROCM_PATH}" + echo "::group::RVS level 4 (${RVS_BIN} -r 4) against ${TARGET_ROCM_PATH}" ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' set +e From 10348c54982284b6259188974c4b41d0f76134a4 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 10 Jun 2026 16:45:02 -0500 Subject: [PATCH 193/275] Warm calls based gemm ramp-up --- gst.so/include/action.h | 4 +++- gst.so/include/gst_worker.h | 16 ++++++++++++++-- gst.so/src/action.cpp | 15 +++++++++++++-- gst.so/src/gst_worker.cpp | 21 ++++++++++++++------- iet.so/src/iet_worker.cpp | 2 +- include/rvs_blas.h | 2 +- perf.so/src/perf_worker.cpp | 4 ++-- src/rvs_blas.cpp | 12 ++---------- tst.so/src/tst_worker.cpp | 4 ++-- 9 files changed, 52 insertions(+), 28 deletions(-) diff --git a/gst.so/include/action.h b/gst.so/include/action.h index 9e1373517..f89c34ddd 100644 --- a/gst.so/include/action.h +++ b/gst.so/include/action.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -90,6 +90,8 @@ class gst_action: public rvs::actionbase { //Parameter to heat up uint64_t gst_hot_calls; + //Parameter for warm-up calls before ramp + uint64_t gst_warm_calls; //Tranpose set to none or enabled int gst_trans_a; diff --git a/gst.so/include/gst_worker.h b/gst.so/include/gst_worker.h index 54f0d44ee..8e614bef7 100644 --- a/gst.so/include/gst_worker.h +++ b/gst.so/include/gst_worker.h @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -125,11 +125,21 @@ class GSTWorker : public rvs::ThreadBase { gst_hot_calls = _hot_calls; } - //! sets hot calls + //! gets hot calls uint64_t get_gst_hot_calls(void) { return gst_hot_calls; } + //! sets warm calls + void set_gst_warm_calls(uint64_t _warm_calls) { + gst_warm_calls = _warm_calls; + } + + //! gets warm calls + uint64_t get_gst_warm_calls(void) { + return gst_warm_calls; + } + //! sets the matrix size void set_matrix_size_a(uint64_t _matrix_size_a) { matrix_size_a = _matrix_size_a; @@ -355,6 +365,8 @@ class GSTWorker : public rvs::ThreadBase { std::string matrix_init; //num of hot calls uint64_t gst_hot_calls; + //num of warm-up calls during ramp period + uint64_t gst_warm_calls; //! actual ramp time in case the GPU achieves the given target_stress Gflops uint64_t ramp_actual_time; //! rvs_blas pointer diff --git a/gst.so/src/action.cpp b/gst.so/src/action.cpp index b8258b1fd..1d52f616b 100644 --- a/gst.so/src/action.cpp +++ b/gst.so/src/action.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -60,6 +60,7 @@ using std::regex; #define RVS_CONF_TARGET_STRESS_KEY "target_stress" #define RVS_CONF_TOLERANCE_KEY "tolerance" #define RVS_CONF_HOT_CALLS "hot_calls" +#define RVS_CONF_WARM_CALLS "warm_calls" #define RVS_CONF_MATRIX_SIZE_KEYA "matrix_size_a" #define RVS_CONF_MATRIX_SIZE_KEYB "matrix_size_b" #define RVS_CONF_MATRIX_SIZE_KEYC "matrix_size_c" @@ -94,7 +95,7 @@ using std::regex; #define TARGET_KEY "target" #define DTYPE_KEY "dtype" -#define GST_DEFAULT_RAMP_INTERVAL 5000 +#define GST_DEFAULT_RAMP_INTERVAL 0 #define GST_DEFAULT_LOG_INTERVAL 1000 #define GST_DEFAULT_MAX_VIOLATIONS 0 #define GST_DEFAULT_TOLERANCE 0.05 @@ -102,6 +103,7 @@ using std::regex; #define GST_DEFAULT_MATRIX_SIZE 5760 #define GST_DEFAULT_MATRIX_INIT "default" #define GST_DEFAULT_HOT_CALLS 1 +#define GST_DEFAULT_WARM_CALLS 1 #define GST_DEFAULT_TRANS_A 0 #define GST_DEFAULT_TRANS_B 1 #define GST_DEFAULT_ALPHA_VAL 1 @@ -190,6 +192,7 @@ bool gst_action::do_gpu_stress_test(map gst_gpus_device_index) { workers[i].set_target_stress(gst_target_stress); workers[i].set_tolerance(gst_tolerance); workers[i].set_gst_hot_calls(gst_hot_calls); + workers[i].set_gst_warm_calls(gst_warm_calls); workers[i].set_matrix_size_a(gst_matrix_size_a); workers[i].set_matrix_size_b(gst_matrix_size_b); workers[i].set_matrix_size_c(gst_matrix_size_c); @@ -360,6 +363,14 @@ bool gst_action::get_all_gst_config_keys(void) { bsts = false; } + error = property_get_int(RVS_CONF_WARM_CALLS, &gst_warm_calls, GST_DEFAULT_WARM_CALLS); + if (error == 1) { + msg = "invalid '" + + std::string(RVS_CONF_WARM_CALLS) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + error = property_get_int(RVS_CONF_MATRIX_SIZE_KEYA, &gst_matrix_size_a, GST_DEFAULT_MATRIX_SIZE); if (error == 1) { msg = "invalid '" + diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 2b30d7c2b..3335d503e 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -151,7 +151,7 @@ void GSTWorker::hit_max_gflops(int *error, string *err_description) { } // run GEMM operation - if (!gpu_blas->run_blas_gemm(false)) + if (!gpu_blas->run_blas_gemm(1)) continue; // failed to run the GEMM operation // Waits for GEMM operation to complete @@ -221,6 +221,8 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { // the delay which gives the SGEMM frequency will be dynamically computed delay_target_stress = 0; + bool ramp_single_shot = (ramp_interval == 0); + gst_start_time = std::chrono::system_clock::now(); gst_log_interval_time = std::chrono::system_clock::now(); gst_start_gflops_time = std::chrono::system_clock::now(); @@ -230,10 +232,12 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { if (rvs::lp::Stopping()) return false; - gst_end_time = std::chrono::system_clock::now(); - if (time_diff(gst_end_time, gst_start_time) > - ramp_interval * 1000u - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE * 1000u) - return false; + if (!ramp_single_shot) { + gst_end_time = std::chrono::system_clock::now(); + if (time_diff(gst_end_time, gst_start_time) > + ramp_interval - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + return false; + } gst_last_sgemm_start_time = std::chrono::system_clock::now(); @@ -252,7 +256,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { start_time = gpu_blas->get_time_us(); // run GEMM operation - if(!gpu_blas->run_blas_gemm(false)) { + if(!gpu_blas->run_blas_gemm(1)) { *err_description = GST_BLAS_ERROR; *error = 1; @@ -334,6 +338,9 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { num_sgemm_ops_log_interval = 0; gst_log_interval_time = std::chrono::system_clock::now(); } + + if (ramp_single_shot) + return true; } return false; @@ -470,7 +477,7 @@ bool GSTWorker::do_gst_stress_test(int *error, std::string *err_description) { start_time = gpu_blas->get_time_us(); // launch GEMM operation - if(!gpu_blas->run_blas_gemm(true)) { + if(!gpu_blas->run_blas_gemm(gst_hot_calls)) { *err_description = GST_BLAS_ERROR; *error = 1; diff --git a/iet.so/src/iet_worker.cpp b/iet.so/src/iet_worker.cpp index 7c820390f..b7e9a6ad4 100644 --- a/iet.so/src/iet_worker.cpp +++ b/iet.so/src/iet_worker.cpp @@ -133,7 +133,7 @@ void IETWorker::computeThread(void) { while ((duration < run_duration_ms) && (endtest == false)) { // run GEMM operation - if(!gpu_blas->run_blas_gemm(true)) { + if(!gpu_blas->run_blas_gemm(iet_hot_calls)) { endtest = true; break; } diff --git a/include/rvs_blas.h b/include/rvs_blas.h index 25621d4af..ea10fb390 100644 --- a/include/rvs_blas.h +++ b/include/rvs_blas.h @@ -107,7 +107,7 @@ class rvs_blas { void generate_random_matrix_data(void); bool copy_data_to_gpu(void); template bool copy_data_to_gpu(void); - bool run_blas_gemm(bool hot_call); + bool run_blas_gemm(uint64_t num_calls); bool is_gemm_op_complete(void); bool validate_gemm(bool self_check, bool accu_check, double &self_error, double &accu_error); void set_gemm_error(uint64_t _error_freq, uint64_t _error_count); diff --git a/perf.so/src/perf_worker.cpp b/perf.so/src/perf_worker.cpp index ccfade8ee..52070da27 100644 --- a/perf.so/src/perf_worker.cpp +++ b/perf.so/src/perf_worker.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -182,7 +182,7 @@ bool PERFWorker::do_perf_stress_test(int *error, std::string *err_description) { start_time = gpu_blas->get_time_us(); // run GEMM & wait for completion - gpu_blas->run_blas_gemm(true); + gpu_blas->run_blas_gemm(perf_hot_calls); //End the timer end_time = gpu_blas->get_time_us(); diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index 83f6a8b98..f60fbd13a 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -975,21 +975,13 @@ bool rvs_blas::is_gemm_op_complete(void) { * @brief performs the GEMM matrix multiplication operations * @return true if GPU was able to enqueue the GEMM operation, otherwise false */ -bool rvs_blas::run_blas_gemm(bool hot_call) { - - int calls = 0; +bool rvs_blas::run_blas_gemm(uint64_t num_calls) { if (is_error) return false; - /* Determine GEMM call iterations */ - if(true == hot_call) - calls = hot_calls; - else - calls = 1; - /* GEMM call iterations loop */ - for(int i = 0; i < calls; i++) { + for(uint64_t i = 0; i < num_calls; i++) { if(blas_source == "rocblas") { diff --git a/tst.so/src/tst_worker.cpp b/tst.so/src/tst_worker.cpp index b4e2c2456..eea96fa24 100644 --- a/tst.so/src/tst_worker.cpp +++ b/tst.so/src/tst_worker.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -154,7 +154,7 @@ void TSTWorker::blasThread(int gpuIdx, uint64_t matrix_size, std::string tst_ops //Hit the GPU with load to increase temperature while ( (duration < run_duration_ms) && (endtest == false) ){ //call the gemm blas - gpu_blas->run_blas_gemm(true); + gpu_blas->run_blas_gemm(1); /* Set callback to be called upon completion of blas gemm operations */ gpu_blas->set_callback(blas_callback, (void *)this); From b46ae25e38e668a464c43a78a825522055c78340 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 10 Jun 2026 19:46:40 -0500 Subject: [PATCH 194/275] Update RVS version to 1.6.0 --- CHANGELOG.md | 5 +++++ CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cedadce..2382b0e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.6.0 + +### Added + + ## RVS 1.5.0 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index b838e070a..37572b727 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ set( COMP_TYPE "applications" ) set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) project ("rocm-validation-suite" - VERSION 1.5.0) + VERSION 1.6.0) # Default libdir to "lib", this skips GNUInstallDirs from trying to take a guess if it's unset: set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") From d69f8631348f6e7288891f43f7c17d05bcf5be07 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 11 Jun 2026 16:04:28 -0500 Subject: [PATCH 195/275] Refactor babel JSON logging --- babel.so/src/rvs_stress.cpp | 124 ++++++++++++++++++++++-------------- 1 file changed, 75 insertions(+), 49 deletions(-) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index edcdfc135..033a4258e 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -93,7 +93,6 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, std::string msg; std::streamsize ss = std::cout.precision(); std::stringstream sstr; - auto desc = action_descriptor{action, module_name, device.second}; bool time_based = (duration > 0); if (!output_as_csv) @@ -133,22 +132,6 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, } - //json - if (json){ - std::string scale = mibibytes ? "MiB" : "MB"; - auto arr_size = mibibytes ? ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : - ARRAY_SIZE*sizeof(T)*1.0E-6; - auto total_size = mibibytes ? 3.0*ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : - 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6; - if (time_based) - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Duration(ms)", std::to_string(duration) ); - else - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Iterations", std::to_string(num_times) ); - } // Create host vectors std::vector a(ARRAY_SIZE); @@ -292,6 +275,11 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << std::fixed; } + uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); + uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); + std::string iter_key = time_based ? "Duration(ms)" : "Iterations"; + std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); + std::string labels[total_babel_subtests] = {"Read","Write","Copy", "Mul", "Add", "Triad", "Dot"}; size_t sizes[total_babel_subtests] = { 1 * sizeof(T) * ARRAY_SIZE, @@ -312,6 +300,32 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, test->triad, test->dot}; + auto fmt3 = [](double val) -> std::string { + std::ostringstream oss; + oss << std::fixed << std::setprecision(3) << val; + return oss.str(); + }; + + // Build single JSON node per GPU: metadata + nested "results" object + void* json_root = nullptr; + void* json_results = nullptr; + if (json) { + unsigned int sec, usec; + rvs::lp::get_ticks(&sec, &usec); + json_root = rvs::lp::LogRecordCreate(module_name.c_str(), action.c_str(), + rvs::logresults, sec, usec, true); + if (json_root) { + rvs::lp::AddString(json_root, "gpu_id", std::to_string(device.second)); + uint16_t gpu_index = 0; + rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); + rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); + rvs::lp::AddString(json_root, "Array size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "Total size", std::to_string(total_size)); + rvs::lp::AddString(json_root, iter_key, iter_val); + json_results = rvs::lp::CreateNode(json_root, "results"); + } + } + // Display babel subtest results for (int i = 0; i < total_babel_subtests; i++) { @@ -353,17 +367,24 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bw_scale * sizes[i] / average << std::endl; } - if (json){ + if (json && json_results) { const char *key = mibibytes ? "MiBytes/sec" : "MBytes/sec"; const char *peak_key = mibibytes ? "Max_MiBytes/sec" : "Max_MBytes/sec"; const char *worst_key = mibibytes ? "Min_MiBytes/sec" : "Min_MBytes/sec"; const char *avg_key = mibibytes ? "Avg_MiBytes/sec" : "Avg_MBytes/sec"; - log_to_json(desc, rvs::logresults, "Function",std::string(labels[i]), - key, std::to_string(bw_scale * sizes[i] / (*minmax.first)), - peak_key, std::to_string(bw_scale * sizes[i] / (*minmax.first)), - worst_key, std::to_string(bw_scale * sizes[i] / (*minmax.second)), - avg_key, std::to_string(bw_scale * sizes[i] / average), - "pass", "true"); + void* subtest_node = rvs::lp::CreateNode(json_results, labels[i].c_str()); + if (subtest_node) { + rvs::lp::AddString(subtest_node, key, + fmt3(bw_scale * sizes[i] / (*minmax.first))); + rvs::lp::AddString(subtest_node, peak_key, + fmt3(bw_scale * sizes[i] / (*minmax.first))); + rvs::lp::AddString(subtest_node, worst_key, + fmt3(bw_scale * sizes[i] / (*minmax.second))); + rvs::lp::AddString(subtest_node, avg_key, + fmt3(bw_scale * sizes[i] / average)); + rvs::lp::AddString(subtest_node, "pass", "true"); + rvs::lp::AddNode(json_results, subtest_node); + } } } } @@ -371,6 +392,12 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, sstr << "---------------------------------------------------------------------------------" << std::endl; rvs::lp::Log(sstr.str(), rvs::logresults); + + if (json && json_root && json_results) { + rvs::lp::AddNode(json_root, json_results); + rvs::lp::LogRecordFlush(json_root, true); + } + delete stream; return true; @@ -382,10 +409,13 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b const std::string& data_init, const std::string& nontemporal, uint64_t duration) { std::string msg; - auto desc = action_descriptor{action, module_name, device.second}; triad_only = true; bool time_based = (duration > 0); std::stringstream sstr; + uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); + uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); + std::string iter_key = time_based ? "Duration(ms)" : "Iterations"; + std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); if (!output_as_csv) { if (time_based) @@ -418,21 +448,6 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b << " (=" << 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6 << " MB)" << std::endl; } rvs::lp::Log(sstr.str(), rvs::logresults); - if (json){ - std::string scale = mibibytes ? "MiB" : "MB"; - auto arr_size = mibibytes ? ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : - ARRAY_SIZE*sizeof(T)*1.0E-6; - auto total_size = mibibytes ? 3.0*ARRAY_SIZE*sizeof(T)*pow(2.0, -20.0) : - 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6; - if (time_based) - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Duration(ms)", std::to_string(duration) ); - else - log_to_json(desc, rvs::logresults,"Array size", std::to_string(arr_size), - "Total size", std::to_string(total_size), - "Iterations", std::to_string(num_times) ); - } std::cout.precision(ss); } sstr.str( std::string() ); @@ -530,15 +545,26 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b << bandwidth << std::endl; } rvs::lp::Log(sstr.str(), rvs::logresults); - if (json){ - std::string bw_field{"Bandwidth ("}; - bw_field +=(mibibytes) ? "GiB/s" : "GB/s"; - bw_field += ")"; - log_to_json(desc, rvs::logresults, - "GPU Id", std::to_string(device.second), - "Runtime (seconds)", std::to_string(runtime), - bw_field, std::to_string(bandwidth), - "pass", "true"); + if (json) { + unsigned int sec, usec; + rvs::lp::get_ticks(&sec, &usec); + void* json_root = rvs::lp::LogRecordCreate(module_name.c_str(), action.c_str(), + rvs::logresults, sec, usec, true); + if (json_root) { + rvs::lp::AddString(json_root, "gpu_id", std::to_string(device.second)); + uint16_t gpu_index = 0; + rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); + rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); + rvs::lp::AddString(json_root, "Array size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "Total size", std::to_string(total_size)); + rvs::lp::AddString(json_root, iter_key, iter_val); + std::string bw_field = std::string("Bandwidth (") + + ((mibibytes) ? "GiB/s" : "GB/s") + ")"; + rvs::lp::AddString(json_root, "Runtime (seconds)", std::to_string(runtime)); + rvs::lp::AddString(json_root, bw_field.c_str(), std::to_string(bandwidth)); + rvs::lp::AddString(json_root, "pass", "true"); + rvs::lp::LogRecordFlush(json_root, true); + } } delete stream; From f6bd44df7d8d5d66dd1a4eddc6bef0249c85836f Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 11 Jun 2026 18:53:07 -0500 Subject: [PATCH 196/275] Consistent key naming across all JSON fields --- babel.so/src/rvs_stress.cpp | 49 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 033a4258e..99b979754 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -277,7 +277,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); - std::string iter_key = time_based ? "Duration(ms)" : "Iterations"; + std::string iter_key = time_based ? "duration_ms" : "iterations"; std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); std::string labels[total_babel_subtests] = {"Read","Write","Copy", "Mul", "Add", "Triad", "Dot"}; @@ -300,7 +300,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, test->triad, test->dot}; - auto fmt3 = [](double val) -> std::string { + auto format_bw = [](double val) -> std::string { std::ostringstream oss; oss << std::fixed << std::setprecision(3) << val; return oss.str(); @@ -319,8 +319,8 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, uint16_t gpu_index = 0; rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); - rvs::lp::AddString(json_root, "Array size", std::to_string(arr_size)); - rvs::lp::AddString(json_root, "Total size", std::to_string(total_size)); + rvs::lp::AddString(json_root, "array_size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "total_size", std::to_string(total_size)); rvs::lp::AddString(json_root, iter_key, iter_val); json_results = rvs::lp::CreateNode(json_root, "results"); } @@ -357,31 +357,27 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, sstr << std::left << std::setw(12) << device.second << std::left << std::setw(12) << labels[i] - << std::left << std::setw(15) << std::setprecision(3) << - bw_scale * sizes[i] / (*minmax.first) - << std::left << std::setw(15) << std::setprecision(3) << - bw_scale * sizes[i] / (*minmax.first) - << std::left << std::setw(15) << std::setprecision(3) << - bw_scale * sizes[i] / (*minmax.second) - << std::left << std::setw(15) << std::setprecision(3) << - bw_scale * sizes[i] / average + << std::left << std::setw(15) << format_bw(bw_scale * sizes[i] / (*minmax.first)) + << std::left << std::setw(15) << format_bw(bw_scale * sizes[i] / (*minmax.first)) + << std::left << std::setw(15) << format_bw(bw_scale * sizes[i] / (*minmax.second)) + << std::left << std::setw(15) << format_bw(bw_scale * sizes[i] / average) << std::endl; } if (json && json_results) { - const char *key = mibibytes ? "MiBytes/sec" : "MBytes/sec"; - const char *peak_key = mibibytes ? "Max_MiBytes/sec" : "Max_MBytes/sec"; - const char *worst_key = mibibytes ? "Min_MiBytes/sec" : "Min_MBytes/sec"; - const char *avg_key = mibibytes ? "Avg_MiBytes/sec" : "Avg_MBytes/sec"; + const char *key = mibibytes ? "mibytes_per_sec" : "mbytes_per_sec"; + const char *peak_key = mibibytes ? "max_mibytes_per_sec" : "max_mbytes_per_sec"; + const char *worst_key = mibibytes ? "min_mibytes_per_sec" : "min_mbytes_per_sec"; + const char *avg_key = mibibytes ? "avg_mibytes_per_sec" : "avg_mbytes_per_sec"; void* subtest_node = rvs::lp::CreateNode(json_results, labels[i].c_str()); if (subtest_node) { rvs::lp::AddString(subtest_node, key, - fmt3(bw_scale * sizes[i] / (*minmax.first))); + format_bw(bw_scale * sizes[i] / (*minmax.first))); rvs::lp::AddString(subtest_node, peak_key, - fmt3(bw_scale * sizes[i] / (*minmax.first))); + format_bw(bw_scale * sizes[i] / (*minmax.first))); rvs::lp::AddString(subtest_node, worst_key, - fmt3(bw_scale * sizes[i] / (*minmax.second))); + format_bw(bw_scale * sizes[i] / (*minmax.second))); rvs::lp::AddString(subtest_node, avg_key, - fmt3(bw_scale * sizes[i] / average)); + format_bw(bw_scale * sizes[i] / average)); rvs::lp::AddString(subtest_node, "pass", "true"); rvs::lp::AddNode(json_results, subtest_node); } @@ -414,7 +410,7 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b std::stringstream sstr; uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); - std::string iter_key = time_based ? "Duration(ms)" : "Iterations"; + std::string iter_key = time_based ? "duration_ms" : "iterations"; std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); if (!output_as_csv) { @@ -555,13 +551,12 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b uint16_t gpu_index = 0; rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); - rvs::lp::AddString(json_root, "Array size", std::to_string(arr_size)); - rvs::lp::AddString(json_root, "Total size", std::to_string(total_size)); + rvs::lp::AddString(json_root, "array_size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "total_size", std::to_string(total_size)); rvs::lp::AddString(json_root, iter_key, iter_val); - std::string bw_field = std::string("Bandwidth (") + - ((mibibytes) ? "GiB/s" : "GB/s") + ")"; - rvs::lp::AddString(json_root, "Runtime (seconds)", std::to_string(runtime)); - rvs::lp::AddString(json_root, bw_field.c_str(), std::to_string(bandwidth)); + const char *bw_key = mibibytes ? "bandwidth_gib_per_sec" : "bandwidth_gb_per_sec"; + rvs::lp::AddString(json_root, "runtime_sec", std::to_string(runtime)); + rvs::lp::AddString(json_root, bw_key, std::to_string(bandwidth)); rvs::lp::AddString(json_root, "pass", "true"); rvs::lp::LogRecordFlush(json_root, true); } From 68b4eef46d149b0a12c2f47be041ffef1881255b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 12 Jun 2026 19:32:30 -0500 Subject: [PATCH 197/275] Remove unused configuration file --- rvs/conf/MI300X/gst_ext.conf | 94 ------------------------------------ 1 file changed, 94 deletions(-) delete mode 100644 rvs/conf/MI300X/gst_ext.conf diff --git a/rvs/conf/MI300X/gst_ext.conf b/rvs/conf/MI300X/gst_ext.conf deleted file mode 100644 index 6be9c7027..000000000 --- a/rvs/conf/MI300X/gst_ext.conf +++ /dev/null @@ -1,94 +0,0 @@ -# ################################################################################ -# # -# # Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. -# # -# # MIT LICENSE: -# # Permission is hereby granted, free of charge, to any person obtaining a copy of -# # this software and associated documentation files (the "Software"), to deal in -# # the Software without restriction, including without limitation the rights to -# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# # of the Software, and to permit persons to whom the Software is furnished to do -# # so, subject to the following conditions: -# # -# # The above copyright notice and this permission notice shall be included in all -# # copies or substantial portions of the Software. -# # -# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# # SOFTWARE. -# # -# ############################################################################### - -actions: -- name: gst-1000Tflops-8KB-fp8_r-false - device: all - module: gst - parallel: false - count: 1 - duration: 30000 - copy_matrix: false - target_stress: 1000000 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 8192 - data_type: fp8_r - transa: 1 - transb: 0 - alpha: 1 - beta: 0 - -- name: gst-1000Tflops-8KB-fp8_r-true - device: all - module: gst - parallel: true - count: 1 - duration: 60000 - copy_matrix: false - target_stress: 1000000 - matrix_size_a: 8192 - matrix_size_b: 8192 - matrix_size_c: 8192 - data_type: fp8_r - transa: 1 - transb: 0 - alpha: 1 - beta: 0 - -- name: gst-500Tflops-4KB-bf16_r-false - device: all - module: gst - parallel: false - count: 1 - duration: 30000 - copy_matrix: false - target_stress: 500000 - matrix_size_a: 4096 - matrix_size_b: 4096 - matrix_size_c: 8192 - data_type: bf16_r - transa: 1 - transb: 0 - alpha: 1 - beta: 0 - -- name: gst-500Tflops-4KB-bf16_r-true - device: all - module: gst - parallel: true - count: 1 - duration: 60000 - copy_matrix: false - target_stress: 500000 - matrix_size_a: 4096 - matrix_size_b: 4096 - matrix_size_c: 8192 - data_type: bf16_r - transa: 1 - transb: 0 - alpha: 1 - beta: 0 - From dc6aa6a8fda9dab69b2fec4e79180706aaf0eb30 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 12 Jun 2026 15:27:47 -0700 Subject: [PATCH 198/275] enable S3 upload for RVS mirror repos Add an option to enable S3 upload from any mirror of RVS code. Workflow code already ensure S3 authentication using ARN and fed through secrets. This should enable S3 upload for all mirror that has the respective variables configured properly. --- .github/workflows/README_BUILD_PACKAGES.md | 11 +++++--- .../workflows/build-relocatable-packages.yml | 26 ++++++++++--------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 8b90088b2..458c93837 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -141,12 +141,12 @@ The GitHub Actions workflow performs minimal platform-specific operations: 2. **Set Environment Variables** from workflow inputs or defaults 3. **Execute Build Script** - `./build_packages_local.sh` handles everything 4. **Verify Packages** - Platform-specific verification (dpkg-deb or rpm -q) -5. **Upload to S3** (when repo is `ROCm/ROCmValidationSuite`) – Each job uploads its packages to S3 using OIDC. The bash routing logic determines the S3 path: `release/*` branch builds (push or manual) go to `release/`, scheduled/push/manual builds go to `nightly/`, and PR builds go to a ref-specific path. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped gracefully if `AWS_S3_BUCKET` is not set. +5. **Upload to S3** (when the repo is `ROCm/ROCmValidationSuite`, or when repository variable `RVS_S3_UPLOAD_ENABLED` is `true`) – Each job uploads its packages to S3 using OIDC. The bash routing logic determines the S3 path: `release/*` branch builds (push or manual) go to `release/`, scheduled/push/manual builds go to `nightly/`, and PR builds go to a ref-specific path. Requires `AWS_S3_BUCKET` (variable) and `AWS_ROLE_ARN` (secret). Skipped gracefully if `AWS_S3_BUCKET` is not set. 6. **Generate Repo Metadata** (schedule, push, and manual builds only) – Creates APT repo metadata (`Packages`, `Packages.gz`, `Release`) for DEB and YUM/DNF repodata (`repodata/`) for RPM, then uploads to S3 so the paths can be used as native package repositories. Skipped for PR builds since their packages go to one-off ref-specific paths. ### S3 Upload (OIDC – No Stored Credentials) -S3 upload runs **only when** the repository is **`ROCm/ROCmValidationSuite`** (the `if` guard prevents forks from attempting credential setup). The upload step itself is always reached, but exits gracefully if `AWS_S3_BUCKET` is not set. Uses **AWS OIDC**; no long-term access key or secret. The bash routing inside the upload step determines the S3 destination based on the event type and branch. +S3 upload runs when the repository is **`ROCm/ROCmValidationSuite`** **or** when **`RVS_S3_UPLOAD_ENABLED`** is set to the literal string **`true`** (for forks, mirrors, or other org repositories that opt in after IAM trust is updated). Fork PRs from other repositories are still skipped (no OIDC for cross-repo PR heads). The upload step is reached when those guards pass, but exits gracefully if `AWS_S3_BUCKET` is not set. Uses **AWS OIDC**; no long-term access key or secret. The bash routing inside the upload step determines the S3 destination based on the event type and branch. **Where `vars` and `secrets` are defined** @@ -165,6 +165,7 @@ The workflow uses GitHub repository variables to control which runners execute e | `RUNNER_LABEL` | `ubuntu-22.04` | Ubuntu build job | | `RUNNER_LABEL_CONTAINER` | `ubuntu-latest` | CentOS/manylinux build job (container) | | `RUNNER_LABEL_UTILITY` | `ubuntu-latest` | Release summary job | +| `RVS_S3_UPLOAD_ENABLED` | _(unset)_ | Set to `true` to run S3/OIDC upload steps when the repo is not `ROCm/ROCmValidationSuite`. Requires `AWS_S3_BUCKET`, `AWS_ROLE_ARN`, and IAM trust for this repository. | To use a self-hosted runner, set the variable to your runner's label (e.g., `self-hosted` or a custom label) in **Settings** → **Secrets and variables** → **Actions** → **Variables**. @@ -178,7 +179,11 @@ To use a self-hosted runner, set the variable to your runner's label (e.g., `sel - Name: `AWS_S3_BUCKET` - Value: your S3 bucket name (e.g. `my-rocm-packages`). -3. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. +3. **Repository variable** (only if the repo is **not** `ROCm/ROCmValidationSuite` and you want S3 upload from this repo): + - Name: `RVS_S3_UPLOAD_ENABLED` + - Value: `true` (must be this exact string). Upstream does not need this variable. + +4. **AWS IAM**: The role in `AWS_ROLE_ARN` must have a trust policy allowing GitHub OIDC to assume it for the **repository that runs the workflow** (identity provider `token.actions.githubusercontent.com`, audience `sts.amazonaws.com`) and permissions to `s3:PutObject` (and related) on the bucket. **S3 path layout** (resolved by [`.github/scripts/rvs-s3-upload-route.sh`](../scripts/rvs-s3-upload-route.sh), POSIX-safe for Ubuntu `sh`): diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 18262699c..8a72be0d1 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -48,6 +48,8 @@ env: # Optional local package server upload (Step 6 of build_packages_local.sh). # Disabled by default. To enable, set repo Actions variable # LOCAL_PACKAGE_SERVER_URL to a reachable HTTP server that accepts PUT. + # S3 upload steps also run when repository variable RVS_S3_UPLOAD_ENABLED is the string 'true' + # (in addition to the upstream ROCm/ROCmValidationSuite repo). See README_BUILD_PACKAGES.md. jobs: prepare-nightly-branches: @@ -280,13 +282,13 @@ jobs: echo "Package filename: $DEB_FILE" fi - # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs: OIDC token response is empty → JSON parse fails) + # S3 upload: upstream repo, or any repo with vars.RVS_S3_UPLOAD_ENABLED == 'true' (skip fork PRs: OIDC empty → JSON parse fails) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: apt-get update && apt-get install -y awscli - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -307,7 +309,7 @@ jobs: # S3 routing: POSIX script (ubuntu:22.04 container uses sh — no bash [[). - name: Upload Ubuntu packages to S3 id: upload-s3-ubuntu - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: sh .github/scripts/rvs-s3-upload-route.sh upload-deb env: AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} @@ -315,9 +317,9 @@ jobs: # Generate APT repo metadata (Packages, Packages.gz, Release) so the S3 path # can be consumed directly as a DEB repository by apt. - # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. + # Only runs when S3 upload is allowed (upstream or RVS_S3_UPLOAD_ENABLED) and the event is schedule, push, or manual. - name: Generate and upload DEB repo metadata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 @@ -448,14 +450,14 @@ jobs: echo "Package filename: $RPM_FILE" fi - # S3 upload for ROCm/ROCmValidationSuite only (skip fork PRs — OIDC not usable) + # S3 upload: upstream repo, or RVS_S3_UPLOAD_ENABLED (skip fork PRs — OIDC not usable) - name: Install AWS CLI - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | python3 -m pip install --break-system-packages awscli || (yum install -y python3-pip && pip3 install awscli) - name: Configure AWS credentials - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: | TOKEN=$(curl -s -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | python3 -c "import sys,json; print(json.load(sys.stdin)['value'])") @@ -475,7 +477,7 @@ jobs: - name: Upload CentOS/RHEL packages to S3 id: upload-s3-centos - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.skip_upload != true run: sh .github/scripts/rvs-s3-upload-route.sh upload-rpm-tar env: AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} @@ -483,9 +485,9 @@ jobs: # Generate YUM/DNF repo metadata (repodata/) so the S3 path can be consumed # directly as an RPM repository by yum/dnf. - # Only runs when the repository is ROCm/ROCmValidationSuite and the event is schedule, push, or manual. + # Only runs when S3 upload is allowed (upstream or RVS_S3_UPLOAD_ENABLED) and the event is schedule, push, or manual. - name: Generate and upload RPM repodata to S3 - if: github.repository == 'ROCm/ROCmValidationSuite' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) + if: (github.repository == 'ROCm/ROCmValidationSuite' || vars.RVS_S3_UPLOAD_ENABLED == 'true') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.skip_upload != true && (github.event_name != 'schedule' || matrix.is_default == true) run: | BUCKET="${{ vars.AWS_S3_BUCKET }}" [ -z "$BUCKET" ] && exit 0 From 600761270a6eeac4cb34d6b28d0b2950b1dc0bea Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 15 Jun 2026 12:23:21 -0700 Subject: [PATCH 199/275] fix typo on amdrocm-runtime actual name of ROCm runtime package is amdrocm-runtime --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37572b727..2265d34be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,8 +322,8 @@ set(CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>") # Package dependencies: support both legacy (ROCm <=6.x) and new amdrocm-* naming (TheRock/ROCm 8.x per RFC0009) # DEB uses "old | new" OR syntax, RPM uses "(old or new)" boolean dependency syntax # rocm-llvm: ROCm LLVM (includes libomp used by HIP/RVS); pull OpenMP runtime from the ROCm stack, not host libgomp. -set(ROCM_DEB_DEPS "hip-runtime-amd | amdrocm-runtimes, comgr | amdrocm-runtimes, hsa-rocr | amdrocm-runtimes, rocblas | amdrocm-blas, amd-smi-lib | amdrocm-amdsmi, hiprand | amdrocm-rand, hipblaslt | amdrocm-blas, rocm-llvm | amdrocm-llvm") -set(ROCM_RPM_DEPS "(hip-runtime-amd or amdrocm-runtimes), (comgr or amdrocm-runtimes), (hsa-rocr or amdrocm-runtimes), (rocblas or amdrocm-blas), (amd-smi-lib or amdrocm-amdsmi), (hiprand or amdrocm-rand), (hipblaslt or amdrocm-blas), (rocm-llvm or amdrocm-llvm)") +set(ROCM_DEB_DEPS "hip-runtime-amd | amdrocm-runtime, comgr | amdrocm-runtime, hsa-rocr | amdrocm-runtime, rocblas | amdrocm-blas, amd-smi-lib | amdrocm-amdsmi, hiprand | amdrocm-rand, hipblaslt | amdrocm-blas, rocm-llvm | amdrocm-llvm") +set(ROCM_RPM_DEPS "(hip-runtime-amd or amdrocm-runtime), (comgr or amdrocm-runtime), (hsa-rocr or amdrocm-runtime), (rocblas or amdrocm-blas), (amd-smi-lib or amdrocm-amdsmi), (hiprand or amdrocm-rand), (hipblaslt or amdrocm-blas), (rocm-llvm or amdrocm-llvm)") if(FETCH_ROCMPATH_FROM_ROCMCORE) set(ROCM_DEB_DEPS "${ROCM_DEB_DEPS}, ${ROCM_CORE} | amdrocm-base") set(ROCM_RPM_DEPS "${ROCM_RPM_DEPS}, (${ROCM_CORE} or amdrocm-base)") From eaa98326f802e0eef1a5fb9ab9fe70badafecf61 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 16 Jun 2026 13:20:26 +0530 Subject: [PATCH 200/275] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b1924ca..39272e225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,13 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added +- Test-level configurations for MI350P-450W and MI350P-600W . ## RVS 1.5.0 ### Added - Added the pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not intended for production use.)** -- Test-level configurations for MI350P-450W and MI350P-600W . - Added support for MI350X QPX mode. - Added support for the MXFP8 data type. - Added iterations-based GST hot run support. From 17fb3405007dad5106dff99a5ab80d79171eff4e Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 17 Jun 2026 20:00:33 -0400 Subject: [PATCH 201/275] changed the url to pick up the latest RVS image to test Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 22 +++++++++++----------- .github/workflows/rvs-nightly-tests.yml | 16 +++++++++------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 748326301..a53934bb6 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -1,8 +1,8 @@ # RVS Nightly Tests Workflow This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), -which picks up the **latest RVS tarball** from the index URL configured in -`vars.RVS_TARBALL_INDEX_URL` (e.g. `https://repo.amd.com/rocm/rvs/tarball/`) +which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL` if set, otherwise the default +[`https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/`](https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/)) once per day, copies it to a **configurable remote target node** over SSH, installs it there, and runs RVS level 4 on that node. @@ -19,7 +19,7 @@ schedule / workflow_run / manual │ ▼ detect-tarball [utility runner] - │ curl $RVS_TARBALL_INDEX_URL → pick newest amdrocm*-rvs-*.tar.gz + │ curl → pick newest amdrocm*-rvs-*.tar.gz (index = secret or CloudFront nightly default) ▼ prepare-test-context [utility runner] │ rvs_nightly_test.sh validate-config → paths + remote work dir @@ -95,7 +95,6 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | **Required** | Directory listing scraped for the latest tarball, e.g. `https://repo.amd.com/rocm/rvs/tarball/`. No fallback — the workflow fails fast if unset and no `tarball_url` input is supplied. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | | `RVS_TARGET_ROCM_PATH` | **Required** *(unless every run sets `target_rocm_path` input)* | Absolute path to the ROCm tarball install root on the target node — the directory that contains `bin/rocminfo`, `bin/amd-smi`, `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/`. The workflow doesn't assume any conventional path (no `/opt/rocm` default), since tarball installs land wherever you extracted them. | | `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | @@ -104,13 +103,14 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| +| `RVS_TARBALL_INDEX_URL` | optional | Directory listing URL scraped for the latest tarball (same `curl` + `grep` logic as before). **Default in workflow:** `https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/` when this secret is unset. Set the secret to override, e.g. `https://repo.amd.com/rocm/rvs/tarball/` for the AMD repo listing. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast on `schedule` if neither this secret nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | ## How the latest tarball is picked -The `detect` job does (with `$INDEX_URL` = `vars.RVS_TARBALL_INDEX_URL`): +The `detect` job does (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the workflow default CloudFront nightly URL): ```bash curl -sL "$INDEX_URL" \ @@ -266,7 +266,7 @@ if `$RVS_BIN` isn't executable after extraction. - `ssh`, `scp`, `ssh-keyscan`, and `curl` on `PATH`. - Network egress to: - - the host serving `vars.RVS_TARBALL_INDEX_URL` (typically port 443), + - the host serving the tarball index URL (typically port 443; default CloudFront nightly or `secrets.RVS_TARBALL_INDEX_URL`), - the target node (port 22 — or wherever its sshd listens, configurable in the SSH config block of the workflow). - The runner does **not** need a GPU, ROCm, or `sudo`. @@ -363,7 +363,7 @@ e.g.: | Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | -| Source URL | `$RVS_TARBALL_INDEX_URL/amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | +| Source URL | resolved tarball URL (default index: CloudFront nightly, unless secret `RVS_TARBALL_INDEX_URL` overrides) | | RVS version | `RVS 1.4.21.0-...` | | Overall result | **PASS** | @@ -446,8 +446,8 @@ Watch the Actions tab for: | Symptom | Likely cause | |---|---| -| `detect` job exits with `vars.RVS_TARBALL_INDEX_URL is not set` | The required variable is unset. Set it in the repo Variables (e.g. to `https://repo.amd.com/rocm/rvs/tarball/`), or pass `tarball_url` via `workflow_dispatch`. | -| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the URL in `vars.RVS_TARBALL_INDEX_URL` returns at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | +| `detect` job exits with "No tarball index URL…" (should not occur) | Report as a workflow bug; the YAML supplies a default index when the secret is unset. | +| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the default [`https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/`](https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/) is reachable, or set secret `RVS_TARBALL_INDEX_URL` to a listing that contains at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | | `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | | **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | | **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | @@ -478,7 +478,7 @@ There are three ways to point the workflow at a different node, in increasing or -f target_node="" \ -f target_rocm_path="" ``` -3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick these up unless an input overrides them. +3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` (and optionally `RVS_TARBALL_INDEX_URL`) and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick these up unless an input overrides them. The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` @@ -489,4 +489,4 @@ on **every** node you intend to point the workflow at. - [RVS source](../../README.md) - [`build-relocatable-packages.yml`](./build-relocatable-packages.yml) and [`README_BUILD_PACKAGES.md`](./README_BUILD_PACKAGES.md) — the upstream packaging pipeline that produces these tarballs - [GitHub Actions: scheduled events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) -- [GitHub Actions: encrypted secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) — for `RVS_TARGET_SSH_KEY` +- [GitHub Actions: encrypted secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) — for `RVS_TARGET_SSH_KEY`, `RVS_TARBALL_INDEX_URL`, etc. diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 7508342f7..9cc8b913f 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,8 +1,9 @@ name: RVS Nightly Tests -# Picks up the latest RVS tarball published at the index URL configured in -# vars.RVS_TARBALL_INDEX_URL, copies it to a configurable target node, installs -# it there, runs RVS level 4 on that node, and uploads a Markdown report + logs. +# Picks up the latest RVS tarball from the tarball index (secrets.RVS_TARBALL_INDEX_URL +# if set, otherwise https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/), copies it +# to a configurable target node, installs it there, runs RVS level 4 on that node, +# and uploads a Markdown report + logs. # # Orchestration lives in this workflow; install/test/report steps run via # rvs_nightly_test.sh (same pattern as build-relocatable-packages.yml + @@ -12,7 +13,7 @@ name: RVS Nightly Tests # Triggers # -------- -# - schedule: daily poll of vars.RVS_TARBALL_INDEX_URL +# - schedule: daily poll of tarball index (repo secret or CloudFront nightly default) # - workflow_dispatch: manual run with optional overrides # - workflow_run: after Build Relocatable Packages completes successfully @@ -26,7 +27,7 @@ on: workflow_dispatch: inputs: tarball_url: - description: 'Override tarball URL (default: latest from vars.RVS_TARBALL_INDEX_URL)' + description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL or CloudFront nightly)' required: false default: '' target_node: @@ -54,7 +55,8 @@ concurrency: cancel-in-progress: false env: - TARBALL_INDEX_URL: ${{ vars.RVS_TARBALL_INDEX_URL }} + # Default: public nightly tarball directory (override with repo Secret RVS_TARBALL_INDEX_URL, e.g. repo.amd.com listing). + TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL || 'https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/' }} jobs: detect-tarball: @@ -84,7 +86,7 @@ jobs: set -euo pipefail if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL:-}" ]; then - echo "::error::vars.RVS_TARBALL_INDEX_URL is not set; set it or pass workflow_dispatch.tarball_url" + echo "::error::No tarball index URL and no workflow_dispatch.tarball_url (unexpected — workflow should set a default index)." exit 1 fi From a9b35231b960d789324201cdf011fe865bee7c89 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 17 Jun 2026 20:10:07 -0400 Subject: [PATCH 202/275] removed the url name as it is internal link Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 16 +++++++--------- .github/workflows/rvs-nightly-tests.yml | 8 ++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index a53934bb6..9a238c20e 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -1,9 +1,7 @@ # RVS Nightly Tests Workflow This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), -which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL` if set, otherwise the default -[`https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/`](https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/)) -once per day, copies it to a **configurable remote target node** over SSH, +which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL` if set, otherwise the **built-in default index URL** in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) — see `env.TARBALL_INDEX_URL`), once per day, copies it to a **configurable remote target node** over SSH, installs it there, and runs RVS level 4 on that node. The GitHub Actions runner ("RVS Runner") is only an **orchestrator** — it @@ -19,7 +17,7 @@ schedule / workflow_run / manual │ ▼ detect-tarball [utility runner] - │ curl → pick newest amdrocm*-rvs-*.tar.gz (index = secret or CloudFront nightly default) + │ curl → pick newest amdrocm*-rvs-*.tar.gz (index = secret or workflow default) ▼ prepare-test-context [utility runner] │ rvs_nightly_test.sh validate-config → paths + remote work dir @@ -103,14 +101,14 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | optional | Directory listing URL scraped for the latest tarball (same `curl` + `grep` logic as before). **Default in workflow:** `https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/` when this secret is unset. Set the secret to override, e.g. `https://repo.amd.com/rocm/rvs/tarball/` for the AMD repo listing. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | +| `RVS_TARBALL_INDEX_URL` | optional | Directory listing URL scraped for the latest tarball (same `curl` + `grep` logic as before). When unset, the workflow uses the **default index URL** baked into `rvs-nightly-tests.yml` (`env.TARBALL_INDEX_URL`). Set this secret to point at another listing (for example your organization’s internal index). GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast on `schedule` if neither this secret nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | ## How the latest tarball is picked -The `detect` job does (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the workflow default CloudFront nightly URL): +The `detect` job does (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the default from the workflow `env.TARBALL_INDEX_URL` expression): ```bash curl -sL "$INDEX_URL" \ @@ -266,7 +264,7 @@ if `$RVS_BIN` isn't executable after extraction. - `ssh`, `scp`, `ssh-keyscan`, and `curl` on `PATH`. - Network egress to: - - the host serving the tarball index URL (typically port 443; default CloudFront nightly or `secrets.RVS_TARBALL_INDEX_URL`), + - the host serving the tarball index URL (typically HTTPS port 443; either `secrets.RVS_TARBALL_INDEX_URL` or the workflow’s built-in default), - the target node (port 22 — or wherever its sshd listens, configurable in the SSH config block of the workflow). - The runner does **not** need a GPU, ROCm, or `sudo`. @@ -363,7 +361,7 @@ e.g.: | Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | -| Source URL | resolved tarball URL (default index: CloudFront nightly, unless secret `RVS_TARBALL_INDEX_URL` overrides) | +| Source URL | resolved tarball URL (default index comes from the workflow unless secret `RVS_TARBALL_INDEX_URL` overrides) | | RVS version | `RVS 1.4.21.0-...` | | Overall result | **PASS** | @@ -447,7 +445,7 @@ Watch the Actions tab for: | Symptom | Likely cause | |---|---| | `detect` job exits with "No tarball index URL…" (should not occur) | Report as a workflow bug; the YAML supplies a default index when the secret is unset. | -| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Verify the default [`https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/`](https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/) is reachable, or set secret `RVS_TARBALL_INDEX_URL` to a listing that contains at least one `amdrocm*-rvs-*-Linux.tar.gz` link. | +| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Confirm network access to the index host, inspect the HTML listing for `amdrocm*-rvs-*-Linux.tar.gz` links, and/or set secret `RVS_TARBALL_INDEX_URL` to a valid listing URL. Compare with the fallback string in `env.TARBALL_INDEX_URL` in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) if you rely on the built-in default. | | `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | | **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | | **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 9cc8b913f..6d71c69fd 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,7 +1,7 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball from the tarball index (secrets.RVS_TARBALL_INDEX_URL -# if set, otherwise https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/), copies it +# if set, otherwise the fallback URL in env.TARBALL_INDEX_URL below), copies it # to a configurable target node, installs it there, runs RVS level 4 on that node, # and uploads a Markdown report + logs. # @@ -13,7 +13,7 @@ name: RVS Nightly Tests # Triggers # -------- -# - schedule: daily poll of tarball index (repo secret or CloudFront nightly default) +# - schedule: daily poll of tarball index (repo secret or workflow fallback URL) # - workflow_dispatch: manual run with optional overrides # - workflow_run: after Build Relocatable Packages completes successfully @@ -27,7 +27,7 @@ on: workflow_dispatch: inputs: tarball_url: - description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL or CloudFront nightly)' + description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL or workflow fallback)' required: false default: '' target_node: @@ -55,7 +55,7 @@ concurrency: cancel-in-progress: false env: - # Default: public nightly tarball directory (override with repo Secret RVS_TARBALL_INDEX_URL, e.g. repo.amd.com listing). + # Fallback index URL when secrets.RVS_TARBALL_INDEX_URL is unset (override via that secret). TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL || 'https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/' }} jobs: From 9a0bed53a8932cf82f72ee71d6668d0f2c6e3338 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Thu, 18 Jun 2026 14:08:46 -0400 Subject: [PATCH 203/275] changed the target node to orchestrator for downloading tarball Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 60 ++++++------ .github/workflows/rvs-nightly-tests.yml | 112 ++++++++++------------ rvs_nightly_test.sh | 5 +- 3 files changed, 86 insertions(+), 91 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 9a238c20e..a6429a7ca 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -16,17 +16,12 @@ at any GPU host without code changes. schedule / workflow_run / manual │ ▼ -detect-tarball [utility runner] - │ curl → pick newest amdrocm*-rvs-*.tar.gz (index = secret or workflow default) +install-rvs-on-target [self-hosted orchestrator] ──ssh──▶ [target GPU node] + │ resolve index + validate paths (orchestrator only) + │ setup-ssh → download .tar.gz on runner (curl never on target) → scp to target + │ verify-rocm → install-rvs → verify-rvs-binary (commands run on target via ssh) ▼ -prepare-test-context [utility runner] - │ rvs_nightly_test.sh validate-config → paths + remote work dir - ▼ -install-rvs-on-target [test runner] ──ssh──▶ [target GPU node] - │ rvs_nightly_test.sh: setup-ssh, verify-rocm, download, copy, - │ install-rvs, verify-rvs-binary - ▼ -run-rvs-level-4 [test runner] ──ssh──▶ [target GPU node] +run-rvs-level-4 [self-hosted orchestrator] ──ssh──▶ [target GPU node] │ rvs_nightly_test.sh: run-level4, collect-logs, capture-versions │ upload intermediate logs artifact; cleanup remote work dir ▼ @@ -93,9 +88,10 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| +| `RVS_NIGHTLY_INDEX_RUNNER_LABEL` | optional (defaults to `RVS_TEST_RUNNER_LABEL`) | Runner label for **install-rvs-on-target** (resolve + download + scp). Use a self-hosted pool with HTTPS egress to the tarball index and `.tar.gz` host. The GPU target never performs those downloads. If unset, `RVS_TEST_RUNNER_LABEL` (then `self-hosted`) is used. | | `RVS_REMOTE_WORK_DIR` | optional (default `/tmp/rvs-nightly-`) | Working dir on the target node. Cleared with `rm -rf` at the end of the job. | | `RVS_TARGET_ROCM_PATH` | **Required** *(unless every run sets `target_rocm_path` input)* | Absolute path to the ROCm tarball install root on the target node — the directory that contains `bin/rocminfo`, `bin/amd-smi`, `lib/`, `lib/llvm/lib/`, and `lib/rocm_sysdeps/lib/`. The workflow doesn't assume any conventional path (no `/opt/rocm` default), since tarball installs land wherever you extracted them. | -| `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label of the GitHub runner that orchestrates the workflow. The runner doesn't need a GPU or ROCm — it just needs `ssh`, `scp`, and `curl`. | +| `RVS_TEST_RUNNER_LABEL` | optional (default `self-hosted`) | Label for **run-rvs-level-4**. **install-rvs-on-target** uses `RVS_NIGHTLY_INDEX_RUNNER_LABEL` when set, otherwise this label — that job resolves the index, **downloads the tarball on the orchestrator**, and `scp`s it to the target (the target never curls the CDN). Requires `ssh`, `scp`, `curl`, and HTTPS egress to the tarball hosts. Does not need a GPU or ROCm. | **Secrets** (Settings → Secrets and variables → Actions → Secrets): @@ -108,7 +104,7 @@ gh workflow run rvs-nightly-tests.yml \ ## How the latest tarball is picked -The `detect` job does (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the default from the workflow `env.TARBALL_INDEX_URL` expression): +The **Resolve latest tarball URL** step at the start of **install-rvs-on-target** runs on the orchestrator (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the default from the workflow `env.TARBALL_INDEX_URL` expression): ```bash curl -sL "$INDEX_URL" \ @@ -133,7 +129,7 @@ directory under the chosen ROCm. The same workflow handles ROCm 6, 7, etc., and any version inside `7.x` without code changes: ```bash -# On the runner (Validate target node configuration step): +# On the orchestrator (Validate configuration step in install-rvs-on-target): # Parsed from $TARBALL_NAME via [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]] ROCM_MAJOR=7 # INSTALL_DIR is always /opt/rocm/extras-/ — it's where the RVS @@ -263,9 +259,10 @@ if `$RVS_BIN` isn't executable after extraction. **On the GitHub runner (orchestrator):** - `ssh`, `scp`, `ssh-keyscan`, and `curl` on `PATH`. -- Network egress to: - - the host serving the tarball index URL (typically HTTPS port 443; either `secrets.RVS_TARBALL_INDEX_URL` or the workflow’s built-in default), - - the target node (port 22 — or wherever its sshd listens, configurable in the SSH config block of the workflow). +- **install-rvs-on-target** runs on `vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL` or `vars.RVS_TEST_RUNNER_LABEL` (see Variables). On that runner only: `curl` resolves the latest tarball from the index, `curl` downloads the `.tar.gz` to `./pkg/`, then `scp` pushes it to the target. The GPU target never curls the index or CDN. +- Network egress from that orchestrator to: + - the tarball index and tarball file hosts (HTTPS port 443; from `secrets.RVS_TARBALL_INDEX_URL` / workflow default unless `workflow_dispatch.tarball_url` is set), + - the target node (SSH, typically port 22). - The runner does **not** need a GPU, ROCm, or `sudo`. **On the target node** (all enforced by the **Pre-flight ROCm checks** below — the workflow fails fast if any are missing): @@ -277,7 +274,7 @@ if `$RVS_BIN` isn't executable after extraction. ## Pre-flight ROCm checks -Before downloading or installing the tarball, the workflow runs **`Verify ROCm prerequisites on target node`** over SSH. It's deliberately minimal — two probes against the actual install at `$TARGET_ROCM_PATH`: +Before extracting the RVS tarball on the target, the workflow runs **`Verify ROCm prerequisites on target node`** over SSH. It's deliberately minimal — two probes against the actual install at `$TARGET_ROCM_PATH`: | Sub-check | Action on failure | Catches | |---|---|---| @@ -406,12 +403,14 @@ we do not duplicate host identity in our own script output. ## GitHub runner vs target node -The `test` job runs on `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}`, -but this runner only orchestrates — it doesn't need a GPU or ROCm. You can: +The **install-rvs-on-target** and **run-rvs-level-4** jobs use +`${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}` +and `${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }}` respectively so **index resolution, tarball download, and `scp`** +happen only on the orchestrator. The runner only orchestrates — it doesn't need a GPU or ROCm. You can: -- Reuse an existing self-hosted runner that already has SSH access to the lab. -- Use a small purpose-built orchestration runner (any Linux box with `ssh`/`scp`/`curl`). -- In principle, use a GitHub-hosted `ubuntu-latest` runner — but that requires the target node to be reachable from GitHub's hosted runner IPs, which usually isn't the case for lab hosts behind a VPN/bastion. +- Reuse an existing self-hosted runner that already has SSH access to the lab **and** HTTPS egress to the tarball hosts. +- Use a small purpose-built orchestration runner (any Linux box with `ssh`/`scp`/`curl` and outbound HTTPS). +- **GitHub-hosted `ubuntu-latest`** is not used for tarball resolution or download; those steps must run where lab egress allows. The **target node** is what needs the GPU, ROCm, and `NOPASSWD` sudo. It does **not** need to be a registered GitHub runner. @@ -431,22 +430,23 @@ gh workflow run rvs-nightly-tests.yml Watch the Actions tab for: -1. `detect` resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`). -2. `test` job picks up on your orchestrator runner. -3. **Validate target node configuration** prints `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` (SSH target host/user are **not** printed). -4. **Setup SSH key for target node** verifies SSH connectivity (no host identity printed to logs). +1. **install-rvs-on-target** resolves a tarball URL (`Latest tarball : amdrocm-rvs-…`) on the orchestrator only. +2. **Validate configuration** (same job) prints `Target ROCm path`, `Remote work dir`, and `Expected RVS binary` (SSH target host/user are **not** printed). +3. **Setup SSH for target node** verifies SSH connectivity (no host identity printed to logs). +4. **Download tarball on orchestrator** then **Copy tarball to target** — the `.tar.gz` is never fetched on the GPU node. 5. **Verify ROCm prerequisites on target node** prints `::notice::ROCm prerequisites OK on target node at `. 6. **Install RVS on target node** prints the detected `ROCM_MAJOR`, the chosen `Target ROCm path`, and `Installed RVS at: /extras-/bin/rvs`. 7. **Verify RVS binary library resolution on target node** prints `::notice::RVS binary's library dependencies resolved OK on target, all from `. -8. RVS level 4 step completes; the run summary shows the results table with the Level 4 row and overall PASS/FAIL. +8. **run-rvs-level-4** completes; the run summary shows the results table with the Level 4 row and overall PASS/FAIL. ## Debugging a failed run | Symptom | Likely cause | |---|---| -| `detect` job exits with "No tarball index URL…" (should not occur) | Report as a workflow bug; the YAML supplies a default index when the secret is unset. | -| `detect` job exits with "Could not resolve a tarball URL" | The index page returned no matches. Confirm network access to the index host, inspect the HTML listing for `amdrocm*-rvs-*-Linux.tar.gz` links, and/or set secret `RVS_TARBALL_INDEX_URL` to a valid listing URL. Compare with the fallback string in `env.TARBALL_INDEX_URL` in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) if you rely on the built-in default. | -| `test` job stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | +| **install-rvs-on-target** exits with "No tarball index URL…" (should not occur) | Report as a workflow bug; the YAML supplies a default index when the secret is unset. | +| **Resolve latest tarball URL** fails with "Could not resolve a tarball URL" | The index page returned no matches. Confirm network access from the orchestrator to the index host, inspect the HTML listing for `amdrocm*-rvs-*-Linux.tar.gz` links, and/or set secret `RVS_TARBALL_INDEX_URL` to a valid listing URL. Compare with the fallback string in `env.TARBALL_INDEX_URL` in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) if you rely on the built-in default. | +| **install-rvs-on-target** stuck "Queued" | No runner online for `vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL` or `vars.RVS_TEST_RUNNER_LABEL` (see Actions → Runners). That job performs index `curl`, tarball download, and `scp` to the target. | +| **run-rvs-level-4** stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | | **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | | **Setup SSH key for target node** fails: `secrets.RVS_TARGET_SSH_KEY is not set` | The required secret is missing. Add the private SSH key as a repo secret. | | **Setup SSH key for target node** fails: `Permission denied (publickey)` | The key in `RVS_TARGET_SSH_KEY` isn't authorized on the target node for `$TARGET_USER`, or the key format is wrong. Verify from a workstation with `ssh -i -o BatchMode=yes @ true` (use your real user, host, and key; exit code 0 means the key works). | diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 6d71c69fd..39b4b7b37 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -10,7 +10,10 @@ name: RVS Nightly Tests # build_packages_local.sh). # # Required repo configuration: see README_NIGHTLY_TESTS.md - +# +# Tarball index resolution, tarball download, and scp to the GPU target all run on +# the self-hosted orchestrator job below — the target never curls the index or CDN. +# # Triggers # -------- # - schedule: daily poll of tarball index (repo secret or workflow fallback URL) @@ -59,14 +62,26 @@ env: TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL || 'https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/' }} jobs: - detect-tarball: - name: Detect latest RVS tarball + install-rvs-on-target: + name: Install RVS on target node if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' - runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 120 outputs: - tarball_url: ${{ steps.resolve.outputs.tarball_url }} - tarball_name: ${{ steps.resolve.outputs.tarball_name }} + tarball_url: ${{ steps.resolve.outputs.tarball_url }} + tarball_name: ${{ steps.resolve.outputs.tarball_name }} + remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} + rocm_major: ${{ steps.prepare.outputs.rocm_major }} + install_dir: ${{ steps.prepare.outputs.install_dir }} + rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} + env: + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Restore last-seen marker (cron path) if: github.event_name == 'schedule' uses: actions/cache@v4 @@ -76,7 +91,7 @@ jobs: restore-keys: | rvs-nightly-tarball- - - name: Resolve latest tarball URL + - name: Resolve latest tarball URL (orchestrator only) id: resolve env: INDEX_URL: ${{ env.TARBALL_INDEX_URL }} @@ -129,35 +144,26 @@ jobs: echo "tarball_name=$NAME" } >> "$GITHUB_OUTPUT" + # Later steps in this job read TARBALL_URL / TARBALL_NAME (download-tarball, etc.) + { + echo "TARBALL_URL=$URL" + echo "TARBALL_NAME=$NAME" + } >> "$GITHUB_ENV" + echo "Latest tarball : $NAME" echo "URL : $URL" - - name: Save marker (cron path) + - name: Save last-seen marker (cron path) if: github.event_name == 'schedule' uses: actions/cache/save@v4 with: path: last_tarball_marker.txt key: rvs-nightly-tarball-${{ steps.resolve.outputs.tarball_name }} - prepare-test-context: - name: Prepare test run context - needs: detect-tarball - runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - outputs: - remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} - rocm_major: ${{ steps.prepare.outputs.rocm_major }} - install_dir: ${{ steps.prepare.outputs.install_dir }} - rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Validate configuration and derive paths id: prepare env: - TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} - TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} - TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} VAR_REMOTE_WORK_DIR: ${{ vars.RVS_REMOTE_WORK_DIR }} GITHUB_RUN_ID: ${{ github.run_id }} @@ -165,24 +171,14 @@ jobs: chmod +x rvs_nightly_test.sh ./rvs_nightly_test.sh validate-config - install-rvs-on-target: - name: Install RVS on target node - needs: [detect-tarball, prepare-test-context] - runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} - timeout-minutes: 120 - env: - TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} - TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} - TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} - TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} - TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} - REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} - ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} - INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} - RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 + - name: Export paths for remaining steps + run: | + { + echo "REMOTE_WORK_DIR=${{ steps.prepare.outputs.remote_work_dir }}" + echo "ROCM_MAJOR=${{ steps.prepare.outputs.rocm_major }}" + echo "INSTALL_DIR=${{ steps.prepare.outputs.install_dir }}" + echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" + } >> "$GITHUB_ENV" - name: Setup SSH for target node env: @@ -191,15 +187,15 @@ jobs: chmod +x rvs_nightly_test.sh ./rvs_nightly_test.sh setup-ssh - - name: Verify ROCm prerequisites on target node - run: ./rvs_nightly_test.sh verify-rocm - - - name: Download tarball on runner + - name: Download tarball on orchestrator runner run: ./rvs_nightly_test.sh download-tarball - name: Copy tarball to target node run: ./rvs_nightly_test.sh copy-to-target + - name: Verify ROCm prerequisites on target node + run: ./rvs_nightly_test.sh verify-rocm + - name: Install RVS on target node run: ./rvs_nightly_test.sh install-rvs @@ -212,7 +208,7 @@ jobs: run-rvs-level-4: name: Run RVS level 4 on target node - needs: [detect-tarball, prepare-test-context, install-rvs-on-target] + needs: [install-rvs-on-target] runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 180 outputs: @@ -222,15 +218,13 @@ jobs: rvs_version: ${{ steps.versions.outputs.rvs_version }} target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} env: - TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} - TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} - REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} - ROCM_MAJOR: ${{ needs.prepare-test-context.outputs.rocm_major }} - INSTALL_DIR: ${{ needs.prepare-test-context.outputs.install_dir }} - RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.install-rvs-on-target.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.install-rvs-on-target.outputs.install_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -272,9 +266,9 @@ jobs: create-test-report: name: Create Test Report - needs: [detect-tarball, prepare-test-context, run-rvs-level-4] + needs: [install-rvs-on-target, run-rvs-level-4] runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - if: always() && !cancelled() && needs.detect-tarball.result == 'success' && needs.run-rvs-level-4.result != 'skipped' + if: always() && !cancelled() && needs.install-rvs-on-target.result == 'success' && needs.run-rvs-level-4.result != 'skipped' steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -289,11 +283,11 @@ jobs: - name: Build test report id: report env: - TARBALL_URL: ${{ needs.detect-tarball.outputs.tarball_url }} - TARBALL_NAME: ${{ needs.detect-tarball.outputs.tarball_name }} + TARBALL_URL: ${{ needs.install-rvs-on-target.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.install-rvs-on-target.outputs.tarball_name }} TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} - REMOTE_WORK_DIR: ${{ needs.prepare-test-context.outputs.remote_work_dir }} - RVS_BIN: ${{ needs.prepare-test-context.outputs.rvs_bin }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} RVS_LEVEL4_RC: ${{ needs.run-rvs-level-4.outputs.rc }} RVS_LEVEL4_START: ${{ needs.run-rvs-level-4.outputs.start }} RVS_LEVEL4_END: ${{ needs.run-rvs-level-4.outputs.end }} diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index f97b1142a..e2a544a19 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -14,7 +14,7 @@ Commands (workflow order): validate-config Fail fast; emit prepare job outputs to GITHUB_OUTPUT setup-ssh Write SSH key/config under RUNNER_TEMP and verify connectivity verify-rocm Remote rocminfo + amd-smi on TARGET_ROCM_PATH - download-tarball curl tarball to ./pkg/ on the orchestrator runner + download-tarball curl tarball to ./pkg/ on the orchestrator runner only (never on SSH target) copy-to-target scp tarball to REMOTE_WORK_DIR/pkg on target install-rvs Extract tarball on target under INSTALL_DIR verify-rvs-binary Remote ldd check on RVS_BIN @@ -177,7 +177,8 @@ cmd_download_tarball() { require_env TARBALL_URL require_env TARBALL_NAME mkdir -p ./pkg - echo "Downloading: $TARBALL_URL" + echo "Downloading tarball on orchestrator runner (target node is not used for this fetch):" + echo " $TARBALL_URL" curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" ls -la ./pkg/ file "./pkg/${TARBALL_NAME}" || true From bc9dd96d9cab18a2abca2f94620a677b9157be1f Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Thu, 18 Jun 2026 16:25:23 -0400 Subject: [PATCH 204/275] fixed the grep extraction Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-tests.yml | 36 +++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 39b4b7b37..79fe1782e 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -94,26 +94,40 @@ jobs: - name: Resolve latest tarball URL (orchestrator only) id: resolve env: - INDEX_URL: ${{ env.TARBALL_INDEX_URL }} + # Do not set INDEX_URL here from ${{ env.* }} — it can be empty on some runners and + # masks workflow env. Use inherited TARBALL_INDEX_URL inside the script. INPUT_URL: ${{ inputs.tarball_url }} EVENT_NAME: ${{ github.event_name }} run: | set -euo pipefail - if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL:-}" ]; then - echo "::error::No tarball index URL and no workflow_dispatch.tarball_url (unexpected — workflow should set a default index)." + # Workflow-level env.TARBALL_INDEX_URL (secret override or YAML fallback). + INDEX_URL="${TARBALL_INDEX_URL:-}" + + if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL}" ]; then + echo "::error::No tarball index URL (set secret RVS_TARBALL_INDEX_URL or workflow env TARBALL_INDEX_URL) and no workflow_dispatch.tarball_url." exit 1 fi fetch_latest() { local idx="$1" - local html - html="$(curl -sL --max-time 30 "$idx" || true)" - echo "$html" \ - | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ - | sort -uV \ - | tail -n 1 \ - | awk -v p="${idx%/}" '{print p "/" $0}' + local html raw name + html="$(curl -sSL --max-time 60 --retry 2 --retry-delay 2 "$idx" 2>/dev/null || true)" + if [ -z "$html" ]; then + echo "::error::curl returned empty body for index URL (check orchestrator HTTPS egress and URL): ${idx}" >&2 + return 0 + fi + # grep exits 1 when there are no matches — must not trip pipefail before we check results. + raw="$(printf '%s' "$html" | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' 2>/dev/null || true)" + name="$(printf '%s\n' "$raw" | sort -uV | tail -n 1 || true)" + if [ -z "$name" ]; then + echo "::error::Index page contained no amdrocm*-rvs-*-Linux.tar.gz links (check listing format or regex). Index URL: ${idx}" >&2 + echo "::notice::First 800 chars of response (for debugging):" >&2 + printf '%.800s\n' "$html" >&2 || true + echo "" >&2 + return 0 + fi + printf '%s/%s\n' "${idx%/}" "$name" } if [ -n "${INPUT_URL:-}" ]; then @@ -123,7 +137,7 @@ jobs: fi if [ -z "${URL:-}" ]; then - echo "::error::Could not resolve a tarball URL from $INDEX_URL" + echo "::error::Could not resolve a tarball URL from index: ${INDEX_URL}" exit 1 fi From 93bdd0be7d9d653a0e2722af068ef9e802e00ed0 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 19 Jun 2026 14:01:23 -0400 Subject: [PATCH 205/275] TARBALL_URL was empty in the Create Test Report job, fixed it Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 1 + .github/workflows/rvs-nightly-tests.yml | 10 ++++++++-- rvs_nightly_test.sh | 11 +++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index a6429a7ca..56f0e9ba9 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -463,6 +463,7 @@ Watch the Actions tab for: | **Verify RVS binary library resolution on target node** fails with `not found` | A ROCm runtime library is missing or not in `RPATH` on the target. The step prints the `ldd` output; install the matching ROCm component (typically `rocm-llvm`, `rocm-core`, `hip-runtime-amd`). | | **Run RVS level 4 on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check `rvs_level_4.log` in the artifact for the specific error. | | **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | +| **Create Test Report** / **Build test report**: `Required environment variable TARBALL_URL is not set` | The install job’s `tarball_url` output was empty when passed into the report job (often URLs with `%`, `&`, or other characters that break the old `echo "tarball_url=$URL"` → `GITHUB_OUTPUT` form). The workflow now writes that URL with delimiter syntax; upgrade to current `rvs-nightly-tests.yml`. The report step also tolerates a missing URL and still writes `SUMMARY.md` with the tarball filename. | | Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually via `workflow_dispatch` to validate. | ## Retargeting at a different node diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 79fe1782e..0d182d107 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -153,14 +153,20 @@ jobs: fi echo "$NAME" > last_tarball_marker.txt + # Use heredoc delimiter syntax so URLs with %, &, query strings, etc. are not + # truncated or dropped when propagated to other jobs via job outputs. { - echo "tarball_url=$URL" + echo "tarball_url<> "$GITHUB_OUTPUT" # Later steps in this job read TARBALL_URL / TARBALL_NAME (download-tarball, etc.) { - echo "TARBALL_URL=$URL" + echo "TARBALL_URL<> "$GITHUB_ENV" diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index e2a544a19..6c3644b49 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -342,11 +342,18 @@ REMOTE cmd_build_report() { require_env TARBALL_NAME - require_env TARBALL_URL require_env TARGET_ROCM_PATH require_env REMOTE_WORK_DIR require_env RVS_BIN + # TARBALL_URL is optional: the report job reads it from install-rvs-on-target outputs. + # If that output was empty (e.g. legacy echo-to-GITHUB_OUTPUT with special URL chars), + # still emit SUMMARY.md with the tarball filename. + local tarball_url_display="${TARBALL_URL:-}" + if [ -z "$tarball_url_display" ]; then + tarball_url_display="_(unavailable — check install job resolve step / use heredoc GITHUB_OUTPUT for URLs with special characters)_" + fi + local rc4="${RVS_LEVEL4_RC:-0}" local start="${RVS_LEVEL4_START:-}" local end="${RVS_LEVEL4_END:-}" @@ -378,7 +385,7 @@ cmd_build_report() { echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${target_rocm_version}\`) |" echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" echo "| Tarball | \`${TARBALL_NAME}\` |" - echo "| Source URL | ${TARBALL_URL} |" + echo "| Source URL | ${tarball_url_display} |" echo "| RVS version | \`${rvs_version}\` |" echo "| Overall result | **${overall}** |" echo "" From 42dd4c1314363544e2aaf8987531c4adcdf090df Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 19 Jun 2026 18:26:58 -0400 Subject: [PATCH 206/275] Added new workflow for PR tests, removed any trace of internal link from nightly workflow Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 16 +- .github/workflows/README_PR_TESTS.md | 68 +++ .github/workflows/rvs-nightly-tests.yml | 14 +- .github/workflows/rvs-pr-tests.yml | 318 ++++++++++ rvs_pr_test.sh | 685 ++++++++++++++++++++++ 5 files changed, 1086 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/README_PR_TESTS.md create mode 100644 .github/workflows/rvs-pr-tests.yml create mode 100755 rvs_pr_test.sh diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 56f0e9ba9..a8a80b289 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -1,7 +1,7 @@ # RVS Nightly Tests Workflow This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), -which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL` if set, otherwise the **built-in default index URL** in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) — see `env.TARBALL_INDEX_URL`), once per day, copies it to a **configurable remote target node** over SSH, +which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL`, passed through workflow `env.TARBALL_INDEX_URL` — **no default URL in the repo**), once per day, copies it to a **configurable remote target node** over SSH, installs it there, and runs RVS level 4 on that node. The GitHub Actions runner ("RVS Runner") is only an **orchestrator** — it @@ -68,7 +68,7 @@ gh workflow run rvs-nightly-tests.yml \ -f target_user="" ``` -Example — keep the default tarball but run on a different host today: +Example — resolve from your index secret (typical manual run; ensure `RVS_TARBALL_INDEX_URL` is set for scheduled runs): ```bash gh workflow run rvs-nightly-tests.yml -f target_node="" @@ -97,14 +97,14 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | optional | Directory listing URL scraped for the latest tarball (same `curl` + `grep` logic as before). When unset, the workflow uses the **default index URL** baked into `rvs-nightly-tests.yml` (`env.TARBALL_INDEX_URL`). Set this secret to point at another listing (for example your organization’s internal index). GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | +| `RVS_TARBALL_INDEX_URL` | **Required** *(unless every run that needs an index provides `workflow_dispatch` `tarball_url`; `schedule` and `workflow_run` need this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` (e.g. `https:///nightly/rvs/tar/`). Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast on `schedule` if neither this secret nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | ## How the latest tarball is picked -The **Resolve latest tarball URL** step at the start of **install-rvs-on-target** runs on the orchestrator (with `$INDEX_URL` = `secrets.RVS_TARBALL_INDEX_URL` if set, else the default from the workflow `env.TARBALL_INDEX_URL` expression): +The **Resolve latest tarball URL** step at the start of **install-rvs-on-target** runs on the orchestrator with `$INDEX_URL` = `TARBALL_INDEX_URL` from the workflow env (set from `secrets.RVS_TARBALL_INDEX_URL`), unless `workflow_dispatch.tarball_url` is set: ```bash curl -sL "$INDEX_URL" \ @@ -261,7 +261,7 @@ if `$RVS_BIN` isn't executable after extraction. - `ssh`, `scp`, `ssh-keyscan`, and `curl` on `PATH`. - **install-rvs-on-target** runs on `vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL` or `vars.RVS_TEST_RUNNER_LABEL` (see Variables). On that runner only: `curl` resolves the latest tarball from the index, `curl` downloads the `.tar.gz` to `./pkg/`, then `scp` pushes it to the target. The GPU target never curls the index or CDN. - Network egress from that orchestrator to: - - the tarball index and tarball file hosts (HTTPS port 443; from `secrets.RVS_TARBALL_INDEX_URL` / workflow default unless `workflow_dispatch.tarball_url` is set), + - the tarball index and tarball file hosts (HTTPS port 443; from `secrets.RVS_TARBALL_INDEX_URL` via workflow `env.TARBALL_INDEX_URL` unless `workflow_dispatch.tarball_url` is set), - the target node (SSH, typically port 22). - The runner does **not** need a GPU, ROCm, or `sudo`. @@ -358,7 +358,7 @@ e.g.: | Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | -| Source URL | resolved tarball URL (default index comes from the workflow unless secret `RVS_TARBALL_INDEX_URL` overrides) | +| Source URL | resolved tarball URL (from `workflow_dispatch.tarball_url` or index at `secrets.RVS_TARBALL_INDEX_URL`) | | RVS version | `RVS 1.4.21.0-...` | | Overall result | **PASS** | @@ -443,8 +443,8 @@ Watch the Actions tab for: | Symptom | Likely cause | |---|---| -| **install-rvs-on-target** exits with "No tarball index URL…" (should not occur) | Report as a workflow bug; the YAML supplies a default index when the secret is unset. | -| **Resolve latest tarball URL** fails with "Could not resolve a tarball URL" | The index page returned no matches. Confirm network access from the orchestrator to the index host, inspect the HTML listing for `amdrocm*-rvs-*-Linux.tar.gz` links, and/or set secret `RVS_TARBALL_INDEX_URL` to a valid listing URL. Compare with the fallback string in `env.TARBALL_INDEX_URL` in [`rvs-nightly-tests.yml`](./rvs-nightly-tests.yml) if you rely on the built-in default. | +| **install-rvs-on-target** exits with "No tarball index URL…" | `RVS_TARBALL_INDEX_URL` is unset and `workflow_dispatch.tarball_url` was not provided. Set the secret to your HTTPS directory index (e.g. `https:///nightly/rvs/tar/`) or pass `tarball_url` for that run. | +| **Resolve latest tarball URL** fails with "Could not resolve a tarball URL" | The index page returned no matches. Confirm network access from the orchestrator to the index host, inspect the HTML listing for `amdrocm*-rvs-*-Linux.tar.gz` links, and/or set secret `RVS_TARBALL_INDEX_URL` to a valid listing URL. | | **install-rvs-on-target** stuck "Queued" | No runner online for `vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL` or `vars.RVS_TEST_RUNNER_LABEL` (see Actions → Runners). That job performs index `curl`, tarball download, and `scp` to the target. | | **run-rvs-level-4** stuck "Queued" | No orchestrator runner online with the label in `vars.RVS_TEST_RUNNER_LABEL`. | | **Validate target node configuration** fails: `No target node configured` | Neither `inputs.target_node` nor `secrets.RVS_TARGET_NODE` is set. Add the secret in Settings → Secrets and variables → Actions → Secrets, or pass `target_node` via `workflow_dispatch`. | diff --git a/.github/workflows/README_PR_TESTS.md b/.github/workflows/README_PR_TESTS.md new file mode 100644 index 000000000..600d645b0 --- /dev/null +++ b/.github/workflows/README_PR_TESTS.md @@ -0,0 +1,68 @@ +# RVS PR Tests Workflow + +This document describes [`.github/workflows/rvs-pr-tests.yml`](./rvs-pr-tests.yml). It mirrors [RVS Nightly Tests](./README_NIGHTLY_TESTS.md) **orchestration** (self-hosted runner resolves the artifact, `curl` + `scp` to the GPU target, SSH-driven install, `rvs -r 4`, Markdown report) but targets the **Linux relocatable tarball** (`amdrocm*-rvs-*-Linux.tar.gz`) — the **same artifact type as nightly** — not the Ubuntu `.deb` by default. A **direct `.deb` URL** in the secret or `package_url` is still supported. + +- **Resolve** ([`rvs_pr_test.sh resolve-package-url`](../../rvs_pr_test.sh)): from an HTTPS **listing root that ends at `/rvs`** (with or without a trailing slash), walks the index and picks the latest **`merge//…/…-Linux.tar.gz`**; or uses a **direct HTTPS URL** to that `.tar.gz` (or a `.deb`). Probes the URL with `curl` before install. +- **Scheduled** runs **poll hourly (UTC)**. A **detect** job compares an **artifact key** to an **Actions cache** marker; if unchanged, install and tests are **skipped**. After **successful** level 4, a **save** job updates the marker. **Manual** runs always execute the full pipeline (marker not updated for schedule logic). +- Triggers on **`schedule`** and **`workflow_dispatch` only** — not on **Build Relocatable Packages**. + +Install logic is in [`rvs_pr_test.sh`](../../rvs_pr_test.sh): **`.tar.gz`** → `tar -xzf` under `/opt/rocm/extras-/` (same as nightly); **`.deb`** → `dpkg` path. + +## How “latest” is chosen (`resolve-package-url`) + +**Directory root** (HTTPS index for `https:///rvs` or `https:///rvs/` — same behavior): + +1. Largest numeric **build** directory under the root. +2. **`merge/`** → largest numeric **PR** directory. +3. Under that PR, a subdirectory listing **`amdrocm*-rvs-*-Linux.tar.gz`** (prefers **`manylinux_*`**). +4. Version-sort tarball names → **full HTTPS URL** to that file. + +**Direct URL**: if the configured value is already a `*-Linux.tar.gz` (or other `*.tar.gz` accepted by validation) or a **`.deb`**, that URL is used as-is. + +## Triggers + +| Trigger | When | Behavior | +|---|---|---| +| `schedule` | `0 * * * *` UTC (hourly) | Detect new artifact key vs cache → optionally full install + level 4 + report; save marker after **successful** level 4. | +| `workflow_dispatch` | Manual | Always run full pipeline. | + +## Repository configuration + +Use the same **secrets** and **variables** as nightly for SSH and ROCm (`RVS_TARGET_NODE`, `RVS_TARGET_USER`, `RVS_TARGET_SSH_KEY`, `RVS_TARGET_ROCM_PATH`, runner labels, etc.). See [README_NIGHTLY_TESTS.md](./README_NIGHTLY_TESTS.md#repository-configuration). + +**PR package URL secrets** (parallel idea to nightly’s tarball index secret): + +| Name | Kind | Purpose | +|---|---|---| +| `RVS_PR_DEB_PACKAGE_URL` | Secret | **Preferred.** HTTPS **index root through `/rvs/`** only (e.g. `https:///rvs/` — no build/merge path; trailing `/` optional), **or** a **direct** `*-Linux.tar.gz` URL, **or** a **`.deb`** URL. Used when `package_url` is empty. | +| `RVS_PR_PACKAGE_URL` | Secret | Legacy alias if `RVS_PR_DEB_PACKAGE_URL` is unset. | + +## Manual run + +```bash +gh workflow run rvs-pr-tests.yml +``` + +Examples — set your real values in secrets or `-f package_url`: + +**Index root only** (resolver follows `rvs//merge//…/*.tar.gz`): + +```bash +gh workflow run rvs-pr-tests.yml \ + -f package_url="https:///rvs/" \ + -f target_node="" +``` + +**Direct tarball URL**: + +```bash +gh workflow run rvs-pr-tests.yml \ + -f package_url="https:////amdrocm7-rvs-…-Linux.tar.gz" \ + -f target_node="" +``` + +Artifacts: `rvs-pr-logs-`, `rvs-pr-report-`. + +## Target prerequisites + +Same as nightly: for **tarball** installs, target layout matches **relocatable RVS** under `/opt/rocm/extras-/`; **`sudo -n`** if `/opt` is not user-writable. For **`.deb`**, passwordless **`sudo`** for `dpkg` / `apt-get`. ROCm at **`RVS_TARGET_ROCM_PATH`**. Orchestrator needs HTTPS egress to your CDN and SSH/SCP to the target. diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 0d182d107..47c032f81 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -1,7 +1,7 @@ name: RVS Nightly Tests # Picks up the latest RVS tarball from the tarball index (secrets.RVS_TARBALL_INDEX_URL -# if set, otherwise the fallback URL in env.TARBALL_INDEX_URL below), copies it +# into env.TARBALL_INDEX_URL below — no baked-in default URL), copies it # to a configurable target node, installs it there, runs RVS level 4 on that node, # and uploads a Markdown report + logs. # @@ -16,7 +16,7 @@ name: RVS Nightly Tests # # Triggers # -------- -# - schedule: daily poll of tarball index (repo secret or workflow fallback URL) +# - schedule: daily poll of tarball index (repo secret RVS_TARBALL_INDEX_URL, or workflow_dispatch tarball_url) # - workflow_dispatch: manual run with optional overrides # - workflow_run: after Build Relocatable Packages completes successfully @@ -30,7 +30,7 @@ on: workflow_dispatch: inputs: tarball_url: - description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL or workflow fallback)' + description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL)' required: false default: '' target_node: @@ -58,8 +58,8 @@ concurrency: cancel-in-progress: false env: - # Fallback index URL when secrets.RVS_TARBALL_INDEX_URL is unset (override via that secret). - TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL || 'https://d22tya8uodfbu6.cloudfront.net/nightly/rvs/tar/' }} + # HTTPS directory listing for nightly tarballs — set repo secret RVS_TARBALL_INDEX_URL (e.g. https:///nightly/rvs/tar/). + TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} jobs: install-rvs-on-target: @@ -101,11 +101,11 @@ jobs: run: | set -euo pipefail - # Workflow-level env.TARBALL_INDEX_URL (secret override or YAML fallback). + # Workflow-level env.TARBALL_INDEX_URL (from secret RVS_TARBALL_INDEX_URL). INDEX_URL="${TARBALL_INDEX_URL:-}" if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL}" ]; then - echo "::error::No tarball index URL (set secret RVS_TARBALL_INDEX_URL or workflow env TARBALL_INDEX_URL) and no workflow_dispatch.tarball_url." + echo "::error::No tarball index URL (set Actions secret RVS_TARBALL_INDEX_URL) and no workflow_dispatch.tarball_url." exit 1 fi diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml new file mode 100644 index 000000000..515d93dbd --- /dev/null +++ b/.github/workflows/rvs-pr-tests.yml @@ -0,0 +1,318 @@ +name: RVS PR Tests + +# Same orchestration pattern as rvs-nightly-tests.yml: package URL from +# secrets.RVS_PR_DEB_PACKAGE_URL (or legacy secrets.RVS_PR_PACKAGE_URL) into env.PR_DEB_PACKAGE_URL +# (no baked-in default URL in this repo). Resolves the Linux relocatable tarball (*.tar.gz) +# from an HTTPS index root ending in /rvs (with or without trailing slash), or accepts a +# direct tarball / .deb URL (see rvs_pr_test.sh resolve-package-url). +# Then copy to a configurable target over SSH, extract or dpkg install, run RVS level 4, report. +# Scheduled runs poll the CDN root from secrets on a cron; if the resolved artifact +# key (build/pr/tgz) changed since the last successful test, install + level 4 run. +# Manual workflow_dispatch always runs tests. See README_PR_TESTS.md. +# +# Required repo configuration: see README_PR_TESTS.md (same secrets/vars as nightly +# for SSH and ROCm path). + +on: + schedule: + # Poll hourly (UTC) for a new PR package on the CDN root configured in secrets. + - cron: '0 * * * *' + workflow_dispatch: + inputs: + package_url: + description: 'Optional override: HTTPS …/rvs/ index root (e.g. https://host/rvs/), direct *-Linux.tar.gz URL, or .deb URL (empty → secrets RVS_PR_DEB_PACKAGE_URL / RVS_PR_PACKAGE_URL; required for schedule if unset)' + required: false + default: '' + target_node: + description: 'Hostname/IP of node to install RVS on and run tests (default: secrets.RVS_TARGET_NODE)' + required: false + default: '' + target_user: + description: 'SSH user on the target node (default: secrets.RVS_TARGET_USER)' + required: false + default: '' + remote_work_dir: + description: 'Working dir on the target node (default: vars.RVS_REMOTE_WORK_DIR or /tmp/rvs-pr-)' + required: false + default: '' + target_rocm_path: + description: 'ROCm tarball install root on the target node (default: vars.RVS_TARGET_ROCM_PATH)' + required: false + default: '' + +permissions: + contents: read + +concurrency: + group: rvs-pr-${{ github.workflow }} + cancel-in-progress: false + +env: + # Set secrets to your HTTPS …/rvs listing root (no deeper path required), a direct *-Linux.tar.gz URL, or a .deb URL. + PR_DEB_PACKAGE_URL: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL || '' }} + +jobs: + detect-new-artifact: + name: Detect new PR package on CDN + runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + outputs: + proceed: ${{ steps.decide.outputs.proceed }} + artifact_key: ${{ steps.decide.outputs.artifact_key }} + env: + PR_PACKAGE_ROOT_URL: ${{ inputs.package_url || env.PR_DEB_PACKAGE_URL }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Restore last artifact key (scheduled poll only) + if: github.event_name == 'schedule' + id: restore_marker + continue-on-error: true + uses: actions/cache/restore@v4 + with: + path: rvs_pr_last_artifact_key.txt + key: rvs-pr-artifact-${{ github.run_id }} + restore-keys: | + rvs-pr-artifact- + + - name: Decide whether to run tests + id: decide + run: | + chmod +x rvs_pr_test.sh + if [ -z "${PR_PACKAGE_ROOT_URL:-}" ]; then + echo "::error::PR_PACKAGE_ROOT_URL is empty. Set Actions secret RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) to your HTTPS …/rvs index root, a direct *-Linux.tar.gz URL, or a .deb URL, or pass workflow_dispatch input package_url." + exit 1 + fi + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "proceed=true" >> "$GITHUB_OUTPUT" + { + echo "artifact_key<> "$GITHUB_OUTPUT" + echo "::notice::Manual run — always executing tests." + exit 0 + fi + NEW="$(./rvs_pr_test.sh peek-latest-artifact-key)" + OLD="$(tr -d '\n' < rvs_pr_last_artifact_key.txt 2>/dev/null || true)" + { + echo "artifact_key<> "$GITHUB_OUTPUT" + if [ "$NEW" = "$OLD" ] && [ -n "$OLD" ]; then + echo "proceed=false" >> "$GITHUB_OUTPUT" + echo "::notice::CDN artifact unchanged (${NEW}); skipping install and tests." + else + echo "proceed=true" >> "$GITHUB_OUTPUT" + echo "::notice::New or first-seen artifact key: ${NEW} (previous: ${OLD:-})" + fi + + install-rvs-on-target: + name: Install RVS on target node + needs: [detect-new-artifact] + if: needs.detect-new-artifact.outputs.proceed == 'true' + runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 120 + outputs: + tarball_url: ${{ steps.resolve.outputs.tarball_url }} + tarball_name: ${{ steps.resolve.outputs.tarball_name }} + remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} + rocm_major: ${{ steps.prepare.outputs.rocm_major }} + install_dir: ${{ steps.prepare.outputs.install_dir }} + rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} + env: + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + PR_PACKAGE_ROOT_URL: ${{ inputs.package_url || env.PR_DEB_PACKAGE_URL }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Resolve package URL (Linux tarball or .deb) + id: resolve + run: | + chmod +x rvs_pr_test.sh + if [ -z "${PR_PACKAGE_ROOT_URL:-}" ]; then + echo "::error::PR_PACKAGE_ROOT_URL is empty. Set Actions secret RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) to your HTTPS …/rvs index root, a direct *-Linux.tar.gz URL, or a .deb URL, or pass workflow_dispatch input package_url." + exit 1 + fi + ./rvs_pr_test.sh resolve-package-url + + - name: Validate configuration and derive paths + id: prepare + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} + INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} + VAR_REMOTE_WORK_DIR: ${{ vars.RVS_REMOTE_WORK_DIR }} + GITHUB_RUN_ID: ${{ github.run_id }} + run: | + chmod +x rvs_pr_test.sh + ./rvs_pr_test.sh validate-config + + - name: Export paths for remaining steps + run: | + { + echo "REMOTE_WORK_DIR=${{ steps.prepare.outputs.remote_work_dir }}" + echo "ROCM_MAJOR=${{ steps.prepare.outputs.rocm_major }}" + echo "INSTALL_DIR=${{ steps.prepare.outputs.install_dir }}" + echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" + } >> "$GITHUB_ENV" + + - name: Setup SSH for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} + run: | + chmod +x rvs_pr_test.sh + ./rvs_pr_test.sh setup-ssh + + - name: Download package on orchestrator runner + run: ./rvs_pr_test.sh download-tarball + + - name: Copy package to target node + run: ./rvs_pr_test.sh copy-to-target + + - name: Verify ROCm prerequisites on target node + run: ./rvs_pr_test.sh verify-rocm + + - name: Install RVS on target node + run: ./rvs_pr_test.sh install-rvs + + - name: Verify RVS binary library resolution on target node + run: ./rvs_pr_test.sh verify-rvs-binary + + - name: Cleanup local SSH state + if: always() + run: ./rvs_pr_test.sh cleanup-local-ssh + + run-rvs-level-4: + name: Run RVS level 4 on target node + needs: [install-rvs-on-target] + runs-on: ${{ vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 180 + outputs: + rc: ${{ steps.level4.outputs.rc }} + start: ${{ steps.level4.outputs.start }} + end: ${{ steps.level4.outputs.end }} + rvs_version: ${{ steps.versions.outputs.rvs_version }} + target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} + env: + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.install-rvs-on-target.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.install-rvs-on-target.outputs.install_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup SSH for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} + run: | + chmod +x rvs_pr_test.sh + ./rvs_pr_test.sh setup-ssh + + - name: Run RVS level 4 on target node + id: level4 + run: ./rvs_pr_test.sh run-level4 + + - name: Collect logs from target node + if: always() + run: ./rvs_pr_test.sh collect-logs + + - name: Capture RVS and ROCm versions from target + id: versions + if: always() + run: ./rvs_pr_test.sh capture-versions + + - name: Upload test logs (intermediate) + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-pr-logs-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Cleanup remote work dir and local SSH state + if: always() + run: | + ./rvs_pr_test.sh cleanup-remote + ./rvs_pr_test.sh cleanup-local-ssh + + create-test-report: + name: Create Test Report + needs: [install-rvs-on-target, run-rvs-level-4] + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + if: always() && !cancelled() && needs.install-rvs-on-target.result == 'success' && needs.run-rvs-level-4.result != 'skipped' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Download test logs + uses: actions/download-artifact@v4 + with: + name: rvs-pr-logs-${{ github.run_id }} + path: ./reports + continue-on-error: true + + - name: Build test report + id: report + env: + TARBALL_URL: ${{ needs.install-rvs-on-target.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.install-rvs-on-target.outputs.tarball_name }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} + RVS_LEVEL4_RC: ${{ needs.run-rvs-level-4.outputs.rc }} + RVS_LEVEL4_START: ${{ needs.run-rvs-level-4.outputs.start }} + RVS_LEVEL4_END: ${{ needs.run-rvs-level-4.outputs.end }} + RVS_VERSION: ${{ needs.run-rvs-level-4.outputs.rvs_version }} + TARGET_ROCM_VERSION: ${{ needs.run-rvs-level-4.outputs.target_rocm_version }} + GITHUB_RUN_ID: ${{ github.run_id }} + GITHUB_SERVER_URL: ${{ github.server_url }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_EVENT_NAME: ${{ github.event_name }} + run: | + chmod +x rvs_pr_test.sh + mkdir -p ./reports + ./rvs_pr_test.sh build-report + + - name: Upload report and logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-pr-report-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Fail the workflow if level 4 failed + if: steps.report.outputs.overall == 'FAIL' || needs.run-rvs-level-4.result == 'failure' + run: | + echo "::error::RVS test failure — level4 rc=${{ needs.run-rvs-level-4.outputs.rc }}" + exit 1 + + save-pr-artifact-marker: + name: Save PR artifact marker after successful level 4 + needs: [detect-new-artifact, run-rvs-level-4] + if: github.event_name == 'schedule' && needs.detect-new-artifact.outputs.proceed == 'true' && needs.run-rvs-level-4.outputs.rc == '0' + runs-on: ubuntu-latest + steps: + - name: Write artifact key for next poll + env: + KEY: ${{ needs.detect-new-artifact.outputs.artifact_key }} + run: | + set -euo pipefail + printf '%s\n' "$KEY" > rvs_pr_last_artifact_key.txt + test -s rvs_pr_last_artifact_key.txt + + - name: Save artifact key to Actions cache + uses: actions/cache/save@v4 + with: + path: rvs_pr_last_artifact_key.txt + key: rvs-pr-artifact-${{ github.run_id }} diff --git a/rvs_pr_test.sh b/rvs_pr_test.sh new file mode 100755 index 000000000..8e3719fa7 --- /dev/null +++ b/rvs_pr_test.sh @@ -0,0 +1,685 @@ +#!/bin/bash +################################################################################ +# Remote RVS PR-package install + test driver (used by rvs-pr-tests.yml). +# Like rvs_nightly_test.sh but defaults to /tmp/rvs-pr-* staging; primary artifact +# is the amdrocm*-rvs-*-Linux.tar.gz relocatable tarball (optional .deb still supported). +################################################################################ + +set -euo pipefail + +usage() { + cat <<'EOF' +Usage: rvs_pr_test.sh + +Commands (workflow order): + resolve-package-url Discover latest Linux .tar.gz from rvs/ root, or a direct .tar.gz / .deb URL; + writes tarball_url + tarball_name to GITHUB_OUTPUT / GITHUB_ENV when set + peek-latest-artifact-key Print one-line artifact key (build/pr/tgz, tgz:basename, or deb:basename) for cache compare; stdout only + validate-config Fail fast; emit prepare job outputs to GITHUB_OUTPUT + setup-ssh Write SSH key/config under RUNNER_TEMP and verify connectivity + verify-rocm Remote rocminfo + amd-smi on TARGET_ROCM_PATH + download-tarball curl package (.deb or .tar.gz) to ./pkg/ on the orchestrator only + copy-to-target scp package to REMOTE_WORK_DIR/pkg on target + install-rvs Install .deb via dpkg on target, or extract .tar.gz under INSTALL_DIR + verify-rvs-binary Remote ldd check on RVS_BIN + run-level4 Run rvs -r 4; write rc/start/end to GITHUB_OUTPUT if set + collect-logs scp remote logs to ./reports/ + capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT + build-report Write ./reports/SUMMARY.md from env + prior outputs + cleanup-remote rm -rf REMOTE_WORK_DIR on target + cleanup-local-ssh Remove workflow-scoped key/config files +EOF +} + +require_env() { + local name="$1" + if [ -z "${!name:-}" ]; then + echo "::error::Required environment variable $name is not set" >&2 + exit 1 + fi +} + +ld_path_export() { + echo "${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib" +} + +# --- CDN rvs/ root → latest Linux tarball (orchestrator only; curl never on GPU target) --- + +cdn_curl_listing() { + local url="$1" + curl -sSL --max-time 120 --retry 2 --retry-delay 2 \ + -A 'Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)' "$url" 2>/dev/null || true +} + +# Largest purely-numeric directory name from an S3/CF HTML index (href="1234/"). +cdn_latest_numeric_dir() { + local html="$1" + printf '%s' "$html" | grep -oE 'href="[0-9]+/"' | sed 's/href="//;s/\/"//' | sort -n | tail -n 1 || true +} + +# First subdirectory (non-parent) containing an amdrocm*-rvs-*-Linux.tar.gz link; prefer manylinux_*. +cdn_find_tgz_listing_url() { + local pr_page_html="$1" + local pr_base="$2" + local line dir html pick + pick="" + while IFS= read -r line; do + dir="${line%/}" + [[ -z "$dir" || "$dir" == '..' ]] && continue + html="$(cdn_curl_listing "${pr_base}${dir}/")" + if ! printf '%s' "$html" | grep -qE 'amdrocm[0-9]+-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz'; then + continue + fi + if [[ "$dir" == manylinux* ]]; then + pick="$dir" + break + fi + if [ -z "$pick" ]; then + pick="$dir" + fi + done < <(printf '%s' "$pr_page_html" | grep -oE 'href="[^./][^"]*/"' | sed 's/href="//;s/"$//' | grep -v '^\.\./$' || true) + + if [ -z "$pick" ]; then + echo "" + return 0 + fi + printf '%s' "${pr_base}${pick}/" +} + +# Args: internal rvs root URL without trailing slash (not a direct .tar.gz / .deb file). +# Prints: buildprtgz_nametgz_https_url to stdout; errors to stderr; exit 1 on failure. +cdn_resolve_latest_merge_tgz_metadata() { + local root="$1" + local base="${root}/" + local idx html build merge_base merge_html pr pr_page tgz_url tgz_dir_html tgz_name + + idx="$(cdn_curl_listing "$base")" + if [ -z "$idx" ]; then + echo "::error::Empty listing from ${base} (check URL and orchestrator HTTPS egress)." >&2 + return 1 + fi + build="$(cdn_latest_numeric_dir "$idx")" + if [ -z "$build" ]; then + echo "::error::No numeric build directory under ${base}" >&2 + return 1 + fi + html="$(cdn_curl_listing "${base}${build}/")" + if ! printf '%s' "$html" | grep -q 'href="merge/"'; then + echo "::error::Build ${build} has no merge/ directory (expected rvs//merge/...)." >&2 + return 1 + fi + merge_base="${base}${build}/merge/" + merge_html="$(cdn_curl_listing "$merge_base")" + pr="$(cdn_latest_numeric_dir "$merge_html")" + if [ -z "$pr" ]; then + echo "::error::No numeric PR directory under ${merge_base}" >&2 + return 1 + fi + pr_page="$(cdn_curl_listing "${merge_base}${pr}/")" + tgz_url="$(cdn_find_tgz_listing_url "$pr_page" "${merge_base}${pr}/")" + if [ -z "$tgz_url" ]; then + echo "::error::No subdirectory under ${merge_base}${pr}/ listing amdrocm*-rvs-*-Linux.tar.gz." >&2 + return 1 + fi + tgz_dir_html="$(cdn_curl_listing "$tgz_url")" + tgz_name="$(printf '%s' "$tgz_dir_html" | grep -oE 'amdrocm[0-9]+-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' 2>/dev/null | sort -uV | tail -n 1 || true)" + if [ -z "$tgz_name" ]; then + echo "::error::Could not parse tarball filename under ${tgz_url}" >&2 + return 1 + fi + printf '%s\t%s\t%s\t%s' "$build" "$pr" "$tgz_name" "${tgz_url}${tgz_name}" +} + +cmd_peek_latest_artifact_key() { + local root="${PR_PACKAGE_ROOT_URL:-}" + if [ -z "$root" ]; then + root="${1:-}" + fi + if [ -z "${root:-}" ]; then + echo "::error::Set PR_PACKAGE_ROOT_URL (HTTPS …/rvs index root or direct .tar.gz / .deb URL)." >&2 + exit 1 + fi + root="${root%/}" + + if [[ "$root" == *.deb ]]; then + printf 'deb:%s\n' "$(basename "${root%%\?*}")" + return 0 + fi + + if [[ "$root" == *-Linux.tar.gz ]] || [[ "$root" == *.tar.gz ]]; then + printf 'tgz:%s\n' "$(basename "${root%%\?*}")" + return 0 + fi + + local meta + if ! meta="$(cdn_resolve_latest_merge_tgz_metadata "$root")"; then + exit 1 + fi + local build pr tgz_name _url + IFS=$'\t' read -r build pr tgz_name _url <<<"$meta" + printf '%s/%s/%s\n' "$build" "$pr" "$tgz_name" +} + +cmd_resolve_package_url() { + local root="${PR_PACKAGE_ROOT_URL:-}" + if [ -z "$root" ]; then + root="${1:-}" + fi + if [ -z "${root:-}" ]; then + echo "::error::Set PR_PACKAGE_ROOT_URL (HTTPS …/rvs index root or direct .tar.gz / .deb URL)." >&2 + exit 1 + fi + + root="${root%/}" + local URL NAME + + # Direct HTTPS URL to relocatable Linux tarball (same artifact as nightly). + if [[ "$root" == *-Linux.tar.gz ]] || [[ "$root" == *.tar.gz ]]; then + URL="$root" + NAME="$(basename "${URL%%\?*}")" + echo "::notice::Using direct Linux tarball URL (basename: ${NAME})" + if ! curl -fsSIL --max-time 120 -A 'Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)' -o /dev/null "$URL"; then + echo "::error::Tarball URL is not retrievable: ${URL}" >&2 + exit 1 + fi + elif [[ "$root" == *.deb ]]; then + URL="$root" + NAME="$(basename "${URL%%\?*}")" + echo "::notice::Using direct .deb URL (basename: ${NAME})" + if ! curl -fsSIL --max-time 120 -A 'Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)' -o /dev/null "$URL"; then + echo "::error::Deb URL is not retrievable: ${URL}" >&2 + exit 1 + fi + else + local base="${root}/" + echo "::notice::Resolving latest Linux tarball under CDN root: ${base}" + local meta build pr tgz_name tgz_url + if ! meta="$(cdn_resolve_latest_merge_tgz_metadata "$root")"; then + exit 1 + fi + IFS=$'\t' read -r build pr tgz_name tgz_url <<<"$meta" + echo "::notice::Latest build id: ${build}" + echo "::notice::Latest merge PR directory: ${pr}" + URL="$tgz_url" + NAME="$tgz_name" + echo "::notice::Resolved tarball: ${NAME}" + if ! curl -fsSIL --max-time 120 -A 'Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)' -o /dev/null "$URL"; then + echo "::error::Resolved tarball URL is not retrievable: ${URL}" >&2 + exit 1 + fi + fi + + if [[ "$NAME" != *.deb ]] && [[ "$NAME" != *-Linux.tar.gz ]]; then + echo "::error::RVS PR Tests expected a *-Linux.tar.gz relocatable tarball or a .deb; got: ${NAME}" >&2 + exit 1 + fi + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + { + echo "tarball_url<> "$GITHUB_OUTPUT" + fi + + if [ -n "${GITHUB_ENV:-}" ]; then + { + echo "TARBALL_URL<> "$GITHUB_ENV" + fi + + echo "Package file : $NAME" + echo "URL : $URL" +} + +cmd_validate_config() { + require_env TARBALL_NAME + require_env TARGET_NODE + require_env TARGET_ROCM_PATH + + local input_remote="${INPUT_REMOTE_WORK_DIR:-}" + local var_remote="${VAR_REMOTE_WORK_DIR:-}" + local run_id="${GITHUB_RUN_ID:-local}" + + if [ -n "$input_remote" ]; then + REMOTE_WORK_DIR="$input_remote" + elif [ -n "$var_remote" ]; then + REMOTE_WORK_DIR="$var_remote" + else + REMOTE_WORK_DIR="/tmp/rvs-pr-${run_id}" + fi + + # amdrocm7-rvs-…-Linux.tar.gz or amdrocm7-rvs_….deb + if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then + ROCM_MAJOR="${BASH_REMATCH[1]}" + else + echo "::error::Cannot parse ROCm major version from package name: $TARBALL_NAME" >&2 + exit 1 + fi + + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + RVS_BIN="${INSTALL_DIR}/bin/rvs" + + # Do not print orchestrator or target host identity here (hostname/IP may be + # workflow inputs and must not appear in CI logs). GitHub may still log runner + # metadata in the job "Set up job" phase. + echo "SSH target : (omitted — use secrets RVS_TARGET_* / workflow inputs)" + echo "Target ROCm path : $TARGET_ROCM_PATH" + echo "Remote work dir : $REMOTE_WORK_DIR" + echo "ROCm major : $ROCM_MAJOR" + echo "Expected RVS binary : $RVS_BIN" + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + { + echo "remote_work_dir=$REMOTE_WORK_DIR" + echo "rocm_major=$ROCM_MAJOR" + echo "install_dir=$INSTALL_DIR" + echo "rvs_bin=$RVS_BIN" + } >> "$GITHUB_OUTPUT" + fi + + export REMOTE_WORK_DIR ROCM_MAJOR INSTALL_DIR RVS_BIN +} + +ssh_state_paths() { + local base="${RUNNER_TEMP:-/tmp}" + SSH_KEY_FILE="${base}/rvs_target_key" + SSH_CONFIG_FILE="${base}/rvs_target_ssh_config" + mkdir -p "$base" +} + +cmd_setup_ssh() { + require_env TARGET_NODE + require_env REMOTE_WORK_DIR + + ssh_state_paths + + if [ -n "${GITHUB_ENV:-}" ]; then + { + echo "SSH_KEY_FILE=$SSH_KEY_FILE" + echo "SSH_CONFIG_FILE=$SSH_CONFIG_FILE" + } >> "$GITHUB_ENV" + fi + + if [ -z "${SSH_PRIVATE_KEY:-}" ]; then + echo "::error::SSH_PRIVATE_KEY is not set; cannot SSH to target node." >&2 + exit 1 + fi + + install -m 600 /dev/null "$SSH_KEY_FILE" + printf '%s\n' "$SSH_PRIVATE_KEY" > "$SSH_KEY_FILE" + chmod 600 "$SSH_KEY_FILE" + + local known_hosts="${SSH_CONFIG_FILE}.known_hosts" + : > "$known_hosts" + chmod 600 "$known_hosts" + ssh-keyscan -T 15 -H "$TARGET_NODE" >> "$known_hosts" 2>/dev/null || true + + cat > "$SSH_CONFIG_FILE" <&2 + exit 1 + fi + echo "::notice::SSH connectivity OK." + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" +} + +cmd_verify_rocm() { + require_env SSH_CONFIG_FILE + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +echo "=== System ===" +# Omit nodename (uname -a prints hostname); -srvmo keeps kernel/OS/arch only. +uname -srvmo +echo +echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" +if [ ! -d "${TARGET_ROCM_PATH}" ]; then + echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." + exit 1 +fi +echo "=== ${TARGET_ROCM_PATH}/bin/rocminfo ===" +"${TARGET_ROCM_PATH}/bin/rocminfo" +echo +echo "=== ${TARGET_ROCM_PATH}/bin/amd-smi version ===" +"${TARGET_ROCM_PATH}/bin/amd-smi" version +echo +echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}" +REMOTE +} + +cmd_download_tarball() { + require_env TARBALL_URL + require_env TARBALL_NAME + mkdir -p ./pkg + echo "Downloading RVS package on orchestrator runner (target node is not used for this fetch):" + echo " $TARBALL_URL" + curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" + ls -la ./pkg/ + file "./pkg/${TARBALL_NAME}" || true +} + +cmd_copy_to_target() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + echo "Copying ./pkg/${TARBALL_NAME} -> rvs-target:${REMOTE_WORK_DIR}/pkg/" + scp -q -F "$SSH_CONFIG_FILE" "./pkg/${TARBALL_NAME}" \ + "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "ls -la '${REMOTE_WORK_DIR}/pkg/'" +} + +cmd_install_rvs() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR + require_env INSTALL_DIR + require_env RVS_BIN + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" +echo "Target ROCm path : ${TARGET_ROCM_PATH}" +echo "Detected ROCm major version : ${ROCM_MAJOR}" +echo "Install target : ${INSTALL_DIR}" +echo "Expected RVS binary : ${RVS_BIN}" +if [ ! -f "$PKG" ]; then + echo "::error::Package file not found on target node at $PKG" + exit 1 +fi +if [[ "$TARBALL_NAME" == *.deb ]]; then + echo "Installing .deb with dpkg (non-interactive)..." + export DEBIAN_FRONTEND=noninteractive + if sudo -n dpkg -i "$PKG"; then + : + else + echo "::warning::dpkg -i had a non-zero exit; trying apt-get -f install then dpkg again" + sudo -n apt-get update -qq || true + sudo -n apt-get install -f -y -qq || true + sudo -n dpkg -i "$PKG" + fi +else + probe="$INSTALL_DIR" + while [ ! -d "$probe" ] && [ "$probe" != "/" ]; do probe=$(dirname "$probe"); done + if [ -w "$probe" ]; then + echo "Installing into $INSTALL_DIR without sudo (writable path)" + mkdir -p "$INSTALL_DIR" + tar -xzf "$PKG" -C "$INSTALL_DIR" + else + echo "Installing into $INSTALL_DIR via sudo -n (path not user-writable)" + sudo -n mkdir -p "$INSTALL_DIR" + sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" + fi +fi +if [ ! -x "$RVS_BIN" ]; then + echo "::error::rvs binary not found or not executable at $RVS_BIN after install" + ls -la "$INSTALL_DIR/" || true + ls -la "$INSTALL_DIR/bin/" || true + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "Installed RVS at: $RVS_BIN" +"$RVS_BIN" --version || true +REMOTE +} + +cmd_verify_rvs_binary() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +if [ ! -x "$RVS_BIN" ]; then + echo "::error::$RVS_BIN was not produced by install on target." + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "=== ldd $RVS_BIN ===" +LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) +echo "$LDD_OUTPUT" +if echo "$LDD_OUTPUT" | grep -q "not found"; then + echo "::error::RVS binary has unresolved library dependencies on target (see above)." + exit 1 +fi +echo "::notice::RVS binary's library dependencies resolved OK on target." +REMOTE +} + +cmd_run_level4() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env REMOTE_WORK_DIR + require_env TARGET_ROCM_PATH + + set +e + local start end rc + start=$(date -u +%FT%TZ) + echo "::group::RVS level 4 (${RVS_BIN} -r 4) against ${TARGET_ROCM_PATH}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set +e +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +mkdir -p "${REMOTE_WORK_DIR}/reports" +"$RVS_BIN" -r 4 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_4.log" +RC=${PIPESTATUS[0]} +echo "remote_rc=$RC" +exit $RC +REMOTE + rc=$? + echo "::endgroup::" + end=$(date -u +%FT%TZ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rc=$rc" >> "$GITHUB_OUTPUT" + echo "start=$start" >> "$GITHUB_OUTPUT" + echo "end=$end" >> "$GITHUB_OUTPUT" + fi + # Caller workflow decides whether to fail the job on non-zero rc. + return 0 +} + +cmd_collect_logs() { + require_env SSH_CONFIG_FILE + require_env REMOTE_WORK_DIR + mkdir -p ./reports + if [ ! -f "$SSH_CONFIG_FILE" ]; then + echo "::warning::SSH config not present; skipping log collection." + return 0 + fi + echo "Copying logs from rvs-target:${REMOTE_WORK_DIR}/reports/ -> ./reports/" + scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/*.log" ./reports/ || \ + echo "::warning::No log files retrieved from target node." + ls -la ./reports/ || true +} + +cmd_capture_versions() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + local rvs_version target_rocm_version + rvs_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +"$RVS_BIN" --version 2>/dev/null +REMOTE + ) + target_rocm_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null || echo "unknown" +cat "${TARGET_ROCM_PATH}/.info/version" 2>/dev/null \ + || cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" 2>/dev/null \ + || echo "unknown" +REMOTE + ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rvs_version=$rvs_version" >> "$GITHUB_OUTPUT" + echo "target_rocm_version=$target_rocm_version" >> "$GITHUB_OUTPUT" + fi +} + +cmd_build_report() { + require_env TARBALL_NAME + require_env TARGET_ROCM_PATH + require_env REMOTE_WORK_DIR + require_env RVS_BIN + + # TARBALL_URL is optional: the report job reads it from install-rvs-on-target outputs. + # If that output was empty (e.g. legacy echo-to-GITHUB_OUTPUT with special URL chars), + # still emit SUMMARY.md with the tarball filename. + local tarball_url_display="${TARBALL_URL:-}" + if [ -z "$tarball_url_display" ]; then + tarball_url_display="_(unavailable — check install job resolve step / use heredoc GITHUB_OUTPUT for URLs with special characters)_" + fi + + local rc4="${RVS_LEVEL4_RC:-0}" + local start="${RVS_LEVEL4_START:-}" + local end="${RVS_LEVEL4_END:-}" + local rvs_version="${RVS_VERSION:-unknown}" + local target_rocm_version="${TARGET_ROCM_VERSION:-unknown}" + local run_id="${GITHUB_RUN_ID:-local}" + local server_url="${GITHUB_SERVER_URL:-https://github.com}" + local repository="${GITHUB_REPOSITORY:-local/repo}" + local event_name="${GITHUB_EVENT_NAME:-local}" + + mkdir -p ./reports + local s4 overall + if [ "$rc4" -eq 0 ]; then + s4=PASS + overall=PASS + else + s4=FAIL + overall=FAIL + fi + + local report_title="${REPORT_TITLE:-# RVS PR Tests Report}" + local pkg_label="Linux tarball" + if [[ "${TARBALL_NAME}" == *.deb ]]; then + pkg_label="Deb package" + fi + local artifact_hint="${REPORT_ARTIFACT_HINT:-rvs-pr-report-${run_id}}" + + local report=./reports/SUMMARY.md + { + echo "${report_title}" + echo "" + echo "| Field | Value |" + echo "|---|---|" + echo "| Run | [\`${run_id}\`](${server_url}/${repository}/actions/runs/${run_id}) |" + echo "| Trigger | \`${event_name}\` |" + echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${target_rocm_version}\`) |" + echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" + echo "| ${pkg_label} | \`${TARBALL_NAME}\` |" + echo "| Source URL | ${tarball_url_display} |" + echo "| RVS version | \`${rvs_version}\` |" + echo "| Overall result | **${overall}** |" + echo "" + echo "## Results" + echo "" + echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" + echo "|---|---|:--:|---:|---|---|" + echo "| Level 4 | \`${RVS_BIN} -r 4\` | ${s4} | ${rc4} | ${start} | ${end} |" + echo "" + echo "## Logs" + echo "" + echo "Full stdout/stderr from the level-4 run is attached to the artifact" + echo "\`${artifact_hint}\`:" + echo "" + echo "- \`rvs_level_4.log\`" + echo "- \`SUMMARY.md\` (this file)" + } > "$report" + + cat "$report" + if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then + cat "$report" >> "$GITHUB_STEP_SUMMARY" + fi + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "overall=$overall" >> "$GITHUB_OUTPUT" + echo "rc4=$rc4" >> "$GITHUB_OUTPUT" + fi +} + +cmd_cleanup_remote() { + set +e + if [ -z "${REMOTE_WORK_DIR:-}" ] || [ -z "${SSH_CONFIG_FILE:-}" ] || [ ! -f "$SSH_CONFIG_FILE" ]; then + return 0 + fi + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "rm -rf '${REMOTE_WORK_DIR}'" || \ + echo "::warning::Failed to clean up ${REMOTE_WORK_DIR} on target node." +} + +cmd_cleanup_local_ssh() { + set +e + if [ -n "${SSH_KEY_FILE:-}" ]; then + rm -f "$SSH_KEY_FILE" + fi + if [ -n "${SSH_CONFIG_FILE:-}" ]; then + rm -f "$SSH_CONFIG_FILE" "${SSH_CONFIG_FILE}.known_hosts" + fi +} + +main() { + if [ $# -lt 1 ]; then + usage + exit 1 + fi + case "$1" in + resolve-package-url) cmd_resolve_package_url "${2:-}" ;; + peek-latest-artifact-key) cmd_peek_latest_artifact_key "${2:-}" ;; + validate-config) cmd_validate_config ;; + setup-ssh) cmd_setup_ssh ;; + verify-rocm) cmd_verify_rocm ;; + download-tarball) cmd_download_tarball ;; + copy-to-target) cmd_copy_to_target ;; + install-rvs) cmd_install_rvs ;; + verify-rvs-binary) cmd_verify_rvs_binary ;; + run-level4) cmd_run_level4 ;; + collect-logs) cmd_collect_logs ;; + capture-versions) cmd_capture_versions ;; + build-report) cmd_build_report ;; + cleanup-remote) cmd_cleanup_remote ;; + cleanup-local-ssh) cmd_cleanup_local_ssh ;; + -h|--help) usage ;; + *) + echo "::error::Unknown command: $1" >&2 + usage + exit 1 + ;; + esac +} + +main "$@" From 850c3f7edb9a53f643a7a9f879444d2766bc268a Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 19 Jun 2026 23:37:03 -0400 Subject: [PATCH 207/275] Removed polling and added a trigger once there is a successful PR build Signed-off-by: Urvashi Tiwari --- .github/workflows/README_PR_TESTS.md | 45 +++--- .github/workflows/rvs-pr-tests.yml | 207 ++++++++++++++------------- rvs_pr_test.sh | 35 ++++- 3 files changed, 170 insertions(+), 117 deletions(-) diff --git a/.github/workflows/README_PR_TESTS.md b/.github/workflows/README_PR_TESTS.md index 600d645b0..e7c0b1abe 100644 --- a/.github/workflows/README_PR_TESTS.md +++ b/.github/workflows/README_PR_TESTS.md @@ -1,40 +1,47 @@ # RVS PR Tests Workflow -This document describes [`.github/workflows/rvs-pr-tests.yml`](./rvs-pr-tests.yml). It mirrors [RVS Nightly Tests](./README_NIGHTLY_TESTS.md) **orchestration** (self-hosted runner resolves the artifact, `curl` + `scp` to the GPU target, SSH-driven install, `rvs -r 4`, Markdown report) but targets the **Linux relocatable tarball** (`amdrocm*-rvs-*-Linux.tar.gz`) — the **same artifact type as nightly** — not the Ubuntu `.deb` by default. A **direct `.deb` URL** in the secret or `package_url` is still supported. +This document describes [`.github/workflows/rvs-pr-tests.yml`](./rvs-pr-tests.yml). It mirrors [RVS Nightly Tests](./README_NIGHTLY_TESTS.md) **orchestration** (self-hosted runner resolves the artifact, `curl` + `scp` to the GPU target, SSH-driven install, `rvs -r 4`, Markdown report) but targets the **Linux relocatable tarball** (`amdrocm*-rvs-*-Linux.tar.gz`) — not the Ubuntu `.deb` by default. A **direct `.deb` URL** is still supported for manual runs. -- **Resolve** ([`rvs_pr_test.sh resolve-package-url`](../../rvs_pr_test.sh)): from an HTTPS **listing root that ends at `/rvs`** (with or without a trailing slash), walks the index and picks the latest **`merge//…/…-Linux.tar.gz`**; or uses a **direct HTTPS URL** to that `.tar.gz` (or a `.deb`). Probes the URL with `curl` before install. -- **Scheduled** runs **poll hourly (UTC)**. A **detect** job compares an **artifact key** to an **Actions cache** marker; if unchanged, install and tests are **skipped**. After **successful** level 4, a **save** job updates the marker. **Manual** runs always execute the full pipeline (marker not updated for schedule logic). -- Triggers on **`schedule`** and **`workflow_dispatch` only** — not on **Build Relocatable Packages**. +## Triggers + +| Trigger | When | Behavior | +|---|---|---| +| `workflow_run` | After **[Build Relocatable Packages](https://github.com/ROCm/ROCmValidationSuite/actions/workflows/build-relocatable-packages.yml)** completes | Runs **only** when the triggering run **`conclusion` is `success`** and the triggering event is **`pull_request`**. Resolves the tarball at `…/rvs//merge//manylinux_2_28/` (same path layout as [`.github/scripts/rvs-s3-upload-route.sh`](../../.github/scripts/rvs-s3-upload-route.sh) for PR uploads). | +| `workflow_dispatch` | Manual | Always runs (subject to secrets/inputs). | + +There is **no** `schedule` and **no** CDN polling or Actions cache marker. Install logic is in [`rvs_pr_test.sh`](../../rvs_pr_test.sh): **`.tar.gz`** → `tar -xzf` under `/opt/rocm/extras-/` (same as nightly); **`.deb`** → `dpkg` path. -## How “latest” is chosen (`resolve-package-url`) +## How the package URL is chosen (`resolve-package-url`) -**Directory root** (HTTPS index for `https:///rvs` or `https:///rvs/` — same behavior): +**After a successful PR build (`workflow_run`)** -1. Largest numeric **build** directory under the root. -2. **`merge/`** → largest numeric **PR** directory. -3. Under that PR, a subdirectory listing **`amdrocm*-rvs-*-Linux.tar.gz`** (prefers **`manylinux_*`**). -4. Version-sort tarball names → **full HTTPS URL** to that file. +1. Read **`github.event.workflow_run.pull_requests[0].number`** and **`github.event.workflow_run.run_number`** (the Build workflow’s run number, same as **`GITHUB_RUN_NUMBER`** during S3 upload in **Build Relocatable Packages**). +2. Set secret **`RVS_PR_DEB_PACKAGE_URL`** (or **`RVS_PR_PACKAGE_URL`**) to the HTTPS **`…/rvs`** (or **`…/rvs/`**) base only — no `merge/` or `manylinux` segments (for example the CloudFront root you use for PR artifacts). +3. The workflow probes **`manylinux_2_28`** listings in this order (first that returns a listing wins): + - **`{base}/{pr}/merge/{run_number}/manylinux_2_28/`** — matches [`.github/scripts/rvs-s3-upload-route.sh`](../../.github/scripts/rvs-s3-upload-route.sh) PR layout (`rvs/${GITHUB_REF_NAME}/${GITHUB_RUN_NUMBER}/manylinux_2_28` with `GITHUB_REF_NAME` = `/merge`). + - **`{base}/{run_number}/merge/{pr}/manylinux_2_28/`** — alternate mirror layout. +4. [`rvs_pr_test.sh resolve-package-url`](../../rvs_pr_test.sh) treats that URL as a **`manylinux_*`** directory listing, selects the latest **`amdrocm*-rvs-*-Linux.tar.gz`**, then download → target install → **`rvs -r 4`** on the GPU host (see nightly README for SSH / `RVS_TARGET_*`). -**Direct URL**: if the configured value is already a `*-Linux.tar.gz` (or other `*.tar.gz` accepted by validation) or a **`.deb`**, that URL is used as-is. +If **`pull_requests`** is empty (common for some fork PR flows), the job fails with a clear error — set up a manual run with `package_url` instead, or adjust branch/secret policy so the payload includes the PR. -## Triggers +**Manual (`workflow_dispatch`)** -| Trigger | When | Behavior | -|---|---|---| -| `schedule` | `0 * * * *` UTC (hourly) | Detect new artifact key vs cache → optionally full install + level 4 + report; save marker after **successful** level 4. | -| `workflow_dispatch` | Manual | Always run full pipeline. | +- **`package_url`** or **`RVS_PR_DEB_PACKAGE_URL`** / **`RVS_PR_PACKAGE_URL`** may be: + - **`…/rvs/`** index root → crawler picks latest `rvs//merge//…/*.tar.gz` (legacy layout), + - a **`…/manylinux_*/`** directory listing → latest tarball in that folder, + - a **direct** `*-Linux.tar.gz` or **`.deb`** URL. ## Repository configuration Use the same **secrets** and **variables** as nightly for SSH and ROCm (`RVS_TARGET_NODE`, `RVS_TARGET_USER`, `RVS_TARGET_SSH_KEY`, `RVS_TARGET_ROCM_PATH`, runner labels, etc.). See [README_NIGHTLY_TESTS.md](./README_NIGHTLY_TESTS.md#repository-configuration). -**PR package URL secrets** (parallel idea to nightly’s tarball index secret): +**PR package URL secrets** | Name | Kind | Purpose | |---|---|---| -| `RVS_PR_DEB_PACKAGE_URL` | Secret | **Preferred.** HTTPS **index root through `/rvs/`** only (e.g. `https:///rvs/` — no build/merge path; trailing `/` optional), **or** a **direct** `*-Linux.tar.gz` URL, **or** a **`.deb`** URL. Used when `package_url` is empty. | +| `RVS_PR_DEB_PACKAGE_URL` | Secret | **Required** for `workflow_run`: HTTPS base **`…/rvs`** or **`…/rvs/`** only (no `merge/` / `manylinux` path). **Manual runs:** same base, or `…/manylinux_*/` listing, or direct tarball / `.deb`. | | `RVS_PR_PACKAGE_URL` | Secret | Legacy alias if `RVS_PR_DEB_PACKAGE_URL` is unset. | ## Manual run @@ -45,7 +52,7 @@ gh workflow run rvs-pr-tests.yml Examples — set your real values in secrets or `-f package_url`: -**Index root only** (resolver follows `rvs//merge//…/*.tar.gz`): +**`…/rvs/` index root** (crawler uses `rvs//merge//…`): ```bash gh workflow run rvs-pr-tests.yml \ diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml index 515d93dbd..e67d131b9 100644 --- a/.github/workflows/rvs-pr-tests.yml +++ b/.github/workflows/rvs-pr-tests.yml @@ -1,26 +1,22 @@ name: RVS PR Tests -# Same orchestration pattern as rvs-nightly-tests.yml: package URL from -# secrets.RVS_PR_DEB_PACKAGE_URL (or legacy secrets.RVS_PR_PACKAGE_URL) into env.PR_DEB_PACKAGE_URL -# (no baked-in default URL in this repo). Resolves the Linux relocatable tarball (*.tar.gz) -# from an HTTPS index root ending in /rvs (with or without trailing slash), or accepts a -# direct tarball / .deb URL (see rvs_pr_test.sh resolve-package-url). -# Then copy to a configurable target over SSH, extract or dpkg install, run RVS level 4, report. -# Scheduled runs poll the CDN root from secrets on a cron; if the resolved artifact -# key (build/pr/tgz) changed since the last successful test, install + level 4 run. -# Manual workflow_dispatch always runs tests. See README_PR_TESTS.md. +# Runs after a successful "Build Relocatable Packages" run on pull_request, or on +# workflow_dispatch. Package URL: for workflow_run, derived from secrets.RVS_PR_DEB_PACKAGE_URL +# (HTTPS …/rvs base) + PR number + triggering run number + manylinux path (same layout as +# .github/scripts/rvs-s3-upload-route.sh). For manual runs, use package_url or secret (rvs/ +# root, …/manylinux_*/ listing, direct .tar.gz, or .deb). See README_PR_TESTS.md. # -# Required repo configuration: see README_PR_TESTS.md (same secrets/vars as nightly -# for SSH and ROCm path). +# Required repo configuration: README_PR_TESTS.md (same secrets/vars as nightly for SSH/ROCm). on: - schedule: - # Poll hourly (UTC) for a new PR package on the CDN root configured in secrets. - - cron: '0 * * * *' + workflow_run: + workflows: ['Build Relocatable Packages'] + types: + - completed workflow_dispatch: inputs: package_url: - description: 'Optional override: HTTPS …/rvs/ index root (e.g. https://host/rvs/), direct *-Linux.tar.gz URL, or .deb URL (empty → secrets RVS_PR_DEB_PACKAGE_URL / RVS_PR_PACKAGE_URL; required for schedule if unset)' + description: 'HTTPS …/rvs/ root, …/manylinux_*/ listing, direct *-Linux.tar.gz, or .deb (empty → secrets; not used for workflow_run — secret must be /rvs/ base)' required: false default: '' target_node: @@ -44,74 +40,16 @@ permissions: contents: read concurrency: - group: rvs-pr-${{ github.workflow }} + group: rvs-pr-${{ github.workflow }}-${{ github.run_id }} cancel-in-progress: false env: - # Set secrets to your HTTPS …/rvs listing root (no deeper path required), a direct *-Linux.tar.gz URL, or a .deb URL. PR_DEB_PACKAGE_URL: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL || '' }} jobs: - detect-new-artifact: - name: Detect new PR package on CDN - runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} - outputs: - proceed: ${{ steps.decide.outputs.proceed }} - artifact_key: ${{ steps.decide.outputs.artifact_key }} - env: - PR_PACKAGE_ROOT_URL: ${{ inputs.package_url || env.PR_DEB_PACKAGE_URL }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Restore last artifact key (scheduled poll only) - if: github.event_name == 'schedule' - id: restore_marker - continue-on-error: true - uses: actions/cache/restore@v4 - with: - path: rvs_pr_last_artifact_key.txt - key: rvs-pr-artifact-${{ github.run_id }} - restore-keys: | - rvs-pr-artifact- - - - name: Decide whether to run tests - id: decide - run: | - chmod +x rvs_pr_test.sh - if [ -z "${PR_PACKAGE_ROOT_URL:-}" ]; then - echo "::error::PR_PACKAGE_ROOT_URL is empty. Set Actions secret RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) to your HTTPS …/rvs index root, a direct *-Linux.tar.gz URL, or a .deb URL, or pass workflow_dispatch input package_url." - exit 1 - fi - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "proceed=true" >> "$GITHUB_OUTPUT" - { - echo "artifact_key<> "$GITHUB_OUTPUT" - echo "::notice::Manual run — always executing tests." - exit 0 - fi - NEW="$(./rvs_pr_test.sh peek-latest-artifact-key)" - OLD="$(tr -d '\n' < rvs_pr_last_artifact_key.txt 2>/dev/null || true)" - { - echo "artifact_key<> "$GITHUB_OUTPUT" - if [ "$NEW" = "$OLD" ] && [ -n "$OLD" ]; then - echo "proceed=false" >> "$GITHUB_OUTPUT" - echo "::notice::CDN artifact unchanged (${NEW}); skipping install and tests." - else - echo "proceed=true" >> "$GITHUB_OUTPUT" - echo "::notice::New or first-seen artifact key: ${NEW} (previous: ${OLD:-})" - fi - install-rvs-on-target: name: Install RVS on target node - needs: [detect-new-artifact] - if: needs.detect-new-artifact.outputs.proceed == 'true' + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request') runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: @@ -125,17 +63,111 @@ jobs: TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || vars.RVS_TARGET_ROCM_PATH }} - PR_PACKAGE_ROOT_URL: ${{ inputs.package_url || env.PR_DEB_PACKAGE_URL }} steps: - name: Checkout Repository uses: actions/checkout@v4 + - name: Set package URL (manual) + if: github.event_name == 'workflow_dispatch' + env: + PACKAGE_INPUT: ${{ inputs.package_url }} + SECRET_PKG: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} + run: | + set -euo pipefail + u="${PACKAGE_INPUT:-}" + if [ -z "${u}" ]; then + u="${SECRET_PKG:-}" + fi + if [ -z "${u}" ]; then + echo "::error::Set Actions secret RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL), or pass workflow_dispatch input package_url." + exit 1 + fi + { + echo "PR_PACKAGE_ROOT_URL<> "$GITHUB_ENV" + + - name: Set package URL (after successful PR build) + if: github.event_name == 'workflow_run' + env: + SECRET_PKG: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} + PR_JSON: ${{ toJSON(github.event.workflow_run.pull_requests) }} + RUN_NUMBER: ${{ github.event.workflow_run.run_number }} + run: | + set -euo pipefail + python3 <<'PY' + import json + import os + import subprocess + import sys + + base = (os.environ.get("SECRET_PKG") or "").strip().rstrip("/") + if not base: + print("::error::Set RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) to the HTTPS rvs listing base (…/rvs) for post-build runs.", file=sys.stderr) + sys.exit(1) + low = base.lower() + if low.endswith(".deb") or low.endswith(".tar.gz"): + print("::error::For Build workflow triggers, set the secret to the /rvs HTTPS base only, not a direct .deb or .tar.gz URL.", file=sys.stderr) + sys.exit(1) + + prs = json.loads(os.environ.get("PR_JSON") or "[]") + if not prs: + print("::error::workflow_run has no pull_requests in the payload (e.g. fork PR). Cannot infer rvs/…/manylinux_2_28 path.", file=sys.stderr) + sys.exit(1) + pr = int(prs[0]["number"]) + run_number = int(os.environ["RUN_NUMBER"]) + # Primary: matches .github/scripts/rvs-s3-upload-route.sh — rvs//merge//manylinux_2_28 + # Fallback: some mirrors use rvs//merge//manylinux_2_28 + candidates = [ + f"{base}/{pr}/merge/{run_number}/manylinux_2_28", + f"{base}/{run_number}/merge/{pr}/manylinux_2_28", + ] + + def listing_reachable(url: str) -> bool: + p = subprocess.run( + [ + "curl", + "-sfS", + "--max-time", + "60", + "-A", + "Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)", + "-o", + "/dev/null", + url.rstrip("/") + "/", + ], + capture_output=True, + ) + return p.returncode == 0 + + listing = "" + for cand in candidates: + if listing_reachable(cand): + listing = cand + break + if not listing: + print( + "::error::Could not reach a manylinux_2_28 listing for this PR build. Tried:\n " + + "\n ".join(c + "/" for c in candidates), + file=sys.stderr, + ) + sys.exit(1) + print(f"::notice::Using manylinux_2_28 listing from this Build workflow run: {listing}/") + + out_path = os.environ["GITHUB_ENV"] + with open(out_path, "a", encoding="utf-8") as f: + f.write("PR_PACKAGE_ROOT_URL< rvs_pr_last_artifact_key.txt - test -s rvs_pr_last_artifact_key.txt - - - name: Save artifact key to Actions cache - uses: actions/cache/save@v4 - with: - path: rvs_pr_last_artifact_key.txt - key: rvs-pr-artifact-${{ github.run_id }} diff --git a/rvs_pr_test.sh b/rvs_pr_test.sh index 8e3719fa7..0f8a3d835 100755 --- a/rvs_pr_test.sh +++ b/rvs_pr_test.sh @@ -12,7 +12,7 @@ usage() { Usage: rvs_pr_test.sh Commands (workflow order): - resolve-package-url Discover latest Linux .tar.gz from rvs/ root, or a direct .tar.gz / .deb URL; + resolve-package-url Discover latest Linux .tar.gz from rvs/ root, from a .../manylinux_*/ listing dir, or a direct .tar.gz / .deb URL; writes tarball_url + tarball_name to GITHUB_OUTPUT / GITHUB_ENV when set peek-latest-artifact-key Print one-line artifact key (build/pr/tgz, tgz:basename, or deb:basename) for cache compare; stdout only validate-config Fail fast; emit prepare job outputs to GITHUB_OUTPUT @@ -130,6 +130,27 @@ cdn_resolve_latest_merge_tgz_metadata() { printf '%s\t%s\t%s\t%s' "$build" "$pr" "$tgz_name" "${tgz_url}${tgz_name}" } +# HTTPS directory listing ending in .../manylinux_*/ (e.g. PR build upload path). +# Prints: tarball_https_urlbasename to stdout; errors to stderr; exit 1 on failure. +cdn_resolve_tgz_from_manylinux_dir() { + local root="$1" + root="${root%/}" + local base="${root}/" + local html tgz_name + + html="$(cdn_curl_listing "$base")" + if [ -z "$html" ]; then + echo "::error::Empty listing from ${base} (check URL and orchestrator HTTPS egress)." >&2 + return 1 + fi + tgz_name="$(printf '%s' "$html" | grep -oE 'amdrocm[0-9]+-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' 2>/dev/null | sort -uV | tail -n 1 || true)" + if [ -z "$tgz_name" ]; then + echo "::error::No amdrocm*-rvs-*-Linux.tar.gz link under ${base}" >&2 + return 1 + fi + printf '%s\t%s' "${base}${tgz_name}" "$tgz_name" +} + cmd_peek_latest_artifact_key() { local root="${PR_PACKAGE_ROOT_URL:-}" if [ -z "$root" ]; then @@ -190,6 +211,18 @@ cmd_resolve_package_url() { echo "::error::Deb URL is not retrievable: ${URL}" >&2 exit 1 fi + elif printf '%s' "$root" | grep -qE '/manylinux[^/]*$'; then + local meta_ml + echo "::notice::Resolving Linux tarball under manylinux listing: ${root}/" + if ! meta_ml="$(cdn_resolve_tgz_from_manylinux_dir "$root")"; then + exit 1 + fi + IFS=$'\t' read -r URL NAME <<<"$meta_ml" + echo "::notice::Resolved tarball: ${NAME}" + if ! curl -fsSIL --max-time 120 -A 'Mozilla/5.0 (compatible; RVS-PR-Tests/1.0)' -o /dev/null "$URL"; then + echo "::error::Resolved tarball URL is not retrievable: ${URL}" >&2 + exit 1 + fi else local base="${root}/" echo "::notice::Resolving latest Linux tarball under CDN root: ${base}" From f1a0a2e25805befdcd58d601d44a6c2515bb8c7e Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 22 Jun 2026 13:03:05 -0400 Subject: [PATCH 208/275] Fixed Create test report, so Create test report should get TARBALL_NAME reliably. Signed-off-by: Urvashi Tiwari --- rvs_pr_test.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/rvs_pr_test.sh b/rvs_pr_test.sh index 0f8a3d835..ee77771fe 100755 --- a/rvs_pr_test.sh +++ b/rvs_pr_test.sh @@ -248,11 +248,17 @@ cmd_resolve_package_url() { fi if [ -n "${GITHUB_OUTPUT:-}" ]; then + # Write each output in its own multiline block so GitHub never merges tarball_url + # body with the tarball_name line (which can leave tarball_name unset for job outputs). { echo "tarball_url<> "$GITHUB_OUTPUT" + { + echo "tarball_name<> "$GITHUB_OUTPUT" fi @@ -261,7 +267,11 @@ cmd_resolve_package_url() { echo "TARBALL_URL<> "$GITHUB_ENV" + { + echo "TARBALL_NAME<> "$GITHUB_ENV" fi @@ -585,6 +595,11 @@ REMOTE } cmd_build_report() { + # Job outputs sometimes drop tarball_name when tarball_url is multiline; recover from URL. + if [ -z "${TARBALL_NAME:-}" ] && [ -n "${TARBALL_URL:-}" ]; then + TARBALL_NAME="$(basename "${TARBALL_URL%%\?*}")" + export TARBALL_NAME + fi require_env TARBALL_NAME require_env TARGET_ROCM_PATH require_env REMOTE_WORK_DIR From 59cfe8fe2ec376e3f049b1e83ad200fabc435569 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 22 Jun 2026 16:57:27 -0400 Subject: [PATCH 209/275] Fixed Create test report, so Create test report should get TARBALL_NAME Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-pr-tests.yml | 15 ++++++++++++++ rvs_pr_test.sh | 33 +++++++++++++++++++----------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml index e67d131b9..6e90fd084 100644 --- a/.github/workflows/rvs-pr-tests.yml +++ b/.github/workflows/rvs-pr-tests.yml @@ -192,6 +192,15 @@ jobs: echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" } >> "$GITHUB_ENV" + # Job outputs can drop tarball_url/name when passed to create-test-report; artifact is reliable. + - name: Upload package metadata for report job + uses: actions/upload-artifact@v4 + with: + name: rvs-pr-pkg-meta-${{ github.run_id }} + path: ./pkg-meta/ + retention-days: 1 + if-no-files-found: error + - name: Setup SSH for target node env: SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} @@ -293,6 +302,12 @@ jobs: path: ./reports continue-on-error: true + - name: Download package metadata + uses: actions/download-artifact@v4 + with: + name: rvs-pr-pkg-meta-${{ github.run_id }} + path: ./pkg-meta + - name: Build test report id: report env: diff --git a/rvs_pr_test.sh b/rvs_pr_test.sh index ee77771fe..c1c4e6765 100755 --- a/rvs_pr_test.sh +++ b/rvs_pr_test.sh @@ -248,17 +248,13 @@ cmd_resolve_package_url() { fi if [ -n "${GITHUB_OUTPUT:-}" ]; then - # Write each output in its own multiline block so GitHub never merges tarball_url - # body with the tarball_name line (which can leave tarball_name unset for job outputs). + # Heredoc for tarball_url (URLs may contain %, &, etc.); plain assignment for tarball_name + # (safe filename) — same pattern as rvs-nightly-tests.yml / rvs_nightly_test.sh. { echo "tarball_url<> "$GITHUB_OUTPUT" - { - echo "tarball_name<> "$GITHUB_OUTPUT" fi @@ -267,14 +263,15 @@ cmd_resolve_package_url() { echo "TARBALL_URL<> "$GITHUB_ENV" - { - echo "TARBALL_NAME<> "$GITHUB_ENV" fi + # Artifact fallback for create-test-report when job outputs drop URL/name between jobs. + mkdir -p ./pkg-meta + printf '%s\n' "$NAME" > ./pkg-meta/tarball_name + printf '%s\n' "$URL" > ./pkg-meta/tarball_url + echo "Package file : $NAME" echo "URL : $URL" } @@ -594,7 +591,19 @@ REMOTE fi } +load_pkg_meta_from_artifact() { + if [ -f ./pkg-meta/tarball_name ] && [ -z "${TARBALL_NAME:-}" ]; then + TARBALL_NAME="$(tr -d '\r' < ./pkg-meta/tarball_name)" + export TARBALL_NAME + fi + if [ -f ./pkg-meta/tarball_url ] && [ -z "${TARBALL_URL:-}" ]; then + TARBALL_URL="$(tr -d '\r' < ./pkg-meta/tarball_url)" + export TARBALL_URL + fi +} + cmd_build_report() { + load_pkg_meta_from_artifact # Job outputs sometimes drop tarball_name when tarball_url is multiline; recover from URL. if [ -z "${TARBALL_NAME:-}" ] && [ -n "${TARBALL_URL:-}" ]; then TARBALL_NAME="$(basename "${TARBALL_URL%%\?*}")" From 862c64080b83e121181c24f2cbb2671d4aadb2e7 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 22 Jun 2026 17:00:26 -0500 Subject: [PATCH 210/275] Time comparison correction. --- gst.so/src/gst_worker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 3335d503e..1fd20577a 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -235,7 +235,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { if (!ramp_single_shot) { gst_end_time = std::chrono::system_clock::now(); if (time_diff(gst_end_time, gst_start_time) > - ramp_interval - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) + (ramp_interval - NMAX_MS_GPU_RUN_PEAK_PERFORMANCE) * 1000u) return false; } From 1a7ea956b2bb068129b4b6d7dd88b76bd36d09e3 Mon Sep 17 00:00:00 2001 From: "Saad Rahim (AMD)" <44449863+saadrahim@users.noreply.github.com> Date: Tue, 23 Jun 2026 10:17:27 -0600 Subject: [PATCH 211/275] Build and install TransferBench CLI as part of RVS (#1199) * Build and install TransferBench CLI as part of RVS Vendor TransferBench as a git submodule under external/TransferBench and build its CLI binary in an isolated sub-build, installing it alongside the rvs executable. The PEBB and PBQT modules already consumed TransferBench headers via a configure-time clone; this replaces that clone with the submodule (same pinned commit, v1.66.02) and reuses the source tree for the CLI build. - Add external/TransferBench submodule (pinned to c78c4ae, v1.66.02) - Replace CMakeTransferBenchDownload.cmake's ExternalProject_Add clone with a submodule presence check; PEBB/PBQT now include TransferBench headers from external/TransferBench/src/header - Add CMakeTransferBenchCLI.cmake: ExternalProject_Add sub-build that invokes TransferBench's own CMake (it pins amdclang++ pre-project, so add_subdirectory is not viable) and installs the CLI to bindir - Add BUILD_TRANSFERBENCH_CLI option (default ON) to opt out - Update README clone instructions and CHANGELOG * TransferBench sub-build: enable BUILD_RELOCATABLE_PACKAGE The sub-build was failing on CentOS/RHEL CI because TransferBench's default install branch calls rocm_install() / rocm_setup_version() from rocm-cmake, which is not on the CMake module path in the manylinux build container. Setting BUILD_RELOCATABLE_PACKAGE=ON selects TransferBench's plain install(TARGETS ...) branch (designed exactly for this 'included in a larger build' case) and gives us the correct relocatable RPATH layout matching RVS's own packaging. Forward ROCM_MAJOR_VERSION and CPACK_PACKAGING_INSTALL_PREFIX so the child build computes the same RPATH as the parent. * TransferBench sub-build: forward CXX flags and narrow GPU targets The CentOS/RHEL CI job builds RVS in the manylinux_2_28 container with amdclang++ + a gcc-toolset for a modern libstdc++. The parent build passes that via -DCMAKE_CXX_FLAGS=--gcc-toolchain=, but ExternalProject_Add did not forward it, so the TransferBench sub-build fell back to the container's default libstdc++ and failed to find the C++20 header that TransferBench requires. Forward CMAKE_CXX_FLAGS to the child build. Also narrow the GPU target list via a new TRANSFERBENCH_GPU_TARGETS cache var, defaulting to the archs RVS itself ships on (drops gfx1150/gfx1151 from TB's 13-arch default) to keep the sub-build under CI time budget. Enable ExternalProject log files so future failures surface useful errors. * docs: position bundled TransferBench CLI as compatibility-only Clarify in README and CHANGELOG that TransferBench is bundled with RVS and the CLI ships in the same package. The CLI exists for backward compatibility with workflows that invoke TransferBench directly; new work should prefer either RVS (which wraps TransferBench via the pebb and pbqt modules) or the TransferBench API. * docs: add TransferBench page describing bundling and CLI compatibility Add docs/transferbench.md explaining that TransferBench is vendored as a submodule and shipped in the same RVS package, that the CLI is bundled for compatibility with existing TransferBench-based workflows, and that new work should prefer RVS (via pebb/pbqt) or the TransferBench API. Wire it into the Sphinx toctree and the docs landing page. * Fix bundled TransferBench CLI leaking its install dir into packages The TransferBench sub-build was given its own absolute install prefix (TransferBench-cli-install) and the parent install pulled the binary from there. With rocm_install()/CPACK_SET_DESTDIR, that absolute build-tree directory was captured verbatim into the TGZ. Make the ExternalProject build-only (INSTALL_COMMAND "") and install the CLI straight from the child build-dir root, where TransferBench emits it via set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .). Drop the now-unused CMAKE_INSTALL_PREFIX, INSTALL_DIR, CPACK_PACKAGING_INSTALL_PREFIX forwarding, and the no-op BUILD_RELOCATABLE_PACKAGE flag (TransferBench has no such option and always installs via rocm_install()). * build_packages_local: clean TGZ layout for the bundled CLI Re-build after the TGZ re-configure so the TransferBench sub-build is rebuilt against the emptied CPACK_PACKAGING_INSTALL_PREFIX instead of cpack copying a stale tree. Also flip CMAKE_INSTALL_PREFIX to / for the TGZ pass. Install rules key off the emptied CPACK_PACKAGING_INSTALL_PREFIX so files still land at the tarball root, but CPACK_SET_DESTDIR=ON otherwise materialises CMAKE_INSTALL_PREFIX under DESTDIR, leaving an empty opt/rocm/extras-/ tree in the tarball. Pointing the prefix at / removes the orphan dir. * build_packages_local: fix usr/ regression in TGZ layout The TGZ pass set CMAKE_INSTALL_PREFIX=/ to avoid an empty opt/rocm/extras-/ directory left by CPack DESTDIR staging. But with prefix=/, GNUInstallDirs' FHS special case rewrites bin->usr/bin, lib->usr/lib, etc. (and -DCMAKE_INSTALL_BINDIR=bin does not override it), nesting the entire package under usr/ instead of the root layout (bin/ lib/ include/ share/) that RVS ships. Keep the original install prefix (root layout) and instead strip empty directories from the tarball after cpack, which removes the empty opt/rocm/extras-/ staging residue without disturbing real files. --------- Co-authored-by: RVS Dev Co-authored-by: saadrahim Co-authored-by: frepaul <71665912+frepaul@users.noreply.github.com> --- .github/workflows/rvs-nightly-tests.yml | 4 ++ .gitmodules | 3 + CHANGELOG.md | 1 + CMakeLists.txt | 37 +++++----- CMakeTransferBenchCLI.cmake | 93 +++++++++++++++++++++++++ CMakeTransferBenchDownload.cmake | 40 ----------- README.md | 19 ++++- build_packages_local.sh | 40 ++++++++++- docs/index.rst | 1 + docs/sphinx/_toc.yml.in | 2 + docs/transferbench.md | 86 +++++++++++++++++++++++ external/TransferBench | 1 + 12 files changed, 269 insertions(+), 58 deletions(-) create mode 100644 CMakeTransferBenchCLI.cmake delete mode 100644 CMakeTransferBenchDownload.cmake create mode 100644 docs/transferbench.md create mode 160000 external/TransferBench diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 47c032f81..38dca2f3f 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -248,6 +248,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + submodules: recursive - name: Setup SSH for target node env: @@ -292,6 +294,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + submodules: recursive - name: Download test logs uses: actions/download-artifact@v4 diff --git a/.gitmodules b/.gitmodules index e69de29bb..8f5ec053a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "external/TransferBench"] + path = external/TransferBench + url = https://github.com/ROCm/TransferBench.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 39272e225..4d7a30483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added +- Bundled TransferBench as a git submodule under `external/TransferBench` and ship the TransferBench CLI in the same DEB/RPM as `rvs`. The CLI is provided for compatibility with existing TransferBench-based workflows; new work should use RVS (via the `pebb`/`pbqt` modules) or the TransferBench API directly. Opt out of the CLI build with `-DBUILD_TRANSFERBENCH_CLI=OFF`. - Added the pulse stressor module (`pulse.so`) for GPU power pulse stress testing. **(Beta — not intended for production use.)** - Added support for MI350X QPX mode. - Added support for the MXFP8 data type. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2265d34be..0617007c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -583,27 +583,32 @@ endif () ################################################################################ ################################################################################ -# TransferBench Download -configure_file(CMakeTransferBenchDownload.cmake TransferBench-download/CMakeLists.txt) +# TransferBench (vendored as a git submodule under external/TransferBench) +# +# Headers are consumed directly from the submodule by the PEBB and PBQT modules. +# The TransferBench CLI binary is built as an isolated sub-build and installed +# alongside rvs when BUILD_TRANSFERBENCH_CLI is ON (default). +################################################################################ +set(TRANSFERBENCH_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/TransferBench") -execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/TransferBench-download ) -if(result) - message(FATAL_ERROR "CMake step for TransferBench failed: ${result}") +if(NOT EXISTS "${TRANSFERBENCH_SOURCE_DIR}/CMakeLists.txt") + message(FATAL_ERROR + "TransferBench submodule not initialised. Run:\n" + " git submodule update --init --recursive\n" + "from the repository root and re-run cmake.") endif() -execute_process(COMMAND ${CMAKE_COMMAND} --build . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/TransferBench-download ) -if(result) - message(FATAL_ERROR "Build step for TransferBench failed: ${result}") +if(NOT DEFINED TRANSFERBENCH_INC_DIR) + set(TRANSFERBENCH_INC_DIR "${TRANSFERBENCH_SOURCE_DIR}/src/header") + message(STATUS "TRANSFERBENCH_INC_DIR ${TRANSFERBENCH_INC_DIR}") endif() -if (NOT DEFINED TRANSFERBENCH_INC_DIR) - set (TRANSFERBENCH_INC_DIR "${CMAKE_BINARY_DIR}/TransferBench-src/src/header") - message ("TRANSFERBENCH_INC_DIR ${TRANSFERBENCH_INC_DIR}") -endif () +option(BUILD_TRANSFERBENCH_CLI + "Build and install the TransferBench CLI alongside rvs" ON) + +if(BUILD_TRANSFERBENCH_CLI) + include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeTransferBenchCLI.cmake) +endif() ################################################################################ ## rocBLAS diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake new file mode 100644 index 000000000..288a773e7 --- /dev/null +++ b/CMakeTransferBenchCLI.cmake @@ -0,0 +1,93 @@ +################################################################################ +## +## Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +## MIT LICENSE +## +################################################################################ +# +# Build the TransferBench CLI binary from the external/TransferBench submodule +# as a sub-build of RVS, and install it alongside the rvs executable. +# +# TransferBench pins amdclang++ as the compiler before its project() call, so +# add_subdirectory would conflict with the parent compiler. ExternalProject_Add +# runs the child build in an isolated CMake invocation. +# +# The child build is BUILD-ONLY: we never invoke TransferBench's own install +# rules. TransferBench installs unconditionally via rocm_install() into an +# absolute prefix; letting it install into a build-tree directory caused that +# directory to leak verbatim into the packaged TGZ (e.g. +# __w/.../build/TransferBench-cli-install/bin/TransferBench). Instead we set +# INSTALL_COMMAND to a no-op and pick the binary straight out of the child +# build tree, then install it ourselves into the rvs package layout. +# +# TransferBench writes its CLI binary to the build-tree root via +# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .), so it lands at +# ${TRANSFERBENCH_BUILD_DIR}/TransferBench. +# +# We forward CMAKE_CXX_FLAGS so the child build inherits things like +# --gcc-toolchain=... that RVS's build script sets to make amdclang++ pick up +# a modern libstdc++ (required for C++20 in TransferBench). +# +# TRANSFERBENCH_GPU_TARGETS narrows the set of GPU archs TransferBench builds +# for. Defaults to the same set RVS itself ships on so the package isn't +# bloated and the CI build doesn't time out on archs RVS doesn't care about. +# Override with -DTRANSFERBENCH_GPU_TARGETS="gfx906;gfx90a;..." or set to +# empty to take TransferBench's default (13 archs). +# +################################################################################ + +include(ExternalProject) + +if(NOT TRANSFERBENCH_SOURCE_DIR) + message(FATAL_ERROR "TRANSFERBENCH_SOURCE_DIR not set") +endif() + +set(TRANSFERBENCH_BUILD_DIR "${CMAKE_BINARY_DIR}/TransferBench-cli-build") + +# Narrow GPU target set by default. Empty string = take TB's own default. +set(TRANSFERBENCH_GPU_TARGETS + "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201" + CACHE STRING "GPU targets to build TransferBench for") + +set(_tb_cmake_args + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DROCM_PATH=${ROCM_PATH} + -DBUILD_PACKAGES=OFF +) + +# Forward parent CXX flags (carries --gcc-toolchain=... on RHEL/manylinux so +# amdclang++ picks up a modern libstdc++ with ). +if(CMAKE_CXX_FLAGS) + list(APPEND _tb_cmake_args "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") +endif() + +if(TRANSFERBENCH_GPU_TARGETS) + list(APPEND _tb_cmake_args "-DGPU_TARGETS=${TRANSFERBENCH_GPU_TARGETS}") +endif() + +if(DEFINED ROCM_MAJOR_VERSION) + list(APPEND _tb_cmake_args -DROCM_MAJOR_VERSION=${ROCM_MAJOR_VERSION}) +endif() + +# Build only -- never run TransferBench's own install rules (see header). The +# binary is consumed directly from the build tree by the install(PROGRAMS) +# below, so there is no separate child install directory to leak into packages. +ExternalProject_Add(TransferBenchCLI + SOURCE_DIR "${TRANSFERBENCH_SOURCE_DIR}" + BINARY_DIR "${TRANSFERBENCH_BUILD_DIR}" + CMAKE_ARGS ${_tb_cmake_args} + BUILD_ALWAYS OFF + INSTALL_COMMAND "" + TEST_COMMAND "" + LOG_CONFIGURE ON + LOG_BUILD ON + LOG_OUTPUT_ON_FAILURE ON +) + +# Install the TransferBench CLI binary into the rvs package layout (same +# component as rvs itself, so it lands in the same DEB/RPM). Pulled straight +# from the child build tree -- TransferBench emits it at the build-dir root via +# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .). +install(PROGRAMS "${TRANSFERBENCH_BUILD_DIR}/TransferBench" + DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} + COMPONENT rvsmodule) diff --git a/CMakeTransferBenchDownload.cmake b/CMakeTransferBenchDownload.cmake deleted file mode 100644 index ec26da326..000000000 --- a/CMakeTransferBenchDownload.cmake +++ /dev/null @@ -1,40 +0,0 @@ -################################################################################ -## -## Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. -## -## MIT LICENSE: -## Permission is hereby granted, free of charge, to any person obtaining a copy of -## this software and associated documentation files (the "Software"), to deal in -## the Software without restriction, including without limitation the rights to -## use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -## of the Software, and to permit persons to whom the Software is furnished to do -## so, subject to the following conditions: -## -## The above copyright notice and this permission notice shall be included in all -## copies or substantial portions of the Software. -## -## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -## SOFTWARE. -## -################################################################################ - -cmake_minimum_required(VERSION 3.5.0) - -project(TransferBench-download NONE) - -include(ExternalProject) -ExternalProject_Add(TransferBench - GIT_REPOSITORY https://github.com/ROCm/TransferBench.git - GIT_TAG c78c4aec95e5e8317ddecdf6e224443f63473312 #TransferBench v1.66.02 - SOURCE_DIR "${CMAKE_BINARY_DIR}/TransferBench-src" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) diff --git a/README.md b/README.md index 0dbd57513..d450cbf7a 100644 --- a/README.md +++ b/README.md @@ -117,9 +117,26 @@ This section explains how to get and compile current development stream of RVS. ### Clone repository ``` -git clone https://github.com/ROCm/ROCmValidationSuite.git +git clone --recurse-submodules https://github.com/ROCm/ROCmValidationSuite.git ``` +If the repository was already cloned without `--recurse-submodules`, initialise the TransferBench submodule from inside the clone: + +``` +git submodule update --init --recursive +``` + +### Bundled TransferBench + +[TransferBench](https://github.com/ROCm/TransferBench) is vendored under `external/TransferBench` as a git submodule and built/installed alongside `rvs` by default, so the same DEB/RPM ships both `rvs` and the `TransferBench` CLI. + +The bundled CLI is provided **for compatibility** with existing workflows that invoke `TransferBench` directly. For new work, prefer either: + +- **RVS**, which exposes TransferBench functionality through the `pebb` and `pbqt` modules with config-driven test definitions, or +- The **TransferBench API** (headers under `external/TransferBench/src/header`) for programmatic use. + +Pass `-DBUILD_TRANSFERBENCH_CLI=OFF` to cmake to skip building the CLI. + **Note:** The above command clones the master branch. If you're using a specific ROCm release, it's recommended to use the corresponding RVS version from the same release branch to ensure compatibility. diff --git a/build_packages_local.sh b/build_packages_local.sh index 0401e0228..4820e5d67 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -864,13 +864,51 @@ if command -v rpm >/dev/null 2>&1; then fi # Create TGZ package +# +# TGZ uses a different layout than DEB/RPM: CPACK_PACKAGING_INSTALL_PREFIX is +# emptied so files land at the tarball root (bin/, lib/, share/) rather than +# under /opt/rocm/extras-/. RVS bakes CPACK_PACKAGING_INSTALL_PREFIX into +# each install() DESTINATION at configure time, so we must RE-configure (not +# just re-cpack) for the destinations to flip. +# +# Two extra steps are needed for a clean tarball: +# - Re-build after the re-configure so ExternalProject sub-builds (the bundled +# TransferBench CLI) are rebuilt against the new state; otherwise cpack would +# copy from a stale sub-build tree and silently miss files. +# - Prune empty directories from the tarball afterwards. With +# CPACK_SET_DESTDIR=ON, CPack materialises CMAKE_INSTALL_PREFIX +# (/opt/rocm/extras-) under DESTDIR even though every real install() +# destination keys off the emptied CPACK_PACKAGING_INSTALL_PREFIX, leaving an +# empty opt/rocm/extras-/ tree. We must NOT fix this by setting +# CMAKE_INSTALL_PREFIX=/ : GNUInstallDirs' FHS special case then rewrites +# bin->usr/bin, lib->usr/lib, ... (and -DCMAKE_INSTALL_BINDIR=bin does not +# override it), nesting the whole package under usr/. Instead keep the root +# layout and strip empty dirs from the tarball after cpack. RVS never ships +# intentionally-empty directories. print_info "Creating TGZ package..." CMAKE_ARGS+=(-DCPACK_SET_DESTDIR=ON -DCPACK_MONOLITHIC_INSTALL=ON "-DCPACK_PACKAGING_INSTALL_PREFIX:PATH=" -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF) $CMAKE_COMMAND "${CMAKE_ARGS[@]}" +$CMAKE_COMMAND --build "$BUILD_DIR" -- -j"$(nproc 2>/dev/null || echo 4)" || print_warning "Re-build before TGZ packaging reported errors; proceeding with cpack" cd "$BUILD_DIR" cpack -G TGZ --verbose +cpack_tgz_status=$? + +# Strip empty directories left in the tarball by CPack DESTDIR staging +# (notably opt/rocm/extras-/). See the comment above the TGZ configure. +if [ $cpack_tgz_status -eq 0 ]; then + for _tgz in amdrocm*-rvs*.tar.gz; do + [ -e "$_tgz" ] || continue + _staged=$(mktemp -d) + if tar xzf "$_tgz" -C "$_staged"; then + find "$_staged" -depth -mindepth 1 -type d -empty -delete + ( cd "$_staged" && tar czf "$OLDPWD/$_tgz" -- * ) + print_info "Pruned empty staging directories from $_tgz" + fi + rm -rf "$_staged" + done +fi -if [ $? -eq 0 ]; then +if [ $cpack_tgz_status -eq 0 ]; then TGZ_FILE=$(ls amdrocm*-rvs*.tar.gz 2>/dev/null | head -1) if [ -n "$TGZ_FILE" ]; then print_success "Created TGZ package: $TGZ_FILE" diff --git a/docs/index.rst b/docs/index.rst index 82574feda..e7573fe29 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -26,6 +26,7 @@ For more information, refer to `GitHub. ` + * :doc:`TransferBench in RVS ` To contribute to the documentation, refer to `Contributing to ROCm `_. diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 16f6cfe95..90ff22d89 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -12,6 +12,8 @@ subtrees: title: User guide - file: features.md title: ROCm Validation Suite modules + - file: transferbench.md + title: TransferBench in RVS - caption: About entries: - file: license.md diff --git a/docs/transferbench.md b/docs/transferbench.md new file mode 100644 index 000000000..a616ffb5a --- /dev/null +++ b/docs/transferbench.md @@ -0,0 +1,86 @@ +# TransferBench in RVS + +[TransferBench](https://github.com/ROCm/TransferBench) is a low-level utility +for measuring host-to-device, device-to-device, and NIC transfer performance on +AMD platforms. It is vendored into RVS as a git submodule at +`external/TransferBench` and built as part of the RVS build. + +## What ships in the RVS package + +Building RVS produces a single DEB or RPM that contains: + +- The `rvs` launcher and all RVS test modules, including `pebb.so` and + `pbqt.so`, which use the TransferBench headers internally as their transfer + backend. +- The standalone `TransferBench` CLI binary, installed alongside `rvs` under + the same prefix (for example `/opt/rocm/extras-/bin/TransferBench`). + +No separate TransferBench package needs to be installed. + +## Why the CLI is bundled + +The `TransferBench` CLI is bundled **for compatibility**. Existing tooling, +scripts, and CI pipelines that invoke `TransferBench` directly continue to +work after installing RVS, without requiring a second package. + +For new work, the recommended entry points are: + +- **RVS** — use the `pebb` and `pbqt` modules with a YAML config to drive + TransferBench through RVS's standard CLI, result schema, and logging. + See the [User guide](ug1main.md) for the supported `transfer_method`, + `transferbench_test`, `executor`, and related options. +- **The TransferBench API** — headers live under + `external/TransferBench/src/header`. Link against the headers from your + own application when you need programmatic access to the transfer engine. + +The standalone CLI should be reserved for reproducing legacy benchmark +invocations or for ad-hoc one-off measurements outside an RVS run. + +## Build options + +The CLI is built by default. To skip it, pass: + +``` +cmake -DBUILD_TRANSFERBENCH_CLI=OFF ... +``` + +Skipping the CLI does not affect RVS's `pebb`/`pbqt` modules — they consume +the TransferBench *headers* from the submodule, not the CLI binary. + +The set of GPU architectures the CLI is compiled for can be narrowed with: + +``` +cmake -DTRANSFERBENCH_GPU_TARGETS="gfx90a;gfx942;gfx950" ... +``` + +By default RVS builds the CLI for the same arch set RVS itself ships on. + +## Submodule layout + +``` +ROCmValidationSuite/ + external/ + TransferBench/ # git submodule, pinned in the RVS tree + src/ + client/Client.cpp # CLI entry point + header/ # public headers consumed by pebb/pbqt +``` + +After cloning RVS, initialise the submodule if you did not pass +`--recurse-submodules`: + +``` +git submodule update --init --recursive +``` + +## Version pinning + +The TransferBench submodule is pinned to a specific commit in the RVS tree, +so a given RVS tag always bundles a known-good TransferBench revision. To +move to a newer TransferBench, update the submodule pointer in a normal pull +request against RVS. + +## Further reading + +- [TransferBench project](https://github.com/ROCm/TransferBench) +- [RVS User guide — `pebb` and `pbqt` modules](ug1main.md) diff --git a/external/TransferBench b/external/TransferBench new file mode 160000 index 000000000..c78c4aec9 --- /dev/null +++ b/external/TransferBench @@ -0,0 +1 @@ +Subproject commit c78c4aec95e5e8317ddecdf6e224443f63473312 From e329643c911d1b0d1122ba0f4138e792ce11dd2b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 17 Jun 2026 01:00:53 -0500 Subject: [PATCH 212/275] Add time duration cli option Update cli. documentation. --- docs/cli.md | 23 +++++++++++++++++++---- docs/ug1main.md | 10 +++++++--- rvs/src/rvscli.cpp | 7 +++++-- rvs/src/rvsexec.cpp | 25 +++++++++++++++++++++++-- rvs/src/rvsexec_do_yaml.cpp | 6 ++++++ 5 files changed, 60 insertions(+), 11 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 63a8b52f7..1dfd59a9c 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -2,7 +2,7 @@ ## Synopsis -rvs [-h|-g|-t|--version|--help|--listTests|--listGpus] +rvs [-h|-g|--version|--help|--listTests|--listGpus] rvs [[[-d|--debugLevel] 0|--quiet] | [[-d|--debugLevel] 1|2|3|4] | [[-d|--debugLevel] 5|--verbose|-v]] [-c path/config_file] [-l path/log_file [-a] [-j]] @@ -27,22 +27,37 @@ -i --indexes Comma separated list of GPU ids/indexes to run test on. This overrides the device/device_index values specified for every actions in the - configuration file, including the ‘all’ value. + configuration file, including the 'all' value. + +-s --selectActions Comma separated list of action names or 0-based action index numbers + to run from the configuration file. Only the matching actions will + be executed. All other actions are skipped. -j --json Generate output file in JSON format. if a path follows this argument, that will be used as json log file; else a file created in /var/tmp/ with timestamp in name. + -l --debugLogFile Generate log file with output and debug information. +-m --module Specify a module name to run the corresponding platform-specific + (MI-series GPUs) module configuration file. Valid modules: babel, + gpup, gst, iet, mem, pebb, peqt, pbqt, rcqt. --t --listTests List the test modules present in RVS. +-t --duration Specify the test duration (in seconds) for each action. Overrides + the duration value in all actions of the configuration file. + + --listTests List the test modules present in RVS. -v --verbose Enable verbose reporting. Equivalent to specifying -d 5 option. +-p --parallel Enables or disables parallel execution across multiple GPUs. Use in + conjunction with -c option. Accepted values: true, false. If no + value is provided, defaults to true. + -n --numTimes Number of times the test repeatedly executes. Use in conjunction with -c option. - --quiet No console output given. See logs and return code for errors. +-q --quiet No console output given. See logs and return code for errors. --version Display version information and exit. diff --git a/docs/ug1main.md b/docs/ug1main.md index 634ed5faa..22fa32a8c 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -220,7 +220,11 @@ platform-specific (MI-series GPUs) module configuration file. Valid modules: gst, iet, mem, pebb, peqt, pbqt, rcqt. --t--listTestsList the test modules present in RVS. +-t--durationSpecify the test duration (in seconds) for each action. +Overrides the duration value in all actions of the configuration file. + + +--listTestsList the test modules present in RVS. -v--verboseEnable detailed logging. Equivalent to specifying -d 5 option. @@ -238,7 +242,7 @@ If no value is provided for the option, it defaults to true. Use this option in conjunction with -c option. ---quietNo console output given. See logs and return +-q--quietNo console output given. See logs and return code for errors. --versionDisplays the version information and exits. @@ -276,7 +280,7 @@ Print version information and exit: List all available test modules: ```bash -./rvs -t +./rvs --listTests ``` List all GPUs visible to RVS: ```bash diff --git a/rvs/src/rvscli.cpp b/rvs/src/rvscli.cpp index 04e0e1ac7..f07ce69a0 100644 --- a/rvs/src/rvscli.cpp +++ b/rvs/src/rvscli.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -183,8 +183,11 @@ void rvs::cli::init_grammar() { grammar.insert(gpair("-r", sp)); grammar.insert(gpair("--run", sp)); - sp = std::make_shared("-t", command); + sp = std::make_shared("-t", command, value); grammar.insert(gpair("-t", sp)); + grammar.insert(gpair("--duration", sp)); + + sp = std::make_shared("--listTests", command); grammar.insert(gpair("--listTests", sp)); sp = std::make_shared("-v", command); diff --git a/rvs/src/rvsexec.cpp b/rvs/src/rvsexec.cpp index eb4b58ccd..dcbe0a37d 100644 --- a/rvs/src/rvsexec.cpp +++ b/rvs/src/rvsexec.cpp @@ -290,6 +290,24 @@ int rvs::exec::run() { } } + // check -t option + if (rvs::options::has_option("-t", &val)) { + try { + int64_t dur = std::stoll(val); + if (dur <= 0) { + rvs::logger::Err("duration must be greater than 0", MODULE_NAME_CAPS); + return -1; + } + } + catch(...) { + char buff[1024]; + snprintf(buff, sizeof(buff), + "duration value not a valid integer: %s", val.c_str()); + rvs::logger::Err(buff, MODULE_NAME_CAPS); + return -1; + } + } + // construct modules configuration file relative path val = path + "../share/rocm-validation-suite/conf/.rvsmodules.config"; // Check if config file exists if not check the old file location for backward compatibility @@ -303,7 +321,7 @@ int rvs::exec::run() { return 1; } - if (rvs::options::has_option("-t", &val)) { + if (rvs::options::has_option("--listTests", &val)) { cout << endl << "ROCm Validation Suite (version " << RVS_VERSION_STRING << ")" << endl << endl; cout << "Modules available:" << endl; @@ -570,7 +588,10 @@ void rvs::exec::do_help() { cout << " (MI-series GPUs) module configuration file. Valid modules: babel, gpup, gst, iet,\n"; cout << " mem, pebb, peqt, pbqt, rcqt.\n\n"; - cout << "-t --listTests List the test modules present in RVS.\n\n"; + cout << "-t --duration Specify the test duration (in seconds) for each action.\n"; + cout << " Overrides the duration value in all actions of the configuration file.\n\n"; + + cout << " --listTests List the test modules present in RVS.\n\n"; cout << "-v --verbose Enable detailed logging. Equivalent to specifying -d 5 option.\n\n"; diff --git a/rvs/src/rvsexec_do_yaml.cpp b/rvs/src/rvsexec_do_yaml.cpp index aaef9614d..a12bf8de9 100644 --- a/rvs/src/rvsexec_do_yaml.cpp +++ b/rvs/src/rvsexec_do_yaml.cpp @@ -1004,6 +1004,12 @@ int rvs::exec::do_yaml_properties(const YAML::Node& node, } } + string duration; + if (rvs::options::has_option("-t", &duration)) { + uint64_t dur_ms = std::stoull(duration) * 1000; + sts += pif1->property_set("duration", std::to_string(dur_ms)); + } + return sts; } From 4df993f5427bed2b81e58f90bde676b9e4438905 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 23 Jun 2026 15:53:55 -0400 Subject: [PATCH 213/275] Added the support for RVS Release test pipeline Signed-off-by: Urvashi Tiwari --- .github/workflows/README_RELEASE_TESTS.md | 205 ++++++++++ .github/workflows/rvs-release-tests.yml | 313 +++++++++++++++ rvs_release_test.sh | 453 ++++++++++++++++++++++ 3 files changed, 971 insertions(+) create mode 100644 .github/workflows/README_RELEASE_TESTS.md create mode 100644 .github/workflows/rvs-release-tests.yml create mode 100755 rvs_release_test.sh diff --git a/.github/workflows/README_RELEASE_TESTS.md b/.github/workflows/README_RELEASE_TESTS.md new file mode 100644 index 000000000..a1663c268 --- /dev/null +++ b/.github/workflows/README_RELEASE_TESTS.md @@ -0,0 +1,205 @@ +# RVS Release Tests Workflow + +This document describes [`.github/workflows/rvs-release-tests.yml`](./rvs-release-tests.yml), +which picks up the **latest RVS release tarball** from the release tarball index +(`secrets.RVS_RELEASE_TARBALL_INDEX_URL`, passed through workflow `env.TARBALL_INDEX_URL` — +**no default URL in the repo**), copies it to a +**dedicated release test GPU node** over SSH, installs it there, and runs **RVS level 5** +(full stress) on that node. + +Release testing is intentionally separate from [nightly tests](./README_NIGHTLY_TESTS.md): +different tarball channel, different target-node secrets, and a heavier test level. + +The GitHub Actions runner is only an **orchestrator** — it does not need a GPU or ROCm +locally. Install, binary verification, and `rvs -r 5` run on the remote target. + +## What it does + +``` +workflow_run (release/* build) / workflow_dispatch + │ + ▼ +gate-release-trigger [utility runner] — skip non-release workflow_run events + ▼ +install-rvs-on-target [self-hosted orchestrator] ──ssh──▶ [release GPU node] + │ resolve release index + validate paths (orchestrator only) + │ setup-ssh → download .tar.gz on runner → scp to target + │ verify-rocm → install-rvs → verify-rvs-binary + ▼ +run-rvs-level-5 [self-hosted orchestrator] ──ssh──▶ [release GPU node] + │ rvs_release_test.sh: run-level5 (release tarballs only), collect-logs, capture-versions + │ upload intermediate logs artifact; cleanup remote work dir + ▼ +create-test-report [utility runner] + │ rvs_release_test.sh build-report → SUMMARY.md + final artifact + ▼ +artifact: rvs-release-report- +``` + +Install, test, and report logic lives in [`rvs_release_test.sh`](../../rvs_release_test.sh) +at the repo root — independent from [`rvs_nightly_test.sh`](../../rvs_nightly_test.sh) (nightly) +and [`rvs_pr_test.sh`](../../rvs_pr_test.sh) (PR). + +## Triggers + +| Trigger | When it runs | +|---|---| +| `workflow_run` | After **Build Relocatable Packages** completes **successfully** on a `release/*` branch. Builds on `main`, feature branches, or failed release builds do **not** start this workflow. | +| `workflow_dispatch` | Manual run from the Actions UI (or `gh workflow run`). Always eligible; does not require a prior package build. | + +There is no `schedule` trigger — release validation is tied to release package publication +or explicit manual runs. + +## Manual dispatch inputs + +| Input | Default | Description | +|---|---|---| +| `tarball_url` | _(empty → latest from release index)_ | Download this exact URL instead of scraping the release index. | +| `target_node` | _(empty → `secrets.RVS_RELEASE_TARGET_NODE`)_ | Hostname or IP of the release test GPU node. | +| `target_user` | _(empty → `secrets.RVS_RELEASE_TARGET_USER`)_ | SSH user on the target node. | +| `remote_work_dir` | _(empty → `vars.RVS_RELEASE_REMOTE_WORK_DIR`, then `/tmp/rvs-release-`)_ | Staging and log directory on the target; removed at job end. | +| `target_rocm_path` | _(empty → `secrets.RVS_RELEASE_TARGET_ROCM_PATH`)_ | Absolute path to the ROCm install root on the target. | + +Workflow inputs override repo secrets for that run only. + +Examples: + +```bash +# Latest release tarball from the index secret, default release target secrets +gh workflow run rvs-release-tests.yml + +# Pin a specific release tarball +gh workflow run rvs-release-tests.yml \ + -f tarball_url="/amdrocm7-rvs-1.4.21-r0711.20260623-Linux.tar.gz" + +# One-off run against a different node (secrets unchanged) +gh workflow run rvs-release-tests.yml \ + -f target_node="" \ + -f target_user="" \ + -f target_rocm_path="" +``` + +## Repository configuration + +### Secrets (release-specific) + +All release target settings are **secrets** (masked as `***` in logs): + +| Name | Required? | Purpose | +|---|---|---| +| `RVS_RELEASE_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the release validation GPU node. | +| `RVS_RELEASE_TARGET_USER` | optional | SSH user on the release target. If unset, SSH falls back to the orchestrator runner's local user. | +| `RVS_RELEASE_TARGET_SSH_KEY` | **Required** | Private SSH key authorized on the release target for `RVS_RELEASE_TARGET_USER`. | +| `RVS_RELEASE_TARGET_ROCM_PATH` | **Required** *(unless every run sets `target_rocm_path` input)* | Absolute path to the ROCm install root on the release target (`bin/rocminfo`, `bin/amd-smi`, `lib/`, etc.). | +| `RVS_RELEASE_TARBALL_INDEX_URL` | **Required** *(unless every run provides `workflow_dispatch` `tarball_url`; `workflow_run` needs this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` release tarball. Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. | + +These are **independent** from nightly/PR secrets (`RVS_TARGET_*`, `RVS_TARBALL_INDEX_URL`). Use a dedicated +release-validation host so full-stress level 5 does not contend with nightly level 4. + +### Variables (optional) + +| Name | Default | Purpose | +|---|---|---| +| `RVS_RELEASE_INDEX_RUNNER_LABEL` | falls back to `RVS_NIGHTLY_INDEX_RUNNER_LABEL`, then `RVS_TEST_RUNNER_LABEL`, then `self-hosted` | Runner label for **install-rvs-on-target** (index resolve + download + scp). | +| `RVS_RELEASE_TEST_RUNNER_LABEL` | falls back to `RVS_TEST_RUNNER_LABEL`, then `self-hosted` | Runner label for **run-rvs-level-5**. | +| `RVS_RELEASE_REMOTE_WORK_DIR` | `/tmp/rvs-release-` | Fixed remote work dir when not using the per-run input. | + +## How the latest release tarball is picked + +Unless `workflow_dispatch.tarball_url` is set, **install-rvs-on-target** scrapes +`secrets.RVS_RELEASE_TARBALL_INDEX_URL` (workflow `env.TARBALL_INDEX_URL`): + +```bash +curl -sL "$INDEX_URL" \ + | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' \ + | sort -uV \ + | tail -n 1 +``` + +The version-sorted newest filename is downloaded on the orchestrator and `scp`'d to the +target. The target never fetches the index or tarball URL directly. + +Release tarballs are published by +[Build Relocatable Packages](./build-relocatable-packages.yml) when a `release/*` +branch build completes (CentOS job uploads the `.tar.gz` to the release tarball prefix). + +## The test — level 5 (full stress) + +On the target node (with `$RVS_BIN` = `/opt/rocm/extras-/bin/rvs`): + +```bash +"$RVS_BIN" -r 5 +``` + +Level 5 runs the full stress suite (extended duration vs level 4). Expect **hours** of +runtime depending on GPU SKU and configuration. The **run-rvs-level-5** job timeout is +**480 minutes** (8 hours); increase `timeout-minutes` in the workflow if your hardware +needs longer. + +Stdout/stderr is captured to `$REMOTE_WORK_DIR/reports/rvs_level_5.log` on the target, +then copied back to `./reports/` on the orchestrator. + +See [RVS user guide — test levels](../../docs/ug1main.md) for what level 5 includes. + +## Test report + +`create-test-report` writes `reports/SUMMARY.md` and uploads artifact +`rvs-release-report-`: + +```markdown +# RVS Release Test Report + +| Field | Value | +|---|---| +| Tarball | `amdrocm7-rvs-…-Linux.tar.gz` | +| Overall result | **PASS** | + +## Results + +| Test | Command | Result | Exit | +|---------|--------------------------------------|:------:|-----:| +| Level 5 | `/opt/rocm/extras-7/bin/rvs -r 5` | PASS | 0 | +``` + +Artifact contents: + +``` +rvs-release-report-/ +├── SUMMARY.md +└── rvs_level_5.log +``` + +## Target node prerequisites + +Same requirements as nightly tests — see +[README_NIGHTLY_TESTS.md — prerequisites](./README_NIGHTLY_TESTS.md#target-node-prerequisites) +for SSH, `NOPASSWD` sudo, ROCm layout, and the manual validation one-liner. + +Quick checklist for the **release** node: + +- SSH reachable from the orchestrator; `RVS_RELEASE_TARGET_SSH_KEY` authorized. +- ROCm at `RVS_RELEASE_TARGET_ROCM_PATH` with `rocminfo` and `amd-smi` working. +- GPU(s) suitable for sustained level 5 stress (power/thermal headroom, no conflicting jobs). +- `sudo -n` if `/opt/rocm/extras-` is not user-writable. + +## Troubleshooting + +| Symptom | Likely cause | +|---|---| +| Workflow skipped after a main-branch package build | Expected — only `release/*` builds pass `gate-release-trigger`. | +| `No tarball index URL` | Set `RVS_RELEASE_TARBALL_INDEX_URL` secret or pass `tarball_url` on manual dispatch. | +| `Required environment variable TARGET_NODE is not set` | Add `RVS_RELEASE_TARGET_NODE` secret or `target_node` input. | +| Level 5 job cancelled at 8h | Increase `timeout-minutes` on **run-rvs-level-5** for slower SKUs. | +| `ldd` / library errors before level 5 | Fix ROCm or RVS install paths on the target; see nightly README verify steps. | + +For orchestrator SSH, index resolution, and log collection details, see +[README_NIGHTLY_TESTS.md](./README_NIGHTLY_TESTS.md). + +## Related workflows + +| Workflow | Script | Tarball source | Test level | Target secrets | +|---|---|---|---|---| +| [rvs-nightly-tests.yml](./rvs-nightly-tests.yml) | `rvs_nightly_test.sh` | `RVS_TARBALL_INDEX_URL` | 4 | `RVS_TARGET_*` | +| [rvs-pr-tests.yml](./rvs-pr-tests.yml) | `rvs_pr_test.sh` | PR package URL | 4 | `RVS_TARGET_*` | +| **rvs-release-tests.yml** | **`rvs_release_test.sh`** | **`RVS_RELEASE_TARBALL_INDEX_URL`** | **5** | **`RVS_RELEASE_TARGET_*`** | +| [build-relocatable-packages.yml](./build-relocatable-packages.yml) | — | _(builds packages)_ | — | — | diff --git a/.github/workflows/rvs-release-tests.yml b/.github/workflows/rvs-release-tests.yml new file mode 100644 index 000000000..d85944c2f --- /dev/null +++ b/.github/workflows/rvs-release-tests.yml @@ -0,0 +1,313 @@ +name: RVS Release Tests + +# Picks up the latest RVS release tarball from the release CDN index, copies it +# to a configurable target node, installs it there, runs RVS level 5 on that node, +# and uploads a Markdown report + logs. +# +# Orchestration lives in this workflow; install/test/report steps run via +# rvs_release_test.sh (level 5; release tarball channel only). +# +# See README_RELEASE_TESTS.md for setup and prerequisites. +# +# Triggers +# -------- +# - workflow_run: after Build Relocatable Packages completes successfully on release/* +# - workflow_dispatch: manual run with optional overrides + +on: + workflow_run: + workflows: ["Build Relocatable Packages"] + types: + - completed + workflow_dispatch: + inputs: + tarball_url: + description: 'Override tarball URL (default: latest from release index)' + required: false + default: '' + target_node: + description: 'Hostname/IP of node to install RVS on and run tests (default: secrets.RVS_RELEASE_TARGET_NODE)' + required: false + default: '' + target_user: + description: 'SSH user on the target node (default: secrets.RVS_RELEASE_TARGET_USER)' + required: false + default: '' + remote_work_dir: + description: 'Working dir on the target node (default: /tmp/rvs-release-)' + required: false + default: '' + target_rocm_path: + description: 'ROCm tarball install root on the target node (default: secrets.RVS_RELEASE_TARGET_ROCM_PATH)' + required: false + default: '' + +permissions: + contents: read + +concurrency: + group: rvs-release-${{ github.workflow }} + cancel-in-progress: false + +env: + # HTTPS directory listing for release tarballs — set repo secret RVS_RELEASE_TARBALL_INDEX_URL. + TARBALL_INDEX_URL: ${{ secrets.RVS_RELEASE_TARBALL_INDEX_URL }} + +jobs: + gate-release-trigger: + name: Gate (release builds only) + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'release/')) + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + steps: + - name: Confirm release test run + run: | + if [ "${{ github.event_name }}" = "workflow_run" ]; then + echo "Release build completed on branch: ${{ github.event.workflow_run.head_branch }}" + else + echo "Manual release test run (workflow_dispatch)" + fi + + install-rvs-on-target: + name: Install RVS on target node + needs: gate-release-trigger + runs-on: ${{ vars.RVS_RELEASE_INDEX_RUNNER_LABEL || vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 120 + outputs: + tarball_url: ${{ steps.resolve.outputs.tarball_url }} + tarball_name: ${{ steps.resolve.outputs.tarball_name }} + remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} + rocm_major: ${{ steps.prepare.outputs.rocm_major }} + install_dir: ${{ steps.prepare.outputs.install_dir }} + rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} + env: + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_RELEASE_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_RELEASE_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || secrets.RVS_RELEASE_TARGET_ROCM_PATH }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Resolve latest release tarball URL (orchestrator only) + id: resolve + env: + INPUT_URL: ${{ inputs.tarball_url }} + run: | + set -euo pipefail + + INDEX_URL="${TARBALL_INDEX_URL:-}" + + if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL}" ]; then + echo "::error::No tarball index URL (set Actions secret RVS_RELEASE_TARBALL_INDEX_URL) and no workflow_dispatch.tarball_url." + exit 1 + fi + + fetch_latest() { + local idx="$1" + local html raw name + html="$(curl -sSL --max-time 60 --retry 2 --retry-delay 2 "$idx" 2>/dev/null || true)" + if [ -z "$html" ]; then + echo "::error::curl returned empty body for index URL (check orchestrator HTTPS egress and URL): ${idx}" >&2 + return 0 + fi + raw="$(printf '%s' "$html" | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' 2>/dev/null || true)" + name="$(printf '%s\n' "$raw" | sort -uV | tail -n 1 || true)" + if [ -z "$name" ]; then + echo "::error::Index page contained no amdrocm*-rvs-*-Linux.tar.gz links (check listing format or regex). Index URL: ${idx}" >&2 + echo "::notice::First 800 chars of response (for debugging):" >&2 + printf '%.800s\n' "$html" >&2 || true + echo "" >&2 + return 0 + fi + printf '%s/%s\n' "${idx%/}" "$name" + } + + if [ -n "${INPUT_URL:-}" ]; then + URL="$INPUT_URL" + else + URL="$(fetch_latest "$INDEX_URL")" + fi + + if [ -z "${URL:-}" ]; then + echo "::error::Could not resolve a tarball URL from index: ${INDEX_URL}" + exit 1 + fi + + NAME="$(basename "$URL")" + + { + echo "tarball_url<> "$GITHUB_OUTPUT" + + { + echo "TARBALL_URL<> "$GITHUB_ENV" + + echo "Latest release tarball : $NAME" + echo "URL : $URL" + + - name: Validate configuration and derive paths + id: prepare + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} + INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} + VAR_REMOTE_WORK_DIR: ${{ vars.RVS_RELEASE_REMOTE_WORK_DIR }} + GITHUB_RUN_ID: ${{ github.run_id }} + run: | + chmod +x rvs_release_test.sh + ./rvs_release_test.sh validate-config + + - name: Export paths for remaining steps + run: | + { + echo "REMOTE_WORK_DIR=${{ steps.prepare.outputs.remote_work_dir }}" + echo "ROCM_MAJOR=${{ steps.prepare.outputs.rocm_major }}" + echo "INSTALL_DIR=${{ steps.prepare.outputs.install_dir }}" + echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" + } >> "$GITHUB_ENV" + + - name: Setup SSH for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_RELEASE_TARGET_SSH_KEY }} + run: | + chmod +x rvs_release_test.sh + ./rvs_release_test.sh setup-ssh + + - name: Download tarball on orchestrator runner + run: ./rvs_release_test.sh download-tarball + + - name: Copy tarball to target node + run: ./rvs_release_test.sh copy-to-target + + - name: Verify ROCm prerequisites on target node + run: ./rvs_release_test.sh verify-rocm + + - name: Install RVS on target node + run: ./rvs_release_test.sh install-rvs + + - name: Verify RVS binary library resolution on target node + run: ./rvs_release_test.sh verify-rvs-binary + + - name: Cleanup local SSH state + if: always() + run: ./rvs_release_test.sh cleanup-local-ssh + + run-rvs-level-5: + name: Run RVS level 5 on target node + needs: [install-rvs-on-target] + runs-on: ${{ vars.RVS_RELEASE_TEST_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 480 + outputs: + rc: ${{ steps.level5.outputs.rc }} + start: ${{ steps.level5.outputs.start }} + end: ${{ steps.level5.outputs.end }} + rvs_version: ${{ steps.versions.outputs.rvs_version }} + target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} + env: + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_RELEASE_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_RELEASE_TARGET_USER }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || secrets.RVS_RELEASE_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.install-rvs-on-target.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.install-rvs-on-target.outputs.install_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup SSH for target node + env: + SSH_PRIVATE_KEY: ${{ secrets.RVS_RELEASE_TARGET_SSH_KEY }} + run: | + chmod +x rvs_release_test.sh + ./rvs_release_test.sh setup-ssh + + - name: Run RVS level 5 on target node + id: level5 + run: ./rvs_release_test.sh run-level5 + + - name: Collect logs from target node + if: always() + run: ./rvs_release_test.sh collect-logs + + - name: Capture RVS and ROCm versions from target + id: versions + if: always() + run: ./rvs_release_test.sh capture-versions + + - name: Upload test logs (intermediate) + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-release-logs-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Cleanup remote work dir and local SSH state + if: always() + run: | + ./rvs_release_test.sh cleanup-remote + ./rvs_release_test.sh cleanup-local-ssh + + create-test-report: + name: Create Test Report + needs: [install-rvs-on-target, run-rvs-level-5] + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + if: always() && !cancelled() && needs.install-rvs-on-target.result == 'success' && needs.run-rvs-level-5.result != 'skipped' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Download test logs + uses: actions/download-artifact@v4 + with: + name: rvs-release-logs-${{ github.run_id }} + path: ./reports + continue-on-error: true + + - name: Build test report + id: report + env: + TARBALL_URL: ${{ needs.install-rvs-on-target.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.install-rvs-on-target.outputs.tarball_name }} + TARGET_ROCM_PATH: ${{ inputs.target_rocm_path || secrets.RVS_RELEASE_TARGET_ROCM_PATH }} + REMOTE_WORK_DIR: ${{ needs.install-rvs-on-target.outputs.remote_work_dir }} + RVS_BIN: ${{ needs.install-rvs-on-target.outputs.rvs_bin }} + RVS_LEVEL5_RC: ${{ needs.run-rvs-level-5.outputs.rc }} + RVS_LEVEL5_START: ${{ needs.run-rvs-level-5.outputs.start }} + RVS_LEVEL5_END: ${{ needs.run-rvs-level-5.outputs.end }} + RVS_VERSION: ${{ needs.run-rvs-level-5.outputs.rvs_version }} + TARGET_ROCM_VERSION: ${{ needs.run-rvs-level-5.outputs.target_rocm_version }} + GITHUB_RUN_ID: ${{ github.run_id }} + GITHUB_SERVER_URL: ${{ github.server_url }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_EVENT_NAME: ${{ github.event_name }} + run: | + chmod +x rvs_release_test.sh + mkdir -p ./reports + ./rvs_release_test.sh build-report + + - name: Upload report and logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-release-report-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Fail the workflow if level 5 failed + if: steps.report.outputs.overall == 'FAIL' || needs.run-rvs-level-5.result == 'failure' + run: | + echo "::error::RVS release test failure — level5 rc=${{ needs.run-rvs-level-5.outputs.rc }}" + exit 1 diff --git a/rvs_release_test.sh b/rvs_release_test.sh new file mode 100755 index 000000000..3bfd03608 --- /dev/null +++ b/rvs_release_test.sh @@ -0,0 +1,453 @@ +#!/bin/bash +################################################################################ +# Remote RVS release-tarball install + test driver (rvs-release-tests.yml only). +# Independent from rvs_nightly_test.sh (nightly) and rvs_pr_test.sh (PR). +################################################################################ + +set -euo pipefail + +usage() { + cat <<'EOF' +Usage: rvs_release_test.sh + +Commands (workflow order): + validate-config Fail fast; emit prepare job outputs to GITHUB_OUTPUT + setup-ssh Write SSH key/config under RUNNER_TEMP and verify connectivity + verify-rocm Remote rocminfo + amd-smi on TARGET_ROCM_PATH + download-tarball curl tarball to ./pkg/ on the orchestrator runner only (never on SSH target) + copy-to-target scp tarball to REMOTE_WORK_DIR/pkg on target + install-rvs Extract tarball on target under INSTALL_DIR + verify-rvs-binary Remote ldd check on RVS_BIN + run-level5 Run rvs -r 5; write rc/start/end to GITHUB_OUTPUT if set + collect-logs scp remote logs to ./reports/ + capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT + build-report Write ./reports/SUMMARY.md from env + prior outputs + cleanup-remote rm -rf REMOTE_WORK_DIR on target + cleanup-local-ssh Remove workflow-scoped key/config files +EOF +} + +require_env() { + local name="$1" + if [ -z "${!name:-}" ]; then + echo "::error::Required environment variable $name is not set" >&2 + exit 1 + fi +} + +cmd_validate_config() { + require_env TARBALL_NAME + require_env TARGET_NODE + require_env TARGET_ROCM_PATH + + local input_remote="${INPUT_REMOTE_WORK_DIR:-}" + local var_remote="${VAR_REMOTE_WORK_DIR:-}" + local run_id="${GITHUB_RUN_ID:-local}" + + if [ -n "$input_remote" ]; then + REMOTE_WORK_DIR="$input_remote" + elif [ -n "$var_remote" ]; then + REMOTE_WORK_DIR="$var_remote" + else + REMOTE_WORK_DIR="/tmp/rvs-release-${run_id}" + fi + + if [[ "$TARBALL_NAME" =~ ^amdrocm([0-9]+)- ]]; then + ROCM_MAJOR="${BASH_REMATCH[1]}" + else + echo "::error::Cannot parse ROCm major version from tarball name: $TARBALL_NAME" >&2 + exit 1 + fi + + INSTALL_DIR="/opt/rocm/extras-${ROCM_MAJOR}" + RVS_BIN="${INSTALL_DIR}/bin/rvs" + + echo "SSH target : (omitted — use secrets RVS_RELEASE_TARGET_* / workflow inputs)" + echo "Target ROCm path : $TARGET_ROCM_PATH" + echo "Remote work dir : $REMOTE_WORK_DIR" + echo "ROCm major : $ROCM_MAJOR" + echo "Expected RVS binary : $RVS_BIN" + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + { + echo "remote_work_dir=$REMOTE_WORK_DIR" + echo "rocm_major=$ROCM_MAJOR" + echo "install_dir=$INSTALL_DIR" + echo "rvs_bin=$RVS_BIN" + } >> "$GITHUB_OUTPUT" + fi + + export REMOTE_WORK_DIR ROCM_MAJOR INSTALL_DIR RVS_BIN +} + +ssh_state_paths() { + local base="${RUNNER_TEMP:-/tmp}" + SSH_KEY_FILE="${base}/rvs_release_target_key" + SSH_CONFIG_FILE="${base}/rvs_release_target_ssh_config" + mkdir -p "$base" +} + +cmd_setup_ssh() { + require_env TARGET_NODE + require_env REMOTE_WORK_DIR + + ssh_state_paths + + if [ -n "${GITHUB_ENV:-}" ]; then + { + echo "SSH_KEY_FILE=$SSH_KEY_FILE" + echo "SSH_CONFIG_FILE=$SSH_CONFIG_FILE" + } >> "$GITHUB_ENV" + fi + + if [ -z "${SSH_PRIVATE_KEY:-}" ]; then + echo "::error::SSH_PRIVATE_KEY is not set; cannot SSH to target node." >&2 + exit 1 + fi + + install -m 600 /dev/null "$SSH_KEY_FILE" + printf '%s\n' "$SSH_PRIVATE_KEY" > "$SSH_KEY_FILE" + chmod 600 "$SSH_KEY_FILE" + + local known_hosts="${SSH_CONFIG_FILE}.known_hosts" + : > "$known_hosts" + chmod 600 "$known_hosts" + ssh-keyscan -T 15 -H "$TARGET_NODE" >> "$known_hosts" 2>/dev/null || true + + cat > "$SSH_CONFIG_FILE" <&2 + exit 1 + fi + echo "::notice::SSH connectivity OK." + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" +} + +cmd_verify_rocm() { + require_env SSH_CONFIG_FILE + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +echo "=== System ===" +uname -srvmo +echo +echo "=== Target ROCm path: ${TARGET_ROCM_PATH} ===" +if [ ! -d "${TARGET_ROCM_PATH}" ]; then + echo "::error::${TARGET_ROCM_PATH} does not exist on the target node." + exit 1 +fi +echo "=== ${TARGET_ROCM_PATH}/bin/rocminfo ===" +"${TARGET_ROCM_PATH}/bin/rocminfo" +echo +echo "=== ${TARGET_ROCM_PATH}/bin/amd-smi version ===" +"${TARGET_ROCM_PATH}/bin/amd-smi" version +echo +echo "::notice::ROCm prerequisites OK on target node at ${TARGET_ROCM_PATH}" +REMOTE +} + +cmd_download_tarball() { + require_env TARBALL_URL + require_env TARBALL_NAME + mkdir -p ./pkg + echo "Downloading release tarball on orchestrator runner (target node is not used for this fetch):" + echo " $TARBALL_URL" + curl -fL --max-time 600 -o "./pkg/${TARBALL_NAME}" "${TARBALL_URL}" + ls -la ./pkg/ + file "./pkg/${TARBALL_NAME}" || true +} + +cmd_copy_to_target() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + echo "Copying ./pkg/${TARBALL_NAME} -> rvs-target:${REMOTE_WORK_DIR}/pkg/" + scp -q -F "$SSH_CONFIG_FILE" "./pkg/${TARBALL_NAME}" \ + "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "ls -la '${REMOTE_WORK_DIR}/pkg/'" +} + +cmd_install_rvs() { + require_env SSH_CONFIG_FILE + require_env TARBALL_NAME + require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR + require_env INSTALL_DIR + require_env RVS_BIN + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARBALL_NAME='$TARBALL_NAME' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' ROCM_MAJOR='$ROCM_MAJOR' INSTALL_DIR='$INSTALL_DIR' RVS_BIN='$RVS_BIN' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +PKG="${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" +echo "Target ROCm path : ${TARGET_ROCM_PATH}" +echo "Detected ROCm major version : ${ROCM_MAJOR}" +echo "Install target : ${INSTALL_DIR}" +echo "Expected RVS binary : ${RVS_BIN}" +if [ ! -f "$PKG" ]; then + echo "::error::Tarball not found on target node at $PKG" + exit 1 +fi +probe="$INSTALL_DIR" +while [ ! -d "$probe" ] && [ "$probe" != "/" ]; do probe=$(dirname "$probe"); done +if [ -w "$probe" ]; then + echo "Installing into $INSTALL_DIR without sudo (writable path)" + mkdir -p "$INSTALL_DIR" + tar -xzf "$PKG" -C "$INSTALL_DIR" +else + echo "Installing into $INSTALL_DIR via sudo -n (path not user-writable)" + sudo -n mkdir -p "$INSTALL_DIR" + sudo -n tar -xzf "$PKG" -C "$INSTALL_DIR" +fi +if [ ! -x "$RVS_BIN" ]; then + echo "::error::rvs binary not found or not executable at $RVS_BIN after install" + ls -la "$INSTALL_DIR/" || true + ls -la "$INSTALL_DIR/bin/" || true + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "Installed RVS at: $RVS_BIN" +"$RVS_BIN" --version || true +REMOTE +} + +cmd_verify_rvs_binary() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set -euo pipefail +if [ ! -x "$RVS_BIN" ]; then + echo "::error::$RVS_BIN was not produced by tarball extraction on target." + exit 1 +fi +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +echo "=== ldd $RVS_BIN ===" +LDD_OUTPUT=$(ldd "$RVS_BIN" 2>&1 || true) +echo "$LDD_OUTPUT" +if echo "$LDD_OUTPUT" | grep -q "not found"; then + echo "::error::RVS binary has unresolved library dependencies on target (see above)." + exit 1 +fi +echo "::notice::RVS binary's library dependencies resolved OK on target." +REMOTE +} + +cmd_run_level5() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env REMOTE_WORK_DIR + require_env TARGET_ROCM_PATH + + set +e + local start end rc + start=$(date -u +%FT%TZ) + echo "::group::RVS level 5 (${RVS_BIN} -r 5) against ${TARGET_ROCM_PATH}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' REMOTE_WORK_DIR='$REMOTE_WORK_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' +set +e +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +mkdir -p "${REMOTE_WORK_DIR}/reports" +"$RVS_BIN" -r 5 2>&1 | tee "${REMOTE_WORK_DIR}/reports/rvs_level_5.log" +RC=${PIPESTATUS[0]} +echo "remote_rc=$RC" +exit $RC +REMOTE + rc=$? + echo "::endgroup::" + end=$(date -u +%FT%TZ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rc=$rc" >> "$GITHUB_OUTPUT" + echo "start=$start" >> "$GITHUB_OUTPUT" + echo "end=$end" >> "$GITHUB_OUTPUT" + fi + return 0 +} + +cmd_collect_logs() { + require_env SSH_CONFIG_FILE + require_env REMOTE_WORK_DIR + mkdir -p ./reports + if [ ! -f "$SSH_CONFIG_FILE" ]; then + echo "::warning::SSH config not present; skipping log collection." + return 0 + fi + echo "Copying logs from rvs-target:${REMOTE_WORK_DIR}/reports/ -> ./reports/" + scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/*.log" ./reports/ || \ + echo "::warning::No log files retrieved from target node." + ls -la ./reports/ || true +} + +cmd_capture_versions() { + require_env SSH_CONFIG_FILE + require_env RVS_BIN + require_env INSTALL_DIR + require_env TARGET_ROCM_PATH + + local rvs_version target_rocm_version + rvs_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "RVS_BIN='$RVS_BIN' INSTALL_DIR='$INSTALL_DIR' TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null | head -1 || echo "unknown" +export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${TARGET_ROCM_PATH}/lib/rocm_sysdeps/lib:${TARGET_ROCM_PATH}/lib/llvm/lib:${TARGET_ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" +"$RVS_BIN" --version 2>/dev/null +REMOTE + ) + target_rocm_version=$( + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "TARGET_ROCM_PATH='$TARGET_ROCM_PATH' bash -s" <<'REMOTE' 2>/dev/null || echo "unknown" +cat "${TARGET_ROCM_PATH}/.info/version" 2>/dev/null \ + || cat "${TARGET_ROCM_PATH}/share/doc/rocm-core/version" 2>/dev/null \ + || echo "unknown" +REMOTE + ) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rvs_version=$rvs_version" >> "$GITHUB_OUTPUT" + echo "target_rocm_version=$target_rocm_version" >> "$GITHUB_OUTPUT" + fi +} + +cmd_build_report() { + require_env TARBALL_NAME + require_env TARGET_ROCM_PATH + require_env REMOTE_WORK_DIR + require_env RVS_BIN + + local tarball_url_display="${TARBALL_URL:-}" + if [ -z "$tarball_url_display" ]; then + tarball_url_display="_(unavailable — check install job resolve step / use heredoc GITHUB_OUTPUT for URLs with special characters)_" + fi + + local rc5="${RVS_LEVEL5_RC:-0}" + local start="${RVS_LEVEL5_START:-}" + local end="${RVS_LEVEL5_END:-}" + local rvs_version="${RVS_VERSION:-unknown}" + local target_rocm_version="${TARGET_ROCM_VERSION:-unknown}" + local run_id="${GITHUB_RUN_ID:-local}" + local server_url="${GITHUB_SERVER_URL:-https://github.com}" + local repository="${GITHUB_REPOSITORY:-local/repo}" + local event_name="${GITHUB_EVENT_NAME:-local}" + + mkdir -p ./reports + local s5 overall + if [ "$rc5" -eq 0 ]; then + s5=PASS + overall=PASS + else + s5=FAIL + overall=FAIL + fi + + local report=./reports/SUMMARY.md + { + echo "# RVS Release Test Report" + echo "" + echo "| Field | Value |" + echo "|---|---|" + echo "| Run | [\`${run_id}\`](${server_url}/${repository}/actions/runs/${run_id}) |" + echo "| Trigger | \`${event_name}\` |" + echo "| Target ROCm path | \`${TARGET_ROCM_PATH}\` (version \`${target_rocm_version}\`) |" + echo "| Remote work dir | \`${REMOTE_WORK_DIR}\` |" + echo "| Tarball | \`${TARBALL_NAME}\` |" + echo "| Source URL | ${tarball_url_display} |" + echo "| RVS version | \`${rvs_version}\` |" + echo "| Overall result | **${overall}** |" + echo "" + echo "## Results" + echo "" + echo "| Test | Command | Result | Exit | Started (UTC) | Ended (UTC) |" + echo "|---|---|:--:|---:|---|---|" + echo "| Level 5 | \`${RVS_BIN} -r 5\` | ${s5} | ${rc5} | ${start} | ${end} |" + echo "" + echo "## Logs" + echo "" + echo "Full stdout/stderr from the level-5 run is attached to the artifact" + echo "\`rvs-release-report-${run_id}\`:" + echo "" + echo "- \`rvs_level_5.log\`" + echo "- \`SUMMARY.md\` (this file)" + } > "$report" + + cat "$report" + if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then + cat "$report" >> "$GITHUB_STEP_SUMMARY" + fi + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "overall=$overall" >> "$GITHUB_OUTPUT" + echo "rc5=$rc5" >> "$GITHUB_OUTPUT" + fi +} + +cmd_cleanup_remote() { + set +e + if [ -z "${REMOTE_WORK_DIR:-}" ] || [ -z "${SSH_CONFIG_FILE:-}" ] || [ ! -f "$SSH_CONFIG_FILE" ]; then + return 0 + fi + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "rm -rf '${REMOTE_WORK_DIR}'" || \ + echo "::warning::Failed to clean up ${REMOTE_WORK_DIR} on target node." +} + +cmd_cleanup_local_ssh() { + set +e + if [ -n "${SSH_KEY_FILE:-}" ]; then + rm -f "$SSH_KEY_FILE" + fi + if [ -n "${SSH_CONFIG_FILE:-}" ]; then + rm -f "$SSH_CONFIG_FILE" "${SSH_CONFIG_FILE}.known_hosts" + fi +} + +main() { + if [ $# -lt 1 ]; then + usage + exit 1 + fi + case "$1" in + validate-config) cmd_validate_config ;; + setup-ssh) cmd_setup_ssh ;; + verify-rocm) cmd_verify_rocm ;; + download-tarball) cmd_download_tarball ;; + copy-to-target) cmd_copy_to_target ;; + install-rvs) cmd_install_rvs ;; + verify-rvs-binary) cmd_verify_rvs_binary ;; + run-level5) cmd_run_level5 ;; + collect-logs) cmd_collect_logs ;; + capture-versions) cmd_capture_versions ;; + build-report) cmd_build_report ;; + cleanup-remote) cmd_cleanup_remote ;; + cleanup-local-ssh) cmd_cleanup_local_ssh ;; + -h|--help) usage ;; + *) + echo "::error::Unknown command: $1" >&2 + usage + exit 1 + ;; + esac +} + +main "$@" From 3aab29ab14faacd19ec48a727baa0f5f4600a396 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 23 Jun 2026 19:50:52 -0500 Subject: [PATCH 214/275] Use warm calls in ramp-up gemm runs. --- gst.so/src/gst_worker.cpp | 10 +++++----- pulse.so/src/pulse_worker.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gst.so/src/gst_worker.cpp b/gst.so/src/gst_worker.cpp index 1fd20577a..5e4b91636 100644 --- a/gst.so/src/gst_worker.cpp +++ b/gst.so/src/gst_worker.cpp @@ -256,7 +256,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { start_time = gpu_blas->get_time_us(); // run GEMM operation - if(!gpu_blas->run_blas_gemm(1)) { + if(!gpu_blas->run_blas_gemm(gst_warm_calls)) { *err_description = GST_BLAS_ERROR; *error = 1; @@ -277,7 +277,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { //Converting microseconds to seconds timetakenforoneiteration = (end_time - start_time)/1e6; - gflops_interval = gpu_blas->gemm_gflop_count()/timetakenforoneiteration; + gflops_interval = gpu_blas->gemm_gflop_count() * gst_warm_calls / timetakenforoneiteration; gst_last_sgemm_end_time = std::chrono::system_clock::now(); micros_last_sgemm = @@ -291,8 +291,8 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { } - num_sgemm_ops++; - num_sgemm_ops_log_interval++; + num_sgemm_ops += gst_warm_calls; + num_sgemm_ops_log_interval += gst_warm_calls; gst_end_time = std::chrono::system_clock::now(); micros_sgemm_ops = @@ -340,7 +340,7 @@ bool GSTWorker::do_gst_ramp(int *error, string *err_description) { } if (ramp_single_shot) - return true; + return gflops_interval >= target_stress * (1.0 - tolerance); } return false; diff --git a/pulse.so/src/pulse_worker.cpp b/pulse.so/src/pulse_worker.cpp index 5b2cb59af..1bf82355d 100644 --- a/pulse.so/src/pulse_worker.cpp +++ b/pulse.so/src/pulse_worker.cpp @@ -557,7 +557,7 @@ bool PulseWorker::do_pulse_stress(void) { for (int iter = 0; iter < workload_iterations && !rvs::lp::Stopping(); ++iter) { - if (!gpu_blas->run_blas_gemm(true)) { + if (!gpu_blas->run_blas_gemm(1)) { test_passed = false; if (halt_on_error) goto done; break; From 1d0836bfe911d2ae6e87decf4fe182be23405e50 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 23 Jun 2026 10:56:31 -0700 Subject: [PATCH 215/275] disable txBench build for local and set RUNPATH Not all developers need to build Transferbench.Hence disabling the build by default. CI will enable the build so that it is packaged along with RVS for nightly and release.This also ensure build is successful for newer ROCm. RUNPATH for Transferbench should be inline with RVS.Pass the same settings as RVS to Transferbench cmake as well. --- .github/workflows/README_BUILD_PACKAGES.md | 7 +++++- .../workflows/build-relocatable-packages.yml | 7 ++++++ CMakeLists.txt | 2 +- CMakeTransferBenchCLI.cmake | 23 +++++++++++++++++++ README.md | 4 ++-- build_packages_local.sh | 13 +++++++++++ docs/transferbench.md | 10 ++++++-- 7 files changed, 60 insertions(+), 6 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 458c93837..c07decdb6 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -65,6 +65,10 @@ When manually triggering the workflow, you can specify: - `gfx1151` - AMD Strix Halo iGPU - `gfx120X-all` - AMD RX 9060/XT, 9070/XT +3. **Build TransferBench CLI** (boolean, default **true** on manual runs): + - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ with the same relocatable RUNPATH as `rvs`. + - On **push**, **PR**, and **schedule**, CI defaults to **ON** unless repository variable `BUILD_TRANSFERBENCH_CLI` is set to `OFF`. + ## How It Works The workflow leverages the `build_packages_local.sh` script for all build operations, ensuring consistency between local development and CI/CD environments. @@ -131,7 +135,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. -**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. +**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) forwards the same RPATH settings into the TransferBench sub-build so the bundled CLI resolves ROCm libraries like `rvs`. ### Workflow Steps @@ -334,6 +338,7 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_SDK_CHANNEL` | `auto` locally | **`nightly`** / **`release`** / **`auto`**. CI sets channel per trigger (see table above); manual with a pin uses **`auto`** so tarball follows version format. | | `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | +| `BUILD_TRANSFERBENCH_CLI` | `OFF` locally; `ON` in CI | Build and install the TransferBench CLI in packages (`-DBUILD_TRANSFERBENCH_CLI`). CI uses `vars.BUILD_TRANSFERBENCH_CLI` or defaults to `ON`; `workflow_dispatch` input **`build_transferbench_cli`** overrides manual runs. | | `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `8.0` → `0800`) - used for RVS version tagging | | `CPACK_DEBIAN_PACKAGE_RELEASE` | Auto-generated | **Default** (`schedule`, `push`, `workflow_dispatch`, local): `r.` (e.g. `r0711.20260423` where `0711` = ROCm 7.11 from `ROCM_VERSION`). **Pull requests**: `r...`. **Release branches** (name starts with `rel`, non-PR): `GITHUB_RUN_NUMBER` (fallback: `1`). | | `CPACK_RPM_PACKAGE_RELEASE` | same as `CPACK_DEBIAN_PACKAGE_RELEASE` | Identical to DEB. | diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 8a72be0d1..83b29f25b 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -30,6 +30,11 @@ on: - gfx1151 - gfx120X-all default: 'gfx110X-all' + build_transferbench_cli: + description: 'Build and bundle TransferBench CLI in DEB/RPM/TGZ' + required: false + type: boolean + default: true permissions: contents: read @@ -41,6 +46,8 @@ env: ROCM_VERSION: ${{ vars.ROCM_VERSION }} GPU_FAMILY: ${{ vars.GPU_FAMILY || 'gfx110X-all' }} BUILD_TYPE: Release + # TransferBench CLI: OFF in build_packages_local.sh by default; ON in CI unless overridden. + BUILD_TRANSFERBENCH_CLI: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.build_transferbench_cli && 'ON' || 'OFF') || vars.BUILD_TRANSFERBENCH_CLI || 'ON' }} # Optional Step 6 in build_packages_local.sh: set repo Actions variable # RVS_AUTO_DETECT_LOCAL_UPLOAD to "1" to probe localhost:8080 when UPLOAD_TARGET is unset. # Leave the variable undefined for default (no probe; S3 uses workflow steps only). diff --git a/CMakeLists.txt b/CMakeLists.txt index 0617007c1..b649afc5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -604,7 +604,7 @@ if(NOT DEFINED TRANSFERBENCH_INC_DIR) endif() option(BUILD_TRANSFERBENCH_CLI - "Build and install the TransferBench CLI alongside rvs" ON) + "Build and install the TransferBench CLI alongside rvs" OFF) if(BUILD_TRANSFERBENCH_CLI) include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeTransferBenchCLI.cmake) diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index 288a773e7..be6d4f52e 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -69,6 +69,29 @@ if(DEFINED ROCM_MAJOR_VERSION) list(APPEND _tb_cmake_args -DROCM_MAJOR_VERSION=${ROCM_MAJOR_VERSION}) endif() +# Relocatable RUNPATH: the CLI is copied from the child build tree via +# install(PROGRAMS) in the parent — it is not re-linked here — so embed the +# same RPATH settings RVS uses when the child links TransferBench. +list(APPEND _tb_cmake_args + -DCMAKE_SKIP_RPATH=FALSE + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE + "-DCMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}" + "-DCMAKE_BUILD_RPATH=${CMAKE_BUILD_RPATH}" +) +if(CMAKE_EXE_LINKER_FLAGS) + list(APPEND _tb_cmake_args "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}") +elseif(CMAKE_EXE_LINKER_FLAGS_INIT) + list(APPEND _tb_cmake_args "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS_INIT}") +endif() +if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9") + list(APPEND _tb_cmake_args -DCMAKE_SKIP_BUILD_RPATH=TRUE) + endif() + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16") + list(APPEND _tb_cmake_args -DCMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH=TRUE) + endif() +endif() + # Build only -- never run TransferBench's own install rules (see header). The # binary is consumed directly from the build tree by the install(PROGRAMS) # below, so there is no separate child install directory to leak into packages. diff --git a/README.md b/README.md index d450cbf7a..2e4d7a3c0 100644 --- a/README.md +++ b/README.md @@ -128,14 +128,14 @@ git submodule update --init --recursive ### Bundled TransferBench -[TransferBench](https://github.com/ROCm/TransferBench) is vendored under `external/TransferBench` as a git submodule and built/installed alongside `rvs` by default, so the same DEB/RPM ships both `rvs` and the `TransferBench` CLI. +[TransferBench](https://github.com/ROCm/TransferBench) is vendored under `external/TransferBench` as a git submodule. The standalone CLI is **off by default** in [`build_packages_local.sh`](build_packages_local.sh) (`BUILD_TRANSFERBENCH_CLI=OFF`); **CI builds enable it by default** so DEB/RPM/TGZ ship `TransferBench` alongside `rvs` unless disabled via repository variable or workflow input. The bundled CLI is provided **for compatibility** with existing workflows that invoke `TransferBench` directly. For new work, prefer either: - **RVS**, which exposes TransferBench functionality through the `pebb` and `pbqt` modules with config-driven test definitions, or - The **TransferBench API** (headers under `external/TransferBench/src/header`) for programmatic use. -Pass `-DBUILD_TRANSFERBENCH_CLI=OFF` to cmake to skip building the CLI. +Enable the CLI locally with `BUILD_TRANSFERBENCH_CLI=ON ./build_packages_local.sh` or `-DBUILD_TRANSFERBENCH_CLI=ON` when invoking cmake directly. **Note:** The above command clones the master branch. If you're using a specific ROCm release, it's recommended to use the corresponding RVS version from the same release branch to ensure compatibility. diff --git a/build_packages_local.sh b/build_packages_local.sh index 4820e5d67..ed797a125 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -9,6 +9,7 @@ set -e # Exit on error # Configuration GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" BUILD_TYPE="${BUILD_TYPE:-Release}" +BUILD_TRANSFERBENCH_CLI="${BUILD_TRANSFERBENCH_CLI:-OFF}" BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" @@ -117,6 +118,14 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1" >&2 } +# Map common truthy/falsey strings to CMake ON/OFF. +normalize_on_off() { + case "$(echo "$1" | tr '[:upper:]' '[:lower:]')" in + 1|on|true|yes) echo ON ;; + *) echo OFF ;; + esac +} + # Join base URL and filename without duplicate slashes join_base_and_file() { local base="$1" @@ -513,6 +522,8 @@ fi apply_sdk_tarball_base_for_version "$ROCM_VERSION" +BUILD_TRANSFERBENCH_CLI="$(normalize_on_off "$BUILD_TRANSFERBENCH_CLI")" + # Print configuration echo "================================================================================" echo " ROCm Validation Suite - Local Package Build Script" @@ -521,6 +532,7 @@ print_info "ROCm Version: $ROCM_VERSION" print_info "ROCm SDK channel: ${ROCM_SDK_CHANNEL:-auto}" print_info "GPU Family: $GPU_FAMILY" print_info "Build Type: $BUILD_TYPE" +print_info "Build TransferBench CLI: $BUILD_TRANSFERBENCH_CLI" print_info "Build Directory: $BUILD_DIR" print_info "ROCm Install: $ROCM_INSTALL_DIR" print_info "SDK Source: $ROCM_SDK_BASE_URL" @@ -775,6 +787,7 @@ CMAKE_ARGS=( -DCPACK_PACKAGING_INSTALL_PREFIX="/opt/rocm/extras-${ROCM_MAJOR}" -DCMAKE_VERBOSE_MAKEFILE=1 -DFETCH_ROCMPATH_FROM_ROCMCORE=ON + -DBUILD_TRANSFERBENCH_CLI="$BUILD_TRANSFERBENCH_CLI" ) # Add CXX compiler if set diff --git a/docs/transferbench.md b/docs/transferbench.md index a616ffb5a..7a19d43cf 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -38,15 +38,21 @@ invocations or for ad-hoc one-off measurements outside an RVS run. ## Build options -The CLI is built by default. To skip it, pass: +The CLI is **off by default** in `build_packages_local.sh` and in CMake (`BUILD_TRANSFERBENCH_CLI=OFF`). CI enables it unless overridden. To build it locally: ``` -cmake -DBUILD_TRANSFERBENCH_CLI=OFF ... +BUILD_TRANSFERBENCH_CLI=ON ./build_packages_local.sh +# or +cmake -DBUILD_TRANSFERBENCH_CLI=ON ... ``` Skipping the CLI does not affect RVS's `pebb`/`pbqt` modules — they consume the TransferBench *headers* from the submodule, not the CLI binary. +When the CLI is built, it is installed next to `rvs` under the same prefix and +uses the **same relocatable RUNPATH** as RVS (`$ORIGIN`, `/opt/rocm/core-/lib`, etc.) +via [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake). + The set of GPU architectures the CLI is compiled for can be narrowed with: ``` From 4696068e2c0239da43eb221bdf3ddc9c49f70bd5 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 23 Jun 2026 12:43:26 -0700 Subject: [PATCH 216/275] Fix RPATH setting in Transferbench With CMAKE_INSTALL_RPATH expanded from parent CMake each $ORIGIN expanded to empty, so RUNPATH became only : separators. --- CMakeTransferBenchCLI.cmake | 31 ++++++++++--------------------- CMakeTransferBenchRPATH.cmake.in | 10 ++++++++++ docs/transferbench.md | 4 +++- 3 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 CMakeTransferBenchRPATH.cmake.in diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index be6d4f52e..ecfa580ee 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -69,28 +69,17 @@ if(DEFINED ROCM_MAJOR_VERSION) list(APPEND _tb_cmake_args -DROCM_MAJOR_VERSION=${ROCM_MAJOR_VERSION}) endif() -# Relocatable RUNPATH: the CLI is copied from the child build tree via -# install(PROGRAMS) in the parent — it is not re-linked here — so embed the -# same RPATH settings RVS uses when the child links TransferBench. -list(APPEND _tb_cmake_args - -DCMAKE_SKIP_RPATH=FALSE - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE - "-DCMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}" - "-DCMAKE_BUILD_RPATH=${CMAKE_BUILD_RPATH}" +# Relocatable RUNPATH for the CLI (copied from the child build tree via install(PROGRAMS)). +# Do not pass CMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH} here: parent-side expansion +# treats $ORIGIN as a cmake variable and yields an all-colon RUNPATH. Use a -C +# initial-cache file with bracket literals instead (CMakeTransferBenchRPATH.cmake.in). +set(_tb_rpath_cache "${CMAKE_BINARY_DIR}/TransferBenchRPATH.cmake") +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMakeTransferBenchRPATH.cmake.in" + "${_tb_rpath_cache}" + @ONLY ) -if(CMAKE_EXE_LINKER_FLAGS) - list(APPEND _tb_cmake_args "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}") -elseif(CMAKE_EXE_LINKER_FLAGS_INIT) - list(APPEND _tb_cmake_args "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS_INIT}") -endif() -if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") - if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9") - list(APPEND _tb_cmake_args -DCMAKE_SKIP_BUILD_RPATH=TRUE) - endif() - if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16") - list(APPEND _tb_cmake_args -DCMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH=TRUE) - endif() -endif() +list(APPEND _tb_cmake_args "-C${_tb_rpath_cache}") # Build only -- never run TransferBench's own install rules (see header). The # binary is consumed directly from the build tree by the install(PROGRAMS) diff --git a/CMakeTransferBenchRPATH.cmake.in b/CMakeTransferBenchRPATH.cmake.in new file mode 100644 index 000000000..a3037c59f --- /dev/null +++ b/CMakeTransferBenchRPATH.cmake.in @@ -0,0 +1,10 @@ +# Initial cache fragment for the TransferBench ExternalProject sub-build. +# Bracket literals keep $ORIGIN literal (CMake otherwise expands $ORIGIN as an +# empty variable, producing a RUNPATH of only ':' separators). +set(CMAKE_INSTALL_RPATH [[$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/lib/llvm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "RVS relocatable RPATH for TransferBench CLI" FORCE) +set(CMAKE_BUILD_RPATH [[$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/lib/llvm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "" FORCE) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "" FORCE) +set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "" FORCE) +set(CMAKE_SKIP_BUILD_RPATH FALSE CACHE BOOL "" FORCE) +set(CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH TRUE CACHE BOOL "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS [[-Wl,--enable-new-dtags -Wl,-rpath,$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/lib/llvm/lib:/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib:/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "" FORCE) diff --git a/docs/transferbench.md b/docs/transferbench.md index 7a19d43cf..fab711960 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -51,7 +51,9 @@ the TransferBench *headers* from the submodule, not the CLI binary. When the CLI is built, it is installed next to `rvs` under the same prefix and uses the **same relocatable RUNPATH** as RVS (`$ORIGIN`, `/opt/rocm/core-/lib`, etc.) -via [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake). +via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in) (initial +cache for the sub-build; `$ORIGIN` must use bracket literals so CMake does not expand it +to empty). The set of GPU architectures the CLI is compiled for can be narrowed with: From bd008097c547445db29dbf7e51c5d2c3a60fc094 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 23 Jun 2026 14:36:07 -0700 Subject: [PATCH 217/275] fix duplicate RPATH setting for txbench With CMAKE_INSTALL_RPATH and CMAKE_EXE_LINKER flags both setting RPATH it was getting duplicated. Removed RVS specific RAPTH from Transferbench binary. --- .github/workflows/README_BUILD_PACKAGES.md | 4 ++-- CMakeTransferBenchCLI.cmake | 5 +++++ CMakeTransferBenchRPATH.cmake.in | 9 +++++---- docs/transferbench.md | 9 ++++----- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index c07decdb6..3e24eaf0c 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -66,7 +66,7 @@ When manually triggering the workflow, you can specify: - `gfx120X-all` - AMD RX 9060/XT, 9070/XT 3. **Build TransferBench CLI** (boolean, default **true** on manual runs): - - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ with the same relocatable RUNPATH as `rvs`. + - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ with a relocatable RUNPATH for ROCm (`$ORIGIN`, `/opt/rocm/lib`, `/opt/rocm/core-/lib`). - On **push**, **PR**, and **schedule**, CI defaults to **ON** unless repository variable `BUILD_TRANSFERBENCH_CLI` is set to `OFF`. ## How It Works @@ -135,7 +135,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. -**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) forwards the same RPATH settings into the TransferBench sub-build so the bundled CLI resolves ROCm libraries like `rvs`. +**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) applies TransferBench-specific relocatable RPATH via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). ### Workflow Steps diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index ecfa580ee..f251350cc 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -79,6 +79,11 @@ configure_file( "${_tb_rpath_cache}" @ONLY ) +# Match parent RVS: on GitHub Actions skip build-tree RPATH (install RPATH still embeds at link). +if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") + file(APPEND "${_tb_rpath_cache}" + "set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL \"\" FORCE)\n") +endif() list(APPEND _tb_cmake_args "-C${_tb_rpath_cache}") # Build only -- never run TransferBench's own install rules (see header). The diff --git a/CMakeTransferBenchRPATH.cmake.in b/CMakeTransferBenchRPATH.cmake.in index a3037c59f..681c4738e 100644 --- a/CMakeTransferBenchRPATH.cmake.in +++ b/CMakeTransferBenchRPATH.cmake.in @@ -1,10 +1,11 @@ # Initial cache fragment for the TransferBench ExternalProject sub-build. # Bracket literals keep $ORIGIN literal (CMake otherwise expands $ORIGIN as an # empty variable, producing a RUNPATH of only ':' separators). -set(CMAKE_INSTALL_RPATH [[$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/lib/llvm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "RVS relocatable RPATH for TransferBench CLI" FORCE) -set(CMAKE_BUILD_RPATH [[$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/rvs;/opt/rocm/lib;/opt/rocm/lib/llvm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "" FORCE) +# RPATH list only via CMAKE_INSTALL_RPATH (same as parent RVS) — do not also pass +# -Wl,-rpath in CMAKE_EXE_LINKER_FLAGS or the path is embedded twice at link time. +set(CMAKE_INSTALL_RPATH [[$ORIGIN;$ORIGIN/../lib;/opt/rocm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib]] CACHE STRING "Relocatable RPATH for TransferBench CLI" FORCE) +set(CMAKE_BUILD_RPATH [[$ORIGIN;$ORIGIN/../lib;/opt/rocm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib]] CACHE STRING "" FORCE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "" FORCE) set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "" FORCE) -set(CMAKE_SKIP_BUILD_RPATH FALSE CACHE BOOL "" FORCE) set(CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH TRUE CACHE BOOL "" FORCE) -set(CMAKE_EXE_LINKER_FLAGS [[-Wl,--enable-new-dtags -Wl,-rpath,$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/opt/rocm/lib/llvm/lib:/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib:/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib/llvm/lib]] CACHE STRING "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS [[-Wl,--enable-new-dtags]] CACHE STRING "" FORCE) diff --git a/docs/transferbench.md b/docs/transferbench.md index fab711960..2e3e9d02f 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -49,11 +49,10 @@ cmake -DBUILD_TRANSFERBENCH_CLI=ON ... Skipping the CLI does not affect RVS's `pebb`/`pbqt` modules — they consume the TransferBench *headers* from the submodule, not the CLI binary. -When the CLI is built, it is installed next to `rvs` under the same prefix and -uses the **same relocatable RUNPATH** as RVS (`$ORIGIN`, `/opt/rocm/core-/lib`, etc.) -via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in) (initial -cache for the sub-build; `$ORIGIN` must use bracket literals so CMake does not expand it -to empty). +When the CLI is built, it is installed next to `rvs` under the same prefix with a +relocatable **RUNPATH** so it can find ROCm libraries at install time and on +target systems (`$ORIGIN`, `$ORIGIN/../lib`, `/opt/rocm/lib`, +`/opt/rocm/core-/lib`). See [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). The set of GPU architectures the CLI is compiled for can be narrowed with: From 6b47f182834b33e85d7566b9f82efb8d81ffae34 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 23 Jun 2026 16:17:18 -0700 Subject: [PATCH 218/275] fix empty RPATH and pkg dependency With Transferbench added to the package adding libnuma dependency With submodules CMKAE_INSTALL_RAPTH is getting empty, hence using CMAKE_EXE_LINKER_FLAGS instead. --- .github/workflows/README_BUILD_PACKAGES.md | 20 ++++++++++---------- CMakeLists.txt | 12 ++++++------ CMakeTransferBenchCLI.cmake | 8 ++++---- CMakeTransferBenchRPATH.cmake.in | 14 ++++++-------- docs/transferbench.md | 9 +++++---- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 3e24eaf0c..939c27d0d 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -66,7 +66,7 @@ When manually triggering the workflow, you can specify: - `gfx120X-all` - AMD RX 9060/XT, 9070/XT 3. **Build TransferBench CLI** (boolean, default **true** on manual runs): - - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ with a relocatable RUNPATH for ROCm (`$ORIGIN`, `/opt/rocm/lib`, `/opt/rocm/core-/lib`). + - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ (requires `libnuma1` / `numactl-libs` at runtime). - On **push**, **PR**, and **schedule**, CI defaults to **ON** unless repository variable `BUILD_TRANSFERBENCH_CLI` is set to `OFF`. ## How It Works @@ -409,23 +409,23 @@ Before you install the RVS TGZ, **ROCm must be installed, configured, and on you #### Install RVS run-time dependencies (on the target system) -The TGZ is built against ROCm; on the target host you still need **PCI** for GPU enumeration: +The TGZ is built against ROCm; on the target host you still need **PCI** for GPU enumeration and **NUMA** when using the bundled **TransferBench** CLI: -| Family | Typical PCI package | -|--------|---------------------| -| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) | -| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | -| **SUSE / openSUSE** | `libpci3` / `pciutils` as appropriate for the release | +| Family | Typical PCI package | NUMA (TransferBench CLI) | +|--------|---------------------|---------------------------| +| **Debian / Ubuntu** | `libpci3` (or `libpci-3-0-0` on some releases) | `libnuma1` | +| **RHEL / Rocky / Alma 8+** | `pciutils-libs` | `numactl-libs` | +| **SUSE / openSUSE** | `libpci3` / `pciutils` as appropriate for the release | `libnuma1` | ```bash # Ubuntu / Debian -sudo apt update && sudo apt install -y libpci3 +sudo apt update && sudo apt install -y libpci3 libnuma1 # RHEL / Rocky / Alma 8+ -sudo dnf install -y pciutils-libs +sudo dnf install -y pciutils-libs numactl-libs # openSUSE / SUSE (adjust package names per release) -sudo zypper install libpci3 +sudo zypper install libpci3 libnuma1 ``` User-facing install steps for TGZ (PATH / `LD_LIBRARY_PATH`, **`RPATH`** including **`/opt/rocm/lib`**, **`/opt/rocm/lib/llvm/lib`**, **`/opt/rocm/core-/lib`**, and **`/opt/rocm/core-/lib/llvm/lib`**) are in **[docs/INSTALL_TGZ.md](../../docs/INSTALL_TGZ.md)**. diff --git a/CMakeLists.txt b/CMakeLists.txt index b649afc5c..34581b32f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -484,23 +484,23 @@ endif() if (YAML_CPP_STATIC_FOUND) # Static linking - no runtime yaml-cpp dependency needed if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libnuma1") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libnuma1") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, numactl-libs") endif() message(STATUS "Package dependencies: yaml-cpp statically linked, no runtime dependency") else() # Dynamic linking - yaml-cpp runtime dependency required if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libyaml-cpp-dev") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libyaml-cpp-dev, libnuma1") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libyaml-cpp0_6") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libyaml-cpp0_6, libnuma1") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, yaml-cpp") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, yaml-cpp, numactl-libs") endif() message(STATUS "Package dependencies: yaml-cpp dynamically linked, runtime dependency included") endif() diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index f251350cc..385cdf4d9 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -70,16 +70,16 @@ if(DEFINED ROCM_MAJOR_VERSION) endif() # Relocatable RUNPATH for the CLI (copied from the child build tree via install(PROGRAMS)). -# Do not pass CMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH} here: parent-side expansion -# treats $ORIGIN as a cmake variable and yields an all-colon RUNPATH. Use a -C -# initial-cache file with bracket literals instead (CMakeTransferBenchRPATH.cmake.in). +# Parent ${CMAKE_INSTALL_RPATH} cannot be forwarded safely ($ORIGIN expands empty). +# TransferBench ignores CMAKE_INSTALL_RPATH; use -C cache with -Wl,-rpath only +# (see CMakeTransferBenchRPATH.cmake.in). set(_tb_rpath_cache "${CMAKE_BINARY_DIR}/TransferBenchRPATH.cmake") configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/CMakeTransferBenchRPATH.cmake.in" "${_tb_rpath_cache}" @ONLY ) -# Match parent RVS: on GitHub Actions skip build-tree RPATH (install RPATH still embeds at link). +# On GitHub Actions skip build-tree RPATH additions (linker -rpath above is enough). if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") file(APPEND "${_tb_rpath_cache}" "set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL \"\" FORCE)\n") diff --git a/CMakeTransferBenchRPATH.cmake.in b/CMakeTransferBenchRPATH.cmake.in index 681c4738e..11792c3ee 100644 --- a/CMakeTransferBenchRPATH.cmake.in +++ b/CMakeTransferBenchRPATH.cmake.in @@ -1,11 +1,9 @@ # Initial cache fragment for the TransferBench ExternalProject sub-build. -# Bracket literals keep $ORIGIN literal (CMake otherwise expands $ORIGIN as an -# empty variable, producing a RUNPATH of only ':' separators). -# RPATH list only via CMAKE_INSTALL_RPATH (same as parent RVS) — do not also pass -# -Wl,-rpath in CMAKE_EXE_LINKER_FLAGS or the path is embedded twice at link time. -set(CMAKE_INSTALL_RPATH [[$ORIGIN;$ORIGIN/../lib;/opt/rocm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib]] CACHE STRING "Relocatable RPATH for TransferBench CLI" FORCE) -set(CMAKE_BUILD_RPATH [[$ORIGIN;$ORIGIN/../lib;/opt/rocm/lib;/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib]] CACHE STRING "" FORCE) -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "" FORCE) +# +# TransferBench links against ROCm install-tree libs and system libs (e.g. libnuma). +# Embed ROCm stack RUNPATH via linker flags only (TB does not honor CMAKE_INSTALL_RPATH). set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "" FORCE) +set(CMAKE_SKIP_INSTALL_RPATH TRUE CACHE BOOL "" FORCE) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "" FORCE) set(CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH TRUE CACHE BOOL "" FORCE) -set(CMAKE_EXE_LINKER_FLAGS [[-Wl,--enable-new-dtags]] CACHE STRING "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS [[-Wl,--enable-new-dtags -Wl,-rpath,/opt/rocm/lib:/opt/rocm/core-@ROCM_MAJOR_VERSION@/lib]] CACHE STRING "" FORCE) diff --git a/docs/transferbench.md b/docs/transferbench.md index 2e3e9d02f..f0ddf24b9 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -49,10 +49,11 @@ cmake -DBUILD_TRANSFERBENCH_CLI=ON ... Skipping the CLI does not affect RVS's `pebb`/`pbqt` modules — they consume the TransferBench *headers* from the submodule, not the CLI binary. -When the CLI is built, it is installed next to `rvs` under the same prefix with a -relocatable **RUNPATH** so it can find ROCm libraries at install time and on -target systems (`$ORIGIN`, `$ORIGIN/../lib`, `/opt/rocm/lib`, -`/opt/rocm/core-/lib`). See [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). +When the CLI is built, it is installed next to `rvs` under the same prefix. The +`TransferBench` binary links `libnuma` and ROCm libraries; package metadata +requires **`libnuma1`** (Debian/Ubuntu) or **`numactl-libs`** (RHEL-family RPM). +RUNPATH entries point at the ROCm stack (`/opt/rocm/lib`, `/opt/rocm/core-/lib`). +See [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). The set of GPU architectures the CLI is compiled for can be narrowed with: From 6338baf45470588d7b4abe2711caba0d750e6405 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 24 Jun 2026 12:25:48 -0500 Subject: [PATCH 219/275] Per-subtest results as a json array --- babel.so/src/rvs_stress.cpp | 8 +++++--- include/rvsliblog.h | 2 ++ include/rvsliblogger.h | 1 + include/rvsloglp.h | 1 + include/rvslognodelist.h | 3 ++- rvs/src/rvsmodule.cpp | 1 + src/rvsliblogger.cpp | 4 ++++ src/rvsloglp.cpp | 5 +++++ src/rvsloglp_utest.cpp | 7 ++++++- src/rvslognodelist.cpp | 13 +++++++++---- 10 files changed, 36 insertions(+), 9 deletions(-) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 99b979754..974f27b81 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -306,7 +306,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, return oss.str(); }; - // Build single JSON node per GPU: metadata + nested "results" object + // Build single JSON node per GPU: metadata + nested "results" array void* json_root = nullptr; void* json_results = nullptr; if (json) { @@ -322,7 +322,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, rvs::lp::AddString(json_root, "array_size", std::to_string(arr_size)); rvs::lp::AddString(json_root, "total_size", std::to_string(total_size)); rvs::lp::AddString(json_root, iter_key, iter_val); - json_results = rvs::lp::CreateNode(json_root, "results"); + json_results = rvs::lp::JsonNestedListCreate("results", rvs::logresults); } } @@ -368,8 +368,10 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, const char *peak_key = mibibytes ? "max_mibytes_per_sec" : "max_mbytes_per_sec"; const char *worst_key = mibibytes ? "min_mibytes_per_sec" : "min_mbytes_per_sec"; const char *avg_key = mibibytes ? "avg_mibytes_per_sec" : "avg_mbytes_per_sec"; - void* subtest_node = rvs::lp::CreateNode(json_results, labels[i].c_str()); + void* subtest_node = rvs::lp::LogRecordCreate(module_name.c_str(), + labels[i].c_str(), rvs::logresults, 0, 0, true); if (subtest_node) { + rvs::lp::AddString(subtest_node, "subtest", labels[i]); rvs::lp::AddString(subtest_node, key, format_bw(bw_scale * sizes[i] / (*minmax.first))); rvs::lp::AddString(subtest_node, peak_key, diff --git a/include/rvsliblog.h b/include/rvsliblog.h index 174a0ac3e..8d4a2706d 100644 --- a/include/rvsliblog.h +++ b/include/rvsliblog.h @@ -50,6 +50,7 @@ typedef void (*t_cbAddNode)(void* Parent, void* Child); typedef void (*t_cbStop)(uint16_t flags); typedef bool (*t_cbStopping)(void); typedef void* (*t_cbJsonNamedListCreate)( const char* name, const int LogLevel); +typedef void* (*t_cbJsonNestedListCreate)( const char* name, const int LogLevel); typedef int (*t_rvs_module_err)(const char*, const char*, const char*); @@ -88,6 +89,7 @@ typedef struct tag_module_init { //! pointer to rvs::logger::Err() function t_rvs_module_err cbErr; t_cbJsonNamedListCreate cbJsonNamedListCreate; + t_cbJsonNestedListCreate cbJsonNestedListCreate; } T_MODULE_INIT; #ifdef __cplusplus diff --git a/include/rvsliblogger.h b/include/rvsliblogger.h index 35f83e85a..e6baae7d4 100644 --- a/include/rvsliblogger.h +++ b/include/rvsliblogger.h @@ -83,6 +83,7 @@ class logger { static int Err(const char *Message, const char *Module = nullptr, const char *Action = nullptr); static void* JsonNamedListCreate(const char* name, const int LogLevel); + static void* JsonNestedListCreate(const char* name, const int LogLevel); protected: static int ToFile(const std::string& Row , bool json = false); diff --git a/include/rvsloglp.h b/include/rvsloglp.h index 9290075c2..e76367d8f 100644 --- a/include/rvsloglp.h +++ b/include/rvsloglp.h @@ -88,6 +88,7 @@ class lp { static int Err(const std::string &Msg, const std::string &Module, const std::string &Action); static void* JsonNamedListCreate(const char* name, const int LogLevel); + static void* JsonNestedListCreate(const char* name, const int LogLevel); protected: //! Module init structure passed through Initialize() method diff --git a/include/rvslognodelist.h b/include/rvslognodelist.h index 649311f9a..52130ae77 100644 --- a/include/rvslognodelist.h +++ b/include/rvslognodelist.h @@ -44,7 +44,7 @@ namespace rvs { */ class LogListNode : virtual public LogNode { public: - explicit LogListNode(const char* Name, int LogLevel, const LogNodeBase* Parent = nullptr); + explicit LogListNode(const char* Name, int LogLevel, bool nested = false, const LogNodeBase* Parent = nullptr); virtual ~LogListNode(); virtual std::string ToJson(const std::string& Lead = ""); @@ -58,6 +58,7 @@ class LogListNode : virtual public LogNode { protected: int Level; + bool IsNested; }; } // namespace rvs diff --git a/rvs/src/rvsmodule.cpp b/rvs/src/rvsmodule.cpp index 40caf4dcf..93e7be0d5 100644 --- a/rvs/src/rvsmodule.cpp +++ b/rvs/src/rvsmodule.cpp @@ -249,6 +249,7 @@ int rvs::module::initialize() { d.cbLogExt = rvs::logger::LogExt; d.cbLogRecordCreate = rvs::logger::LogRecordCreate; d.cbJsonNamedListCreate = rvs::logger::JsonNamedListCreate; + d.cbJsonNestedListCreate = rvs::logger::JsonNestedListCreate; d.cbJsonStartNodeCreate = rvs::logger::JsonStartNodeCreate; d.cbJsonActionStartNodeCreate = rvs::logger::JsonActionStartNodeCreate; d.cbJsonEndNodeCreate = rvs::logger::JsonEndNodeCreate; diff --git a/src/rvsliblogger.cpp b/src/rvsliblogger.cpp index 383c8d664..66e11dcdf 100644 --- a/src/rvsliblogger.cpp +++ b/src/rvsliblogger.cpp @@ -427,7 +427,11 @@ int rvs::logger::JsonActionStartNodeCreate(const char* Module, const char* Actio void* rvs::logger::JsonNamedListCreate(const char* name,const int LogLevel){ rvs::LogListNode* rec = new rvs::LogListNode(name, LogLevel); return static_cast(rec); +} +void* rvs::logger::JsonNestedListCreate(const char* name, const int LogLevel){ + rvs::LogListNode* rec = new rvs::LogListNode(name, LogLevel, true); + return static_cast(rec); } int rvs::logger::JsonActionEndNodeCreate() { std::string row{RVSINDENT}; diff --git a/src/rvsloglp.cpp b/src/rvsloglp.cpp index a8052c3b0..d94ac18c0 100644 --- a/src/rvsloglp.cpp +++ b/src/rvsloglp.cpp @@ -56,6 +56,7 @@ int rvs::lp::Initialize(const T_MODULE_INIT* pMi) { mi.cbStopping = pMi->cbStopping; mi.cbErr = pMi->cbErr; mi.cbJsonNamedListCreate = pMi->cbJsonNamedListCreate; + mi.cbJsonNestedListCreate = pMi->cbJsonNestedListCreate; return 0; } @@ -342,3 +343,7 @@ void* rvs::lp::JsonNamedListCreate(const char* name, const int LogLevel) { return (*mi.cbJsonNamedListCreate)(name, LogLevel); } +void* rvs::lp::JsonNestedListCreate(const char* name, const int LogLevel) { + return (*mi.cbJsonNestedListCreate)(name, LogLevel); +} + diff --git a/src/rvsloglp_utest.cpp b/src/rvsloglp_utest.cpp index e9aac399f..25bfce7df 100644 --- a/src/rvsloglp_utest.cpp +++ b/src/rvsloglp_utest.cpp @@ -52,7 +52,8 @@ int rvs::lp::Initialize(const T_MODULE_INIT* pMi) { mi.cbAddNode = pMi->cbAddNode; mi.cbStop = pMi->cbStop; mi.cbStopping = pMi->cbStopping; - mi.cbErr = pMi->cbErr; + mi.cbErr = pMi->cbErr; + mi.cbJsonNestedListCreate = pMi->cbJsonNestedListCreate; return 0; } @@ -254,6 +255,10 @@ int rvs::lp::Err(const std::string &Message, const std::string &Module) { return rvs::logger::Err(Message.c_str(), Module.c_str(), nullptr); } +void* rvs::lp::JsonNestedListCreate(const char* name, const int LogLevel) { + return rvs::logger::JsonNestedListCreate(name, LogLevel); +} + /** * @brief Log Error output * diff --git a/src/rvslognodelist.cpp b/src/rvslognodelist.cpp index d7026e291..7a003adeb 100644 --- a/src/rvslognodelist.cpp +++ b/src/rvslognodelist.cpp @@ -37,10 +37,11 @@ using std::string; * @param Parent Pointer to parent node * */ -rvs::LogListNode::LogListNode(const char* Name, int LogLevel, const rvs::LogNodeBase* Parent) +rvs::LogListNode::LogListNode(const char* Name, int LogLevel, bool nested, const rvs::LogNodeBase* Parent) : LogNode(Name, Parent), -Level(LogLevel){ +Level(LogLevel), +IsNested(nested){ Type = eLN::Record; } @@ -84,7 +85,9 @@ void rvs::LogListNode::Add(rvs::LogNodeBase* pChild) { std::string rvs::LogListNode::ToJson(const std::string& Lead) { DTRACE_ string result(RVSENDL); - result += "{"; + if (!IsNested) { + result += "{"; + } result += Lead + "\"" + Name + "\"" + " : ["; int size = Child.size(); @@ -95,6 +98,8 @@ std::string rvs::LogListNode::ToJson(const std::string& Lead) { } } result += RVSENDL + Lead + "]"; - result += "}"; + if (!IsNested) { + result += "}"; + } return result; } From b2587f3b9507b45efe3127ada170c762d37e3487 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 24 Jun 2026 14:01:06 -0400 Subject: [PATCH 220/275] Edited the nightly run to only run when schedule and on PUSH Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 10 +++++----- .github/workflows/rvs-nightly-tests.yml | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index a8a80b289..dad912a11 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -13,7 +13,7 @@ at any GPU host without code changes. ## What it does ``` -schedule / workflow_run / manual +schedule / push / manual │ ▼ install-rvs-on-target [self-hosted orchestrator] ──ssh──▶ [target GPU node] @@ -40,7 +40,7 @@ at the repo root — the same split as `build-relocatable-packages.yml` + | Trigger | Cadence | What fires | |---|---|---| | `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index and always runs install + level 4, even when the latest tarball filename matches the previous run (a notice is logged when unchanged). | -| `workflow_run` | After **Build Relocatable Packages** completes | Runs only when that workflow's overall conclusion is **success**. No changes to the build workflow are required. | +| `push` | Commits to `master`, `main`, or `release/**` | Runs install + level 4 using the latest tarball from the index (same as schedule). | | `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and **retargeting at any node** without editing the workflow. | The cron deliberately runs after AMD's typical nightly publish window; @@ -97,8 +97,8 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | **Required** *(unless every run that needs an index provides `workflow_dispatch` `tarball_url`; `schedule` and `workflow_run` need this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` (e.g. `https:///nightly/rvs/tar/`). Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | -| `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast on `schedule` if neither this secret nor `target_node` input is set. | +| `RVS_TARBALL_INDEX_URL` | **Required** *(unless every run that needs an index provides `workflow_dispatch` `tarball_url`; `schedule` and `push` need this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` (e.g. `https:///nightly/rvs/tar/`). Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | +| `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast if neither this secret nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | @@ -477,7 +477,7 @@ There are three ways to point the workflow at a different node, in increasing or -f target_node="" \ -f target_rocm_path="" ``` -3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` (and optionally `RVS_TARBALL_INDEX_URL`) and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled and manual runs will pick these up unless an input overrides them. +3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` (and optionally `RVS_TARBALL_INDEX_URL`) and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled, push, and manual runs will pick these up unless an input overrides them. The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 38dca2f3f..8d4853c2f 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -16,17 +16,18 @@ name: RVS Nightly Tests # # Triggers # -------- -# - schedule: daily poll of tarball index (repo secret RVS_TARBALL_INDEX_URL, or workflow_dispatch tarball_url) +# - schedule: daily poll of tarball index (repo secret RVS_TARBALL_INDEX_URL) +# - push: master, main, and release/* merges # - workflow_dispatch: manual run with optional overrides -# - workflow_run: after Build Relocatable Packages completes successfully on: schedule: - cron: '0 15 * * *' - workflow_run: - workflows: ["Build Relocatable Packages"] - types: - - completed + push: + branches: + - master + - main + - 'release/**' workflow_dispatch: inputs: tarball_url: @@ -64,7 +65,6 @@ env: jobs: install-rvs-on-target: name: Install RVS on target node - if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: From 4ed6b534959fcacda4d11958cb8bdbb313792b38 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 24 Jun 2026 15:41:18 -0400 Subject: [PATCH 221/275] Removed release from RVS nightly test pipeline Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 2 +- .github/workflows/rvs-nightly-tests.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index dad912a11..18eac202d 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -40,7 +40,7 @@ at the repo root — the same split as `build-relocatable-packages.yml` + | Trigger | Cadence | What fires | |---|---|---| | `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index and always runs install + level 4, even when the latest tarball filename matches the previous run (a notice is logged when unchanged). | -| `push` | Commits to `master`, `main`, or `release/**` | Runs install + level 4 using the latest tarball from the index (same as schedule). | +| `push` | Commits to `master` or `main` | Runs install + level 4 using the latest tarball from the index (same as schedule). | | `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and **retargeting at any node** without editing the workflow. | The cron deliberately runs after AMD's typical nightly publish window; diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 8d4853c2f..e50f0478a 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -17,7 +17,7 @@ name: RVS Nightly Tests # Triggers # -------- # - schedule: daily poll of tarball index (repo secret RVS_TARBALL_INDEX_URL) -# - push: master, main, and release/* merges +# - push: master and main merges # - workflow_dispatch: manual run with optional overrides on: @@ -27,7 +27,6 @@ on: branches: - master - main - - 'release/**' workflow_dispatch: inputs: tarball_url: From 45b0862ca4bc941c94cc4f40f1f0c245bf09c2ee Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 24 Jun 2026 16:49:17 -0400 Subject: [PATCH 222/275] Added a condition to run only on the successful build from RVS nightly test pipeline Signed-off-by: Urvashi Tiwari --- .github/workflows/README_NIGHTLY_TESTS.md | 20 +++++---- .github/workflows/rvs-nightly-tests.yml | 49 ++++++++++++++++------- 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/.github/workflows/README_NIGHTLY_TESTS.md b/.github/workflows/README_NIGHTLY_TESTS.md index 18eac202d..60d791c3d 100644 --- a/.github/workflows/README_NIGHTLY_TESTS.md +++ b/.github/workflows/README_NIGHTLY_TESTS.md @@ -1,7 +1,7 @@ # RVS Nightly Tests Workflow This document describes [`.github/workflows/rvs-nightly-tests.yml`](./rvs-nightly-tests.yml), -which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL`, passed through workflow `env.TARBALL_INDEX_URL` — **no default URL in the repo**), once per day, copies it to a **configurable remote target node** over SSH, +which picks up the **latest RVS tarball** from the tarball index (`secrets.RVS_TARBALL_INDEX_URL`, passed through workflow `env.TARBALL_INDEX_URL` — **no default URL in the repo**), after a successful **Build Relocatable Packages** run (or on manual dispatch), copies it to a **configurable remote target node** over SSH, installs it there, and runs RVS level 4 on that node. The GitHub Actions runner ("RVS Runner") is only an **orchestrator** — it @@ -13,7 +13,7 @@ at any GPU host without code changes. ## What it does ``` -schedule / push / manual +workflow_run (push main|master or scheduled build) / manual │ ▼ install-rvs-on-target [self-hosted orchestrator] ──ssh──▶ [target GPU node] @@ -39,12 +39,10 @@ at the repo root — the same split as `build-relocatable-packages.yml` + | Trigger | Cadence | What fires | |---|---|---| -| `schedule` | `0 15 * * *` UTC daily (08:00 PST / 07:00 PDT) | Polls the tarball index and always runs install + level 4, even when the latest tarball filename matches the previous run (a notice is logged when unchanged). | -| `push` | Commits to `master` or `main` | Runs install + level 4 using the latest tarball from the index (same as schedule). | +| `workflow_run` | After **Build Relocatable Packages** completes | Runs only when that workflow's overall conclusion is **success** and the triggering event was either **`push`** to **`main`** / **`master`**, or the package workflow's own **`schedule`** (daily build). PR builds, release-branch builds, failed builds, and manual package builds do **not** start nightly tests. | | `workflow_dispatch` | Manual | Always runs. Supports overriding the tarball URL and **retargeting at any node** without editing the workflow. | -The cron deliberately runs after AMD's typical nightly publish window; -adjust the cron string in the workflow if your publish cadence is different. +Nightly tests no longer have their own cron — they follow successful **Build Relocatable Packages** runs (see that workflow's `0 13 * * *` UTC schedule for the daily package build cadence). ## Manual dispatch inputs @@ -68,7 +66,7 @@ gh workflow run rvs-nightly-tests.yml \ -f target_user="" ``` -Example — resolve from your index secret (typical manual run; ensure `RVS_TARBALL_INDEX_URL` is set for scheduled runs): +Example — resolve from your index secret (typical manual run; ensure `RVS_TARBALL_INDEX_URL` is set for post-build runs): ```bash gh workflow run rvs-nightly-tests.yml -f target_node="" @@ -97,7 +95,7 @@ gh workflow run rvs-nightly-tests.yml \ | Name | Required? | Purpose | |---|---|---| -| `RVS_TARBALL_INDEX_URL` | **Required** *(unless every run that needs an index provides `workflow_dispatch` `tarball_url`; `schedule` and `push` need this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` (e.g. `https:///nightly/rvs/tar/`). Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | +| `RVS_TARBALL_INDEX_URL` | **Required** *(unless every run that needs an index provides `workflow_dispatch` `tarball_url`; `workflow_run` needs this secret)* | HTTPS directory listing URL scraped for the latest `amdrocm*-rvs-*-Linux.tar.gz` (e.g. `https:///nightly/rvs/tar/`). Copied into workflow `env.TARBALL_INDEX_URL`. GitHub masks secret values in logs when printed. If this name was previously an Actions **Variable**, copy the value to this secret and remove the variable. | | `RVS_TARGET_NODE` | **Required** *(unless every run sets `target_node` input)* | Hostname or IP of the node where RVS is installed and tests run. Stored as a secret so the lab node identity isn't visible in repo Variables or in run logs — GitHub Actions automatically masks secret values as `***` wherever they appear in step output. Workflow fails fast if neither this secret nor `target_node` input is set. | | `RVS_TARGET_USER` | optional (no hard-coded default) | SSH user on the target node. If unset and `target_user` input is empty, the SSH client falls back to the orchestrator runner's local user — set this secret explicitly to avoid surprises. Stored as a secret so the lab account name isn't visible in repo settings or run logs (auto-masked as `***`). | | `RVS_TARGET_SSH_KEY` | **Required** | Private SSH key (OpenSSH or PEM format) authorized on the target node for `RVS_TARGET_USER`. Written to `$RUNNER_TEMP/rvs_target_key` for the duration of the job and scrubbed in the cleanup step. | @@ -354,7 +352,7 @@ e.g.: | Field | Value | |---|---| | Run | `1234567890` | -| Trigger | `schedule` | +| Trigger | `workflow_run` (scheduled package build) | | Target ROCm path | `` (version ``) | | Remote work dir | `/tmp/rvs-nightly-1234567890` | | Tarball | `amdrocm7-rvs-1.4.21-288-Linux.tar.gz` | @@ -464,7 +462,7 @@ Watch the Actions tab for: | **Run RVS level 4 on target node** exits non-zero immediately (after both verify steps passed) | RVS plugin's own dependency missing on the target (e.g. `libpci3` on Debian). Check `rvs_level_4.log` in the artifact for the specific error. | | **Collect logs from target node** warns: `No log files retrieved from target node` | The level steps exited so early they didn't produce any output, or `$REMOTE_WORK_DIR` was wiped. Inspect the level-step logs in the run UI for the original error. | | **Create Test Report** / **Build test report**: `Required environment variable TARBALL_URL is not set` | The install job’s `tarball_url` output was empty when passed into the report job (often URLs with `%`, `&`, or other characters that break the old `echo "tarball_url=$URL"` → `GITHUB_OUTPUT` form). The workflow now writes that URL with delimiter syntax; upgrade to current `rvs-nightly-tests.yml`. The report step also tolerates a missing URL and still writes `SUMMARY.md` with the tarball filename. | -| Cron skipped a day | GitHub may delay or drop schedules under high load. Run once manually via `workflow_dispatch` to validate. | +| Daily package build skipped or failed | Nightly tests only start after a **successful** **Build Relocatable Packages** run. If the scheduled package build failed or was skipped, nightly tests will not run until the next successful build (or trigger manually via `workflow_dispatch`). | ## Retargeting at a different node @@ -477,7 +475,7 @@ There are three ways to point the workflow at a different node, in increasing or -f target_node="" \ -f target_rocm_path="" ``` -3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` (and optionally `RVS_TARBALL_INDEX_URL`) and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent scheduled, push, and manual runs will pick these up unless an input overrides them. +3. **Permanent change:** update repo secrets `RVS_TARGET_NODE` / `RVS_TARGET_USER` (and optionally `RVS_TARBALL_INDEX_URL`) and repo variable `RVS_TARGET_ROCM_PATH` (and optionally repo variable `RVS_REMOTE_WORK_DIR`). All subsequent post-build (`workflow_run`) and manual runs will pick these up unless an input overrides them. The same `RVS_TARGET_SSH_KEY` secret is reused across nodes — make sure the public counterpart of that key is added to `$TARGET_USER`'s `~/.ssh/authorized_keys` diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index e50f0478a..01bb888d9 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -16,17 +16,15 @@ name: RVS Nightly Tests # # Triggers # -------- -# - schedule: daily poll of tarball index (repo secret RVS_TARBALL_INDEX_URL) -# - push: master and main merges +# - workflow_run: after Build Relocatable Packages completes successfully +# (push to main/master, or scheduled package build) # - workflow_dispatch: manual run with optional overrides on: - schedule: - - cron: '0 15 * * *' - push: - branches: - - master - - main + workflow_run: + workflows: ["Build Relocatable Packages"] + types: + - completed workflow_dispatch: inputs: tarball_url: @@ -62,8 +60,30 @@ env: TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} jobs: + gate-nightly-trigger: + name: Gate (eligible triggers only) + if: >- + github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_run' && + github.event.workflow_run.conclusion == 'success' && + ( + (github.event.workflow_run.event == 'push' && + (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'master')) || + github.event.workflow_run.event == 'schedule' + )) + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + steps: + - name: Confirm nightly test run + run: | + if [ "${{ github.event_name }}" = "workflow_run" ]; then + echo "Package build (${{ github.event.workflow_run.event }}) completed on branch: ${{ github.event.workflow_run.head_branch }}" + else + echo "Manual nightly test run (workflow_dispatch)" + fi + install-rvs-on-target: name: Install RVS on target node + needs: gate-nightly-trigger runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: @@ -81,8 +101,8 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Restore last-seen marker (cron path) - if: github.event_name == 'schedule' + - name: Restore last-seen marker (scheduled build path) + if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'schedule' uses: actions/cache@v4 with: path: last_tarball_marker.txt @@ -97,6 +117,7 @@ jobs: # masks workflow env. Use inherited TARBALL_INDEX_URL inside the script. INPUT_URL: ${{ inputs.tarball_url }} EVENT_NAME: ${{ github.event_name }} + WORKFLOW_RUN_EVENT: ${{ github.event.workflow_run.event || '' }} run: | set -euo pipefail @@ -142,10 +163,10 @@ jobs: NAME="$(basename "$URL")" - if [ "$EVENT_NAME" = "schedule" ] && [ -f last_tarball_marker.txt ]; then + if [ "$WORKFLOW_RUN_EVENT" = "schedule" ] && [ -f last_tarball_marker.txt ]; then LAST="$(cat last_tarball_marker.txt)" if [ "$LAST" = "$NAME" ]; then - echo "::notice::Latest tarball ($NAME) unchanged since last scheduled run — running tests anyway." + echo "::notice::Latest tarball ($NAME) unchanged since last scheduled package build — running tests anyway." else echo "::notice::New tarball (previous: $LAST, now: $NAME)." fi @@ -172,8 +193,8 @@ jobs: echo "Latest tarball : $NAME" echo "URL : $URL" - - name: Save last-seen marker (cron path) - if: github.event_name == 'schedule' + - name: Save last-seen marker (scheduled build path) + if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'schedule' uses: actions/cache/save@v4 with: path: last_tarball_marker.txt From bada8f68b212a6e16be849cb3f6a80cb1e57f622 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 24 Jun 2026 17:24:08 -0500 Subject: [PATCH 223/275] Sync user-guide with latest changes --- docs/ug1main.md | 1020 +++++++++++++++++++---------------------------- 1 file changed, 401 insertions(+), 619 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index 51409d08a..4a70d8756 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -221,7 +221,7 @@ platform-specific (MI-series GPUs) module configuration file. Valid modules: -t--durationSpecify the test duration (in seconds) for each action. -Overrides the duration value in all actions of the configuration file. +Overrides the duration value set in all actions of the configuration file. --listTestsList the test modules present in RVS. @@ -282,6 +282,11 @@ List all available test modules: ```bash ./rvs --listTests ``` + +Override the duration for all actions to 30 seconds: +```bash +./rvs -c conf/gst_single.conf -t 30 +``` List all GPUs visible to RVS: ```bash ./rvs -g @@ -424,6 +429,11 @@ file. deviceidIntegerThis is an optional parameter, but if specified it restricts the action to a specific device type corresponding to the deviceid. + +device_indexIntegerThis is an optional parameter that +restricts the action to a GPU identified by its SMI index. Can also be +overridden via the -i CLI option. + parallelBoolIf this key is false, actions will be run on one device at a time, in the order specified in the device list, or the natural ordering if the device value is “all”. If this parameter is true, @@ -436,14 +446,13 @@ isn’t specified the default is 1. Some modules will ignore this parameter. waitIntegerThis indicates how long the test should -wait between executions, in milliseconds. Some -modules will ignore this parameter. If the -count key is not specified, this key is ignored. +wait between executions, in milliseconds. The default value is 500 ms. +Some modules will ignore this parameter. -durationIntegerThis parameter overrides the count key, if -specified. This indicates how long the test -should run, given in milliseconds. Some -modules will ignore this parameter. +durationIntegerThis indicates how long the test +should run, given in milliseconds. When specified, it takes precedence +over the count key for modules that support it. Some modules will +ignore this parameter. moduleStringThis parameter specifies the module that @@ -466,8 +475,11 @@ for the kfd, with the following path: /sys/class/kfd/kfd/topology/nodes/ Each of the GPU nodes in the directory is identified with a number, -indicating the device index of the GPU. This module will ignore count, duration -or wait key values. +indicating the device index of the GPU. Use the `device_index` common key to +target specific GPUs by their topology node index. + +Note: GPUP ignores the `count`, `duration`, `wait`, `parallel`, and +`log_interval` common keys — each action performs a single-pass property dump. ### Module specific keys @@ -711,7 +723,7 @@ Consider this action: Action lists deviceid 267 which is not present in the system. Output for such configuration is: - RVS-GPUP: action: action_1 invalid 'deviceid' key value + RVS-ERROR [GPUP] [action_1] invalid 'deviceid' key value ## GM module @@ -776,7 +788,7 @@ message will be printed to stdout while the bounding value is still exceeded. Integer If this key is specified metrics will be sampled at the given rate. The units for - the sample_interval are milliseconds. The default value is 1000. + the sample_interval are milliseconds. The default value is 500. @@ -785,8 +797,8 @@ message will be printed to stdout while the bounding value is still exceeded. If this key is specified informational messages will be emitted at the given interval, providing the current values of all parameters specified. This parameter - must be equal to or greater than the sample rate. If this value is not specified, - no logging will occur. + must be equal to or greater than the sample_interval. The default value is 1000 ms + (logging is ON by default). Set to 0 to disable periodic logging. @@ -838,9 +850,9 @@ being monitored: [INFO ][][] gm monitoring bounds min: max: During the monitoring informational output regarding the metrics of the GPU will -be sampled at every interval specified by the sample_rate key. If a bounding box -violation is discovered during a sampling interval, a warning message is -logged with the following format: +be sampled at every interval specified by the `sample_interval` key. If a +bounding box violation is discovered during a sampling interval, a warning +message is logged with the following format: [INFO ][][] gm bounds violation @@ -852,7 +864,7 @@ logged at every interval using the following format: When monitoring is stopped for a target GPU, a result message is logged with the following format: - [RESULT][][] gm gm stopped + [RESULT][][] gm stopped The following messages, reporting the number of metric violations that were sampled over the duration of the monitoring and the average metric value is @@ -957,7 +969,7 @@ Consider action with syntax error ('temp' key is missing lower value): Output for such configuration is: - RVS-GM: action: action_1 Wrong number of metric parameters + RVS-ERROR [GM] [action_1] Invalid 'metrics.temp' key. **Example 4:** @@ -978,7 +990,7 @@ Consider action with logical error: Output for such configuration is: - RVS-GM: action: action_1 Log interval has the lower value than the sample interval + RVS-ERROR [GM] [action_1] Log interval has the lower value than the sample interval ## PESM module @@ -996,8 +1008,8 @@ after testing has completed. For information on GPU power state monitoring, see PCI Power Management Capability Structure, Gen 3 spec, device states D0-D3. For information on link status changes see Status Register (Offset 12h), Gen 3 spec. -Monitoring is performed by polling respective PCIe registers roughly every 1ms -(one millisecond). +Monitoring is performed by polling respective PCIe registers approximately every +1 second. ### Module Specific Keys @@ -1016,31 +1028,21 @@ The default value is 0 (no wait). ### Output -Module specific output keys are described in the table below: +When monitoring starts, an informational message is logged: -
- - - -
Output Key Type Description
stateStringA string detailing the current power state -of the GPU or the speed of the PCIe link.
-
+ [] PCIe link speed and power monitoring started ... -When monitoring is started for a target GPU, a result message is logged -with the following format: +When a PCIe link speed or power state change is detected, an informational +message is logged per GPU: - [RESULT][][] pesm started + [] PCIe link speed changed + [] PCIe power state changed -When monitoring is stopped for a target GPU, a result message is logged -with the following format: +When monitoring stops (triggered by a `monitor: false` action), a summary is +logged: - [RESULT][][] pesm all stopped - -When monitoring is enabled, any detected state changes in link speed or GPU -power state will generate the following informational messages: - - [INFO ][][] pesm power state change - [INFO ][][] pesm link speed change + [] PCIe monitoring ended after wait duration. + [] GPU PCIe speed change true/false ### Examples @@ -1082,29 +1084,23 @@ If executed like this: output similar to this one can be produced: - [RESULT] [497544.637462] [action_1] pesm all started - [INFO ] [497544.648299] [action_1] pesm 33367 link speed change 8 GT/s - [INFO ] [497544.648299] [action_1] pesm 33367 power state change D0 - [INFO ] [497544.648733] [action_1] pesm 3254 link speed change 8 GT/s - [INFO ] [497544.648733] [action_1] pesm 3254 power state change D0 - [INFO ] [497544.650413] [action_1] pesm 50599 link speed change 8 GT/s - [INFO ] [497544.650413] [action_1] pesm 50599 power state change D0 - [INFO ] [497545.170392] [action_2] gst 33367 start 5000.000000 copy matrix:false - [INFO ] [497547.36602 ] [action_2] gst 33367 Gflops 6478.066983 - [INFO ] [497548.69221 ] [action_2] gst 33367 target achieved 5000.000000 - [INFO ] [497549.101219] [action_2] gst 33367 Gflops 5189.993529 - [INFO ] [497550.132376] [action_2] gst 33367 Gflops 5189.993529 + [action_1] PCIe link speed and power monitoring started ... + [action_1] 33367 PCIe link speed changed 8 GT/s + [action_1] 33367 PCIe power state changed D0 + [action_1] 3254 PCIe link speed changed 8 GT/s + [action_1] 3254 PCIe power state changed D0 + [action_1] 50599 PCIe link speed changed 8 GT/s + [action_1] 50599 PCIe power state changed D0 + [action_2] [GPU:: 33367] GFLOPS 6478.066983 + [action_2] [GPU:: 33367] GFLOPS 5189.993529 + [action_2] [GPU:: 33367] GFLOPS 5189.993529 ... - [INFO ] [497563.569370] [action_2] gst 33367 Gflops 5174.935520 - [RESULT] [497564.86904 ] [action_2] gst 33367 Gflop: 6478.066983 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: TRUE - [INFO ] [497564.220311] [action_2] gst 33367 start 5000.000000 copy matrix:false - [INFO ] [497566.70585 ] [action_2] gst 33367 Gflops 6521.049418 - [INFO ] [497567.99929 ] [action_2] gst 33367 target achieved 5000.000000 - [INFO ] [497568.143096] [action_2] gst 33367 Gflops 5130.281235 - ... - [INFO ] [497582.683893] [action_2] gst 33367 Gflops 5135.204729 - [RESULT] [497583.130945] [action_2] gst 33367 Gflop: 6521.049418 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: TRUE - [RESULT] [497583.155470] [action_3] pesm all stopped + [action_2] [GPU:: 33367] GFLOPS 5174.935520 + [action_2] [GPU:: 33367] GFLOPS 6478.066983 Target GFLOPS: 5000.000000 met: TRUE + [action_3] PCIe monitoring ended after wait duration. + [action_3] GPU 33367 PCIe speed change true + [action_3] GPU 3254 PCIe speed change false + [action_3] GPU 50599 PCIe speed change true **Example 2:** @@ -1121,7 +1117,7 @@ Consider this file: This file has an invalid entry in `deviceid` key. If execute, an error will be reported: - RVS-PESM: action: act1 invalide 'deviceid' key value: xxx + RVS-ERROR [PESM] [act1] invalid 'deviceid' key value: xxx ## RCQT module @@ -1137,15 +1133,17 @@ independent and scriptable interface capable for performing the configuration checks required for ROCm support. The checks in this module do not target a specific device. \n\n -Two types of actions are performed by RCQT. -1) Metapackage Check -metapackage-validation: This will check the installation of the mentioned -metapackages and their dependencies and their respective versions as required -by metapackage. List of metapackages are provided with key `package` - -2) Packages installation check -packagelist-install-validation: This action checks if the package is installed. - Packages are provided against key `rpmpackagelist` and `debpackagelist` +Two types of actions are performed by RCQT, selected by which configuration +key is present — not by the action name: + +1) **Metapackage Check** — triggered when the `package` key is present. +Checks the installation of the named metapackages and their dependencies, +verifying the installed versions. + +2) **Packages installation check** — triggered when `rpmpackagelist` or +`debpackagelist` is present. Checks whether the listed packages are installed. + +Note: the `device` key is ignored by RCQT; checks are platform-wide. This feature is used to check installed packages on the system. It provides checks for installed packages and the currently available package versions, if @@ -1259,7 +1257,7 @@ Output keys are described in the table below: PackageString Name of checked package -versionFloating Number +versionString Installed version of the package Missing packagesInteger @@ -1279,7 +1277,6 @@ In this example, all given packages are installed. actions: - name: packagelist-install-validation - device: all module: rcqt rpmpackagelist: rocm-hip-libraries rocm-core @@ -1347,8 +1344,6 @@ Module specific output keys are described in the table below:
  • atomic_op_routing
  • dev_serial_num
  • kernel_driver
  • -
  • pwr_base_pwr
  • -
  • pwr_rail_type
  • device_id
  • vendor_id
  • @@ -1420,7 +1415,7 @@ A regular PEQT configuration file looks like this: ```{note} - When setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them -- There are no regular expression for this `.conf` file, therefore RVS will report `TRUE` if at least one AMD compatible GPU is registered within the system. Otherwise it will report `FALSE`. +- There are no regular expression for this `.conf` file, therefore RVS will report `true` if at least one AMD compatible GPU is registered within the system. Otherwise it will report `false`. ``` The Power Budgeting capability is a dynamic one, having the following form: @@ -1478,7 +1473,7 @@ The output for such a configuration file may look like this: [INFO ] [177628.401806] pcie_act_1 peqt slot_physical_num #0 [INFO ] [177628.401814] pcie_act_1 peqt slot_pwr_limit_value 0.000W [INFO ] [177628.401819] pcie_act_1 peqt vendor_id 4098 - [RESULT] [177628.403781] pcie_act_1 peqt TRUE + [RESULT] [177628.403781] pcie_act_1 peqt true **Example 2:** @@ -1512,9 +1507,9 @@ error will be logged out. **Example 3:** Another example with even more regular expressions is given below. The expected -PEQT check result is TRUE if at least one AMD compatible GPU having the ID 3254 -or 33367 is registered within the system and all the PCIe capabilities values -match their corresponding regular expressions. +PEQT check result is `true` if at least one AMD compatible GPU matching +`deviceid: 26720` from the device list is found and all the PCIe capability +values match their corresponding regular expressions. actions: - name: pcie_act_1 @@ -1629,9 +1624,11 @@ memory. bar4_sizeIntegerThe actual size of BAR4. bar4_base_addrIntegerThe actual base address of BAR4 memory. -bar5_sizeIntegerThe actual size of BAR5. -passString 'true' if all of the properties match the -values given, 'false' otherwise. +bar5_sizeIntegerThe actual size of BAR5. Note: due to a +source bug, the JSON output for bar5_size is populated from the BAR4 +size instead of BAR5; the text log value is correct. +passBool 'true' if all of the BAR properties satisfy +the constraints, 'false' otherwise. @@ -1640,14 +1637,14 @@ they satisfy the give parameters. The pass output key will be true and the test will pass if all of the BAR properties satisfy the constraints. After the check is finished, the following informational messages will be generated: - [INFO ][][] smqt bar1_size - [INFO ][][] smqt bar1_base_addr - [INFO ][][] smqt bar2_size - [INFO ][][] smqt bar2_base_addr - [INFO ][][] smqt bar4_size - [INFO ][][] smqt bar4_base_addr - [INFO ][][] smqt bar5_size - [RESULT][][] smqt + [INFO ][][] smqt bar1_size + [INFO ][][] smqt bar1_base_addr + [INFO ][][] smqt bar2_size + [INFO ][][] smqt bar2_base_addr + [INFO ][][] smqt bar4_size + [INFO ][][] smqt bar4_base_addr + [INFO ][][] smqt bar5_size + [RESULT][][] smqt pass: ### Examples @@ -1673,30 +1670,30 @@ Consider this file (sizes are in bytes): Results for three GPUs are: - [INFO ] [257936.568768] [action_1] smqt bar1_size 17179869184 (16.00 GB) - [INFO ] [257936.568768] [action_1] smqt bar1_base_addr 13C0000000C - [INFO ] [257936.568768] [action_1] smqt bar2_size 2097152 (2.00 MB) - [INFO ] [257936.568768] [action_1] smqt bar2_base_addr 13B0000000C - [INFO ] [257936.568768] [action_1] smqt bar4_size 524288 (512.00 KB) - [INFO ] [257936.568768] [action_1] smqt bar4_base_addr E4B00000 - [INFO ] [257936.568768] [action_1] smqt bar5_size 0 (0.00 B) - [RESULT] [257936.568920] [action_1] smqt fail - [INFO ] [257936.569234] [action_1] smqt bar1_size 17179869184 (16.00 GB) - [INFO ] [257936.569234] [action_1] smqt bar1_base_addr 1A00000000C - [INFO ] [257936.569234] [action_1] smqt bar2_size 2097152 (2.00 MB) - [INFO ] [257936.569234] [action_1] smqt bar2_base_addr 19F0000000C - [INFO ] [257936.569234] [action_1] smqt bar4_size 524288 (512.00 KB) - [INFO ] [257936.569234] [action_1] smqt bar4_base_addr E9900000 - [INFO ] [257936.569234] [action_1] smqt bar5_size 0 (0.00 B) - [RESULT] [257936.569281] [action_1] smqt fail - [INFO ] [257936.570798] [action_1] smqt bar1_size 17179869184 (16.00 GB) - [INFO ] [257936.570798] [action_1] smqt bar1_base_addr 16C0000000C - [INFO ] [257936.570798] [action_1] smqt bar2_size 2097152 (2.00 MB) - [INFO ] [257936.570798] [action_1] smqt bar2_base_addr 1710000000C - [INFO ] [257936.570798] [action_1] smqt bar4_size 524288 (512.00 KB) - [INFO ] [257936.570798] [action_1] smqt bar4_base_addr E7300000 - [INFO ] [257936.570798] [action_1] smqt bar5_size 0 (0.00 B) - [RESULT] [257936.570837] [action_1] smqt fail + [INFO ] [257936.568768] [action_1] smqt 3254 bar1_size 17179869184 (16.00 GB) + [INFO ] [257936.568768] [action_1] smqt 3254 bar1_base_addr 13C0000000C + [INFO ] [257936.568768] [action_1] smqt 3254 bar2_size 2097152 (2.00 MB) + [INFO ] [257936.568768] [action_1] smqt 3254 bar2_base_addr 13B0000000C + [INFO ] [257936.568768] [action_1] smqt 3254 bar4_size 524288 (512.00 KB) + [INFO ] [257936.568768] [action_1] smqt 3254 bar4_base_addr E4B00000 + [INFO ] [257936.568768] [action_1] smqt 3254 bar5_size 0 (0.00 B) + [RESULT] [257936.568920] [action_1] smqt 3254 pass: false + [INFO ] [257936.569234] [action_1] smqt 50599 bar1_size 17179869184 (16.00 GB) + [INFO ] [257936.569234] [action_1] smqt 50599 bar1_base_addr 1A00000000C + [INFO ] [257936.569234] [action_1] smqt 50599 bar2_size 2097152 (2.00 MB) + [INFO ] [257936.569234] [action_1] smqt 50599 bar2_base_addr 19F0000000C + [INFO ] [257936.569234] [action_1] smqt 50599 bar4_size 524288 (512.00 KB) + [INFO ] [257936.569234] [action_1] smqt 50599 bar4_base_addr E9900000 + [INFO ] [257936.569234] [action_1] smqt 50599 bar5_size 0 (0.00 B) + [RESULT] [257936.569281] [action_1] smqt 50599 pass: false + [INFO ] [257936.570798] [action_1] smqt 33367 bar1_size 17179869184 (16.00 GB) + [INFO ] [257936.570798] [action_1] smqt 33367 bar1_base_addr 16C0000000C + [INFO ] [257936.570798] [action_1] smqt 33367 bar2_size 2097152 (2.00 MB) + [INFO ] [257936.570798] [action_1] smqt 33367 bar2_base_addr 1710000000C + [INFO ] [257936.570798] [action_1] smqt 33367 bar4_size 524288 (512.00 KB) + [INFO ] [257936.570798] [action_1] smqt 33367 bar4_base_addr E7300000 + [INFO ] [257936.570798] [action_1] smqt 33367 bar5_size 0 (0.00 B) + [RESULT] [257936.570837] [action_1] smqt 33367 pass: false In this example, BAR sizes reported by GPUs match those listed in configuration key except for the BAR5, hence the test fails. @@ -1725,7 +1722,9 @@ specified in the list will be considered. to a specific device type corresponding to the deviceid. test_bandwidthBool If this key is set to true the P2P bandwidth benchmark will run if a pair of -devices pass the P2P check. +devices pass the P2P check. Note: setting this to false currently causes the +module to exit with an error in the current implementation; bandwidth testing +must be enabled for a successful run. bidirectionalBool This option is only used if test_bandwidth key is true. This specifies the type of transfer to run:\n @@ -1934,29 +1933,30 @@ peers. You may need to increase test duration. -If the value of test_bandwidth key is false, the tool will only try to determine -if the GPU(s) in the peers key are P2P to the action’s GPU. In this case the -bidirectional and log_interval values will be ignored, if they are specified. If -a gpu is a P2P peer to the device the test will pass, otherwise it will fail. A -message indicating the result will be provided for each GPUs specified. It will -have the following format: +The P2P capability check logs a result message for each device-peer pair. +Self-pairs (same GPU) are not logged. The message format is: - [RESULT][][] p2p peers: distance: :[ :] + [] p2p [GPU:: - - ] [GPU:: - - ] peers: distance: : -If the value of test_bandwidth is true bandwidth testing between the device and -each of its peers will take place in parallel or in sequence, depending on the -value of the parallel flag. During the duration of bandwidth benchmarking, -informational output providing the moving average of the transfer’s bandwidth -will be calculated and logged at every time increment specified by the -`log_interval` parameter. The messages will have the following output: +If `test_bandwidth` is true, bandwidth testing between the device and each of +its peers will take place in parallel or in sequence, depending on the value of +the `parallel` flag. During bandwidth benchmarking, informational output +providing the moving average of the transfer's bandwidth is logged at every +`log_interval`: - [INFO ][][] p2p-bandwidth [] bidirectional: + [] p2p-bandwidth[] [GPU:: - - ] [GPU:: - - ] bidirectional: GBps -At the end of the test the average bytes/second will be calculated over the -entire test duration, and will be logged as a result: +At the end of the test, the average bandwidth over the entire test duration is +logged as a result: - [RESULT][][] p2p-bandwidth [] bidirectional: + [] p2p-bandwidth[] [GPU:: - - ] [GPU:: - - ] bidirectional: GBps duration: secs +When `transferbench_test: alltoall` is used, additional aggregate output lines +are emitted: + + [] a2a-p2p-bandwidth[] ... + [] a2a-gpu-bandwidth ... Aggregate peer bandwidth: GBps + [] a2a-bandwidth [ GPUs][ p2p transfers] Aggregate bandwidth: GBps ### Examples @@ -1973,21 +1973,21 @@ tested for p2p capability with no bandwidth testing (test_bandwidth: false). peers: all test_bandwidth: false +Note: setting `test_bandwidth: false` causes the module to exit with an error +in the current implementation. The P2P check result format shown below is +emitted before the exit when bandwidth testing is enabled. + +Possible result (with `test_bandwidth: true`) is: -Possible result is: + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.262875] [action_1] p2p 3254 3254 peers:false distance:-1 - [RESULT] [1656631.262968] [action_1] p2p 3254 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263039] [action_1] p2p 3254 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263103] [action_1] p2p 50599 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263151] [action_1] p2p 50599 50599 peers:false distance:-1 - [RESULT] [1656631.263203] [action_1] p2p 50599 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263265] [action_1] p2p 33367 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263321] [action_1] p2p 33367 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1656631.263360] [action_1] p2p 33367 33367 peers:false distance:-1 +From the output we can see the P2P topology between three GPUs. -From the first line of result, we can see that GPU (ID 3254) can't access itself. -From the second line of result, we can see that source GPU (ID 3254) can access destination GPU (ID 50599). **Example 2:** @@ -2006,41 +2006,27 @@ for each completed transfer (log_interval: 0) test_bandwidth: true bidirectional: true +When run with "-d 3" switch, possible result is: When run with "-d 3" switch, possible result is: - [RESULT] [1657122.364752] [action_1] p2p 3254 3254 peers:false distance:-1 - [RESULT] [1657122.364845] [action_1] p2p 3254 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.364917] [action_1] p2p 3254 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.364985] [action_1] p2p 50599 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.365037] [action_1] p2p 50599 50599 peers:false distance:-1 - [RESULT] [1657122.365094] [action_1] p2p 50599 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.365157] [action_1] p2p 33367 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.365221] [action_1] p2p 33367 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1657122.365270] [action_1] p2p 33367 33367 peers:false distance:-1 - [INFO ] [1657123.644203] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 7.013 GBps - [INFO ] [1657123.644376] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 6.615 GBps - [INFO ] [1657123.644453] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 2.367 GBps - [INFO ] [1657123.644522] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 7.504 GBps - [INFO ] [1657123.644590] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 8.207 GBps - [INFO ] [1657123.644673] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 7.680 GBps - [INFO ] [1657124.926221] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 6.646 GBps - [INFO ] [1657124.926368] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 8.418 GBps - [INFO ] [1657124.926438] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 7.402 GBps - [INFO ] [1657124.926506] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 6.161 GBps - [INFO ] [1657124.926573] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 9.024 GBps - [INFO ] [1657124.926640] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 8.740 GBps - [INFO ] [1657126.208742] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 5.680 GBps - [INFO ] [1657126.208905] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 8.011 GBps - [INFO ] [1657126.208990] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 3.918 GBps - [INFO ] [1657126.209066] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 6.058 GBps - [INFO ] [1657126.209140] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 6.650 GBps - [INFO ] [1657126.209213] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 0.000 GBps - [RESULT] [1657126.742128] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 5.767 GBps duration: 0.368453 sec - [RESULT] [1657126.743287] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 6.013 GBps duration: 0.498944 sec - [RESULT] [1657126.744411] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 5.278 GBps duration: 0.380393 sec - [RESULT] [1657126.745534] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 4.160 GBps duration: 0.484577 sec - [RESULT] [1657126.746684] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 5.219 GBps duration: 0.407190 sec - [RESULT] [1657126.747827] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 4.001 GBps duration: 0.562350 sec + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 7.013 GBps + [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 6.615 GBps + [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 2.367 GBps + [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 7.504 GBps + [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 8.207 GBps + [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 7.680 GBps + [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 5.767 GBps duration: 0.368453 secs + [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 6.013 GBps duration: 0.498944 secs + [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.278 GBps duration: 0.380393 secs + [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 4.160 GBps duration: 0.484577 secs + [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.219 GBps duration: 0.407190 secs + [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.001 GBps duration: 0.562350 secs We can see that on this particular machine there are three GPUs and six possible device-to-peer transfers. @@ -2065,23 +2051,20 @@ false). bidirectional: false parallel: false +Possible output is: Possible output is: - [RESULT] [1657218.801555] [action_1] p2p 50599 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1657218.801655] [action_1] p2p 50599 33367 peers:true distance:56 HyperTransport:56 - [INFO ] [1657219.871532] [action_1] p2p-bandwidth [1/2] 50599 3254 bidirectional: false 4.517 GBps - [INFO ] [1657219.871717] [action_1] p2p-bandwidth [2/2] 50599 33367 bidirectional: false 4.475 GBps - [INFO ] [1657220.940263] [action_1] p2p-bandwidth [1/2] 50599 3254 bidirectional: false 4.476 GBps - [INFO ] [1657220.940461] [action_1] p2p-bandwidth [2/2] 50599 33367 bidirectional: false 4.601 GBps - [INFO ] [1657222.7589 ] [action_1] p2p-bandwidth [1/2] 50599 3254 bidirectional: false 4.488 GBps - [INFO ] [1657222.7760 ] [action_1] p2p-bandwidth [2/2] 50599 33367 bidirectional: false 4.470 GBps - [INFO ] [1657223.74647 ] [action_1] p2p-bandwidth [1/2] 50599 3254 bidirectional: false 4.666 GBps - [INFO ] [1657223.74810 ] [action_1] p2p-bandwidth [2/2] 50599 33367 bidirectional: false 4.576 GBps - [RESULT] [1657224.181106] [action_1] p2p-bandwidth [1/2] 50599 3254 bidirectional: false 4.539 GBps duration: 1.321909 sec - [RESULT] [1657224.182255] [action_1] p2p-bandwidth [2/2] 50599 33367 bidirectional: false 4.551 GBps duration: 1.318517 sec + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.517 GBps + [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.475 GBps + [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.476 GBps + [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.601 GBps + [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.539 GBps duration: 1.321909 secs + [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.551 GBps duration: 1.318517 secs From the last line of result, we can see that source GPU (ID 50599) can access -destination GPU (ID 33367) and that the bandwidth is 4.495 GBps. +destination GPU (ID 33367) and that the bandwidth is approximately 4.5 GBps. **Example 4:** @@ -2099,45 +2082,27 @@ of tests: bidirectional: true parallel: true +Possible output is: Possible output is: - [RESULT] [1657295.937184] [action_1] p2p 3254 3254 peers:false distance:-1 - [RESULT] [1657295.937267] [action_1] p2p 3254 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937324] [action_1] p2p 3254 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937379] [action_1] p2p 50599 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937429] [action_1] p2p 50599 50599 peers:false distance:-1 - [RESULT] [1657295.937482] [action_1] p2p 50599 33367 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937543] [action_1] p2p 33367 3254 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937607] [action_1] p2p 33367 50599 peers:true distance:56 HyperTransport:56 - [RESULT] [1657295.937655] [action_1] p2p 33367 33367 peers:false distance:-1 - [INFO ] [1657297.216212] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 4.972 GBps - [INFO ] [1657297.216351] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 8.183 GBps - [INFO ] [1657297.216423] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 8.911 GBps - [INFO ] [1657297.216490] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 7.690 GBps - [INFO ] [1657297.216558] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 7.768 GBps - [INFO ] [1657297.216642] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 4.589 GBps - [INFO ] [1657298.487427] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 8.778 GBps - [INFO ] [1657298.487593] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 7.921 GBps - [INFO ] [1657298.487730] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 8.164 GBps - [INFO ] [1657298.487807] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 8.921 GBps - [INFO ] [1657298.487878] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 8.487 GBps - [INFO ] [1657298.487956] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 7.648 GBps - [INFO ] [1657299.760175] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 7.210 GBps - [INFO ] [1657299.760249] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 4.274 GBps - [INFO ] [1657299.760284] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 0.000 GBps - [INFO ] [1657299.760318] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 5.942 GBps - [INFO ] [1657299.760349] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 0.001 GBps - [INFO ] [1657299.760381] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 5.490 GBps - [RESULT] [1657300.293126] [action_1] p2p-bandwidth [1/6] 3254 50599 bidirectional: true 6.964 GBps duration: 0.287248 sec - [RESULT] [1657300.294334] [action_1] p2p-bandwidth [2/6] 3254 33367 bidirectional: true 3.960 GBps duration: 0.536554 sec - [RESULT] [1657300.295528] [action_1] p2p-bandwidth [3/6] 50599 3254 bidirectional: true 5.442 GBps duration: 0.368977 sec - [RESULT] [1657300.296691] [action_1] p2p-bandwidth [4/6] 50599 33367 bidirectional: true 4.187 GBps duration: 0.477756 sec - [RESULT] [1657300.297840] [action_1] p2p-bandwidth [5/6] 33367 3254 bidirectional: true 4.942 GBps duration: 0.607009 sec - [RESULT] [1657300.299016] [action_1] p2p-bandwidth [6/6] 33367 50599 bidirectional: true 3.828 GBps duration: 0.523495 sec - -It can be seen that transfers [2/6] and [5/6] did not take place in the second -log interval so average from the previous cycle is displayed instead and -marked with "(*)" + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 + [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.972 GBps + [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 8.183 GBps + [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 8.911 GBps + [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 7.690 GBps + [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 7.768 GBps + [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.589 GBps + [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 6.964 GBps duration: 0.287248 secs + [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 3.960 GBps duration: 0.536554 secs + [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.442 GBps duration: 0.368977 secs + [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 4.187 GBps duration: 0.477756 secs + [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 4.942 GBps duration: 0.607009 secs + [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 3.828 GBps duration: 0.523495 secs ## PEBB module The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA @@ -2158,23 +2123,22 @@ will be considered. The default value is true. will be considered. The default value is true. parallelBool -This option is only used if the test_bandwidth -key is true.\n +Controls whether transfers run in parallel across all CPU–GPU paths or one +by one.\n - true – Run all test transfers in parallel.\n - false – Run test transfers one by one. durationInteger -This option is only used if test_bandwidth is true. This key specifies the -duration a transfer test should run, given in milliseconds. If this key is not -specified, the default value is 10000 (10 seconds). +This key specifies the duration a transfer test should run, given in +milliseconds. If this key is not specified, the default value is 10000 (10 +seconds). log_intervalInteger -This option is only used if test_bandwidth is true. This is a positive -integer, given in milliseconds, that specifies an interval over which the moving -average of the bandwidth will be calculated and logged. The default value is -1000 (1 second). It must be smaller than the duration key.\n -if this key is 0 (zero), results are displayed as soon as the test transfer +This is a positive integer, given in milliseconds, that specifies an interval +over which the moving average of the bandwidth will be calculated and logged. The +default value is 1000 (1 second). It must be smaller than the duration key.\n +If this key is 0 (zero), results are displayed as soon as the test transfer is completed. block_sizeCollection of Integers Optional. Defines list of block sizes to be used in transfer tests.\n @@ -2344,19 +2308,18 @@ peers. You may need to increase test duration. At the beginning, the test will display link info for every CPU/GPU pair: - [RESULT][][] pcie-bandwidth [] distance: :[ :] + [] pcie-bandwidth [CPU:: ] [GPU:: - - ] distance: : During the execution of the benchmark, informational output providing the moving -average of the bandwidth of the transfer will be calculated and logged. This -interval is provided by the log_interval parameter and will have the following -output format: +average of the bandwidth of the transfer will be calculated and logged at every +`log_interval`: - [INFO ][][] pcie-bandwidth [] h2d: d2h: + [] pcie-bandwidth [] [CPU:: ] [GPU:: - - ] h2d:: d2h:: GBps -At the end of test, the average bytes/second will be calculated over the -entire test duration, and will be logged as a result: +At the end of test, the average bandwidth over the entire test duration is +logged as a result: - [RESULT][][] pcie-bandwidth [] h2d: d2h: + [] pcie-bandwidth [] [CPU:: ] [GPU:: - - ] h2d:: d2h:: GBps duration: secs @@ -2381,42 +2344,30 @@ This will initiate host to device transfer to all GPUs with immediate output Output from this action might look like: - [RESULT] [1658774.978614] [action_1] pcie-bandwidth 0 4 3254 distance:36 HyperTransport:36 - [RESULT] [1658774.978664] [action_1] pcie-bandwidth 1 4 3254 distance:20 PCIe:20 - [RESULT] [1658774.978695] [action_1] pcie-bandwidth 2 4 3254 distance:36 HyperTransport:36 - [RESULT] [1658774.978728] [action_1] pcie-bandwidth 3 4 3254 distance:36 HyperTransport:36 - [RESULT] [1658774.978763] [action_1] pcie-bandwidth 0 5 50599 distance:36 HyperTransport:36 - [RESULT] [1658774.978795] [action_1] pcie-bandwidth 1 5 50599 distance:36 HyperTransport:36 - [RESULT] [1658774.978825] [action_1] pcie-bandwidth 2 5 50599 distance:20 PCIe:20 - [RESULT] [1658774.978856] [action_1] pcie-bandwidth 3 5 50599 distance:36 HyperTransport:36 - [RESULT] [1658774.978889] [action_1] pcie-bandwidth 0 6 33367 distance:36 HyperTransport:36 - [RESULT] [1658774.978922] [action_1] pcie-bandwidth 1 6 33367 distance:36 HyperTransport:36 - [RESULT] [1658774.978952] [action_1] pcie-bandwidth 2 6 33367 distance:36 HyperTransport:36 - [RESULT] [1658774.978982] [action_1] pcie-bandwidth 3 6 33367 distance:20 PCIe:20 - [INFO ] [1658774.983743] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: false 12.233 GBps - [INFO ] [1658774.988272] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: false 12.227 GBps - [INFO ] [1658774.993197] [action_1] pcie-bandwidth [3/12] 2 3254 h2d: true d2h: false 11.770 GBps - [INFO ] [1658774.998105] [action_1] pcie-bandwidth [4/12] 3 3254 h2d: true d2h: false 11.313 GBps - [INFO ] [1658775.4457 ] [action_1] pcie-bandwidth [5/12] 0 50599 h2d: true d2h: false 12.218 GBps - [INFO ] [1658775.9589 ] [action_1] pcie-bandwidth [6/12] 1 50599 h2d: true d2h: false 10.292 GBps - [INFO ] [1658775.14627 ] [action_1] pcie-bandwidth [7/12] 2 50599 h2d: true d2h: false 10.456 GBps - [INFO ] [1658775.19664 ] [action_1] pcie-bandwidth [8/12] 3 50599 h2d: true d2h: false 10.614 GBps - [INFO ] [1658775.26210 ] [action_1] pcie-bandwidth [9/12] 0 33367 h2d: true d2h: false 12.222 GBps - [INFO ] [1658775.31188 ] [action_1] pcie-bandwidth [10/12] 1 33367 h2d: true d2h: false 12.215 GBps - [INFO ] [1658775.36137 ] [action_1] pcie-bandwidth [11/12] 2 33367 h2d: true d2h: false 12.219 GBps - [INFO ] [1658775.41117 ] [action_1] pcie-bandwidth [12/12] 3 33367 h2d: true d2h: false 12.219 GBps - [RESULT] [1658775.42219 ] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: false 12.233 GBps duration: 0.000780 sec - [RESULT] [1658775.42235 ] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: false 12.227 GBps duration: 0.000780 sec - [RESULT] [1658775.42246 ] [action_1] pcie-bandwidth [3/12] 2 3254 h2d: true d2h: false 11.770 GBps duration: 0.000810 sec - [RESULT] [1658775.42256 ] [action_1] pcie-bandwidth [4/12] 3 3254 h2d: true d2h: false 11.313 GBps duration: 0.000843 sec - [RESULT] [1658775.42271 ] [action_1] pcie-bandwidth [5/12] 0 50599 h2d: true d2h: false 12.218 GBps duration: 0.000781 sec - [RESULT] [1658775.42286 ] [action_1] pcie-bandwidth [6/12] 1 50599 h2d: true d2h: false 10.292 GBps duration: 0.000927 sec - [RESULT] [1658775.42297 ] [action_1] pcie-bandwidth [7/12] 2 50599 h2d: true d2h: false 10.456 GBps duration: 0.000912 sec - [RESULT] [1658775.42309 ] [action_1] pcie-bandwidth [8/12] 3 50599 h2d: true d2h: false 10.614 GBps duration: 0.000898 sec - [RESULT] [1658775.42321 ] [action_1] pcie-bandwidth [9/12] 0 33367 h2d: true d2h: false 12.222 GBps duration: 0.000780 sec - [RESULT] [1658775.42332 ] [action_1] pcie-bandwidth [10/12] 1 33367 h2d: true d2h: false 12.215 GBps duration: 0.000781 sec - [RESULT] [1658775.42344 ] [action_1] pcie-bandwidth [11/12] 2 33367 h2d: true d2h: false 12.219 GBps duration: 0.000780 sec - [RESULT] [1658775.42355 ] [action_1] pcie-bandwidth [12/12] 3 33367 h2d: true d2h: false 12.219 GBps duration: 0.000780 sec + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] distance:20 PCIe:20 + [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 5 - 50599 - 0000:08:00.0] distance:20 PCIe:20 + [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:20 PCIe:20 + [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 12.233 GBps + [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 12.227 GBps + [action_1] pcie-bandwidth [3/12] [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 11.770 GBps + [action_1] pcie-bandwidth [4/12] [CPU:: 3] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 11.313 GBps + [action_1] pcie-bandwidth [5/12] [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 12.218 GBps + [action_1] pcie-bandwidth [6/12] [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.292 GBps + [action_1] pcie-bandwidth [7/12] [CPU:: 2] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.456 GBps + [action_1] pcie-bandwidth [8/12] [CPU:: 3] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.614 GBps + [action_1] pcie-bandwidth [9/12] [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.222 GBps + [action_1] pcie-bandwidth [10/12] [CPU:: 1] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.215 GBps + [action_1] pcie-bandwidth [11/12] [CPU:: 2] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.219 GBps + [action_1] pcie-bandwidth [12/12] [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.219 GBps duration: 0.000780 secs **Example 2:** @@ -2435,45 +2386,23 @@ Consider action: Here, although parallel execution of transfers is requested, log_interval is to short for some transfers to complete. For them, cumulative average is displayed and marked with (*): - - [RESULT] [1659672.517170] [action_1] pcie-bandwidth 0 4 3254 distance:36 HyperTransport:36 - [RESULT] [1659672.517222] [action_1] pcie-bandwidth 1 4 3254 distance:20 PCIe:20 - [RESULT] [1659672.517257] [action_1] pcie-bandwidth 2 4 3254 distance:36 HyperTransport:36 - [RESULT] [1659672.517290] [action_1] pcie-bandwidth 3 4 3254 distance:36 HyperTransport:36 - [RESULT] [1659672.517324] [action_1] pcie-bandwidth 0 5 50599 distance:36 HyperTransport:36 - [RESULT] [1659672.517357] [action_1] pcie-bandwidth 1 5 50599 distance:36 HyperTransport:36 - [RESULT] [1659672.517388] [action_1] pcie-bandwidth 2 5 50599 distance:20 PCIe:20 - [RESULT] [1659672.517419] [action_1] pcie-bandwidth 3 5 50599 distance:36 HyperTransport:36 - [RESULT] [1659672.517452] [action_1] pcie-bandwidth 0 6 33367 distance:36 HyperTransport:36 - [RESULT] [1659672.517483] [action_1] pcie-bandwidth 1 6 33367 distance:36 HyperTransport:36 - [RESULT] [1659672.517515] [action_1] pcie-bandwidth 2 6 33367 distance:36 HyperTransport:36 - [RESULT] [1659672.517546] [action_1] pcie-bandwidth 3 6 33367 distance:20 PCIe:20 - [INFO ] [1659673.49782 ] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: true 1.489 GBps - [INFO ] [1659673.49814 ] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: true 2.701 GBps + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] distance:20 PCIe:20 + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 + [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 + ... + [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 1.489 GBps + [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 2.701 GBps ... - [INFO ] [1659673.582639] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: true 1.489 GBps (*) - [INFO ] [1659673.582686] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: true 16.367 GBps - [INFO ] [1659673.582700] [action_1] pcie-bandwidth [3/12] 2 3254 h2d: true d2h: true 17.300 GBps + [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.793 GBps + [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.872 GBps (*) ... - [INFO ] [1659677.851697] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: true 16.793 GBps - [INFO ] [1659677.851727] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: true 16.872 GBps (*) - [INFO ] [1659677.851741] [action_1] pcie-bandwidth [3/12] 2 3254 h2d: true d2h: true 14.796 GBps (*) - [INFO ] [1659677.851754] [action_1] pcie-bandwidth [4/12] 3 3254 h2d: true d2h: true 20.358 GBps - [INFO ] [1659677.851770] [action_1] pcie-bandwidth [5/12] 0 50599 h2d: true d2h: true 15.632 GBps (*) - [INFO ] [1659677.851828] [action_1] pcie-bandwidth [6/12] 1 50599 h2d: true d2h: true 14.541 GBps (*) + [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.309 GBps duration: 0.061316 secs + [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.871 GBps duration: 0.118547 secs + [action_1] pcie-bandwidth [3/12] [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 13.360 GBps duration: 0.149705 secs ... - [RESULT] [1659678.148280] [action_1] pcie-bandwidth [1/12] 0 3254 h2d: true d2h: true 16.309 GBps duration: 0.061316 sec - [RESULT] [1659678.148318] [action_1] pcie-bandwidth [2/12] 1 3254 h2d: true d2h: true 16.871 GBps duration: 0.118547 sec - [RESULT] [1659678.148332] [action_1] pcie-bandwidth [3/12] 2 3254 h2d: true d2h: true 13.360 GBps duration: 0.149705 sec - [RESULT] [1659678.148349] [action_1] pcie-bandwidth [4/12] 3 3254 h2d: true d2h: true 15.371 GBps duration: 0.130115 sec - [RESULT] [1659678.148363] [action_1] pcie-bandwidth [5/12] 0 50599 h2d: true d2h: true 15.631 GBps duration: 0.127954 sec - [RESULT] [1659678.148377] [action_1] pcie-bandwidth [6/12] 1 50599 h2d: true d2h: true 14.185 GBps duration: 0.140989 sec - [RESULT] [1659678.148390] [action_1] pcie-bandwidth [7/12] 2 50599 h2d: true d2h: true 15.242 GBps duration: 0.131245 sec - [RESULT] [1659678.148404] [action_1] pcie-bandwidth [8/12] 3 50599 h2d: true d2h: true 16.071 GBps duration: 0.124452 sec - [RESULT] [1659678.148418] [action_1] pcie-bandwidth [9/12] 0 33367 h2d: true d2h: true 16.505 GBps duration: 0.121178 sec - [RESULT] [1659678.148432] [action_1] pcie-bandwidth [10/12] 1 33367 h2d: true d2h: true 16.720 GBps duration: 0.059807 sec - [RESULT] [1659678.148445] [action_1] pcie-bandwidth [11/12] 2 33367 h2d: true d2h: true 15.604 GBps duration: 0.128168 sec - [RESULT] [1659678.148458] [action_1] pcie-bandwidth [12/12] 3 33367 h2d: true d2h: true 16.193 GBps duration: 0.123525 sec + [action_1] pcie-bandwidth [12/12] [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::true 16.193 GBps duration: 0.123525 secs Please note that in link information results, some records could be marked with (R). This means, that communication is possible if initiated by the destination @@ -2526,25 +2455,20 @@ time. period for the test to succeed. The default value is 0.05 (5%). max_violationsInteger The number of tolerance violations that can occur after the ramp_interval -for the test to still pass. The default value is 0. +for the test to still pass. The default value is 0. Note: this key is parsed +but violation counting is not active in the current implementation; pass/fail +is determined solely by whether the peak GFLOPS meets the target. log_intervalInteger This is a positive integer, given in milliseconds, that specifies an -interval over which the moving average of the bandwidth will be calculated and +interval over which the moving average of GFLOPS will be calculated and logged. -matrix_sizeInteger -Sets all three matrix dimensions (M, N, and K) to the same value. Equivalent -to setting matrix_size_a, matrix_size_b, and matrix_size_c -to the same value. The default value is 5760. matrix_size_aInteger -Number of rows of matrix A (the M dimension in GEMM). Overrides -matrix_size for this dimension. The default value is 5760. +Number of rows of matrix A (the M dimension in GEMM). The default value is 5760. matrix_size_bInteger -Number of columns of matrix B (the N dimension in GEMM). Overrides -matrix_size for this dimension. The default value is 5760. +Number of columns of matrix B (the N dimension in GEMM). The default value is 5760. matrix_size_cInteger Inner (shared) dimension K of the GEMM operation (columns of A / rows of B). -Overrides matrix_size for this dimension. The default value is -5760. +The default value is 5760. ops_typeString GEMM operation type. Accepted values: sgemm, dgemm, @@ -2554,7 +2478,7 @@ module defaults to sgemm. Mutually exclusive with data_type.< data_typeString Data type for the GEMM computation. Accepted values include: fp4_r, fp6_r, fp8_r, bf16_r, fp16_r, -fp32_r, tf32_r (xf32_r), i8_r. If not specified +fp32_r, i8_r. If not specified the module falls back to the type implied by ops_type. out_data_typeString @@ -2563,8 +2487,9 @@ applicable when using hipBLASLt. If not specified the default matches the compute type. compute_typeString -Accumulation/compute type used internally by the BLAS library. If not -specified the default is fp32_r. +Accumulation/compute type used internally by the BLAS library. Accepted +values include fp32_r (default) and xf32_r (TF32 fast +compute). blas_sourceString BLAS library backend to use. Accepted values: @@ -2578,7 +2503,7 @@ launch overhead. The default value is 1. Matrix initialization method. Accepted values: default – Initialize with default pattern (default). trig – Initialize with trigonometric (sine/cosine) values. -random – Initialize with random values. +rand – Initialize with random values. transaInteger Transpose operation applied to matrix A before the GEMM call. @@ -2682,70 +2607,17 @@ default value is 0. ### Output -Module specific output keys are described in the table below: - -
    - - - - - - - - - - - - - - - - -
    Output Key Type Description
    target_stressTime Series FloatsThe average gflops over the last log interval.
    max_gflopsFloatThe maximum sustained performance obtained by the GPU during the -test.
    stress_violationsIntegerThe number of gflops readings that violated the tolerance of the test after -the ramp interval.
    flops_per_opIntegerFlops (floating point operations) per operation queued to the GPU queue. -One operation is one call to SGEMM/DGEMM.
    bytes_copied_per_opIntegerNumber of bytes copied to the GPU per GEMM operation when -copy_matrix is true.
    try_ops_per_secFloatCalculated number of ops/second necessary to achieve target -gigaflops.
    passBool'true' if the GPU achieves its desired sustained performance -level.
    -
    - -An informational message will be emitted when the test starts -execution: - - [INFO ][][] gst start copy matrix: - - -During the execution of the test, informational output providing the moving -average the GPU(s) gflops will be logged at each `log_interval`: - - [INFO ][][] gst Gflops: - -When the target gflops is achieved, the following message will be logged: - - [INFO ][][] gst target achieved +During the execution of the test, a result message reporting the GFLOPS +achieved by the GPU is logged at each `log_interval`: -If the target gflops, or stress, is not achieved in the `ramp_interval` -provided, the test will terminate and the following message will be logged: + [] [GPU:: ] GFLOPS - [INFO ][][] gst ramp time exceeded +When the test completes, the final result message is printed: -In this case the test will fail.\n + [] [GPU:: ] GFLOPS Target GFLOPS: met: TRUE -If the target stress (gflops) is achieved the test will attempt to run for the -rest of the duration specified by the action, sustaining the stress load during -that time. If the stress level violates the bounds set by the tolerance level -during that time a violation message will be logged: - - [INFO ][][] gst stress violation - -When the test completes, the following result message will be printed: - - [RESULT][][] gst Gflop: flops_per_op: bytes_copied_per_op: try_ops_per_sec: pass: - -The test will pass if the target_stress is reached before the end of the -`ramp_interval` and the `stress_violations` value is less than the given -`max_violations` value. Otherwise, the test will fail. +The test passes if `max_gflops >= target_stress * (1 - tolerance)` at the end +of the run. Otherwise the result is `met: FALSE`. ### Examples @@ -2762,7 +2634,7 @@ value (gigaflops). Thus, the most basic configuration file looks like this: For the above configuration file, all the missing configuration keys will have their default -values (for example: `copy_matrix=true`, `matrix_size=5760`). For more +values (for example: `copy_matrix=true`, `matrix_size_a/b/c=5760`). For more information about the default values, see Common configuration keys and Configuration keys. @@ -2771,55 +2643,23 @@ When the RVS tool runs against such a configuration file, it will do the following: - run the stress test on all available (and compatible) AMD GPUs, one after the other - - log a start message containing the GPU ID, the `target_stress` and the -value of the `copy_matrix`: - - ``` - [INFO ] [164337.932824] action_gst_1 gst 50599 start 3500.000000 copy matrix:true - ``` - - - emit, each `log_interval` (for example: 1000ms), a message containing the -gigaflops value that the current GPU achieved: - - ``` - [INFO ] [164355.111207] action_gst_1 gst 33367 Gflops 3535.670231 - ``` - - - log a message as soon as the current GPU reaches the given `target_stress`: - - ``` - [INFO ] [164350.804843] action_gst_1 gst 33367 target achieved 500.000000 - ``` - - - log a ramp time exceeded message if the GPU was not able to reach the -`target_stress` in the `ramp_interval` time frame (for example: 5000). In such a -case, the test will also terminate: - - ``` - [INFO ] [164013.788870] action_gst_1 gst 3254 ramp time exceeded 5000 - ``` - - - log the test result, when the stress test completes. The message contains -the test's overall result and some other statistics according in Output -keys: + - emit, each `log_interval` (for example: 1000 ms), a result message +containing the GFLOPS value achieved by the current GPU: ``` - [RESULT] [164355.647523] action_gst_1 gst 33367 Gflop: 4066.020766 flops_per_op: 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 9.157367 pass: TRUE + [action_gst_1] [GPU:: 33367] GFLOPS 3535.670231 ``` - - log a stress violation message when the current gigaflops (for the last -`log_interval`, for example: 1000ms) violates the bounds set by the `tolerance` -configuration key (for example: 0.1). Note that this message is not logged -during the `ramp_interval` time frame: + - log the final result when the stress test completes: ``` - [INFO ] [164013.788870] action_gst_1 gst 3254 stress violation 2500 + [action_gst_1] [GPU:: 33367] GFLOPS 4066.020766 Target GFLOPS: 3500.000000 met: TRUE ``` If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, the following configuration file will cause the RVS to terminate with the -following error message: `RVS-GST: action: action_gst_1 key 'target_stress' was not found` +following error message: `RVS-ERROR [GST] [action_gst_1] key 'target_stress' was not found` actions: - name: action_gst_1 @@ -2843,7 +2683,9 @@ A more complex configuration file looks like this: copy_matrix: false target_stress: 5000 tolerance: 0.07 - matrix_size: 5760 + matrix_size_a: 5760 + matrix_size_b: 5760 + matrix_size_c: 5760 For this configuration file, the RVS tool will: - run the stress test only for the GPUs having the ID 50599 or 33367. To @@ -2863,56 +2705,36 @@ example) `max_violations` will not terminate the test, but RVS will mark the test result as "fail". -The output for such a configuration key may look like this: - - [INFO ] [172061.758830] action_1 gst 50599 start 5000.000000 copy - matrix:false - [INFO ] [172063.547668] action_1 gst 50599 Gflops 6471.614725 - [INFO ] [172064.577715] action_1 gst 50599 target achieved 5000.000000 - [INFO ] [172065.609224] action_1 gst 50599 Gflops 5189.993529 - [INFO ] [172066.634360] action_1 gst 50599 Gflops 5220.373979 - [INFO ] [172067.659262] action_1 gst 50599 Gflops 5225.472000 - [INFO ] [172068.694305] action_1 gst 50599 Gflops 5169.935583 - [RESULT] [172069.573967] action_1 gst 50599 Gflop: 6471.614725 flops_per_op: - 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: - TRUE - [INFO ] [172069.574369] action_1 gst 33367 start 5000.000000 copy - matrix:false - [INFO ] [172071.409483] action_1 gst 33367 Gflops 6558.348080 - [INFO ] [172072.438104] action_1 gst 33367 target achieved 5000.000000 - [INFO ] [172073.465033] action_1 gst 33367 Gflops 5215.285895 - [INFO ] [172074.501571] action_1 gst 33367 Gflops 5164.945297 - [INFO ] [172075.529468] action_1 gst 33367 Gflops 5210.207720 - [INFO ] [172076.558102] action_1 gst 33367 Gflops 5205.139424 - [RESULT] [172077.448182] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: - 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: - TRUE +The output for such a configuration may look like this: + + [action_1] [GPU:: 50599] GFLOPS 6471.614725 + [action_1] [GPU:: 50599] GFLOPS 5189.993529 + [action_1] [GPU:: 50599] GFLOPS 5220.373979 + [action_1] [GPU:: 50599] GFLOPS 5225.472000 + [action_1] [GPU:: 50599] GFLOPS 5169.935583 + [action_1] [GPU:: 50599] GFLOPS 6471.614725 Target GFLOPS: 5000.000000 met: TRUE + [action_1] [GPU:: 33367] GFLOPS 6558.348080 + [action_1] [GPU:: 33367] GFLOPS 5215.285895 + [action_1] [GPU:: 33367] GFLOPS 5164.945297 + [action_1] [GPU:: 33367] GFLOPS 5210.207720 + [action_1] [GPU:: 33367] GFLOPS 5205.139424 + [action_1] [GPU:: 33367] GFLOPS 6558.348080 Target GFLOPS: 5000.000000 met: TRUE When setting the parallel to true, RVS will run the stress tests on all selected GPUs in parallel and the output may look like this: - [INFO ] [173381.407428] action_1 gst 50599 start 5000.000000 copy - matrix:false - [INFO ] [173381.407744] action_1 gst 33367 start 5000.000000 copy - matrix:false - [INFO ] [173383.245771] action_1 gst 33367 Gflops 6558.348080 - [INFO ] [173383.256935] action_1 gst 50599 Gflops 6484.532120 - [INFO ] [173384.274202] action_1 gst 33367 target achieved 5000.000000 - [INFO ] [173384.286014] action_1 gst 50599 target achieved 5000.000000 - [INFO ] [173385.301038] action_1 gst 33367 Gflops 5215.285895 - [INFO ] [173385.315794] action_1 gst 50599 Gflops 5200.080980 - [INFO ] [173386.337638] action_1 gst 33367 Gflops 5164.945297 - [INFO ] [173386.353274] action_1 gst 50599 Gflops 5159.964636 - [INFO ] [173387.365494] action_1 gst 33367 Gflops 5210.207720 - [INFO ] [173387.383437] action_1 gst 50599 Gflops 5195.032357 - [INFO ] [173388.401250] action_1 gst 33367 Gflops 5169.935583 - [INFO ] [173388.421599] action_1 gst 50599 Gflops 5154.993572 - [RESULT] [173389.282710] action_1 gst 33367 Gflop: 6558.348080 flops_per_op: - 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: - TRUE - [RESULT] [173389.305479] action_1 gst 50599 Gflop: 6484.532120 flops_per_op: - 382.205952x1e9 bytes_copied_per_op: 398131200 try_ops_per_sec: 13.081952 pass: - TRUE + [action_1] [GPU:: 33367] GFLOPS 6558.348080 + [action_1] [GPU:: 50599] GFLOPS 6484.532120 + [action_1] [GPU:: 33367] GFLOPS 5215.285895 + [action_1] [GPU:: 50599] GFLOPS 5200.080980 + [action_1] [GPU:: 33367] GFLOPS 5164.945297 + [action_1] [GPU:: 50599] GFLOPS 5159.964636 + [action_1] [GPU:: 33367] GFLOPS 5210.207720 + [action_1] [GPU:: 50599] GFLOPS 5195.032357 + [action_1] [GPU:: 33367] GFLOPS 5169.935583 + [action_1] [GPU:: 50599] GFLOPS 5154.993572 + [action_1] [GPU:: 33367] GFLOPS 6558.348080 Target GFLOPS: 5000.000000 met: TRUE + [action_1] [GPU:: 50599] GFLOPS 6484.532120 Target GFLOPS: 5000.000000 met: TRUE It is important that all the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. For example, a matrix @@ -2950,24 +2772,25 @@ for the test. ramp_intervalInteger This is a time interval, specified in milliseconds, given to the test to determine the compute load that will sustain the target power. The default value -is 5000 (5 seconds). This time is counted against the duration of the test. +is 5000 (5 seconds). Note: this key is parsed but not used by the worker in the +current implementation. toleranceFloat -A value indicating how much the target_power can fluctuate after the ramp -period for the test to succeed. The default value is 0 (any violation -immediately fails the test). +A value indicating how much the target_power can fluctuate for the test to +succeed. The default value is 0 (any violation immediately fails the test). max_violationsInteger -The number of tolerance violations that can occur after the ramp_interval -for the test to still pass. The default value is 0. +The number of tolerance violations that can occur for the test to still +pass. The default value is 0. Note: this key is parsed but not used by the +worker in the current implementation. sample_intervalInteger -The sampling rate for target_power values given in milliseconds. The default -value is 1000 (1 second). +The interval between power samples, specified in seconds. The default +value is 1 (1 second). If a value less than 1 is specified it is raised to 1. log_intervalInteger -This is a positive integer, given in milliseconds, that specifies an -interval over which the moving average of the bandwidth will be calculated and -logged. +This is a positive integer, given in milliseconds, that specifies a logging +interval. Note: this key is parsed but not used by the worker in the current +implementation. cp_workloadBool If true, enables the GEMM compute workload to drive GPU power. This is the @@ -3016,7 +2839,7 @@ module defaults to sgemm. Mutually exclusive with data_typeString Data type for the GEMM computation. Accepted values include: fp4_r, fp6_r, fp8_r, bf16_r, fp16_r, -fp32_r, tf32_r (xf32_r), i8_r. If not specified +fp32_r, i8_r. If not specified the module falls back to the type implied by ops_type. out_data_typeString @@ -3025,8 +2848,9 @@ applicable when using hipBLASLt. If not specified the default matches the compute type. compute_typeString -Accumulation/compute type used internally by the BLAS library. If not -specified the default is fp32_r. +Accumulation/compute type used internally by the BLAS library. Accepted +values include fp32_r (default) and xf32_r (TF32 fast +compute). blas_sourceString BLAS library backend to use. Accepted values: @@ -3040,7 +2864,7 @@ launch overhead. The default value is 1. Matrix initialization method. Accepted values: default – Initialize with default pattern (default). trig – Initialize with trigonometric (sine/cosine) values. -random – Initialize with random values. +rand – Initialize with random values. transaInteger Transpose operation applied to matrix A before the GEMM call. @@ -3104,22 +2928,18 @@ strided-batched GEMM. The default value is 0. ### Output -Module specific output keys are described in the table below: +During the execution of the test, a result message reporting the measured GPU +power is logged at each `sample_interval`: -
    - - - - - - - - -
    Output Key Type Description
    current_powerTime Series FloatsThe current measured power of the GPU.
    power_violationsIntegerThe number of power readings that violated the tolerance of the test after -the ramp interval. -
    passBool'true' if the GPU achieves its desired sustained power level in the ramp -interval.
    -
    + [] [GPU:: ] Power(W) + +When the test completes, the pass/fail result is printed: + + [] [GPU:: ] pass: TRUE + +The test passes if the peak power measured during the run meets or exceeds +`target_power * (1 - tolerance)`. When JSON output is enabled (`-j`), an +`average power` field is also included in the result record. ### Examples @@ -3135,10 +2955,7 @@ A regular IET configuration file looks like this: count: 2 wait: 100 duration: 10000 - ramp_interval: 5000 - sample_interval: 500 - log_interval: 500 - max_violations: 1 + sample_interval: 1 target_power: 135 tolerance: 0.1 matrix_size: 5760 @@ -3146,79 +2963,49 @@ A regular IET configuration file looks like this: ```{note} - when setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them - the test will run 2 times on each GPU (count = 2) -- only one power violation is allowed. If the total number of violations is bigger than 1 the IET test result will be marked as `failed` +- `sample_interval` is in seconds; values below 1 are raised to 1 ``` When the RVS tool runs against such a configuration file, it will do the following: - run the test on all AMD compatible GPUs -- log a start message containing the GPU ID and the `target_power`, for example: - - ``` - [INFO ] [167316.308057] action_1 iet 50599 start 135.000000 - ``` - -- emit, each log_interval (for example: 500ms), a message containing the power for the current GPU - - ``` - [INFO ] [167319.266707] action_1 iet 50599 current power 136.878342 - ``` - -- log a message as soon as the current GPU reaches the given `target_power` +- emit, each `sample_interval` (1 second), a result message containing the +measured power for the current GPU: ``` - [INFO ] [167318.793062] action_1 iet 50599 target achieved 135.000000 + [action_1] [GPU:: 50599] Power(W) 136.878342 ``` -- log a 'ramp time exceeded' message if the GPU was not able to reach the `target_power` in the `ramp_interval` time frame (for example: 5000ms). In such a case, the test will also terminate +- log the test result when the test completes: ``` - [INFO ] [167648.832413] action_1 iet 50599 ramp time exceeded 5000 - ``` - -- log a 'power violation message' when the current power (for the last `sample_interval`, for example: 500ms) violates the bounds set by the tolerance configuration key (for example: 0.1). Please note that this message is never logged during the `ramp_interval` time frame - - ``` - [INFO ] [161251.971277] action_1 iet 3254 power violation 73.783211 - ``` - -- log the test result, when the stress test completes. - - ``` - [RESULT] [167305.260051] action_1 iet 33367 pass: TRUE + [action_1] [GPU:: 50599] pass: TRUE ``` The output for such a configuration file may look like this: - [INFO ] [167261.27161 ] action_1 iet 33367 start 135.000000 - [INFO ] [167263.516803] action_1 iet 33367 current power 136.934479 - [INFO ] [167263.521355] action_1 iet 33367 target achieved 135.000000 - [INFO ] [167264.16925 ] action_1 iet 33367 current power 138.421844 - [INFO ] [167264.517018] action_1 iet 33367 current power 138.394608 + [action_1] [GPU:: 33367] Power(W) 136.934479 + [action_1] [GPU:: 33367] Power(W) 138.421844 + [action_1] [GPU:: 33367] Power(W) 138.394608 ... - [INFO ] [167271.518402] action_1 iet 33367 current power 139.231918 - [RESULT] [167272.67686 ] action_1 iet 33367 pass: TRUE - [INFO ] [167272.68029 ] action_1 iet 3254 start 135.000000 - [INFO ] [167274.552026] action_1 iet 3254 current power 139.363525 - [INFO ] [167274.552059] action_1 iet 3254 target achieved 135.000000 - [INFO ] [167275.52168 ] action_1 iet 3254 current power 138.661453 - [INFO ] [167275.552241] action_1 iet 3254 current power 138.857635 + [action_1] [GPU:: 33367] Power(W) 139.231918 + [action_1] [GPU:: 33367] pass: TRUE + [action_1] [GPU:: 3254] Power(W) 139.363525 + [action_1] [GPU:: 3254] Power(W) 138.661453 ... - [INFO ] [167282.553983] action_1 iet 3254 current power 140.069687 - [RESULT] [167283.95763 ] action_1 iet 3254 pass: TRUE - [INFO ] [167283.96158 ] action_1 iet 50599 start 135.000000 - [INFO ] [167285.532999] action_1 iet 50599 current power 137.205032 - [INFO ] [167285.543084] action_1 iet 50599 target achieved 135.000000 - [INFO ] [167286.33050 ] action_1 iet 50599 current power 136.137115 + [action_1] [GPU:: 3254] Power(W) 140.069687 + [action_1] [GPU:: 3254] pass: TRUE + [action_1] [GPU:: 50599] Power(W) 137.205032 + [action_1] [GPU:: 50599] Power(W) 136.137115 ... - [INFO ] [167293.534672] action_1 iet 50599 current power 139.753464 - [RESULT] [167294.131420] action_1 iet 50599 pass: TRUE + [action_1] [GPU:: 50599] Power(W) 139.753464 + [action_1] [GPU:: 50599] pass: TRUE **Example 2:** -Another configuration file, which may raise some 'power violation' messages (due to the small tolerance value) looks like this +Another configuration file with a tighter tolerance: - name: action_1 device: all @@ -3227,46 +3014,31 @@ Another configuration file, which may raise some 'power violation' messages (due count: 1 wait: 100 duration: 8000 - ramp_interval: 5000 - sample_interval: 700 - log_interval: 700 - max_violations: 1 + sample_interval: 1 target_power: 80 tolerance: 0.06 matrix_size: 5760 The output for such a configuration file may look like this: - [INFO ] [161236.677785] action_1 iet 33367 start 80.000000 - [INFO ] [161239.350055] action_1 iet 33367 current power 84.186142 - [INFO ] [161239.354542] action_1 iet 33367 target achieved 80.000000 - ... - [INFO ] [161241.450517] action_1 iet 33367 current power 77.001945 - [INFO ] [161241.459600] action_1 iet 33367 power violation 75.163689 - [INFO ] [161242.150642] action_1 iet 33367 current power 82.063576 - [RESULT] [161245.698113] action_1 iet 33367 pass: TRUE - [INFO ] [161245.698525] action_1 iet 3254 start 80.000000 - [INFO ] [161248.394003] action_1 iet 3254 current power 78.842796 - [INFO ] [161248.418631] action_1 iet 3254 target achieved 80.000000 - [INFO ] [161249.94149 ] action_1 iet 3254 current power 79.938454 + [action_1] [GPU:: 33367] Power(W) 84.186142 + [action_1] [GPU:: 33367] Power(W) 77.001945 + [action_1] [GPU:: 33367] Power(W) 82.063576 + [action_1] [GPU:: 33367] pass: TRUE + [action_1] [GPU:: 3254] Power(W) 78.842796 + [action_1] [GPU:: 3254] Power(W) 79.938454 ... - [INFO ] [161249.794201] action_1 iet 3254 current power 76.511711 - [INFO ] [161249.818803] action_1 iet 3254 power violation 74.279594 - [INFO ] [161250.494263] action_1 iet 3254 current power 74.615120 + [action_1] [GPU:: 3254] Power(W) 74.615120 + [action_1] [GPU:: 3254] pass: FALSE + [action_1] [GPU:: 50599] Power(W) 81.560165 + [action_1] [GPU:: 50599] Power(W) 75.057304 ... - [INFO ] [161254.117386] action_1 iet 3254 power violation 73.682312 - [RESULT] [161254.738939] action_1 iet 3254 pass: FALSE - [INFO ] [161254.739387] action_1 iet 50599 start 80.000000 - [INFO ] [161257.374079] action_1 iet 50599 current power 81.560165 - [INFO ] [161257.392085] action_1 iet 50599 target achieved 80.000000 - [INFO ] [161258.774304] action_1 iet 50599 current power 75.057304 - ... - [INFO ] [161262.974833] action_1 iet 50599 current power 80.200668 - [RESULT] [161263.771631] action_1 iet 50599 pass: TRUE + [action_1] [GPU:: 50599] Power(W) 80.200668 + [action_1] [GPU:: 50599] pass: TRUE - All the missing configuration keys (if any) will have their default values. For more information about the default values please consult the dedicated sections (3.3 Common Configuration Keys and 13.1 Module specific keys). -- If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, if the target_power is missing, the RVS to terminate with the following error message: "RVS-IET: action: action_1 key 'target_power' was not found" +- If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, if the target_power is missing, the RVS tool will terminate with the following error message: `RVS-ERROR [IET] [action_1] key 'target_power' was not found` - All the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. - For example, a matrix size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 GPUs - For small` target_power` values (for example: 30-40W), the `sample_interval` should be increased, otherwise the IET may fail either to achieve the given `target_power` or to sustain it (for example: `ramp_interval = 1500` for `target_power = 40`). In case there are problems reaching/sustaining the given `target_power`: @@ -3330,7 +3102,7 @@ Keys below are in addition to common keys (`name`, `module`, `device`, `duration halt_on_errorBoolIf true, stop the GPU thread on first BLAS or thermal error. Default false. hot_callsIntegerBLAS “hot call” / warmup-related parameter forwarded to **rvs_blas**. Default 1. gpu_sync_waitIntegerDefault 10000. Parsed from configuration; **not** referenced by the current barrier implementation (placeholder for future timeout behavior). -max_temp_cFloatJunction temperature ceiling in degrees Celsius. If the GPU junction temperature exceeds this threshold during the run, the worker logs a thermal-violation error and, when halt_on_error is true, terminates that GPU thread. Default 105.0. +max_temp_cFloatJunction temperature ceiling in degrees Celsius. If the GPU junction temperature exceeds this threshold during the run, the worker logs a thermal-violation error and, when halt_on_error is true, terminates that GPU thread. Default 105.0. A value of 0 disables thermal checking entirely. @@ -3343,10 +3115,10 @@ Log lines use the action name, module tag pulse, and GPU ID. Output / log Description Start[INFO] ... pulse <gpu_id> start pulse_rate=<hz> Parameters[INFO] ... pulse_rate=... Hz period=...ms high=...ms low=...ms -Thermal error[ERROR] ... thermal violation: <temp>C (junction > 105°C) +Thermal error[ERROR] ... thermal violation: <temp>C (limit <max_temp_c>C) (emitted only when max_temp_c is > 0) Periodic summaryAt each log_interval, moving averages and extrema: pulse #N avg_high=...W avg_low=...W max_high=...W min_low=...W delta=...W CompletionSummary over the run: pulse count, average high/low power, delta, max high, min low. -pass[RESULT] ... pass: TRUE or FALSE per GPU. +pass[RESULT] ... pass: true or false per GPU. @@ -3422,17 +3194,20 @@ The following tests are available (referenced by index in `exclude`): Number of HIP threads per block launched for each test kernel. The default value is 128. stressBool -If true, enables the memory stress test (Test 10) in addition to the -standard tests. The default value is false. +If true, intended to enable the memory stress test (Test 10) in addition to +the standard tests. The default value is false. Note: this key is parsed but +does not affect which tests run in the current implementation; all tests are +always executed. mapped_memoryBool If true, uses host-mapped (pinned) memory instead of device memory for the test buffers. The default value is false. num_iterInteger Number of iterations to run per test. The default value is 1. excludeCollection of Integers -Space-separated list of test indices (0–10) to skip. All tests not listed -here will be executed. For example, exclude: 9 10 skips the bit fade -and memory stress tests. +Space-separated list of test indices (0–10) to skip. For example, +exclude: 9 10 is intended to skip the bit fade and memory stress tests. +Note: this key is parsed but does not affect which tests run in the current +implementation; all tests are always executed. @@ -3478,11 +3253,15 @@ Run with: ./rvs -c conf/mem.conf -d 3 -The test passes if no memory errors are detected on any GPU. A typical result -message looks like: +The test passes if no memory errors are detected on any GPU. The module logs +a result line per test at INFO level using 1-based test numbering: - [RESULT][][action_1] mem Test 1 [Walking 1 bit] : pass: true errors: 0 Time Taken: 0.652 s - [RESULT][][action_1] mem Test 2 [Own address test] : pass: true errors: 0 Time Taken: 0.423 s + [INFO ][][action_1] mem Test 1 : PASS + [INFO ][][action_1] mem Test 2 : PASS + ... + +A summary JSON record with `errors` and `pass` fields is also emitted when +JSON output is enabled (`-j`). ## BABEL module @@ -3500,8 +3279,9 @@ and detecting bandwidth regressions. - + for this time instead of a fixed number of iterations. A value of 0 means use num_iter. The default value is 0. - + @@ -3546,7 +3326,9 @@ default value is false. +gpu_norm_dist – Initialize on GPU with a normal distribution. +cpu_norm_dist – Initialize on CPU with a normal distribution. +zero_init – Initialize all elements to zero.
    Config Key Type Description
    array_sizeIntegerSize of the test buffer in bytes (or in mebibytes if mibibytes: true). -The default value is 33554432 (32 MB).
    Number of elements in the test array (element count, not bytes). The actual +memory size depends on the data type selected by test_type. The default +value is 33554432 (32 M elements).
    test_typeInteger Data precision used for the benchmark. Accepted values: 1 – Float (32-bit, default). @@ -3516,9 +3296,9 @@ default value is 100.
    mibibytesBoolIf true, array_size is interpreted in mebibytes (MiB) and bandwidth -is reported in GiB/s. If false, bytes and GB/s are used. The default value is -false.
    If true, bandwidth is reported in GiB/s. If false, GB/s are used. This +key affects the reporting unit only; it does not change how array_size +is interpreted. The default value is false.
    o/p_csvBool If true, outputs results in CSV format in addition to the standard log. The default value is false.
    data_initString Data initialization method for the test arrays. Accepted values: default – Initialize with default constant values (default). -Other values may be supported depending on the build.
    nontemporalString Non-temporal (streaming) memory access mode for the kernels. Non-temporal stores bypass the cache and can be useful for measuring true memory bandwidth. @@ -3572,15 +3354,15 @@ is 2.
    - - - - + + +
    Output Key Type Description
    Array sizeIntegerSize of the test array used for the measurement, in bytes or MiB depending -on the mibibytes setting.
    FunctionString Name of the BabelStream kernel executed (e.g., Copy, Mul, Add, Triad, Dot, Read, Write).
    bandwidthFloatMeasured memory bandwidth for this kernel in GB/s (or GiB/s if +
    MBytes/secFloatMeasured memory bandwidth for this kernel in MB/s (or MiB/s if mibibytes: true).
    Max_MBytes/secFloatMaximum memory bandwidth observed across all iterations for this +kernel.
    passBool True if the kernel completed successfully.
    From 109d149d8c6518cdb73ff92f3b490d0fa61760eb Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 24 Jun 2026 12:30:02 -0700 Subject: [PATCH 224/275] update Txbench build to sync with upstream Synchronizing Transferbench build to be same cmake parameters as the one in its pipeline. Enable LOG as well to check if the right GPU_TARGETS are passed and built for. --- .github/workflows/README_BUILD_PACKAGES.md | 10 ++++-- CMakeTransferBenchCLI.cmake | 36 +++++++++++++++++----- build_packages_local.sh | 11 +++++++ docs/transferbench.md | 27 ++++++++++++++-- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 939c27d0d..c02125cdf 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -65,6 +65,11 @@ When manually triggering the workflow, you can specify: - `gfx1151` - AMD Strix Halo iGPU - `gfx120X-all` - AMD RX 9060/XT, 9070/XT + **`GPU_FAMILY` selects the ROCm SDK tarball only.** TransferBench CLI offload + archs come from `GPU_TARGETS` / `TRANSFERBENCH_GPU_TARGETS` (13-arch default + matching upstream TransferBench `build_packages_local.sh`), not from + `gpu_family`. + 3. **Build TransferBench CLI** (boolean, default **true** on manual runs): - When enabled, the `TransferBench` binary is built and bundled in DEB/RPM/TGZ (requires `libnuma1` / `numactl-libs` at runtime). - On **push**, **PR**, and **schedule**, CI defaults to **ON** unless repository variable `BUILD_TRANSFERBENCH_CLI` is set to `OFF`. @@ -135,7 +140,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. -**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) applies TransferBench-specific relocatable RPATH via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). +**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) applies TransferBench-specific relocatable RPATH via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in), forwards **`GPU_TARGETS`** / **`HIP_PLATFORM=amd`**, and prints **`message(STATUS)`** lines for the sub-build. Child configure/build logs: `build/TransferBenchCLI-prefix/src/TransferBenchCLI-stamp/`. ### Workflow Steps @@ -336,7 +341,8 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_SDK_NIGHTLY_BASE_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch` | Tarball base for **nightly** builds (`x.y.za…` versions). | | `ROCM_SDK_NIGHTLY_INDEX_URL` | _(same as index default)_ | Optional override for nightly listing URL. | | `ROCM_SDK_CHANNEL` | `auto` locally | **`nightly`** / **`release`** / **`auto`**. CI sets channel per trigger (see table above); manual with a pin uses **`auto`** so tarball follows version format. | -| `GPU_FAMILY` | `gfx110X-all` | Target GPU architecture | +| `GPU_FAMILY` | `gfx110X-all` | ROCm SDK **tarball** family (`therock-dist-linux--…`); does not set TransferBench offload archs | +| `GPU_TARGETS` / `TRANSFERBENCH_GPU_TARGETS` | 13-arch default (see [`docs/transferbench.md`](../../docs/transferbench.md)) | HIP offload archs for the bundled TransferBench CLI when `BUILD_TRANSFERBENCH_CLI=ON` | | `BUILD_TYPE` | `Release` | CMake build type (Release/Debug) | | `BUILD_TRANSFERBENCH_CLI` | `OFF` locally; `ON` in CI | Build and install the TransferBench CLI in packages (`-DBUILD_TRANSFERBENCH_CLI`). CI uses `vars.BUILD_TRANSFERBENCH_CLI` or defaults to `ON`; `workflow_dispatch` input **`build_transferbench_cli`** overrides manual runs. | | `ROCM_LIBPATCH_VERSION` | Auto-extracted from `ROCM_VERSION` | Major.minor in xxyy format with zero padding (e.g., `7.11` → `0711`, `8.0` → `0800`) - used for RVS version tagging | diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index 385cdf4d9..a17f470c3 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -28,11 +28,15 @@ # --gcc-toolchain=... that RVS's build script sets to make amdclang++ pick up # a modern libstdc++ (required for C++20 in TransferBench). # -# TRANSFERBENCH_GPU_TARGETS narrows the set of GPU archs TransferBench builds -# for. Defaults to the same set RVS itself ships on so the package isn't -# bloated and the CI build doesn't time out on archs RVS doesn't care about. -# Override with -DTRANSFERBENCH_GPU_TARGETS="gfx906;gfx90a;..." or set to -# empty to take TransferBench's default (13 archs). +# TRANSFERBENCH_GPU_TARGETS defaults to TransferBench build_packages_local.sh +# DEFAULT_GPU_TARGETS. Override with -DTRANSFERBENCH_GPU_TARGETS="..." or set +# GPU_TARGETS / TRANSFERBENCH_GPU_TARGETS in build_packages_local.sh. Set to +# empty to take TransferBench's own CMake default. +# +# Feature flags match upstream TransferBench build_packages_local.sh (NIC/MPI/ +# DMA-BUF off, multi-arch not local-GPU-only). Upstream passes -DDISABLE_DMABUF +# but TransferBench CMake uses ENABLE_DMA_BUF instead (that upstream flag is a +# no-op). RPATH uses CMakeTransferBenchRPATH.cmake.in, not BUILD_RELOCATABLE_PACKAGE. # ################################################################################ @@ -44,15 +48,20 @@ endif() set(TRANSFERBENCH_BUILD_DIR "${CMAKE_BINARY_DIR}/TransferBench-cli-build") -# Narrow GPU target set by default. Empty string = take TB's own default. +# Source of truth: TransferBench build_packages_local.sh DEFAULT_GPU_TARGETS set(TRANSFERBENCH_GPU_TARGETS - "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201" + "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201" CACHE STRING "GPU targets to build TransferBench for") set(_tb_cmake_args -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DROCM_PATH=${ROCM_PATH} - -DBUILD_PACKAGES=OFF + -DHIP_PLATFORM=amd + -DCMAKE_VERBOSE_MAKEFILE=ON + -DBUILD_LOCAL_GPU_TARGET_ONLY=OFF + -DENABLE_NIC_EXEC=OFF + -DENABLE_MPI_COMM=OFF + -DENABLE_DMA_BUF=OFF ) # Forward parent CXX flags (carries --gcc-toolchain=... on RHEL/manylinux so @@ -86,6 +95,17 @@ if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") endif() list(APPEND _tb_cmake_args "-C${_tb_rpath_cache}") +message(STATUS "TransferBench CLI sub-build:") +message(STATUS " SOURCE_DIR=${TRANSFERBENCH_SOURCE_DIR}") +message(STATUS " BINARY_DIR=${TRANSFERBENCH_BUILD_DIR}") +message(STATUS " ROCM_PATH=${ROCM_PATH}") +message(STATUS " HIP_PLATFORM=amd") +message(STATUS " GPU_TARGETS=${TRANSFERBENCH_GPU_TARGETS}") +message(STATUS " CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") +foreach(_tb_arg IN LISTS _tb_cmake_args) + message(STATUS " CMAKE_ARGS: ${_tb_arg}") +endforeach() + # Build only -- never run TransferBench's own install rules (see header). The # binary is consumed directly from the build tree by the install(PROGRAMS) # below, so there is no separate child install directory to leak into packages. diff --git a/build_packages_local.sh b/build_packages_local.sh index ed797a125..a7aefa99d 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -10,6 +10,10 @@ set -e # Exit on error GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" BUILD_TYPE="${BUILD_TYPE:-Release}" BUILD_TRANSFERBENCH_CLI="${BUILD_TRANSFERBENCH_CLI:-OFF}" +# TransferBench offload archs (independent of GPU_FAMILY SDK tarball selection). +# Source of truth: TransferBench build_packages_local.sh DEFAULT_GPU_TARGETS. +DEFAULT_GPU_TARGETS="gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201" +TRANSFERBENCH_GPU_TARGETS="${TRANSFERBENCH_GPU_TARGETS:-${GPU_TARGETS:-$DEFAULT_GPU_TARGETS}}" BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" @@ -533,6 +537,9 @@ print_info "ROCm SDK channel: ${ROCM_SDK_CHANNEL:-auto}" print_info "GPU Family: $GPU_FAMILY" print_info "Build Type: $BUILD_TYPE" print_info "Build TransferBench CLI: $BUILD_TRANSFERBENCH_CLI" +if [ "$BUILD_TRANSFERBENCH_CLI" = "ON" ]; then + print_info "TransferBench GPU targets: $TRANSFERBENCH_GPU_TARGETS" +fi print_info "Build Directory: $BUILD_DIR" print_info "ROCm Install: $ROCM_INSTALL_DIR" print_info "SDK Source: $ROCM_SDK_BASE_URL" @@ -790,6 +797,10 @@ CMAKE_ARGS=( -DBUILD_TRANSFERBENCH_CLI="$BUILD_TRANSFERBENCH_CLI" ) +if [ "$BUILD_TRANSFERBENCH_CLI" = "ON" ]; then + CMAKE_ARGS+=(-DTRANSFERBENCH_GPU_TARGETS="$TRANSFERBENCH_GPU_TARGETS") +fi + # Add CXX compiler if set if [ -n "$CMAKE_CXX_COMPILER" ]; then CMAKE_ARGS+=(-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER") diff --git a/docs/transferbench.md b/docs/transferbench.md index f0ddf24b9..e607959dc 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -55,13 +55,34 @@ requires **`libnuma1`** (Debian/Ubuntu) or **`numactl-libs`** (RHEL-family RPM). RUNPATH entries point at the ROCm stack (`/opt/rocm/lib`, `/opt/rocm/core-/lib`). See [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in). -The set of GPU architectures the CLI is compiled for can be narrowed with: +### GPU targets vs SDK tarball family + +`GPU_FAMILY` (for example `gfx110X-all`, `gfx1151`) selects which **ROCm SDK +tarball** `build_packages_local.sh` downloads. It does **not** control which GPU +architectures the `TransferBench` binary is compiled for. + +Offload architectures are set by `GPU_TARGETS` / `TRANSFERBENCH_GPU_TARGETS`. +By default RVS uses the same list as upstream TransferBench packaging +(`external/TransferBench/build_packages_local.sh`): + +``` +gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201 +``` + +Override when building: ``` -cmake -DTRANSFERBENCH_GPU_TARGETS="gfx90a;gfx942;gfx950" ... +GPU_TARGETS="gfx90a;gfx942" BUILD_TRANSFERBENCH_CLI=ON ./build_packages_local.sh +# or +cmake -DBUILD_TRANSFERBENCH_CLI=ON -DTRANSFERBENCH_GPU_TARGETS="gfx90a;gfx942" ... ``` -By default RVS builds the CLI for the same arch set RVS itself ships on. +The sub-build also passes `-DHIP_PLATFORM=amd` and disables optional TransferBench +features (NIC executor, MPI, DMA-BUF, local-GPU-only mode) to match upstream +relocatable packaging and keep the bundled CLI dependency-light. + +CMake logs the forwarded args at configure time; detailed child configure/build +output is under `build/TransferBenchCLI-prefix/` (ExternalProject stamp logs). ## Submodule layout From 58e801e98349195a6c957a93dca3822c7bafbbc7 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 24 Jun 2026 14:12:48 -0700 Subject: [PATCH 225/275] fix passing GPU_TARGETS for Transferbench. GPU_TARGET not getting parsed as a list and hence not all targets getting added to the build. Moving the implementation to list as one cache variable rather that list parsing to ensure all targets are correctly passed. --- .github/workflows/README_BUILD_PACKAGES.md | 2 +- CMakeTransferBenchCLI.cmake | 39 +++++++++++++++++----- docs/transferbench.md | 10 ++++-- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index c02125cdf..43f20c579 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -140,7 +140,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **Dynamic ROCm Path Discovery**: `FETCH_ROCMPATH_FROM_ROCMCORE=ON` allows RVS to automatically detect ROCm installation location at runtime from ROCm core libraries. -**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) applies TransferBench-specific relocatable RPATH via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in), forwards **`GPU_TARGETS`** / **`HIP_PLATFORM=amd`**, and prints **`message(STATUS)`** lines for the sub-build. Child configure/build logs: `build/TransferBenchCLI-prefix/src/TransferBenchCLI-stamp/`. +**Single Source of Truth**: `build_packages_local.sh` drives configure/build/package for CI and local use; **RPATH defaults** live in **`CMakeLists.txt`** so a plain **`cmake`** invocation gets the same install **`RPATH`** without copying flags into the shell script. When **`BUILD_TRANSFERBENCH_CLI=ON`**, [`CMakeTransferBenchCLI.cmake`](../CMakeTransferBenchCLI.cmake) applies TransferBench-specific relocatable RPATH via [`CMakeTransferBenchRPATH.cmake.in`](../CMakeTransferBenchRPATH.cmake.in), forwards **`GPU_TARGETS`** (via `-C` initial cache) / **`HIP_PLATFORM=amd`**, and prints **`message(STATUS)`** lines for the sub-build. **CI** streams verbose TransferBench `cmake --build --verbose` output in the job log (`LOG_BUILD=OFF`); local builds keep stamp logs under `build/TransferBenchCLI-prefix/src/TransferBenchCLI-stamp/`. ### Workflow Steps diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index a17f470c3..cbcdff82f 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -31,7 +31,9 @@ # TRANSFERBENCH_GPU_TARGETS defaults to TransferBench build_packages_local.sh # DEFAULT_GPU_TARGETS. Override with -DTRANSFERBENCH_GPU_TARGETS="..." or set # GPU_TARGETS / TRANSFERBENCH_GPU_TARGETS in build_packages_local.sh. Set to -# empty to take TransferBench's own CMake default. +# empty to take TransferBench's own CMake default. GPU_TARGETS is written into +# the -C initial cache file (not -D on CMAKE_ARGS) because CMake list(APPEND) +# splits semicolon-separated strings. # # Feature flags match upstream TransferBench build_packages_local.sh (NIC/MPI/ # DMA-BUF off, multi-arch not local-GPU-only). Upstream passes -DDISABLE_DMABUF @@ -70,10 +72,6 @@ if(CMAKE_CXX_FLAGS) list(APPEND _tb_cmake_args "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") endif() -if(TRANSFERBENCH_GPU_TARGETS) - list(APPEND _tb_cmake_args "-DGPU_TARGETS=${TRANSFERBENCH_GPU_TARGETS}") -endif() - if(DEFINED ROCM_MAJOR_VERSION) list(APPEND _tb_cmake_args -DROCM_MAJOR_VERSION=${ROCM_MAJOR_VERSION}) endif() @@ -81,7 +79,7 @@ endif() # Relocatable RUNPATH for the CLI (copied from the child build tree via install(PROGRAMS)). # Parent ${CMAKE_INSTALL_RPATH} cannot be forwarded safely ($ORIGIN expands empty). # TransferBench ignores CMAKE_INSTALL_RPATH; use -C cache with -Wl,-rpath only -# (see CMakeTransferBenchRPATH.cmake.in). +# (see CMakeTransferBenchRPATH.cmake.in). GPU_TARGETS is also set in this file. set(_tb_rpath_cache "${CMAKE_BINARY_DIR}/TransferBenchRPATH.cmake") configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/CMakeTransferBenchRPATH.cmake.in" @@ -93,15 +91,39 @@ if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") file(APPEND "${_tb_rpath_cache}" "set(CMAKE_SKIP_BUILD_RPATH TRUE CACHE BOOL \"\" FORCE)\n") endif() +if(TRANSFERBENCH_GPU_TARGETS) + file(APPEND "${_tb_rpath_cache}" + "set(GPU_TARGETS [[${TRANSFERBENCH_GPU_TARGETS}]] CACHE STRING \"\" FORCE)\n") +endif() list(APPEND _tb_cmake_args "-C${_tb_rpath_cache}") +# Verbose child build: --verbose on cmake --build; stream to workflow log in CI. +set(_tb_build_command + ${CMAKE_COMMAND} --build ${TRANSFERBENCH_BUILD_DIR} --verbose) +if(CMAKE_BUILD_PARALLEL_LEVEL) + list(APPEND _tb_build_command --parallel ${CMAKE_BUILD_PARALLEL_LEVEL}) +endif() + +if("$ENV{GITHUB_ACTIONS}" STREQUAL "true") + set(_tb_log_configure OFF) + set(_tb_log_build OFF) +else() + set(_tb_log_configure ON) + set(_tb_log_build ON) +endif() + message(STATUS "TransferBench CLI sub-build:") message(STATUS " SOURCE_DIR=${TRANSFERBENCH_SOURCE_DIR}") message(STATUS " BINARY_DIR=${TRANSFERBENCH_BUILD_DIR}") message(STATUS " ROCM_PATH=${ROCM_PATH}") message(STATUS " HIP_PLATFORM=amd") message(STATUS " GPU_TARGETS=${TRANSFERBENCH_GPU_TARGETS}") +if(TRANSFERBENCH_GPU_TARGETS) + message(STATUS " GPU_TARGETS via: -C${_tb_rpath_cache}") +endif() message(STATUS " CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") +message(STATUS " BUILD_COMMAND: ${CMAKE_COMMAND} --build ${TRANSFERBENCH_BUILD_DIR} --verbose") +message(STATUS " LOG_CONFIGURE=${_tb_log_configure} LOG_BUILD=${_tb_log_build}") foreach(_tb_arg IN LISTS _tb_cmake_args) message(STATUS " CMAKE_ARGS: ${_tb_arg}") endforeach() @@ -113,11 +135,12 @@ ExternalProject_Add(TransferBenchCLI SOURCE_DIR "${TRANSFERBENCH_SOURCE_DIR}" BINARY_DIR "${TRANSFERBENCH_BUILD_DIR}" CMAKE_ARGS ${_tb_cmake_args} + BUILD_COMMAND ${_tb_build_command} BUILD_ALWAYS OFF INSTALL_COMMAND "" TEST_COMMAND "" - LOG_CONFIGURE ON - LOG_BUILD ON + LOG_CONFIGURE ${_tb_log_configure} + LOG_BUILD ${_tb_log_build} LOG_OUTPUT_ON_FAILURE ON ) diff --git a/docs/transferbench.md b/docs/transferbench.md index e607959dc..31fc812b3 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -81,8 +81,14 @@ The sub-build also passes `-DHIP_PLATFORM=amd` and disables optional TransferBen features (NIC executor, MPI, DMA-BUF, local-GPU-only mode) to match upstream relocatable packaging and keep the bundled CLI dependency-light. -CMake logs the forwarded args at configure time; detailed child configure/build -output is under `build/TransferBenchCLI-prefix/` (ExternalProject stamp logs). +`GPU_TARGETS` is injected via the ExternalProject initial cache (`-C` file), not +`-DGPU_TARGETS=...` on the command line, because CMake `list(APPEND)` splits +semicolon-separated values into separate list entries. + +CMake logs forwarded args at parent configure time. In **GitHub Actions**, the +TransferBench sub-build runs `cmake --build ... --verbose` with `LOG_BUILD=OFF` so +compile/link lines appear in the workflow log. Local builds keep stamp logs under +`build/TransferBenchCLI-prefix/src/TransferBenchCLI-stamp/`. ## Submodule layout From dac3178e0046f2fd5daa55bab7216e36fcb4cfc4 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 25 Jun 2026 13:30:40 -0500 Subject: [PATCH 226/275] Alpha and Beta based on compute type. --- src/rvs_blas.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index c1cedcf99..069e2ae6c 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -1227,9 +1227,31 @@ bool rvs_blas::run_blas_gemm(uint64_t num_calls) { void * dc_p = (uint8_t *)dc + (i % block_count) * size_c * get_hipdatatype_size(hbl_out_datatype); void * dd_p = (uint8_t *)dd + (i % block_count) * size_d * get_hipdatatype_size(hbl_out_datatype); + double alpha_d, beta_d; + int32_t alpha_i, beta_i; + float alpha_f, beta_f; + const void *alpha_p, *beta_p; + + if (hbl_computetype == HIPBLAS_COMPUTE_64F) { + alpha_d = blas_alpha_val; + beta_d = blas_beta_val; + alpha_p = &alpha_d; + beta_p = &beta_d; + } else if (hbl_computetype == HIPBLAS_COMPUTE_32I) { + alpha_i = (int32_t)blas_alpha_val; + beta_i = (int32_t)blas_beta_val; + alpha_p = &alpha_i; + beta_p = &beta_i; + } else { + alpha_f = blas_alpha_val; + beta_f = blas_beta_val; + alpha_p = &alpha_f; + beta_p = &beta_f; + } + if (hipblasLtMatmul(hbl_handle, hbl_matmul[i % block_count], - &blas_alpha_val, da_p, hbl_layout_a, - db_p, hbl_layout_b, &blas_beta_val, + alpha_p, da_p, hbl_layout_a, + db_p, hbl_layout_b, beta_p, dc_p, hbl_layout_c, dd_p, hbl_layout_d, &hbl_heuristic_result.algo, hbl_workspace, hbl_heuristic_result.workspaceSize, From 0003af2ef03c57980de1a14d42593186a4b3a81c Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Thu, 25 Jun 2026 15:11:41 -0400 Subject: [PATCH 227/275] Fixing the issue of the skipped workflow being triggered Signed-off-by: Urvashi Tiwari --- .../workflows/build-relocatable-packages.yml | 67 +++++++++++++++++++ .github/workflows/rvs-nightly-tests.yml | 44 +++--------- .github/workflows/rvs-pr-tests.yml | 43 ++++++------ .github/workflows/rvs-release-tests.yml | 22 +----- 4 files changed, 101 insertions(+), 75 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index 83b29f25b..a596a9e61 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -521,6 +521,73 @@ jobs: AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} RVS_RUNNER_SUFFIX: manylinux_2_28 + dispatch-post-build-tests: + name: Dispatch post-build test workflows + needs: [build-ubuntu, build-centos] + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + if: >- + always() && !cancelled() && + needs.build-ubuntu.result == 'success' && + needs.build-centos.result == 'success' + permissions: + actions: write + contents: read + steps: + - name: Dispatch RVS Nightly Tests + if: >- + github.event_name == 'schedule' || + (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')) + uses: actions/github-script@v7 + with: + script: | + const ref = context.payload.pull_request?.base?.ref + ?? context.ref.replace('refs/heads/', ''); + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'rvs-nightly-tests.yml', + ref, + inputs: { trigger_event: context.eventName }, + }); + core.info(`Dispatched RVS Nightly Tests (trigger_event=${context.eventName}) on ref ${ref}`); + + - name: Dispatch RVS Release Tests + if: startsWith(github.ref_name, 'release/') + uses: actions/github-script@v7 + with: + script: | + const ref = context.ref.replace('refs/heads/', ''); + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'rvs-release-tests.yml', + ref, + inputs: {}, + }); + core.info(`Dispatched RVS Release Tests on ref ${ref}`); + + - name: Dispatch RVS PR Tests + if: >- + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + uses: actions/github-script@v7 + with: + script: | + const ref = context.payload.pull_request.base.ref; + const prNumber = String(context.payload.pull_request.number); + const buildRunNumber = String(context.runNumber); + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'rvs-pr-tests.yml', + ref, + inputs: { + pr_number: prNumber, + build_run_number: buildRunNumber, + }, + }); + core.info(`Dispatched RVS PR Tests for PR #${prNumber} (build run ${buildRunNumber}) on ref ${ref}`); + create-release: name: Create Release Summary needs: [build-ubuntu, build-centos] diff --git a/.github/workflows/rvs-nightly-tests.yml b/.github/workflows/rvs-nightly-tests.yml index 01bb888d9..9c48e8cc8 100644 --- a/.github/workflows/rvs-nightly-tests.yml +++ b/.github/workflows/rvs-nightly-tests.yml @@ -16,17 +16,17 @@ name: RVS Nightly Tests # # Triggers # -------- -# - workflow_run: after Build Relocatable Packages completes successfully -# (push to main/master, or scheduled package build) -# - workflow_dispatch: manual run with optional overrides +# - workflow_dispatch: manual run, or dispatched by Build Relocatable Packages +# after a successful push to main/master or scheduled package build +# - trigger_event input (schedule|push) is set by the package-build dispatch step on: - workflow_run: - workflows: ["Build Relocatable Packages"] - types: - - completed workflow_dispatch: inputs: + trigger_event: + description: 'Package-build event that triggered this run (schedule or push); empty for manual runs' + required: false + default: '' tarball_url: description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL)' required: false @@ -60,30 +60,8 @@ env: TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} jobs: - gate-nightly-trigger: - name: Gate (eligible triggers only) - if: >- - github.event_name == 'workflow_dispatch' || - (github.event_name == 'workflow_run' && - github.event.workflow_run.conclusion == 'success' && - ( - (github.event.workflow_run.event == 'push' && - (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'master')) || - github.event.workflow_run.event == 'schedule' - )) - runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - steps: - - name: Confirm nightly test run - run: | - if [ "${{ github.event_name }}" = "workflow_run" ]; then - echo "Package build (${{ github.event.workflow_run.event }}) completed on branch: ${{ github.event.workflow_run.head_branch }}" - else - echo "Manual nightly test run (workflow_dispatch)" - fi - install-rvs-on-target: name: Install RVS on target node - needs: gate-nightly-trigger runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: @@ -102,7 +80,7 @@ jobs: uses: actions/checkout@v4 - name: Restore last-seen marker (scheduled build path) - if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'schedule' + if: inputs.trigger_event == 'schedule' uses: actions/cache@v4 with: path: last_tarball_marker.txt @@ -117,7 +95,7 @@ jobs: # masks workflow env. Use inherited TARBALL_INDEX_URL inside the script. INPUT_URL: ${{ inputs.tarball_url }} EVENT_NAME: ${{ github.event_name }} - WORKFLOW_RUN_EVENT: ${{ github.event.workflow_run.event || '' }} + WORKFLOW_RUN_EVENT: ${{ inputs.trigger_event }} run: | set -euo pipefail @@ -194,7 +172,7 @@ jobs: echo "URL : $URL" - name: Save last-seen marker (scheduled build path) - if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'schedule' + if: inputs.trigger_event == 'schedule' uses: actions/cache/save@v4 with: path: last_tarball_marker.txt @@ -340,7 +318,7 @@ jobs: GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_REPOSITORY: ${{ github.repository }} - GITHUB_EVENT_NAME: ${{ github.event_name }} + GITHUB_EVENT_NAME: ${{ inputs.trigger_event || github.event_name }} run: | chmod +x rvs_nightly_test.sh mkdir -p ./reports diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml index 6e90fd084..82ba15858 100644 --- a/.github/workflows/rvs-pr-tests.yml +++ b/.github/workflows/rvs-pr-tests.yml @@ -1,22 +1,27 @@ name: RVS PR Tests -# Runs after a successful "Build Relocatable Packages" run on pull_request, or on -# workflow_dispatch. Package URL: for workflow_run, derived from secrets.RVS_PR_DEB_PACKAGE_URL -# (HTTPS …/rvs base) + PR number + triggering run number + manylinux path (same layout as -# .github/scripts/rvs-s3-upload-route.sh). For manual runs, use package_url or secret (rvs/ -# root, …/manylinux_*/ listing, direct .tar.gz, or .deb). See README_PR_TESTS.md. +# Runs after a successful "Build Relocatable Packages" run on pull_request (dispatched +# from that workflow), or on workflow_dispatch. Package URL: for post-build dispatch, +# derived from secrets.RVS_PR_DEB_PACKAGE_URL (HTTPS …/rvs base) + pr_number + +# build_run_number inputs + manylinux path (same layout as +# .github/scripts/rvs-s3-upload-route.sh). For manual runs, use package_url or secret. +# See README_PR_TESTS.md. # # Required repo configuration: README_PR_TESTS.md (same secrets/vars as nightly for SSH/ROCm). on: - workflow_run: - workflows: ['Build Relocatable Packages'] - types: - - completed workflow_dispatch: inputs: + pr_number: + description: 'PR number (set by Build Relocatable Packages post-build dispatch)' + required: false + default: '' + build_run_number: + description: 'Build workflow run number (post-build dispatch)' + required: false + default: '' package_url: - description: 'HTTPS …/rvs/ root, …/manylinux_*/ listing, direct *-Linux.tar.gz, or .deb (empty → secrets; not used for workflow_run — secret must be /rvs/ base)' + description: 'HTTPS …/rvs/ root, …/manylinux_*/ listing, direct *-Linux.tar.gz, or .deb (empty → secrets; not used when pr_number + build_run_number are set)' required: false default: '' target_node: @@ -49,7 +54,6 @@ env: jobs: install-rvs-on-target: name: Install RVS on target node - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request') runs-on: ${{ vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: @@ -68,7 +72,7 @@ jobs: uses: actions/checkout@v4 - name: Set package URL (manual) - if: github.event_name == 'workflow_dispatch' + if: inputs.pr_number == '' || inputs.build_run_number == '' env: PACKAGE_INPUT: ${{ inputs.package_url }} SECRET_PKG: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} @@ -89,15 +93,14 @@ jobs: } >> "$GITHUB_ENV" - name: Set package URL (after successful PR build) - if: github.event_name == 'workflow_run' + if: inputs.pr_number != '' && inputs.build_run_number != '' env: SECRET_PKG: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} - PR_JSON: ${{ toJSON(github.event.workflow_run.pull_requests) }} - RUN_NUMBER: ${{ github.event.workflow_run.run_number }} + PR_NUMBER: ${{ inputs.pr_number }} + RUN_NUMBER: ${{ inputs.build_run_number }} run: | set -euo pipefail python3 <<'PY' - import json import os import subprocess import sys @@ -108,14 +111,10 @@ jobs: sys.exit(1) low = base.lower() if low.endswith(".deb") or low.endswith(".tar.gz"): - print("::error::For Build workflow triggers, set the secret to the /rvs HTTPS base only, not a direct .deb or .tar.gz URL.", file=sys.stderr) + print("::error::For post-build dispatch, set the secret to the /rvs HTTPS base only, not a direct .deb or .tar.gz URL.", file=sys.stderr) sys.exit(1) - prs = json.loads(os.environ.get("PR_JSON") or "[]") - if not prs: - print("::error::workflow_run has no pull_requests in the payload (e.g. fork PR). Cannot infer rvs/…/manylinux_2_28 path.", file=sys.stderr) - sys.exit(1) - pr = int(prs[0]["number"]) + pr = int(os.environ["PR_NUMBER"]) run_number = int(os.environ["RUN_NUMBER"]) # Primary: matches .github/scripts/rvs-s3-upload-route.sh — rvs//merge//manylinux_2_28 # Fallback: some mirrors use rvs//merge//manylinux_2_28 diff --git a/.github/workflows/rvs-release-tests.yml b/.github/workflows/rvs-release-tests.yml index d85944c2f..d26d22bcd 100644 --- a/.github/workflows/rvs-release-tests.yml +++ b/.github/workflows/rvs-release-tests.yml @@ -11,14 +11,10 @@ name: RVS Release Tests # # Triggers # -------- -# - workflow_run: after Build Relocatable Packages completes successfully on release/* -# - workflow_dispatch: manual run with optional overrides +# - workflow_dispatch: manual run, or dispatched by Build Relocatable Packages +# after a successful build on a release/* branch on: - workflow_run: - workflows: ["Build Relocatable Packages"] - types: - - completed workflow_dispatch: inputs: tarball_url: @@ -54,22 +50,8 @@ env: TARBALL_INDEX_URL: ${{ secrets.RVS_RELEASE_TARBALL_INDEX_URL }} jobs: - gate-release-trigger: - name: Gate (release builds only) - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'release/')) - runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} - steps: - - name: Confirm release test run - run: | - if [ "${{ github.event_name }}" = "workflow_run" ]; then - echo "Release build completed on branch: ${{ github.event.workflow_run.head_branch }}" - else - echo "Manual release test run (workflow_dispatch)" - fi - install-rvs-on-target: name: Install RVS on target node - needs: gate-release-trigger runs-on: ${{ vars.RVS_RELEASE_INDEX_RUNNER_LABEL || vars.RVS_NIGHTLY_INDEX_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 120 outputs: From 9078d2e30d134830b7a31617e14b207714081cc5 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Thu, 25 Jun 2026 13:30:40 -0500 Subject: [PATCH 228/275] Alpha and Beta based on compute type. --- src/rvs_blas.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/rvs_blas.cpp b/src/rvs_blas.cpp index c1cedcf99..069e2ae6c 100644 --- a/src/rvs_blas.cpp +++ b/src/rvs_blas.cpp @@ -1227,9 +1227,31 @@ bool rvs_blas::run_blas_gemm(uint64_t num_calls) { void * dc_p = (uint8_t *)dc + (i % block_count) * size_c * get_hipdatatype_size(hbl_out_datatype); void * dd_p = (uint8_t *)dd + (i % block_count) * size_d * get_hipdatatype_size(hbl_out_datatype); + double alpha_d, beta_d; + int32_t alpha_i, beta_i; + float alpha_f, beta_f; + const void *alpha_p, *beta_p; + + if (hbl_computetype == HIPBLAS_COMPUTE_64F) { + alpha_d = blas_alpha_val; + beta_d = blas_beta_val; + alpha_p = &alpha_d; + beta_p = &beta_d; + } else if (hbl_computetype == HIPBLAS_COMPUTE_32I) { + alpha_i = (int32_t)blas_alpha_val; + beta_i = (int32_t)blas_beta_val; + alpha_p = &alpha_i; + beta_p = &beta_i; + } else { + alpha_f = blas_alpha_val; + beta_f = blas_beta_val; + alpha_p = &alpha_f; + beta_p = &beta_f; + } + if (hipblasLtMatmul(hbl_handle, hbl_matmul[i % block_count], - &blas_alpha_val, da_p, hbl_layout_a, - db_p, hbl_layout_b, &blas_beta_val, + alpha_p, da_p, hbl_layout_a, + db_p, hbl_layout_b, beta_p, dc_p, hbl_layout_c, dd_p, hbl_layout_d, &hbl_heuristic_result.algo, hbl_workspace, hbl_heuristic_result.workspaceSize, From a1e2c7cff3fd4e40a69a902989766bfcee238b09 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Thu, 25 Jun 2026 20:20:58 -0400 Subject: [PATCH 229/275] Fixed the issue while dispatching RVS PR Tests Signed-off-by: Urvashi Tiwari --- .../workflows/build-relocatable-packages.yml | 77 +++++++++++++++---- .github/workflows/rvs-pr-tests.yml | 12 +-- 2 files changed, 69 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index a596a9e61..b8a747045 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -542,13 +542,29 @@ jobs: script: | const ref = context.payload.pull_request?.base?.ref ?? context.ref.replace('refs/heads/', ''); - await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'rvs-nightly-tests.yml', - ref, - inputs: { trigger_event: context.eventName }, - }); + const inputs = { trigger_event: context.eventName }; + try { + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'rvs-nightly-tests.yml', + ref, + inputs, + }); + } catch (error) { + if (error.status === 422 && String(error.message).includes('Unexpected inputs')) { + core.warning('rvs-nightly-tests.yml on ref does not define trigger_event — dispatching without it.'); + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'rvs-nightly-tests.yml', + ref, + inputs: {}, + }); + } else { + throw error; + } + } core.info(`Dispatched RVS Nightly Tests (trigger_event=${context.eventName}) on ref ${ref}`); - name: Dispatch RVS Release Tests @@ -570,23 +586,56 @@ jobs: if: >- github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + env: + PKG_BASE: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} uses: actions/github-script@v7 with: script: | + const base = (process.env.PKG_BASE || '').trim().replace(/\/$/, ''); + if (!base) { + core.setFailed('RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) is not set — cannot dispatch PR tests.'); + return; + } + const low = base.toLowerCase(); + if (low.endsWith('.deb') || low.endsWith('.tar.gz')) { + core.setFailed('PR package secret must be the …/rvs HTTPS base, not a direct .deb or .tar.gz URL.'); + return; + } + const pr = context.payload.pull_request.number; + const runNumber = context.runNumber; + const candidates = [ + `${base}/${pr}/merge/${runNumber}/manylinux_2_28`, + `${base}/${runNumber}/merge/${pr}/manylinux_2_28`, + ]; + let listing = ''; + for (const cand of candidates) { + const res = await fetch(`${cand}/`, { + headers: { 'User-Agent': 'RVS-PR-Dispatch/1.0' }, + redirect: 'follow', + }); + if (res.ok) { + listing = cand; + break; + } + } + if (!listing) { + core.setFailed( + `Could not reach a manylinux_2_28 listing for PR #${pr} build ${runNumber}. Tried:\n ` + + candidates.map((c) => ` ${c}/`).join('\n'), + ); + return; + } const ref = context.payload.pull_request.base.ref; - const prNumber = String(context.payload.pull_request.number); - const buildRunNumber = String(context.runNumber); + // Pass package_url only — works with the workflow definition on the base branch + // (master may not yet define pr_number / build_run_number inputs). await github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, repo: context.repo.repo, workflow_id: 'rvs-pr-tests.yml', ref, - inputs: { - pr_number: prNumber, - build_run_number: buildRunNumber, - }, + inputs: { package_url: listing }, }); - core.info(`Dispatched RVS PR Tests for PR #${prNumber} (build run ${buildRunNumber}) on ref ${ref}`); + core.info(`Dispatched RVS PR Tests for PR #${pr} (build run ${runNumber}) with package_url=${listing}/ on ref ${ref}`); create-release: name: Create Release Summary diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml index 82ba15858..329cd0ebb 100644 --- a/.github/workflows/rvs-pr-tests.yml +++ b/.github/workflows/rvs-pr-tests.yml @@ -1,11 +1,11 @@ name: RVS PR Tests # Runs after a successful "Build Relocatable Packages" run on pull_request (dispatched -# from that workflow), or on workflow_dispatch. Package URL: for post-build dispatch, -# derived from secrets.RVS_PR_DEB_PACKAGE_URL (HTTPS …/rvs base) + pr_number + -# build_run_number inputs + manylinux path (same layout as -# .github/scripts/rvs-s3-upload-route.sh). For manual runs, use package_url or secret. -# See README_PR_TESTS.md. +# from that workflow with a resolved package_url), or on workflow_dispatch. Package URL: +# for post-build dispatch, the build workflow resolves the manylinux_2_28 listing and +# passes package_url. For manual runs, use package_url or secret (…/rvs base, listing, +# direct .tar.gz, or .deb). Optional pr_number + build_run_number inputs resolve the +# listing inside this workflow when package_url is unset. See README_PR_TESTS.md. # # Required repo configuration: README_PR_TESTS.md (same secrets/vars as nightly for SSH/ROCm). @@ -71,7 +71,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set package URL (manual) + - name: Set package URL (manual or post-build dispatch) if: inputs.pr_number == '' || inputs.build_run_number == '' env: PACKAGE_INPUT: ${{ inputs.package_url }} From 65ea960844541d1d1f729f7d4f788def3bf0f117 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Thu, 25 Jun 2026 22:18:08 -0400 Subject: [PATCH 230/275] Fixing the issue while dispatching RVS PR Tests Signed-off-by: Urvashi Tiwari --- .../workflows/build-relocatable-packages.yml | 56 ++++++------------- .github/workflows/rvs-pr-tests.yml | 29 ++++++---- 2 files changed, 34 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index b8a747045..d158b3fca 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -587,55 +587,31 @@ jobs: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository env: - PKG_BASE: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} + GITHUB_REF_NAME: ${{ github.ref_name }} uses: actions/github-script@v7 with: script: | - const base = (process.env.PKG_BASE || '').trim().replace(/\/$/, ''); - if (!base) { - core.setFailed('RVS_PR_DEB_PACKAGE_URL (or RVS_PR_PACKAGE_URL) is not set — cannot dispatch PR tests.'); - return; - } - const low = base.toLowerCase(); - if (low.endsWith('.deb') || low.endsWith('.tar.gz')) { - core.setFailed('PR package secret must be the …/rvs HTTPS base, not a direct .deb or .tar.gz URL.'); - return; - } - const pr = context.payload.pull_request.number; - const runNumber = context.runNumber; - const candidates = [ - `${base}/${pr}/merge/${runNumber}/manylinux_2_28`, - `${base}/${runNumber}/merge/${pr}/manylinux_2_28`, - ]; - let listing = ''; - for (const cand of candidates) { - const res = await fetch(`${cand}/`, { - headers: { 'User-Agent': 'RVS-PR-Dispatch/1.0' }, - redirect: 'follow', - }); - if (res.ok) { - listing = cand; - break; - } - } - if (!listing) { - core.setFailed( - `Could not reach a manylinux_2_28 listing for PR #${pr} build ${runNumber}. Tried:\n ` - + candidates.map((c) => ` ${c}/`).join('\n'), - ); - return; - } - const ref = context.payload.pull_request.base.ref; - // Pass package_url only — works with the workflow definition on the base branch - // (master may not yet define pr_number / build_run_number inputs). + const prNumber = String(context.payload.pull_request.number); + const buildRunNumber = String(context.runNumber); + // Pass identifiers only — manylinux listing probe runs on the self-hosted + // runner in rvs-pr-tests.yml (lab CDN egress). Use PR head ref so the + // dispatched workflow includes pr_number / build_run_number inputs. + const ref = context.payload.pull_request.head.ref; + const buildRefName = process.env.GITHUB_REF_NAME || ''; await github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, repo: context.repo.repo, workflow_id: 'rvs-pr-tests.yml', ref, - inputs: { package_url: listing }, + inputs: { + pr_number: prNumber, + build_run_number: buildRunNumber, + build_ref_name: buildRefName, + }, }); - core.info(`Dispatched RVS PR Tests for PR #${pr} (build run ${runNumber}) with package_url=${listing}/ on ref ${ref}`); + core.info( + `Dispatched RVS PR Tests for PR #${prNumber} (build run ${buildRunNumber}) on ref ${ref}`, + ); create-release: name: Create Release Summary diff --git a/.github/workflows/rvs-pr-tests.yml b/.github/workflows/rvs-pr-tests.yml index 329cd0ebb..cee46bfe6 100644 --- a/.github/workflows/rvs-pr-tests.yml +++ b/.github/workflows/rvs-pr-tests.yml @@ -1,11 +1,10 @@ name: RVS PR Tests # Runs after a successful "Build Relocatable Packages" run on pull_request (dispatched -# from that workflow with a resolved package_url), or on workflow_dispatch. Package URL: -# for post-build dispatch, the build workflow resolves the manylinux_2_28 listing and -# passes package_url. For manual runs, use package_url or secret (…/rvs base, listing, -# direct .tar.gz, or .deb). Optional pr_number + build_run_number inputs resolve the -# listing inside this workflow when package_url is unset. See README_PR_TESTS.md. +# from that workflow with pr_number + build_run_number), or on workflow_dispatch. +# Post-build dispatch does not resolve the package URL — the install job on the +# self-hosted runner probes the manylinux_2_28 listing (curl, lab CDN egress). +# Manual runs: package_url or secret. See README_PR_TESTS.md. # # Required repo configuration: README_PR_TESTS.md (same secrets/vars as nightly for SSH/ROCm). @@ -20,6 +19,10 @@ on: description: 'Build workflow run number (post-build dispatch)' required: false default: '' + build_ref_name: + description: 'GITHUB_REF_NAME from the package build (/merge); set by post-build dispatch' + required: false + default: '' package_url: description: 'HTTPS …/rvs/ root, …/manylinux_*/ listing, direct *-Linux.tar.gz, or .deb (empty → secrets; not used when pr_number + build_run_number are set)' required: false @@ -71,7 +74,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set package URL (manual or post-build dispatch) + - name: Set package URL (manual) if: inputs.pr_number == '' || inputs.build_run_number == '' env: PACKAGE_INPUT: ${{ inputs.package_url }} @@ -92,12 +95,13 @@ jobs: echo "RVS_PR_PKG_URL" } >> "$GITHUB_ENV" - - name: Set package URL (after successful PR build) + - name: Resolve manylinux listing (post-build dispatch, self-hosted) if: inputs.pr_number != '' && inputs.build_run_number != '' env: SECRET_PKG: ${{ secrets.RVS_PR_DEB_PACKAGE_URL || secrets.RVS_PR_PACKAGE_URL }} PR_NUMBER: ${{ inputs.pr_number }} RUN_NUMBER: ${{ inputs.build_run_number }} + BUILD_REF_NAME: ${{ inputs.build_ref_name }} run: | set -euo pipefail python3 <<'PY' @@ -116,12 +120,15 @@ jobs: pr = int(os.environ["PR_NUMBER"]) run_number = int(os.environ["RUN_NUMBER"]) - # Primary: matches .github/scripts/rvs-s3-upload-route.sh — rvs//merge//manylinux_2_28 - # Fallback: some mirrors use rvs//merge//manylinux_2_28 - candidates = [ + ref_name = (os.environ.get("BUILD_REF_NAME") or "").strip() + # Primary: exact rvs-s3-upload-route.sh layout (rvs/${GITHUB_REF_NAME}/${GITHUB_RUN_NUMBER}/manylinux_2_28) + candidates = [] + if ref_name: + candidates.append(f"{base}/{ref_name}/{run_number}/manylinux_2_28") + candidates.extend([ f"{base}/{pr}/merge/{run_number}/manylinux_2_28", f"{base}/{run_number}/merge/{pr}/manylinux_2_28", - ] + ]) def listing_reachable(url: str) -> bool: p = subprocess.run( From 6cb0bcbd26768d590ed41e2017cbfa0180fe5ec4 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 26 Jun 2026 11:20:11 -0700 Subject: [PATCH 231/275] fix fragile steps in build script. For some reason finding GCN path from ROCm is casuing issue on github runner.Trying a different approach and do error reporting for future debug. --- .github/workflows/README_BUILD_PACKAGES.md | 6 +- build_packages_local.sh | 77 ++++++++++++++++++++-- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 43f20c579..01c1ed5d3 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -96,7 +96,7 @@ GitHub Actions Workflow │ ├── export PATH="$ROCM_PATH/bin:$PATH" │ ├── export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH" │ ├── export CMAKE_PREFIX_PATH="$ROCM_PATH:$CMAKE_PREFIX_PATH" - │ ├── export HIP_DEVICE_LIB_PATH (auto-detected amdgcn/bitcode path) + │ ├── export HIP_DEVICE_LIB_PATH (ordered candidate paths + amdclang++ resource-dir fallback) │ ├── export ROCM_LIBPATCH_VERSION (major.minor in xxyy format, e.g., 0711) │ ├── export CPACK_DEBIAN_PACKAGE_RELEASE (see env table: r.date, PRs add .branch.commit) │ ├── export CPACK_RPM_PACKAGE_RELEASE (same as DEB) @@ -130,7 +130,7 @@ CMAKE_INSTALL_RPATH="$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib/rvs:/opt/rocm/lib:/op **Automatic Version Management**: CMake reads the project version from `CMakeLists.txt` and CPack uses it for package naming automatically. The **patch version** is auto-computed at CMake configure time: `git describe --tags --match "v..*"` counts commits since the last matching `v` tag. For example, if the tag is `v1.3.0` and there have been 15 commits since, the package version becomes `1.3.15`. If no matching tag exists or git is unavailable, the patch defaults to `0` from `CMakeLists.txt`. This works for both CI builds and direct local `cmake` invocations. -**HIP Device Libraries**: Automatically located and exported as `HIP_DEVICE_LIB_PATH` for clang device library discovery. +**HIP Device Libraries**: Probes known TheRock layouts (`lib/llvm/amdgcn/bitcode`, legacy `amdgcn/bitcode`, Clang resource-dir `lib/llvm/lib/clang/*/lib/amdgcn/bitcode`) and falls back to `amdclang++ -print-resource-dir`; exports `HIP_DEVICE_LIB_PATH` for clang device library discovery. **Compiler Selection**: `CMAKE_CXX_COMPILER` is set to ROCm's `hipcc` on both AlmaLinux (manylinux_2_28) and Ubuntu/Debian. Because hipcc is Clang-based and does not bundle libstdc++, the system GCC tree is plumbed in via `--gcc-toolchain=$GCC_TOOLCHAIN`: on AlmaLinux this points at the discovered `gcc-toolset-`; on Ubuntu/Debian it is `/usr` (set when `/usr/include/c++/*/barrier` exists). @@ -298,7 +298,7 @@ The workflow uses `build_packages_local.sh` as the core build engine. This scrip - **Dependency Management**: Installs all required build tools and libraries - Enables PowerTools/CRB repository on AlmaLinux for doxygen and yaml-cpp - **ROCm SDK Setup**: Auto-fetches latest version or downloads specified version from TheRock tarballs -- **HIP Device Libraries**: Auto-locates amdgcn/bitcode directory and exports HIP_DEVICE_LIB_PATH +- **HIP Device Libraries**: Ordered candidate-path probe (no full-tree `find`); exports `HIP_DEVICE_LIB_PATH` - **CMake Configuration**: Sets up relocatable RPATHs and all build parameters - Uses cmake3 on AlmaLinux, cmake on Ubuntu - Sets CMAKE_CXX_COMPILER to hipcc on AlmaLinux and Ubuntu/Debian (Ubuntu also gets `--gcc-toolchain=/usr` for C++20 libstdc++ headers) diff --git a/build_packages_local.sh b/build_packages_local.sh index a7aefa99d..d4e7f65f6 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -130,6 +130,71 @@ normalize_on_off() { esac } +# Locate HIP device bitcode (amdgcn/bitcode) under a TheRock/ROCm SDK root. +# Probes known layouts in priority order — no find|head pipeline (fragile with set -e). +# Prints the path on stdout; returns 0 on success, 1 if not found. +resolve_hip_device_lib_path() { + local root="$1" + local cand resource_dir + + if [ -z "$root" ] || [ ! -d "$root" ]; then + return 1 + fi + + for cand in \ + "${root}/lib/llvm/amdgcn/bitcode" \ + "${root}/amdgcn/bitcode" \ + "${root}/lib/clang/amdgcn/bitcode" + do + if [ -d "$cand" ]; then + echo "$cand" + return 0 + fi + done + + # ROCm 7.2+ Clang resource-dir layout: lib/llvm/lib/clang//lib/amdgcn/bitcode + for cand in "${root}"/lib/llvm/lib/clang/*/lib/amdgcn/bitcode; do + if [ -d "$cand" ]; then + echo "$cand" + return 0 + fi + done + + # Derive from amdclang++ resource dir when present. + if [ -x "${root}/bin/amdclang++" ]; then + resource_dir="$("${root}/bin/amdclang++" -print-resource-dir 2>/dev/null)" || true + if [ -n "$resource_dir" ] && [ -d "${resource_dir}/lib/amdgcn/bitcode" ]; then + echo "${resource_dir}/lib/amdgcn/bitcode" + return 0 + fi + fi + + return 1 +} + +# Print diagnostics when resolve_hip_device_lib_path fails. +report_hip_device_lib_path_failure() { + local root="$1" + print_error "Could not find amdgcn/bitcode under ROCM_PATH=$root" + print_error "HIP device libraries are required for GPU code compilation" + print_error "Tried:" + print_error " ${root}/lib/llvm/amdgcn/bitcode" + print_error " ${root}/amdgcn/bitcode" + print_error " ${root}/lib/clang/amdgcn/bitcode" + print_error " ${root}/lib/llvm/lib/clang/*/lib/amdgcn/bitcode" + print_error " amdclang++ -print-resource-dir .../lib/amdgcn/bitcode" + if [ -d "$root" ]; then + print_error "Top-level contents of $root:" + ls -la "$root" 2>&1 | while read -r line; do print_error " $line"; done + if [ -d "${root}/lib/llvm" ]; then + print_error "Contents of ${root}/lib/llvm:" + ls -la "${root}/lib/llvm" 2>&1 | while read -r line; do print_error " $line"; done + fi + fi + print_error "If the SDK is missing amdgcn/bitcode, this may be a known TheRock symlink issue;" + print_error "see https://github.com/ROCm/TheRock/issues/74" +} + # Join base URL and filename without duplicate slashes join_base_and_file() { local base="$1" @@ -608,14 +673,12 @@ print_info "Step 2: Setting up ROCm environment..." # Find HIP device library path (amdgcn/bitcode) first print_info "Locating HIP device libraries (amdgcn/bitcode)..." -HIP_DEVICE_LIB_PATH=$(find "$ROCM_PATH" -type d -path "*/amdgcn/bitcode" 2>/dev/null | head -1) - -if [ -z "$HIP_DEVICE_LIB_PATH" ]; then - print_error "Could not find amdgcn/bitcode directory in $ROCM_PATH" - print_error "HIP device libraries are required for GPU code compilation" - print_error "Please verify your ROCm SDK installation" +HIP_DEVICE_LIB_PATH="" +if ! HIP_DEVICE_LIB_PATH="$(resolve_hip_device_lib_path "$ROCM_PATH")"; then + report_hip_device_lib_path_failure "$ROCM_PATH" exit 1 fi +print_success "HIP_DEVICE_LIB_PATH=$HIP_DEVICE_LIB_PATH" # Export all environment variables export PATH="$ROCM_PATH/bin:$PATH" @@ -626,7 +689,7 @@ export HIP_DEVICE_LIB_PATH="$HIP_DEVICE_LIB_PATH" # Extract major.minor version from ROCM_VERSION for ROCM_LIBPATCH_VERSION # Convert to xxyy format with zero padding # Example: "7.11.0a20260121" -> "0711", "8.0.0" -> "0800", "10.2.0" -> "1002" -ROCM_VERSION_MAJOR_MINOR=$(echo "$ROCM_VERSION" | grep -oP '^\d+\.\d+') +ROCM_VERSION_MAJOR_MINOR=$(echo "$ROCM_VERSION" | sed -nE 's/^([0-9]+\.[0-9]+).*/\1/p') if [ -z "$ROCM_VERSION_MAJOR_MINOR" ]; then print_error "Could not extract major.minor version from ROCM_VERSION: $ROCM_VERSION" exit 1 From aa6741c6f710ec0f99eacb93f84f543655833649 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 28 Jun 2026 12:57:01 -0700 Subject: [PATCH 232/275] ignore downloading -test- ROCm package ROCm 7.15 onwards added tarball with tests as pacakge with -tests- added to the name before version. Current logic downloads that and fail to fetch the ROCm version from the downloaded tarball. With this change pacakge that has name "-tests-" will be ignored. No ROCm download progress print in github action and print success. --- .github/workflows/README_BUILD_PACKAGES.md | 2 +- build_packages_local.sh | 61 +++++++++++++++++++--- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 01c1ed5d3..9ea1b449c 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -337,7 +337,7 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_SDK_RELEASE_URL` | `https://repo.amd.com/rocm/tarball/` | HTML listing for **release** tarballs (`therock-dist-linux--X.Y.Z.tar.gz`). Used when `ROCM_SDK_CHANNEL=release` or `auto` with this URL set. | | `ROCM_SDK_RELEASE_BASE_URL` | `https://repo.amd.com/rocm/tarball` | Directory URL for downloading **X.Y.Z** tarballs; overridden when version string is nightly-shaped. | | `ROCM_SDK_BASE_URL` | See script | Effective tarball base after channel + version-shape resolution. | -| `ROCM_SDK_INDEX_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch/` | **Nightly** listing for latest nightly SDK discovery. | +| `ROCM_SDK_INDEX_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch/` | **Nightly** listing for latest nightly SDK discovery. Auto-fetch matches **SDK tarballs only** (`therock-dist-linux--.tar.gz`); entries with `-tests-` in the name are ignored. | | `ROCM_SDK_NIGHTLY_BASE_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch` | Tarball base for **nightly** builds (`x.y.za…` versions). | | `ROCM_SDK_NIGHTLY_INDEX_URL` | _(same as index default)_ | Optional override for nightly listing URL. | | `ROCM_SDK_CHANNEL` | `auto` locally | **`nightly`** / **`release`** / **`auto`**. CI sets channel per trigger (see table above); manual with a pin uses **`auto`** so tarball follows version format. | diff --git a/build_packages_local.sh b/build_packages_local.sh index d4e7f65f6..8b5a93620 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -216,6 +216,31 @@ apply_sdk_tarball_base_for_version() { fi } +# Validate ROCM_VERSION after parsing an SDK listing (not -tests- or other variants). +# mode: nightly (x.y.za) or release (X.Y.Z) +validate_rocm_version_string() { + local v="$1" + local mode="$2" + case "$mode" in + nightly) + if echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+a[0-9]+$'; then + return 0 + fi + ;; + release) + if echo "$v" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then + return 0 + fi + ;; + *) + print_error "validate_rocm_version_string: unknown mode $mode" + return 1 + ;; + esac + print_error "Invalid ROCm $mode version string from listing: $v" + return 1 +} + # Function to fetch latest ROCm version for specified GPU family # Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { @@ -224,10 +249,13 @@ fetch_latest_rocm_version() { print_info "Fetching latest ROCm version for $gpu_family..." print_info "Index URL: $ROCM_SDK_INDEX_URL" - # Download index page and parse for latest tarball matching GPU family - # Pattern: therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz - local latest_version=$(wget -qO- "$ROCM_SDK_INDEX_URL" 2>/dev/null | \ - grep -oP "therock-dist-linux-${gpu_family}-\K[^<\"]+(?=\.tar\.gz)" | \ + # SDK only: therock-dist-linux--.tar.gz + # Excludes -tests- tarballs (e.g. ...-gfx110X-all-tests-7.15.0a...) + local latest_version + latest_version=$(wget -qO- "$ROCM_SDK_INDEX_URL" 2>/dev/null | \ + grep -v -- '-tests-' | \ + grep -oE "therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+a[0-9]+" | \ + sed "s|^therock-dist-linux-${gpu_family}-||" | \ sort -V | tail -1) if [ -z "$latest_version" ]; then @@ -235,6 +263,10 @@ fetch_latest_rocm_version() { return 1 fi + if ! validate_rocm_version_string "$latest_version" nightly; then + return 1 + fi + print_success "Found latest ROCm version: $latest_version" ROCM_VERSION="$latest_version" return 0 @@ -251,7 +283,9 @@ fetch_latest_rocm_release_version() { local latest_version latest_version=$(wget -qO- "$list_url" 2>/dev/null | \ - grep -oP "therock-dist-linux-${gpu_family}-\K[0-9]+\.[0-9]+\.[0-9]+(?=\.tar\.gz)" | \ + grep -v -- '-tests-' | \ + grep -oE "therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+" | \ + sed "s|^therock-dist-linux-${gpu_family}-||" | \ sort -V | uniq | tail -1) if [ -z "$latest_version" ]; then @@ -259,6 +293,10 @@ fetch_latest_rocm_release_version() { return 1 fi + if ! validate_rocm_version_string "$latest_version" release; then + return 1 + fi + print_success "Found latest ROCm release version: $latest_version" ROCM_VERSION="$latest_version" return 0 @@ -648,8 +686,17 @@ fi if [ -z "$goto_step2" ]; then print_info "Downloading from: $TARBALL_URL" if wget --spider "$TARBALL_URL" 2>/dev/null; then - wget --show-progress -O "$TARBALL_FILE" "$TARBALL_URL" - print_success "Download complete" + # Avoid flooding CI logs with per-chunk progress on multi-GB SDK tarballs. + if [ -t 1 ]; then + wget --show-progress -O "$TARBALL_FILE" "$TARBALL_URL" + else + wget -q -O "$TARBALL_FILE" "$TARBALL_URL" + fi + if [ -f "$TARBALL_FILE" ]; then + print_success "Download complete ($(du -h "$TARBALL_FILE" | awk '{print $1}'))" + else + print_success "Download complete" + fi else print_error "Failed to download ROCm SDK tarball" print_error "URL: $TARBALL_URL" From 82a4d3a6c06d7682e6b376e476be02a08b123067 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 30 Jun 2026 09:24:14 -0700 Subject: [PATCH 233/275] fix rocm tarball download issue With ROCm 7.15 nightly additional packages are present and causing issue with the ROCm tarball fetching logic. Issue was due to grep -v causing the index to be be emptied out and not able to find the right tarball. --- .github/workflows/README_BUILD_PACKAGES.md | 2 +- build_packages_local.sh | 117 ++++++++++++++++++--- 2 files changed, 104 insertions(+), 15 deletions(-) diff --git a/.github/workflows/README_BUILD_PACKAGES.md b/.github/workflows/README_BUILD_PACKAGES.md index 9ea1b449c..544f46ffe 100644 --- a/.github/workflows/README_BUILD_PACKAGES.md +++ b/.github/workflows/README_BUILD_PACKAGES.md @@ -337,7 +337,7 @@ sudo BUILD_TYPE=Debug ./build_packages_local.sh | `ROCM_SDK_RELEASE_URL` | `https://repo.amd.com/rocm/tarball/` | HTML listing for **release** tarballs (`therock-dist-linux--X.Y.Z.tar.gz`). Used when `ROCM_SDK_CHANNEL=release` or `auto` with this URL set. | | `ROCM_SDK_RELEASE_BASE_URL` | `https://repo.amd.com/rocm/tarball` | Directory URL for downloading **X.Y.Z** tarballs; overridden when version string is nightly-shaped. | | `ROCM_SDK_BASE_URL` | See script | Effective tarball base after channel + version-shape resolution. | -| `ROCM_SDK_INDEX_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch/` | **Nightly** listing for latest nightly SDK discovery. Auto-fetch matches **SDK tarballs only** (`therock-dist-linux--.tar.gz`); entries with `-tests-` in the name are ignored. | +| `ROCM_SDK_INDEX_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch/` | **Nightly** listing for latest nightly SDK discovery. Auto-fetch matches **SDK tarballs only** (`therock-dist-linux--.tar.gz`); `-tests-` entries are excluded **per filename** (version must follow `GPU_FAMILY-` immediately), not by filtering whole HTML lines. | | `ROCM_SDK_NIGHTLY_BASE_URL` | `https://rocm.nightlies.amd.com/tarball-multi-arch` | Tarball base for **nightly** builds (`x.y.za…` versions). | | `ROCM_SDK_NIGHTLY_INDEX_URL` | _(same as index default)_ | Optional override for nightly listing URL. | | `ROCM_SDK_CHANNEL` | `auto` locally | **`nightly`** / **`release`** / **`auto`**. CI sets channel per trigger (see table above); manual with a pin uses **`auto`** so tarball follows version format. | diff --git a/build_packages_local.sh b/build_packages_local.sh index 8b5a93620..1f7f990ca 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -241,25 +241,102 @@ validate_rocm_version_string() { return 1 } +# Parse SDK tarball versions from a listing on stdin (HTML/JSON). +# Per-match only — do not grep -v '-tests-' on the whole page (nightly index is one JSON line). +# Prints one version string per matching SDK tarball. +parse_sdk_tarball_versions_from_listing() { + local gpu_family="$1" + local mode="$2" + local pattern + + case "$mode" in + nightly) + # Digit after gpu_family- excludes ...-gfx110X-all-tests-... + pattern="therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+a[0-9]+" + ;; + release) + pattern="therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+" + ;; + *) + print_error "parse_sdk_tarball_versions_from_listing: unknown mode $mode" + return 1 + ;; + esac + + grep -oE "$pattern" | sed "s|^therock-dist-linux-${gpu_family}-||" +} + +# Collect SDK version strings from a listing file; python3 fallback when grep finds nothing. +collect_sdk_versions_from_listing_file() { + local listing_file="$1" + local gpu_family="$2" + local mode="$3" + local versions + + versions=$(parse_sdk_tarball_versions_from_listing "$gpu_family" "$mode" < "$listing_file") + + if [ -z "$versions" ] && [ -s "$listing_file" ] && command -v python3 >/dev/null 2>&1; then + versions=$(python3 - "$gpu_family" "$mode" "$listing_file" <<'PY' +import re +import sys + +gpu_family = sys.argv[1] +mode = sys.argv[2] +with open(sys.argv[3], encoding="utf-8", errors="replace") as f: + text = f.read() +prefix = "therock-dist-linux-" + re.escape(gpu_family) + "-" +if mode == "nightly": + pat = re.compile(prefix + r"([0-9]+\.[0-9]+\.[0-9]+a[0-9]+)\.tar\.gz") +else: + pat = re.compile(prefix + r"([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz") +seen = set() +for m in pat.finditer(text): + if "-tests-" in m.group(0): + continue + v = m.group(1) + if v not in seen: + seen.add(v) + print(v) +PY +) + if [ -n "$versions" ]; then + print_info "Parsed SDK versions via python3 fallback" + fi + fi + + printf '%s\n' "$versions" +} + # Function to fetch latest ROCm version for specified GPU family # Sets the global ROCM_VERSION variable directly fetch_latest_rocm_version() { local gpu_family="$1" + local listing_tmp latest_version listing_bytes print_info "Fetching latest ROCm version for $gpu_family..." print_info "Index URL: $ROCM_SDK_INDEX_URL" - # SDK only: therock-dist-linux--.tar.gz - # Excludes -tests- tarballs (e.g. ...-gfx110X-all-tests-7.15.0a...) - local latest_version - latest_version=$(wget -qO- "$ROCM_SDK_INDEX_URL" 2>/dev/null | \ - grep -v -- '-tests-' | \ - grep -oE "therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+a[0-9]+" | \ - sed "s|^therock-dist-linux-${gpu_family}-||" | \ - sort -V | tail -1) + listing_tmp="$(mktemp)" + if ! wget -q -O "$listing_tmp" "$ROCM_SDK_INDEX_URL"; then + print_error "wget failed for $ROCM_SDK_INDEX_URL" + rm -f "$listing_tmp" + return 1 + fi + if [ ! -s "$listing_tmp" ]; then + print_error "Empty listing from $ROCM_SDK_INDEX_URL" + rm -f "$listing_tmp" + return 1 + fi + + listing_bytes=$(wc -c < "$listing_tmp" | tr -d ' ') + latest_version=$(collect_sdk_versions_from_listing_file "$listing_tmp" "$gpu_family" nightly \ + | sort -V | tail -1) + rm -f "$listing_tmp" if [ -z "$latest_version" ]; then print_error "Could not fetch latest ROCm nightly version for $gpu_family from $ROCM_SDK_INDEX_URL" + print_error "Listing was ${listing_bytes} bytes but no SDK tarballs matched therock-dist-linux-${gpu_family}-" + print_error "(-tests- tarballs are excluded; do not filter the listing with grep -v on whole lines)" return 1 fi @@ -277,19 +354,31 @@ fetch_latest_rocm_version() { fetch_latest_rocm_release_version() { local gpu_family="$1" local list_url="${ROCM_SDK_RELEASE_URL:-$_ROCM_RELEASE_LIST_DEFAULT}" + local listing_tmp latest_version listing_bytes print_info "Fetching latest ROCm release version (X.Y.Z) for $gpu_family..." print_info "Release listing URL: $list_url" - local latest_version - latest_version=$(wget -qO- "$list_url" 2>/dev/null | \ - grep -v -- '-tests-' | \ - grep -oE "therock-dist-linux-${gpu_family}-[0-9]+\.[0-9]+\.[0-9]+" | \ - sed "s|^therock-dist-linux-${gpu_family}-||" | \ - sort -V | uniq | tail -1) + listing_tmp="$(mktemp)" + if ! wget -q -O "$listing_tmp" "$list_url"; then + print_error "wget failed for $list_url" + rm -f "$listing_tmp" + return 1 + fi + if [ ! -s "$listing_tmp" ]; then + print_error "Empty listing from $list_url" + rm -f "$listing_tmp" + return 1 + fi + + listing_bytes=$(wc -c < "$listing_tmp" | tr -d ' ') + latest_version=$(collect_sdk_versions_from_listing_file "$listing_tmp" "$gpu_family" release \ + | sort -V | uniq | tail -1) + rm -f "$listing_tmp" if [ -z "$latest_version" ]; then print_error "No therock-dist-linux-${gpu_family}-X.Y.Z.tar.gz found under release listing (expected forms like 7.11.0)" + print_error "Listing was ${listing_bytes} bytes but no SDK tarballs matched for $gpu_family" return 1 fi From 86b6d614735ce80cd0cb00716a9fc0128e6a6827 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 8 Jul 2026 17:47:06 -0500 Subject: [PATCH 234/275] Report test result correctly. --- pbqt.so/src/action_run.cpp | 2 +- peqt.so/src/action.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pbqt.so/src/action_run.cpp b/pbqt.so/src/action_run.cpp index b63d0aee0..cf782f915 100644 --- a/pbqt.so/src/action_run.cpp +++ b/pbqt.so/src/action_run.cpp @@ -147,7 +147,7 @@ int pbqt_action::run() { if(bjson){ rvs::lp::JsonActionEndNodeCreate(); } - return 0; + return -1; } RVSTRACE_ diff --git a/peqt.so/src/action.cpp b/peqt.so/src/action.cpp index 34c7cff23..cc39d5f3f 100644 --- a/peqt.so/src/action.cpp +++ b/peqt.so/src/action.cpp @@ -426,7 +426,7 @@ int peqt_action::run(void) { action_result.output = msg; action_callback(&action_result); - return false; + return -1; } // fill in the info @@ -512,12 +512,14 @@ int peqt_action::run(void) { } action_result.state = rvs::actionstate::ACTION_COMPLETED; - action_result.status = rvs::actionstatus::ACTION_SUCCESS; + action_result.status = pci_infra_qual_result + ? rvs::actionstatus::ACTION_SUCCESS + : rvs::actionstatus::ACTION_FAILED; action_result.output = "PEQT Module action " + action_name + " completed"; action_callback(&action_result); RVSTRACE_ - return 0; + return pci_infra_qual_result ? 0 : -1; } From 679dad028867de1cb4d284cb2f3e6957ab7c1f28 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 10 Jul 2026 18:04:07 -0500 Subject: [PATCH 235/275] Babel json schema update. --- docs/schemas/babel.schema | 56 ++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/docs/schemas/babel.schema b/docs/schemas/babel.schema index ada3ea986..e294c94b3 100644 --- a/docs/schemas/babel.schema +++ b/docs/schemas/babel.schema @@ -19,40 +19,54 @@ "gpu_index": { "type": "string" }, - "Array size": { + "array_size": { "type": "string" }, - "Total size": { + "total_size": { "type": "string" }, - "Iterations": { + "duration_ms": { "type": "string" }, - "Function": { - "type": "string" - }, - "MBytes/sec": { - "type": "string" - }, - "Min(s)": { - "type": "string" - }, - "Max(s)": { - "type": "string" - }, - "Average(s)": { - "type": "string" - }, - "pass": { - "type": "string" + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subtest": { + "type": "string", + "enum": ["Read", "Write", "Copy", "Mul", "Add", "Triad", "Dot"] + }, + "mbytes_per_sec": { + "type": "string" + }, + "max_mbytes_per_sec": { + "type": "string" + }, + "min_mbytes_per_sec": { + "type": "string" + }, + "avg_mbytes_per_sec": { + "type": "string" + }, + "pass": { + "type": "string" + } + }, + "required": ["subtest", "mbytes_per_sec", "max_mbytes_per_sec", + "min_mbytes_per_sec", "avg_mbytes_per_sec", "pass"] + }, + "minItems": 1 } - } + }, + "required": ["gpu_id", "gpu_index", "array_size", "total_size", "duration_ms", "results"] }, "minItems": 1 } } }, "required": [ + "version", "babel" ] } From ed30aa222c530ef26d371cee0b9b2f6631661f1d Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 10 Jul 2026 18:15:00 -0500 Subject: [PATCH 236/275] TST json schema update. --- docs/schemas/tst.schema | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/schemas/tst.schema b/docs/schemas/tst.schema index 916bcdc44..cad336c67 100644 --- a/docs/schemas/tst.schema +++ b/docs/schemas/tst.schema @@ -16,6 +16,9 @@ "target_temp": { "type": "string" }, + "throttle_temp": { + "type": "string" + }, "dtype": { "type": "string" }, @@ -28,6 +31,9 @@ "average edge temperature": { "type": "string" }, + "average junction temperature": { + "type": "string" + }, "pass": { "type": "string" } From 75e63e8d19553fbe07eae14d5bd2a12135cabcfa Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 13 Jul 2026 18:01:38 -0500 Subject: [PATCH 237/275] Update PEQT module --- docs/ug1main.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/ug1main.md b/docs/ug1main.md index 4a70d8756..346be2925 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -1304,6 +1304,10 @@ control, status and capabilities registers. These registers are specified in the PCI Express Base Specification, Revision 3. Iteration keys, i.e. count, wait and duration will be ignored for actions using the PEQT module. +```{note} +The PEQT module requires elevated privileges. Run RVS with `sudo` when using this module. +``` + ### Module specific keys Module specific output keys are described in the table below: From 6a63cc46f8eea1c9fbbf72bb73c69be01d83fb85 Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Tue, 14 Jul 2026 20:44:36 -0400 Subject: [PATCH 238/275] Add install docs for RVS 1.5.122 (#1252) * mi350p config cherrypick * remove iet single * Documentation - Additions, Corrections and Updates. (#1150) * Additions, Corrections and Updates in docs * update _toc.yml.in to display updated files on web * update index --------- Co-authored-by: Peter Park (cherry picked from commit 7417426ae98b727a8405f81f2baffdea290c7234) * docs: Update installation page for 7.13 (#1151) * docs(rvs): move installation.rst to build.rst * docs(rvs): add install page add link to compat * docs: update heading in `build.rst` * remove stale doc * fix yaml indentation breaking sphinx build (cherry picked from commit 555be6e6938f29b8d0ea6fc282e68c6f2b7f9fad) * docs: fix rocm core sdk docs url * Fix broken links in header & footer (#1178) * Fix broken link in header * fix per review * Update links and copyright info * update per review * Remove production releases from the list (#1189) * Update version slug * tighten wording * bump rocm-docs-core to 1.35.0 * hardcode interSphinx link (#1207) * Install RVS using native packages * update RVS versions * one more * add patch version * clarify install methods * add 1.5.122 rvs install doc * update RVS versions to 1.5.122 * add back transfer bench doc * update 7.14 install url * add notes --------- Co-authored-by: Davood Saffar Co-authored-by: Manoj S K Co-authored-by: Mohammed Junaid <88209527+jkottiku@users.noreply.github.com> Co-authored-by: Peter Park Co-authored-by: Alex Xu --- docs/conf.py | 22 ++++- docs/install/installation.rst | 104 +++++++++++++++++---- docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 166 +++++++++++++++++----------------- docs/versions.md | 18 ++++ 5 files changed, 209 insertions(+), 103 deletions(-) create mode 100644 docs/versions.md diff --git a/docs/conf.py b/docs/conf.py index 1f8e60322..6fde86237 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ raise ValueError("VERSION not found!") version_number = match[1] -left_nav_title = f"RVS {version_number} Documentation" +left_nav_title = f"ROCm RVS 1.5.122 Documentation" exclude_patterns = [ 'conceptual/**', @@ -23,13 +23,27 @@ # for PDF output on Read the Docs project = "RVS Documentation" author = "Advanced Micro Devices, Inc." -copyright = "Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved." +copyright = "Copyright (c) 2023-2026 Advanced Micro Devices, Inc. All rights reserved." version = version_number release = version_number html_title = left_nav_title extensions = ["rocm_docs"] html_theme = "rocm_docs_theme" -html_theme_options = {"flavor": "rocm"} +html_theme_options = { + "flavor": "generic", + "header_title": f"ROCm™ RVS 1.5.122", + "header_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.5.122/", + "version_list_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.5.122/versions.html", + "nav_secondary_items": { + "GitHub": "https://github.com/ROCm/ROCmValidationSuite", + "Community": "https://github.com/ROCm/ROCm/discussions", + "Blogs": "https://rocm.blogs.amd.com/", + "System and Infra Docs": "https://instinct.docs.amd.com/", + "Support": "https://github.com/ROCm/ROCmValidationSuite/issues/new/choose", + }, + "link_main_doc": False, +} + external_projects_current_project = "rocmvalidationsuite" -external_toc_path = "./sphinx/_toc.yml" +external_toc_path = "./sphinx/_toc.yml" \ No newline at end of file diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 3b9d2b9a9..28a783087 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -7,8 +7,8 @@ Install ROCm Validation Suite ***************************** ROCm Validation Suite (RVS) is supported on AMD Instinct and Radeon GPUs -supported by ROCm. See the :doc:`ROCm compatibilty matrix -` for support information. +supported by ROCm. See the `ROCm compatibilty matrix +`__ for support information. For advanced workflows, source builds, or custom configurations, see ``__. @@ -22,17 +22,16 @@ installed. Install the ROCm Core SDK ------------------------- -For instructions, see `Install AMD ROCm -`__. Use the +For instructions, see `Install AMD ROCm `__. Use the selector panel on that page to view instructions appropriate for your system environment. -Install RVS ------------ +Install RVS using package manager +---------------------------------- -Use the following steps to install RVS on top of the ROCm Core SDK. +Use the following steps to install RVS using package manager on top of the ROCm Core SDK. -1. Install system dependencies using your Linux distribution's package manager. +1. Download the RVS package. .. tab-set:: @@ -40,19 +39,95 @@ Use the following steps to install RVS on top of the ROCm Core SDK. .. code-block:: bash - sudo apt install libpci3 libgomp1 + wget https://repo.amd.com/rocm/rvs/deb/amdrocm7-rvs_1.5.122-579_amd64.deb .. tab-item:: RHEL .. code-block:: bash - sudo dnf install pciutils-libs libgomp + wget https://repo.amd.com/rocm/rvs/rpm/amdrocm7-rvs-1.5.122-579.el8.x86_64.rpm + +2. Install the RVS package. + + .. tab-set:: + + .. tab-item:: Ubuntu + + .. code-block:: bash + + sudo apt install ./amdrocm7-rvs_1.5.122-579_amd64.deb + + .. tab-item:: RHEL + + .. code-block:: bash + + sudo dnf install ./amdrocm7-rvs-1.5.122-579.el8.x86_64.rpm + +3. Complete the following post-installation step to set up your environment. + Set ``ROCM_PATH`` to your ROCm Core SDK location. + + .. tab-set:: + + .. tab-item:: User setup + + .. code-block:: bash + + tee -a ~/.bashrc << EOF + export ROCM_PATH=/opt/rocm + export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + source ~/.bashrc + + .. tab-item:: System-wide setup + + .. code-block:: bash + + sudo tee /etc/profile.d/set-rocm-env.sh << EOF + export ROCM_PATH=/opt/rocm + export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + sudo chmod +x /etc/profile.d/set-rocm-env.sh + source /etc/profile.d/set-rocm-env.sh + +4. Verify your installation. + + .. code-block:: bash + + rvs -h + +.. note:: + The ROCm repositories must be setup as part of RVS package manager installation. This repository setup is part of the ROCm Core SDK installation. + +Install RVS using tarball +-------------------------- + +Use the following steps to install RVS using a tarball on top of the ROCm Core SDK. + +1. Install system dependencies. + + .. tab-set:: + + .. tab-item:: Ubuntu + + .. code-block:: bash + + sudo apt install libpci3 libnuma1 + + .. tab-item:: RHEL + + .. code-block:: bash + + sudo dnf install pciutils-libs numactl-libs 2. Download the RVS tarball. .. code-block:: bash - wget https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.4.21-288-Linux.tar.gz + wget https://repo.amd.com/rocm/rvs/tarball/amdrocm7-rvs-1.5.122-579-Linux.tar.gz 3. Extract the tarball to the ROCm Extras location. Set ``ROCM_PATH`` to your ROCm Core SDK location, which varies depending on how you installed it. For @@ -61,9 +136,8 @@ Use the following steps to install RVS on top of the ROCm Core SDK. .. code-block:: bash - export ROCM_PATH=/opt/rocm - sudo mkdir -p $ROCM_PATH/extras-7 - sudo tar -xzf amdrocm7-rvs-1.4.21-288-Linux.tar.gz -C $ROCM_PATH/extras-7 + sudo mkdir -p /opt/rocm/extras-7 + sudo tar -xzf amdrocm7-rvs-1.5.122-579-Linux.tar.gz -C /opt/rocm/extras-7 4. Complete the following post-installation step to set up your environment. Set ``ROCM_PATH`` to your ROCm Core SDK location. @@ -75,7 +149,6 @@ Use the following steps to install RVS on top of the ROCm Core SDK. .. code-block:: bash tee -a ~/.bashrc << EOF - export ROCM_PATH=/opt/rocm export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH @@ -88,7 +161,6 @@ Use the following steps to install RVS on top of the ROCm Core SDK. .. code-block:: bash sudo tee /etc/profile.d/set-rocm-env.sh << EOF - export ROCM_PATH=/opt/rocm export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index e2b7a5714..d9644348b 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==1.31.3 +rocm-docs-core==1.35.0 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index d087b84bd..04b5a70ab 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -2,100 +2,97 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile requirements.in +# pip-compile --cert=None --client-cert=None --index-url=None --pip-args=None requirements.in # accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.16 +alabaster==1.0.0 # via sphinx -asttokens==3.0.0 +asttokens==3.0.1 # via stack-data -attrs==25.1.0 +attrs==26.1.0 # via # jsonschema # jupyter-cache # referencing -babel==2.15.0 +babel==2.18.0 # via # pydata-sphinx-theme # sphinx -beautifulsoup4==4.12.3 +beautifulsoup4==4.15.0 # via pydata-sphinx-theme -breathe==4.35.0 +breathe==4.36.0 # via rocm-docs-core -certifi==2024.7.4 +certifi==2026.5.20 # via requests -cffi==1.16.0 +cffi==2.0.0 # via # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.7 # via requests -click==8.1.7 +click==8.4.1 # via # jupyter-cache # sphinx-external-toc -comm==0.2.2 +comm==0.2.3 # via ipykernel -cryptography==42.0.8 +cryptography==48.0.1 # via pyjwt -debugpy==1.8.12 +debugpy==1.8.21 # via ipykernel -decorator==5.1.1 +decorator==5.3.1 # via ipython -deprecated==1.2.14 - # via pygithub docutils==0.21.2 # via - # breathe # myst-parser # pydata-sphinx-theme # sphinx -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via ipython -executing==2.2.0 +executing==2.2.1 # via stack-data -fastjsonschema==2.20.0 +fastjsonschema==2.21.2 # via # nbformat # rocm-docs-core -gitdb==4.0.11 +gitdb==4.0.12 # via gitpython -gitpython==3.1.43 +gitpython==3.1.50 # via rocm-docs-core -greenlet==3.1.1 +greenlet==3.5.1 # via sqlalchemy -idna==3.7 +idna==3.18 # via requests -imagesize==1.4.1 +imagesize==2.0.0 # via sphinx -importlib-metadata==8.6.1 +importlib-metadata==9.0.0 # via # jupyter-cache # myst-nb -ipykernel==6.29.5 +ipykernel==7.3.0 # via myst-nb -ipython==8.32.0 +ipython==8.39.0 # via # ipykernel # myst-nb -jedi==0.19.2 +jedi==0.20.0 # via ipython -jinja2==3.1.4 +jinja2==3.1.6 # via # myst-parser # sphinx -jsonschema==4.23.0 +jsonschema==4.26.0 # via nbformat -jsonschema-specifications==2024.10.1 +jsonschema-specifications==2025.9.1 # via jsonschema jupyter-cache==1.0.1 # via myst-nb -jupyter-client==8.6.3 +jupyter-client==8.9.1 # via # ipykernel # nbclient -jupyter-core==5.7.2 +jupyter-core==5.9.1 # via # ipykernel # jupyter-client @@ -105,21 +102,21 @@ markdown-it-py==3.0.0 # via # mdit-py-plugins # myst-parser -markupsafe==2.1.5 +markupsafe==3.0.3 # via jinja2 -matplotlib-inline==0.1.7 +matplotlib-inline==0.2.2 # via # ipykernel # ipython -mdit-py-plugins==0.4.1 +mdit-py-plugins==0.6.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py -myst-nb==1.2.0 +myst-nb==1.4.0 # via rocm-docs-core -myst-parser==3.0.1 +myst-parser==4.0.1 # via myst-nb -nbclient==0.10.2 +nbclient==0.11.0 # via # jupyter-cache # myst-nb @@ -128,81 +125,81 @@ nbformat==5.10.4 # jupyter-cache # myst-nb # nbclient -nest-asyncio==1.6.0 +nest-asyncio2==1.7.2 # via ipykernel -packaging==24.1 +packaging==26.2 # via # ipykernel # pydata-sphinx-theme # sphinx -parso==0.8.4 +parso==0.8.7 # via jedi pexpect==4.9.0 # via ipython -platformdirs==4.3.6 +platformdirs==4.10.0 # via jupyter-core -prompt-toolkit==3.0.50 +prompt-toolkit==3.0.52 # via ipython -psutil==7.0.0 +psutil==7.2.2 # via ipykernel ptyprocess==0.7.0 # via pexpect pure-eval==0.2.3 # via stack-data -pycparser==2.22 +pycparser==3.0 # via cffi pydata-sphinx-theme==0.15.4 # via # rocm-docs-core # sphinx-book-theme -pygithub==2.3.0 +pygithub==2.9.1 # via rocm-docs-core -pygments==2.18.0 +pygments==2.20.0 # via # accessible-pygments # ipython # pydata-sphinx-theme # sphinx -pyjwt[crypto]==2.8.0 +pyjwt[crypto]==2.13.0 # via pygithub -pynacl==1.5.0 +pynacl==1.6.2 # via pygithub python-dateutil==2.9.0.post0 # via jupyter-client -pyyaml==6.0.1 +pyyaml==6.0.3 # via # jupyter-cache # myst-nb # myst-parser # rocm-docs-core # sphinx-external-toc -pyzmq==26.2.1 +pyzmq==27.1.0 # via # ipykernel # jupyter-client -referencing==0.36.2 +referencing==0.37.0 # via # jsonschema # jsonschema-specifications -requests==2.32.3 +requests==2.34.2 # via # pygithub # sphinx -rocm-docs-core==1.31.3 +rocm-docs-core==1.35.0 # via -r requirements.in -rpds-py==0.22.3 +rpds-py==0.30.0 # via # jsonschema # referencing six==1.17.0 # via python-dateutil -smmap==5.0.1 +smmap==5.0.3 # via gitdb -snowballstemmer==2.2.0 +snowballstemmer==3.1.1 # via sphinx -soupsieve==2.5 +soupsieve==2.8.4 # via beautifulsoup4 -sphinx==7.4.5 +sphinx==8.1.3 # via # breathe # myst-nb @@ -213,44 +210,46 @@ sphinx==7.4.5 # sphinx-copybutton # sphinx-design # sphinx-external-toc + # sphinx-multitoc-numbering # sphinx-notfound-page sphinx-book-theme==1.1.4 # via rocm-docs-core sphinx-copybutton==0.5.2 # via rocm-docs-core -sphinx-design==0.6.0 +sphinx-design==0.6.1 # via rocm-docs-core -sphinx-external-toc==1.0.1 +sphinx-external-toc==1.1.0 # via rocm-docs-core -sphinx-notfound-page==1.0.2 +sphinx-multitoc-numbering==0.1.3 + # via sphinx-external-toc +sphinx-notfound-page==1.1.0 # via rocm-docs-core -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.10 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx -sqlalchemy==2.0.38 +sqlalchemy==2.0.50 # via jupyter-cache stack-data==0.6.3 # via ipython -tabulate==0.9.0 +tabulate==0.10.0 # via jupyter-cache -tomli==2.0.1 +tomli==2.4.1 # via sphinx -tornado==6.4.2 +tornado==6.5.7 # via # ipykernel # jupyter-client -traitlets==5.14.3 +traitlets==5.15.1 # via - # comm # ipykernel # ipython # jupyter-client @@ -258,21 +257,24 @@ traitlets==5.14.3 # matplotlib-inline # nbclient # nbformat -typing-extensions==4.12.2 +typing-extensions==4.15.0 # via + # beautifulsoup4 + # cryptography + # exceptiongroup # ipython + # jupyter-client # myst-nb # pydata-sphinx-theme # pygithub + # pyjwt # referencing # sqlalchemy -urllib3==2.2.2 +urllib3==2.7.0 # via # pygithub # requests -wcwidth==0.2.13 +wcwidth==0.8.1 # via prompt-toolkit -wrapt==1.16.0 - # via deprecated -zipp==3.21.0 +zipp==4.1.0 # via importlib-metadata diff --git a/docs/versions.md b/docs/versions.md new file mode 100644 index 000000000..828be0dae --- /dev/null +++ b/docs/versions.md @@ -0,0 +1,18 @@ +:orphan: + + + + + + + +# ROCm RVS release history + +| Version | Release date | +| ------- | ------------ | +| [1.5.122](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.5.122/) | July 15, 2026 | +| [1.4.21](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.4.21/) | May 15, 2026 | + +```{note} +RVS 1.4.21 is a technology preview release. For the latest production release, see the [RVS 1.3.0 documentation](https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/latest/). +``` From eeff30af8b264c464985f0cfc140865d84af75d0 Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Wed, 15 Jul 2026 18:19:01 -0400 Subject: [PATCH 239/275] Install doc updates for RVS 1.5.122 (#1253) * mi350p config cherrypick * remove iet single * Documentation - Additions, Corrections and Updates. (#1150) * Additions, Corrections and Updates in docs * update _toc.yml.in to display updated files on web * update index --------- Co-authored-by: Peter Park (cherry picked from commit 7417426ae98b727a8405f81f2baffdea290c7234) * docs: Update installation page for 7.13 (#1151) * docs(rvs): move installation.rst to build.rst * docs(rvs): add install page add link to compat * docs: update heading in `build.rst` * remove stale doc * fix yaml indentation breaking sphinx build (cherry picked from commit 555be6e6938f29b8d0ea6fc282e68c6f2b7f9fad) * docs: fix rocm core sdk docs url * Fix broken links in header & footer (#1178) * Fix broken link in header * fix per review * Update links and copyright info * update per review * Remove production releases from the list (#1189) * Update version slug * tighten wording * bump rocm-docs-core to 1.35.0 * hardcode interSphinx link (#1207) * Install RVS using native packages * update RVS versions * one more * add patch version * clarify install methods * add 1.5.122 rvs install doc * update RVS versions to 1.5.122 * add back transfer bench doc * update 7.14 install url * add notes * Update RVS install doc * add notes about transferbench * update lastest version * Revert "Merge branch 'master' into docs/1.5.122" This reverts commit dcd06c633555612af5ca8ea4c1b2cbe2b3250f5c, reversing changes made to 7720ab7ad9af538ede31b8b289965d27ac5b0a12. * use OS tabs * minor edits * update verification command * use external doc link --------- Co-authored-by: Davood Saffar Co-authored-by: Manoj S K Co-authored-by: Mohammed Junaid <88209527+jkottiku@users.noreply.github.com> Co-authored-by: Peter Park Co-authored-by: Alex Xu --- docs/index.rst | 5 +++ docs/install/installation.rst | 79 ++++++++++++++++++++++------------- docs/versions.md | 2 +- 3 files changed, 55 insertions(+), 31 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index e7573fe29..bf89738e0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,11 @@ RVS is a collection of tests, benchmarks, and qualification tools, each targetin For more information, refer to `GitHub. `_ +.. note:: + TransferBench is now a part of the ROCm Validation Suite and is installed with it. + See the `TransferBench documentation `__ for more information. + + .. grid:: 2 :gutter: 3 diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 28a783087..7984f622f 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -7,64 +7,82 @@ Install ROCm Validation Suite ***************************** ROCm Validation Suite (RVS) is supported on AMD Instinct and Radeon GPUs -supported by ROCm. See the `ROCm compatibilty matrix +supported by ROCm. See the `ROCm compatibility matrix `__ for support information. For advanced workflows, source builds, or custom configurations, see ``__. -Install RVS on Linux -==================== - -ROCm Validation Suite (RVS) is a ROCm Extra requiring the ROCm Core SDK to be -installed. +.. note:: + TransferBench is now a part of the ROCm Validation Suite and is installed with it. + See the `TransferBench documentation `__ for more information. -Install the ROCm Core SDK -------------------------- +Prerequisites +============= -For instructions, see `Install AMD ROCm `__. Use the +Install the ROCm Core SDK before installing RVS. For instructions, see `Install AMD ROCm +`__. Use the selector panel on that page to view instructions appropriate for your system environment. -Install RVS using package manager ----------------------------------- +Package manager installation +============================= -Use the following steps to install RVS using package manager on top of the ROCm Core SDK. +Use the following steps to install RVS using your distribution's package manager +on top of the ROCm Core SDK. -1. Download the RVS package. +1. Register the RVS repository. .. tab-set:: .. tab-item:: Ubuntu + :sync: ubuntu .. code-block:: bash - wget https://repo.amd.com/rocm/rvs/deb/amdrocm7-rvs_1.5.122-579_amd64.deb + sudo mkdir --parents --mode=0755 /etc/apt/keyrings + wget https://repo.amd.com/rocm/packages-multi-arch/gpg/rocm.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null + sudo tee /etc/apt/sources.list.d/rvs.list << EOF + deb [arch=amd64 signed-by=/etc/apt/keyrings/amdrocm.gpg] https://repo.amd.com/rocm/rvs/packages/deb/ stable main + EOF + + sudo apt update .. tab-item:: RHEL + :sync: rhel .. code-block:: bash - wget https://repo.amd.com/rocm/rvs/rpm/amdrocm7-rvs-1.5.122-579.el8.x86_64.rpm + sudo tee /etc/yum.repos.d/rvs.repo < Date: Wed, 15 Jul 2026 18:56:29 -0500 Subject: [PATCH 240/275] Make libpci static and cleanup. --- CMakeLists.txt | 62 ++++++++++++++++++++++++++++++++----- CMakePciutilsDownload.cmake | 40 ++++++++++++++++++++++++ babel.so/CMakeLists.txt | 2 +- babel.so/include/action.h | 7 ----- docs/ug1main.md | 4 +++ edp.so/CMakeLists.txt | 2 +- edp.so/include/action.h | 7 ----- edp.so/src/action.cpp | 1 - edp.so/src/edp_worker.cpp | 1 - gm.so/CMakeLists.txt | 2 +- gpup.so/CMakeLists.txt | 2 +- gst.so/CMakeLists.txt | 2 +- gst.so/include/action.h | 7 ----- iet.so/CMakeLists.txt | 2 +- iet.so/include/action.h | 7 ----- iet.so/src/action.cpp | 7 ----- mem.so/CMakeLists.txt | 2 +- mem.so/include/action.h | 7 ----- pbqt.so/CMakeLists.txt | 2 +- pbqt.so/src/action.cpp | 1 - pbqt.so/src/action_run.cpp | 1 - pbqt.so/src/rvs_module.cpp | 1 - pbqt.so/src/worker.cpp | 1 - pbqt.so/src/worker_b2b.cpp | 1 - pebb.so/CMakeLists.txt | 2 +- pebb.so/src/action.cpp | 1 - pebb.so/src/action_run.cpp | 1 - pebb.so/src/rvs_module.cpp | 1 - pebb.so/src/worker.cpp | 1 - pebb.so/src/worker_b2b.cpp | 1 - peqt.so/CMakeLists.txt | 2 +- perf.so/CMakeLists.txt | 2 +- perf.so/include/action.h | 7 ----- pesm.so/CMakeLists.txt | 2 +- pesm.so/src/action.cpp | 1 - pesm.so/src/rvs_module.cpp | 1 - pulse.so/CMakeLists.txt | 2 +- pulse.so/include/action.h | 7 ----- pulse.so/src/action.cpp | 7 ----- rvs/CMakeLists.txt | 2 +- smqt.so/CMakeLists.txt | 2 +- testif.so/CMakeLists.txt | 2 +- tst.so/CMakeLists.txt | 2 +- tst.so/include/action.h | 7 ----- tst.so/src/action.cpp | 7 ----- 45 files changed, 116 insertions(+), 115 deletions(-) create mode 100644 CMakePciutilsDownload.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 34581b32f..b275c74f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -480,27 +480,28 @@ elseif (YAML_CPP_SHARED_FOUND) endif() -# Package dependencies - yaml-cpp is conditionally required based on linking type +# Package dependencies - libpci3 is no longer a runtime dep (statically linked); +# yaml-cpp is conditionally required based on linking type if (YAML_CPP_STATIC_FOUND) # Static linking - no runtime yaml-cpp dependency needed if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libnuma1") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libnuma1") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libnuma1") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libnuma1") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, numactl-libs") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, numactl-libs") endif() message(STATUS "Package dependencies: yaml-cpp statically linked, no runtime dependency") else() # Dynamic linking - yaml-cpp runtime dependency required if (${RVS_OS_TYPE} STREQUAL "ubuntu") - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libpci3, libyaml-cpp-dev, libnuma1") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ROCM_DEB_DEPS}, libyaml-cpp-dev, libnuma1") elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libpci3, libyaml-cpp0_6, libnuma1") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, libyaml-cpp0_6, libnuma1") else () # other supported rpm distros - RHEL, CentOS - set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, pciutils-libs, yaml-cpp, numactl-libs") + set(CPACK_RPM_PACKAGE_REQUIRES "${ROCM_RPM_DEPS}, yaml-cpp, numactl-libs") endif() message(STATUS "Package dependencies: yaml-cpp dynamically linked, runtime dependency included") endif() @@ -582,6 +583,53 @@ if (NOT DEFINED MXDATAGENERATOR_INC_DIR) endif () ################################################################################ +################################################################################ +# pciutils - build libpci.a from source to ensure ABI consistency across distros +# (pci_dev struct layout changed between libpci 3.7.0/Ubuntu-22.04 and +# 3.10.0/Ubuntu-24.04; pinning to v3.7.0 and static linking eliminates the +# runtime ABI mismatch and guarantees a clean build on Ubuntu 22.04 kernel headers) +configure_file(CMakePciutilsDownload.cmake pciutils-download/CMakeLists.txt) +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pciutils-download ) +if(result) + message(FATAL_ERROR "CMake step for pciutils failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pciutils-download ) +if(result) + message(FATAL_ERROR "Clone step for pciutils failed: ${result}") +endif() + +# pciutils uses a Makefile; SHARED=no produces libpci.a (static archive only). +# CFLAGS=-fPIC is required because libpci.a is linked into .so modules. +# ZLIB=no disables gzip ID-database support (gzopen/gzgets) - not needed by RVS. +# HWDB=no disables udev hardware-DB lookups (udev_new etc.) - not needed by RVS. +execute_process( + COMMAND make lib/libpci.a SHARED=no ZLIB=no HWDB=no CFLAGS=-fPIC + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pciutils-src +) +if(result) + message(FATAL_ERROR "Build step for pciutils (libpci.a) failed: ${result}") +endif() + +# Arrange headers into include/pci/ so #include resolves correctly +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/pciutils-install/include/pci) +file(GLOB PCIUTILS_HEADERS "${CMAKE_BINARY_DIR}/pciutils-src/lib/*.h") +file(COPY ${PCIUTILS_HEADERS} DESTINATION "${CMAKE_BINARY_DIR}/pciutils-install/include/pci/") + +# Imported target used by all modules via ${LIBPCI_TARGET} +add_library(pci-static STATIC IMPORTED GLOBAL) +set_target_properties(pci-static PROPERTIES + IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pciutils-src/lib/libpci.a" + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/pciutils-install/include" +) +set(LIBPCI_TARGET pci-static) +message(STATUS "pciutils: statically linking libpci.a built from v3.7.0") +################################################################################ + ################################################################################ # TransferBench (vendored as a git submodule under external/TransferBench) # diff --git a/CMakePciutilsDownload.cmake b/CMakePciutilsDownload.cmake new file mode 100644 index 000000000..9cf38edfd --- /dev/null +++ b/CMakePciutilsDownload.cmake @@ -0,0 +1,40 @@ +################################################################################ +## +## Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +## +## MIT LICENSE: +## Permission is hereby granted, free of charge, to any person obtaining a copy of +## this software and associated documentation files (the "Software"), to deal in +## the Software without restriction, including without limitation the rights to +## use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +## of the Software, and to permit persons to whom the Software is furnished to do +## so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in all +## copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +## SOFTWARE. +## +################################################################################ + +cmake_minimum_required(VERSION 3.5.0) + +project(pciutils-download NONE) + +include(ExternalProject) +ExternalProject_Add(pciutils + GIT_REPOSITORY https://github.com/pciutils/pciutils.git + GIT_TAG v3.7.0 + SOURCE_DIR "${CMAKE_BINARY_DIR}/pciutils-src" + BINARY_DIR "${CMAKE_BINARY_DIR}/pciutils-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt index aa4b34ea7..08c3355c7 100644 --- a/babel.so/CMakeLists.txt +++ b/babel.so/CMakeLists.txt @@ -145,7 +145,7 @@ include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/rvs_stress.cpp src/rvs_stream.cpp src/rvs_memworker.cpp) diff --git a/babel.so/include/action.h b/babel.so/include/action.h index e2f5f1b96..c4290a613 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -25,13 +25,6 @@ #ifndef MEM_SO_INCLUDE_ACTION_H_ #define MEM_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/docs/ug1main.md b/docs/ug1main.md index 51409d08a..8ad03d8d9 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -1307,6 +1307,10 @@ control, status and capabilities registers. These registers are specified in the PCI Express Base Specification, Revision 3. Iteration keys, i.e. count, wait and duration will be ignored for actions using the PEQT module. +```{note} +The PEQT module requires elevated privileges. Run RVS with `sudo` when using this module. +``` + ### Module specific keys Module specific output keys are described in the table below: diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt index 512d2aea7..04c2eb43d 100644 --- a/edp.so/CMakeLists.txt +++ b/edp.so/CMakeLists.txt @@ -137,7 +137,7 @@ include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${Y # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libm.so) ## define source files set (SOURCES src/rvs_module.cpp src/action.cpp src/edp_worker.cpp ) diff --git a/edp.so/include/action.h b/edp.so/include/action.h index 8297e4466..688cb7d34 100644 --- a/edp.so/include/action.h +++ b/edp.so/include/action.h @@ -25,13 +25,6 @@ #ifndef EDP_SO_INCLUDE_ACTION_H_ #define EDP_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/edp.so/src/action.cpp b/edp.so/src/action.cpp index eacad634b..f1990539c 100644 --- a/edp.so/src/action.cpp +++ b/edp.so/src/action.cpp @@ -44,7 +44,6 @@ #include "include/rvsloglp.h" extern "C" { - #include #include } diff --git a/edp.so/src/edp_worker.cpp b/edp.so/src/edp_worker.cpp index 59b6ede4c..bace520f2 100644 --- a/edp.so/src/edp_worker.cpp +++ b/edp.so/src/edp_worker.cpp @@ -36,7 +36,6 @@ #include "include/rvstimer.h" extern "C" { - #include #include } diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt index 9d1ab2cef..bdcfb6aac 100644 --- a/gm.so/CMakeLists.txt +++ b/gm.so/CMakeLists.txt @@ -121,7 +121,7 @@ include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${YAML_CPP_INCLUDE_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp) diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt index d2775b6f9..f1fc9df24 100644 --- a/gpup.so/CMakeLists.txt +++ b/gpup.so/CMakeLists.txt @@ -112,7 +112,7 @@ include_directories(./ ../ include ../include ${YAML_CPP_INCLUDE_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${ROCR_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp) diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt index bdcb4b08a..7a553ae99 100644 --- a/gst.so/CMakeLists.txt +++ b/gst.so/CMakeLists.txt @@ -146,7 +146,7 @@ include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${H # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/gst_worker.cpp) diff --git a/gst.so/include/action.h b/gst.so/include/action.h index f89c34ddd..2e7b60d2d 100644 --- a/gst.so/include/action.h +++ b/gst.so/include/action.h @@ -25,13 +25,6 @@ #ifndef GST_SO_INCLUDE_ACTION_H_ #define GST_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt index 61b289e09..41a9098b0 100644 --- a/iet.so/CMakeLists.txt +++ b/iet.so/CMakeLists.txt @@ -163,7 +163,7 @@ include_directories(./ ../ ${AMD_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${AMD_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so ${LIBPCI_TARGET} libm.so) set(SOURCES src/rvs_module.cpp src/action.cpp src/iet_worker.cpp ) diff --git a/iet.so/include/action.h b/iet.so/include/action.h index 1010ede52..bea483fde 100644 --- a/iet.so/include/action.h +++ b/iet.so/include/action.h @@ -25,13 +25,6 @@ #ifndef IET_SO_INCLUDE_ACTION_H_ #define IET_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/iet.so/src/action.cpp b/iet.so/src/action.cpp index 4c8bb6e0e..553e62d61 100644 --- a/iet.so/src/action.cpp +++ b/iet.so/src/action.cpp @@ -34,13 +34,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #define __HIP_PLATFORM_HCC__ diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt index 978f550e7..04edd2f89 100644 --- a/mem.so/CMakeLists.txt +++ b/mem.so/CMakeLists.txt @@ -144,7 +144,7 @@ include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${R # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/rvs_memtest.cpp src/rvs_memworker.cpp) diff --git a/mem.so/include/action.h b/mem.so/include/action.h index 0c03afa09..7fe1957f6 100644 --- a/mem.so/include/action.h +++ b/mem.so/include/action.h @@ -25,13 +25,6 @@ #ifndef MEM_SO_INCLUDE_ACTION_H_ #define MEM_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt index afae4e735..9e14bdd5a 100644 --- a/pbqt.so/CMakeLists.txt +++ b/pbqt.so/CMakeLists.txt @@ -137,7 +137,7 @@ include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_ # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp diff --git a/pbqt.so/src/action.cpp b/pbqt.so/src/action.cpp index 3d8b9f458..c8b4e0598 100644 --- a/pbqt.so/src/action.cpp +++ b/pbqt.so/src/action.cpp @@ -25,7 +25,6 @@ #include "include/action.h" extern "C" { -#include #include } #include diff --git a/pbqt.so/src/action_run.cpp b/pbqt.so/src/action_run.cpp index cf782f915..68547e053 100644 --- a/pbqt.so/src/action_run.cpp +++ b/pbqt.so/src/action_run.cpp @@ -25,7 +25,6 @@ #include "include/action.h" extern "C" { -#include #include } #include diff --git a/pbqt.so/src/rvs_module.cpp b/pbqt.so/src/rvs_module.cpp index 08ad32e10..2a8c26bcd 100644 --- a/pbqt.so/src/rvs_module.cpp +++ b/pbqt.so/src/rvs_module.cpp @@ -24,7 +24,6 @@ *******************************************************************************/ #include "include/rvs_module.h" -#include #include #include "include/rvsloglp.h" diff --git a/pbqt.so/src/worker.cpp b/pbqt.so/src/worker.cpp index a395f33c7..09cbd4c05 100644 --- a/pbqt.so/src/worker.cpp +++ b/pbqt.so/src/worker.cpp @@ -27,7 +27,6 @@ #ifdef __cplusplus extern "C" { #endif -#include #include #ifdef __cplusplus } diff --git a/pbqt.so/src/worker_b2b.cpp b/pbqt.so/src/worker_b2b.cpp index 870bdee2c..485691f00 100644 --- a/pbqt.so/src/worker_b2b.cpp +++ b/pbqt.so/src/worker_b2b.cpp @@ -27,7 +27,6 @@ #ifdef __cplusplus extern "C" { #endif - #include #include #ifdef __cplusplus } diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt index 669d0977a..5f0e9397b 100644 --- a/pebb.so/CMakeLists.txt +++ b/pebb.so/CMakeLists.txt @@ -138,7 +138,7 @@ include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_ # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp diff --git a/pebb.so/src/action.cpp b/pebb.so/src/action.cpp index 2a88a8ddf..1b995c46c 100644 --- a/pebb.so/src/action.cpp +++ b/pebb.so/src/action.cpp @@ -25,7 +25,6 @@ #include "include/action.h" extern "C" { - #include #include } #include diff --git a/pebb.so/src/action_run.cpp b/pebb.so/src/action_run.cpp index d668c728d..f8f77e925 100644 --- a/pebb.so/src/action_run.cpp +++ b/pebb.so/src/action_run.cpp @@ -25,7 +25,6 @@ #include "include/action.h" extern "C" { - #include #include } #include diff --git a/pebb.so/src/rvs_module.cpp b/pebb.so/src/rvs_module.cpp index b0213b9a4..fbea2adbf 100644 --- a/pebb.so/src/rvs_module.cpp +++ b/pebb.so/src/rvs_module.cpp @@ -24,7 +24,6 @@ *******************************************************************************/ #include "include/rvs_module.h" -#include #include #include diff --git a/pebb.so/src/worker.cpp b/pebb.so/src/worker.cpp index 60e21ebc9..67be29e40 100644 --- a/pebb.so/src/worker.cpp +++ b/pebb.so/src/worker.cpp @@ -27,7 +27,6 @@ #ifdef __cplusplus extern "C" { #endif - #include #include #ifdef __cplusplus } diff --git a/pebb.so/src/worker_b2b.cpp b/pebb.so/src/worker_b2b.cpp index 33979a47c..06baa1a56 100644 --- a/pebb.so/src/worker_b2b.cpp +++ b/pebb.so/src/worker_b2b.cpp @@ -27,7 +27,6 @@ #ifdef __cplusplus extern "C" { #endif - #include #include #ifdef __cplusplus } diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt index 354035476..998a99fd6 100644 --- a/peqt.so/CMakeLists.txt +++ b/peqt.so/CMakeLists.txt @@ -110,7 +110,7 @@ include_directories(./ ../ ${HSA_INC_DIR}) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${HSA_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp) diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt index 1f135ce23..507d1cd40 100644 --- a/perf.so/CMakeLists.txt +++ b/perf.so/CMakeLists.txt @@ -146,7 +146,7 @@ include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${H # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${HIP_LIB_DIR} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/perf_worker.cpp) diff --git a/perf.so/include/action.h b/perf.so/include/action.h index 37570b8ae..d2024497e 100644 --- a/perf.so/include/action.h +++ b/perf.so/include/action.h @@ -25,13 +25,6 @@ #ifndef PERF_SO_INCLUDE_ACTION_H_ #define PERF_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt index a04f2fd0c..1bee86352 100644 --- a/pesm.so/CMakeLists.txt +++ b/pesm.so/CMakeLists.txt @@ -110,7 +110,7 @@ include_directories(./ ../ pci) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS libpthread.so ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp) diff --git a/pesm.so/src/action.cpp b/pesm.so/src/action.cpp index e9872d244..8786348eb 100644 --- a/pesm.so/src/action.cpp +++ b/pesm.so/src/action.cpp @@ -25,7 +25,6 @@ #include "include/action.h" extern "C" { -#include #include } diff --git a/pesm.so/src/rvs_module.cpp b/pesm.so/src/rvs_module.cpp index 0ec005f01..f5e28bca8 100644 --- a/pesm.so/src/rvs_module.cpp +++ b/pesm.so/src/rvs_module.cpp @@ -24,7 +24,6 @@ *******************************************************************************/ #include "include/rvs_module.h" -#include #include #include diff --git a/pulse.so/CMakeLists.txt b/pulse.so/CMakeLists.txt index 5433635f5..01d2f4e53 100644 --- a/pulse.so/CMakeLists.txt +++ b/pulse.so/CMakeLists.txt @@ -156,7 +156,7 @@ include_directories(./ ../ ${AMD_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${AMD_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so libm.so) set(SOURCES src/rvs_module.cpp src/action.cpp src/pulse_worker.cpp ) diff --git a/pulse.so/include/action.h b/pulse.so/include/action.h index a999f0c40..b61d682e7 100644 --- a/pulse.so/include/action.h +++ b/pulse.so/include/action.h @@ -25,13 +25,6 @@ #ifndef PULSE_SO_INCLUDE_ACTION_H_ #define PULSE_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/pulse.so/src/action.cpp b/pulse.so/src/action.cpp index e7889f6b2..07f7affac 100644 --- a/pulse.so/src/action.cpp +++ b/pulse.so/src/action.cpp @@ -31,13 +31,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #define __HIP_PLATFORM_HCC__ #include "hip/hip_runtime.h" diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 8cf750224..986fb0389 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -124,7 +124,7 @@ set(CORE_RUNTIME_NAME "hsa-runtime") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") -set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_TARGET}) +set(PROJECT_LINK_LIBS libdl.so libpthread.so ${LIBPCI_TARGET} ${YAML_CPP_TARGET}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt index 806422abf..fca4cfb4c 100644 --- a/smqt.so/CMakeLists.txt +++ b/smqt.so/CMakeLists.txt @@ -109,7 +109,7 @@ include_directories(./ ../ pci) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCR_LIB_DIR}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib ${LIBPCI_TARGET} libm.so) ## define source files set(SOURCES src/rvs_module.cpp src/action.cpp) diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt index 239912bbf..81cf44173 100644 --- a/testif.so/CMakeLists.txt +++ b/testif.so/CMakeLists.txt @@ -111,7 +111,7 @@ include_directories(./ ../ pci) # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ## additional libraries -set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS libpthread.so libm.so) ## define source files ## set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp) diff --git a/tst.so/CMakeLists.txt b/tst.so/CMakeLists.txt index f604f1ba6..ead3e651c 100644 --- a/tst.so/CMakeLists.txt +++ b/tst.so/CMakeLists.txt @@ -158,7 +158,7 @@ include_directories(./ ../ ${AMD_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${AMD_SMI_LIB_DIR} ${ASAN_LIB_PATH}) ## additional libraries -set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) +set (PROJECT_LINK_LIBS rvslib libpthread.so ${LIBPCI_TARGET} libm.so) set(SOURCES src/rvs_module.cpp src/action.cpp src/tst_worker.cpp ) diff --git a/tst.so/include/action.h b/tst.so/include/action.h index 56012b3a7..98e7e2efe 100644 --- a/tst.so/include/action.h +++ b/tst.so/include/action.h @@ -25,13 +25,6 @@ #ifndef TST_SO_INCLUDE_ACTION_H_ #define TST_SO_INCLUDE_ACTION_H_ -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #include diff --git a/tst.so/src/action.cpp b/tst.so/src/action.cpp index b52220a5a..dfac0ab67 100644 --- a/tst.so/src/action.cpp +++ b/tst.so/src/action.cpp @@ -34,13 +34,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif -#include -#ifdef __cplusplus -} -#endif #include #define __HIP_PLATFORM_HCC__ From 1c1c64952e3187ab2dad5b8d74f36dafdaceeb2f Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 16 Jul 2026 10:11:00 -0700 Subject: [PATCH 241/275] Update Transferbench to v1.69.00 --- external/TransferBench | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/TransferBench b/external/TransferBench index c78c4aec9..5fbfa95a1 160000 --- a/external/TransferBench +++ b/external/TransferBench @@ -1 +1 @@ -Subproject commit c78c4aec95e5e8317ddecdf6e224443f63473312 +Subproject commit 5fbfa95a1111a7f33f20b9780e5f22bf739f82fa From 902901c5eb580763daa8423dd400c953777af332 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 16 Jul 2026 13:32:12 -0700 Subject: [PATCH 242/275] add ibverb header from Transferbench TransferBench v1.69+ adds `third-party/ibverbs/` headers (`IbvDynLoad.hpp`). RVS auto-detects that directory at configure time and adds it to the PEBB/PBQT include path (`TRANSFERBENCH_IBVERBS_INC_DIR` in the root `CMakeLists.txt`). When the folder is absent (older submodule pins), no extra includes or `libdl` link are applied. Runtime `libibverbs` is loaded dynamically only if present; PEBB/PBQT gfx/dma tests do not require it. --- CMakeLists.txt | 8 ++++++++ docs/transferbench.md | 7 +++++++ pbqt.so/CMakeLists.txt | 6 ++++++ pebb.so/CMakeLists.txt | 6 ++++++ 4 files changed, 27 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34581b32f..74b10e4cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -603,6 +603,14 @@ if(NOT DEFINED TRANSFERBENCH_INC_DIR) message(STATUS "TRANSFERBENCH_INC_DIR ${TRANSFERBENCH_INC_DIR}") endif() +# TransferBench v1.69+: TransferBench.hpp includes IbvDynLoad.hpp from third-party/ibverbs. +# Omit when folder absent so older submodule pins remain buildable. +set(TRANSFERBENCH_IBVERBS_INC_DIR "") +if(EXISTS "${TRANSFERBENCH_SOURCE_DIR}/third-party/ibverbs") + set(TRANSFERBENCH_IBVERBS_INC_DIR "${TRANSFERBENCH_SOURCE_DIR}/third-party/ibverbs") + message(STATUS "TRANSFERBENCH_IBVERBS_INC_DIR ${TRANSFERBENCH_IBVERBS_INC_DIR}") +endif() + option(BUILD_TRANSFERBENCH_CLI "Build and install the TransferBench CLI alongside rvs" OFF) diff --git a/docs/transferbench.md b/docs/transferbench.md index 31fc812b3..69ee30f5c 100644 --- a/docs/transferbench.md +++ b/docs/transferbench.md @@ -115,6 +115,13 @@ so a given RVS tag always bundles a known-good TransferBench revision. To move to a newer TransferBench, update the submodule pointer in a normal pull request against RVS. +TransferBench v1.69+ adds `third-party/ibverbs/` headers (`IbvDynLoad.hpp`). +RVS auto-detects that directory at configure time and adds it to the PEBB/PBQT +include path (`TRANSFERBENCH_IBVERBS_INC_DIR` in the root `CMakeLists.txt`). +When the folder is absent (older submodule pins), no extra includes or `libdl` +link are applied. Runtime `libibverbs` is loaded dynamically only if present; +PEBB/PBQT gfx/dma tests do not require it. + ## Further reading - [TransferBench project](https://github.com/ROCm/TransferBench) diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt index afae4e735..e41d915c3 100644 --- a/pbqt.so/CMakeLists.txt +++ b/pbqt.so/CMakeLists.txt @@ -134,6 +134,9 @@ endif() ## define include directories include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${TRANSFERBENCH_INC_DIR}) +if(TRANSFERBENCH_IBVERBS_INC_DIR) + include_directories(${TRANSFERBENCH_IBVERBS_INC_DIR}) +endif() # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries @@ -149,6 +152,9 @@ set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET}) +if(TRANSFERBENCH_IBVERBS_INC_DIR) + target_link_libraries(${RVS_TARGET} ${CMAKE_DL_LIBS}) +endif() add_dependencies(${RVS_TARGET} rvslib) add_custom_command(TARGET ${RVS_TARGET} POST_BUILD diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt index 669d0977a..9058fda9e 100644 --- a/pebb.so/CMakeLists.txt +++ b/pebb.so/CMakeLists.txt @@ -135,6 +135,9 @@ endif() ## define include directories include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${TRANSFERBENCH_INC_DIR}) +if(TRANSFERBENCH_IBVERBS_INC_DIR) + include_directories(${TRANSFERBENCH_IBVERBS_INC_DIR}) +endif() # Add directories to look for library files to link link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${AMD_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries @@ -150,6 +153,9 @@ set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET}) +if(TRANSFERBENCH_IBVERBS_INC_DIR) + target_link_libraries(${RVS_TARGET} ${CMAKE_DL_LIBS}) +endif() add_dependencies(${RVS_TARGET} rvslib) add_custom_command(TARGET ${RVS_TARGET} POST_BUILD From 6ade1a64e72a143f768e460c3de15ae3124f8b46 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 1 Jun 2026 14:54:02 -0700 Subject: [PATCH 243/275] workflow cleanup to remove file This is to cleanup the workspace after build is done.This helps to reclaim disk space while running parallel jobs. --- .../workflows/build-relocatable-packages.yml | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-relocatable-packages.yml b/.github/workflows/build-relocatable-packages.yml index d158b3fca..e94d7965b 100644 --- a/.github/workflows/build-relocatable-packages.yml +++ b/.github/workflows/build-relocatable-packages.yml @@ -180,9 +180,36 @@ jobs: out.write(f"branches_json={payload}\n") PY + # Runs on the host (no job container) so we can reclaim runner disk before Docker + # image pulls and ROCm SDK extracts. Failures here are often "No space left on device". + runner-disk-prep: + name: Free runner disk space + runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} + steps: + - name: Free disk space (GitHub-hosted runners) + if: runner.environment == 'github-hosted' + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + + - name: Prune Docker and report disk usage + run: | + echo "=== Disk before prune ===" + df -h / || df -h + if command -v docker >/dev/null 2>&1; then + docker system prune -af --volumes || true + fi + echo "=== Disk after prune ===" + df -h / || df -h + build-ubuntu: name: Build Ubuntu Packages (${{ matrix.branch }}) - needs: prepare-nightly-branches + needs: [prepare-nightly-branches, runner-disk-prep] runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-22.04' }} container: image: ubuntu:22.04 @@ -217,6 +244,7 @@ jobs: apt-utils \ python3 \ python3-pip + rm -rf /var/lib/apt/lists/* - name: Checkout Repository uses: actions/checkout@v4 @@ -256,6 +284,7 @@ jobs: # Container runs as root; ROCM_SDK_* come from "Configure ROCm SDK channel" via GITHUB_ENV. ./build_packages_local.sh + # Print the resulting download URL in the step log and run Summary. - name: Print local package download URL if: vars.LOCAL_PACKAGE_SERVER_URL != '' @@ -275,6 +304,13 @@ jobs: echo "[$URL]($URL)" } >> "$GITHUB_STEP_SUMMARY" + - name: Remove ROCm SDK tree after build + if: always() + run: | + rm -rf "$HOME/rocm-sdk" 2>/dev/null || true + df -h / || df -h + + - name: Verify DEB Package run: | cd ./build @@ -368,7 +404,7 @@ jobs: build-centos: name: Build CentOS/RHEL Packages (${{ matrix.branch }}) - needs: prepare-nightly-branches + needs: [prepare-nightly-branches, runner-disk-prep] runs-on: ${{ vars.RUNNER_LABEL_CONTAINER || 'ubuntu-latest' }} container: image: quay.io/pypa/manylinux_2_28_x86_64 From 72bb18ba76a9e5fe4d029c96e36c1984149c11dc Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 20 Jul 2026 18:07:19 -0500 Subject: [PATCH 244/275] Update module output examples. --- docs/ug1main.md | 1464 +++++++++++++++++++++-------------------------- 1 file changed, 665 insertions(+), 799 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index 346be2925..aa8be8b98 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -587,143 +587,74 @@ format will be returned: ### Examples -**Example 1:** - -Consider action: - - actions: - - name: action_1 - device: all - module: gpup - properties: - all: - io_links-properties: - all: - -Action will display all properties for all compatible GPUs present in the -system. Output for such configuration may be like this: - - [RESULT] [597737.498442] action_1 gpup 3254 cpu_cores_count 0 - [RESULT] [597737.498517] action_1 gpup 3254 simd_count 256 - [RESULT] [597737.498558] action_1 gpup 3254 mem_banks_count 1 - [RESULT] [597737.498598] action_1 gpup 3254 caches_count 96 - [RESULT] [597737.498637] action_1 gpup 3254 io_links_count 1 - [RESULT] [597737.498680] action_1 gpup 3254 cpu_core_id_base 0 - [RESULT] [597737.498725] action_1 gpup 3254 simd_id_base 2147487744 - [RESULT] [597737.498768] action_1 gpup 3254 max_waves_per_simd 10 - [RESULT] [597737.498812] action_1 gpup 3254 lds_size_in_kb 64 - [RESULT] [597737.498856] action_1 gpup 3254 gds_size_in_kb 0 - [RESULT] [597737.498901] action_1 gpup 3254 wave_front_size 64 - [RESULT] [597737.498945] action_1 gpup 3254 array_count 4 - [RESULT] [597737.498990] action_1 gpup 3254 simd_arrays_per_engine 1 - [RESULT] [597737.499035] action_1 gpup 3254 cu_per_simd_array 16 - [RESULT] [597737.499081] action_1 gpup 3254 simd_per_cu 4 - [RESULT] [597737.499128] action_1 gpup 3254 max_slots_scratch_cu 32 - [RESULT] [597737.499175] action_1 gpup 3254 vendor_id 4098 - [RESULT] [597737.499222] action_1 gpup 3254 device_id 26720 - [RESULT] [597737.499270] action_1 gpup 3254 location_id 8960 - [RESULT] [597737.499318] action_1 gpup 3254 drm_render_minor 128 - [RESULT] [597737.499369] action_1 gpup 3254 max_engine_clk_ccompute 2200 - [RESULT] [597737.499419] action_1 gpup 3254 local_mem_size 17163091968 - [RESULT] [597737.499468] action_1 gpup 3254 fw_version 405 - [RESULT] [597737.499518] action_1 gpup 3254 capability 8832 - [RESULT] [597737.499569] action_1 gpup 3254 max_engine_clk_ccompute 2200 - [RESULT] [597737.499633] action_1 gpup 3254 0 count 1 - [RESULT] [597737.499675] action_1 gpup 3254 0 type 2 - [RESULT] [597737.499695] action_1 gpup 3254 0 version_major 0 - [RESULT] [597737.499716] action_1 gpup 3254 0 version_minor 0 - [RESULT] [597737.499736] action_1 gpup 3254 0 node_from 4 - [RESULT] [597737.499763] action_1 gpup 3254 0 node_to 1 - [RESULT] [597737.499783] action_1 gpup 3254 0 weight 20 - [RESULT] [597737.499808] action_1 gpup 3254 0 min_latency 0 - [RESULT] [597737.499830] action_1 gpup 3254 0 max_latency 0 - [RESULT] [597737.499853] action_1 gpup 3254 0 min_bandwidth 0 - [RESULT] [597737.499878] action_1 gpup 3254 0 max_bandwidth 0 - [RESULT] [597737.499902] action_1 gpup 3254 0 recommended_transfer_size 0 - [RESULT] [597737.499927] action_1 gpup 3254 0 flags 1 - [RESULT] [597737.500208] action_1 gpup 50599 cpu_cores_count 0 - [RESULT] [597737.500254] action_1 gpup 50599 simd_count 256 - ... - [RESULT] [597737.501603] action_1 gpup 50599 0 recommended_transfer_size 0 - [RESULT] [597737.501626] action_1 gpup 50599 0 flags 1 - [RESULT] [597737.501877] action_1 gpup 33367 cpu_cores_count 0 - [RESULT] [597737.501921] action_1 gpup 33367 simd_count 256 - ... - [RESULT] [597737.503258] action_1 gpup 33367 0 recommended_transfer_size 0 - [RESULT] [597737.503282] action_1 gpup 33367 0 flags 1 - ... - -**Example 2:** - -Consider action: +**Example:** - actions: - - name: action_1 - device: all - module: gpup - properties: - simd_count: - mem_banks_count: - io_links_count: - vendor_id: - device_id: - location_id: - max_engine_clk_ccompute: - io_links-properties: - version_major: - type: - version_major: - version_minor: - node_from: - node_to: - recommended_transfer_size: - flags: - -This action explicitly lists some of the properties. -Output for such configuration may be: - - [RESULT] [597868.690637] action_1 gpup 3254 device_id 26720 - [RESULT] [597868.690713] action_1 gpup 3254 io_links_count 1 - [RESULT] [597868.690766] action_1 gpup 3254 location_id 8960 - [RESULT] [597868.690819] action_1 gpup 3254 max_engine_clk_ccompute 2200 - [RESULT] [597868.690862] action_1 gpup 3254 mem_banks_count 1 - [RESULT] [597868.690903] action_1 gpup 3254 simd_count 256 - [RESULT] [597868.690950] action_1 gpup 3254 vendor_id 4098 - [RESULT] [597868.691029] action_1 gpup 3254 0 flags 1 - [RESULT] [597868.691053] action_1 gpup 3254 0 node_from 4 - [RESULT] [597868.691075] action_1 gpup 3254 0 node_to 1 - [RESULT] [597868.691099] action_1 gpup 3254 0 recommended_transfer_size 0 - [RESULT] [597868.691119] action_1 gpup 3254 0 type 2 - [RESULT] [597868.691138] action_1 gpup 3254 0 version_major 0 - [RESULT] [597868.691158] action_1 gpup 3254 0 version_minor 0 - [RESULT] [597868.691425] action_1 gpup 50599 device_id 26720 - [RESULT] [597868.691469] action_1 gpup 50599 io_links_count 1 - [RESULT] [597868.691517] action_1 gpup 50599 location_id 17152 - ... - [RESULT] [597868.692159] action_1 gpup 33367 device_id 26720 - [RESULT] [597868.692204] action_1 gpup 33367 io_links_count 1 - [RESULT] [597868.692252] action_1 gpup 33367 location_id 25344 - ... - [RESULT] [597868.692619] action_1 gpup 33367 0 version_minor 0 +Run: -**Example 3:** + ./rvs -c conf/gpup_single.conf -Consider this action: +Configuration (`conf/gpup_single.conf`, first action): actions: - - name: action_1 + - name: RVS-GPUP-TC1 device: all module: gpup - deviceid: 267 properties: all: io_links-properties: all: -Action lists deviceid 267 which is not present in the system. -Output for such configuration is: - - RVS-ERROR [GPUP] [action_1] invalid 'deviceid' key value +Sample output (first action, abridged): + + [RESULT] [302733.913494] Action name :RVS-GPUP-TC1 + [RESULT] [302733.975662] Module name :gpup + [RESULT] [302733.975835] [RVS-GPUP-TC1] gpup 42583 cpu_cores_count 0 + [RESULT] [302733.975836] [RVS-GPUP-TC1] gpup 42583 simd_count 1024 + [RESULT] [302733.975836] [RVS-GPUP-TC1] gpup 42583 mem_banks_count 1 + [RESULT] [302733.975836] [RVS-GPUP-TC1] gpup 42583 caches_count 550 + [RESULT] [302733.975837] [RVS-GPUP-TC1] gpup 42583 io_links_count 8 + [RESULT] [302733.975837] [RVS-GPUP-TC1] gpup 42583 p2p_links_count 1 + [RESULT] [302733.975837] [RVS-GPUP-TC1] gpup 42583 cpu_core_id_base 0 + [RESULT] [302733.975838] [RVS-GPUP-TC1] gpup 42583 simd_id_base 2147487744 + ... + [RESULT] [302733.976401] [RVS-GPUP-TC1] gpup 57875 7 version_major 0 + [RESULT] [302733.976401] [RVS-GPUP-TC1] gpup 57875 7 version_minor 0 + [RESULT] [302733.976402] [RVS-GPUP-TC1] gpup 57875 7 node_from 9 + [RESULT] [302733.976402] [RVS-GPUP-TC1] gpup 57875 7 node_to 8 + [RESULT] [302733.976402] [RVS-GPUP-TC1] gpup 57875 7 weight 15 + [RESULT] [302733.976403] [RVS-GPUP-TC1] gpup 57875 7 min_latency 0 + [RESULT] [302733.976403] [RVS-GPUP-TC1] gpup 57875 7 max_latency 0 + [RESULT] [302733.976403] [RVS-GPUP-TC1] gpup 57875 7 min_bandwidth 0 + [RESULT] [302733.976403] [RVS-GPUP-TC1] gpup 57875 7 recommended_transfer_size 0 + [RESULT] [302733.976404] [RVS-GPUP-TC1] gpup 57875 7 flags 1 + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | RVS-GPUP-TC1 | GPUP | PASS | + +---------------------------------------------------------------------+ ## GM module @@ -875,122 +806,79 @@ reported: ### Examples -**Example 1:** - -Consider action: - - actions: - - name: action_1 - module: gm - device: all - monitor: true - metrics: - temp: true 20 0 - fan: true 10 0 - duration: 5000 - - name: another_action - ... +**Example:** -This action will monitor temperature and fan speed for 5 seconds and then continue -with the next action. Output for such configuration may be: - - [RESULT] [694381.521373] [action_1] gm 33367 started - [INFO ] [694381.531803] action_1 gm 33367 monitoring temp bounds min:0 max:20 - [INFO ] [694381.531817] action_1 gm 33367 monitoring temp bounds min:0 max:20 - [INFO ] [694381.531828] action_1 gm 33367 monitoring fan bounds min:0 max:10 - [RESULT] [694381.521373] [action_1] gm 3254 started - [INFO ] [694381.532257] action_1 gm 3254 monitoring temp bounds min:0 max:20 - [INFO ] [694381.532276] action_1 gm 3254 monitoring temp bounds min:0 max:20 - [INFO ] [694381.532293] action_1 gm 3254 monitoring fan bounds min:0 max:10 - [RESULT] [694381.521373] [action_1] gm 50599 started - [INFO ] [694381.534471] action_1 gm 50599 monitoring temp bounds min:0 max:20 - [INFO ] [694381.534487] action_1 gm 50599 monitoring temp bounds min:0 max:20 - [INFO ] [694381.534502] action_1 gm 50599 monitoring fan bounds min:0 max:10 - [INFO ] [694381.534623] action_1 gm 33367 temp bounds violation 22C - [INFO ] [694381.534822] action_1 gm 3254 temp bounds violation 22C - [INFO ] [694381.534946] action_1 gm 50599 temp bounds violation 22C - [INFO ] [694382.535329] action_1 gm 33367 temp bounds violation 22C - ... - [INFO ] [694385.537777] action_1 gm 50599 temp bounds violation 21C - [RESULT] [694386.538037] [action_1] gm 3254 stopped - [RESULT] [694386.538037] [action_1] gm 50599 stopped - [RESULT] [694386.538037] [action_1] gm 33367 stopped - [RESULT] [694386.521449] [action_1] gm 3254 temp violations 1 - [RESULT] [694386.521449] [action_1] gm 3254 temp average 19C - [RESULT] [694386.521449] [action_1] gm 3254 fan violations 0 - [RESULT] [694386.521449] [action_1] gm 3254 fan average 0% - [RESULT] [694386.521449] [action_1] gm 50599 temp violations 5 - [RESULT] [694386.521449] [action_1] gm 50599 temp average 21C - [RESULT] [694386.521449] [action_1] gm 50599 fan violations 0 - [RESULT] [694386.521449] [action_1] gm 50599 fan average 0% - [RESULT] [694386.521449] [action_1] gm 33367 temp violations 5 - [RESULT] [694386.521449] [action_1] gm 33367 temp average 22C - [RESULT] [694386.521449] [action_1] gm 33367 fan violations 0 - [RESULT] [694386.521449] [action_1] gm 33367 fan average 0% +Run: -**Example 2:** + ./rvs -c conf/gm_single.conf -Consider action: +Configuration (`conf/gm_single.conf`, first action): actions: - - name: action_1 + - name: metrics_monitor module: gm device: all monitor: true metrics: - temp: true 20 0 - fan: true 10 0 - power: true 100 0 - sample_interval: 1000 - log_interval: 1200 - terminate: false - duration: 5000 - -This configuration is similar to that in *Example 1* but has explicitly -given values for *sample_interval* and *log_interval*. Output is similar to -the previous one but averaging and the printout are performed at a different -rate. - -**Example 3:** - -Consider action with syntax error ('temp' key is missing lower value): - - actions: - - name: action_1 - module: gm - device: 33367 50599 - monitor: true - metrics: - temp: true 20 - fan: true 10 0 - power: true 100 0 - sample_interval: 1000 - log_interval: 1200 - -Output for such configuration is: - - RVS-ERROR [GM] [action_1] Invalid 'metrics.temp' key. - -**Example 4:** - -Consider action with logical error: - - actions: - - name: action_1 - module: gm - device: all - monitor: true - metrics: - temp: false 20 0 - clock: true 1500 852 - power: true 100 0 - sample_interval: 5000 - log_interval: 4000 - duration: 8000 - -Output for such configuration is: + temp: true 100 0 + fan: true 100 0 + mem_clock: true 1000 0 + clock: true 1000 0 + power: true 750 0 + duration: 10000 - RVS-ERROR [GM] [action_1] Log interval has the lower value than the sample interval +Sample output (first action, abridged): + + [RESULT] [302734.420713] Action name :metrics_monitor + [RESULT] [302734.503180] Module name :gm + [RESULT] [302734.503340] [metrics_monitor] gm 1590 started + [RESULT] [302734.503340] [metrics_monitor] gm 11806 started + [RESULT] [302734.503340] [metrics_monitor] gm 17010 started + [RESULT] [302734.503340] [metrics_monitor] gm 27226 started + [RESULT] [302734.503340] [metrics_monitor] gm 36479 started + [RESULT] [302734.503340] [metrics_monitor] gm 42583 started + [RESULT] [302734.503340] [metrics_monitor] gm 51771 started + [RESULT] [302734.503340] [metrics_monitor] gm 57875 started + ... + [RESULT] [302744.940440] [metrics_monitor] gm 57875 temp violations 0 + [RESULT] [302744.940440] [metrics_monitor] gm 57875 temp average 0C + [RESULT] [302744.940440] [metrics_monitor] gm 57875 clock violations 0 + [RESULT] [302744.940440] [metrics_monitor] gm 57875 clock average 128MHz + [RESULT] [302744.940440] [metrics_monitor] gm 57875 mem_clock violations 0 + [RESULT] [302744.940440] [metrics_monitor] gm 57875 mem_clock average 128MHz + [RESULT] [302744.940440] [metrics_monitor] gm 57875 fan violations 0 + [RESULT] [302744.940440] [metrics_monitor] gm 57875 fan average 0% + [RESULT] [302744.940440] [metrics_monitor] gm 57875 power violations 0 + [RESULT] [302744.940440] [metrics_monitor] gm 57875 power average 139992336Watts + [RESULT] [302745.228794] [metrics_monitor] gm 57875 stopped + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | metrics_monitor | GM | PASS | + +---------------------------------------------------------------------+ ## PESM module @@ -1198,34 +1086,95 @@ The check will emit a result message with the following format: #### Examples -**Example 1:** +**Example:** -In this example, given package has all dependencies installed. +Run: + + ./rvs -c conf/rcqt_single.conf + +Configuration (`conf/rcqt_single.conf`, first action): actions: - name: metapackage-validation + device: all module: rcqt - package: rocm-ml-sdk - -The output for such configuration is: - - [RESULT] [3648664.1164 ] Action name :metapackage-validation - [RESULT] [3648664.1363 ] Module name :rcqt - - Meta package rocm-ml-sdk : - Package miopen-hip-dev installed version is 3.3.0.60300 - Package rocm-core installed version is 6.3.0.60300 - Package rocm-hip-sdk installed version is 6.3.0.60300 - Package rocm-ml-libraries installed version is 6.3.0.60300 + package: rocm rocm-developer-tools rocm-openmp rocm-opencl-sdk rocm-hip + +Sample output (first action, abridged): + + [RESULT] [302695.777282] Action name :metapackage-validation + [RESULT] [302695.777442] Module name :rcqt + Meta package rocm : + json log file is /var/tmp/rvs_1784325458865.json + Package half installed version is 1.12.0.70201 + Package migraphx installed version is 2.15.0.70201 + Package migraphx-dev installed version is 2.15.0.70201 + Package miopen-hip installed version is 3.5.1.70201 + Package miopen-hip-dev installed version is 3.5.1.70201 + Package mivisionx installed version is 3.5.0.70201 + Package mivisionx-dev installed version is 3.5.0.70201 + Package rocm-cmake installed version is 0.14.0.70201 + Package rocm-core installed version is 7.2.1.70201 + Package rocm-developer-tools installed version is 7.2.1.70201 + Package rocm-hip installed version is 7.2.1.70201 + Package rocm-llvm installed version is 22.0.0.26084.70201 + Package rocm-opencl-sdk installed version is 7.2.1.70201 + Package rocm-openmp installed version is 7.2.1.70201 + Package rocminfo installed version is 1.0.0.70201 + Package rpp installed version is 2.2.1.70201 + Package rpp-dev installed version is 2.2.1.70201 Meta package validation complete : - Total packages validated : 4 - Installed packages : 4 + Total packages validated : 17 + Installed packages : 17 + Missing packages : 0 + Version mismatch packages : 0 + ... + Package rocm-smi-lib installed version is 7.8.0.70201 + Package rocminfo installed version is 1.0.0.70201 + Package rocprim-dev installed version is 4.2.0.70201 + Package rocrand installed version is 4.2.0.70201 + Package rocrand-dev installed version is 4.2.0.70201 + Package rocsolver installed version is 3.32.0.70201 + Package rocsolver-dev installed version is 3.32.0.70201 + Package rocsparse installed version is 4.2.0.70201 + Package rocsparse-dev installed version is 4.2.0.70201 + Package rocthrust-dev installed version is 4.2.0.70201 + Package rocwmma-dev installed version is 2.2.0.70201 + Meta package validation complete : + Total packages validated : 52 + Installed packages : 52 Missing packages : 0 Version mismatch packages : 0 - -For other cases, we will see mismatched/missing packages printed -with respective count + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | metapackage-validation | RCQT | PASS | + +---------------------------------------------------------------------+ + +For other cases, mismatched or missing packages are printed with respective counts. ### Packages installation check @@ -1389,12 +1338,17 @@ chapters in the PCI Express Base Specification, Revision 3. ### Examples -**Example 1:** +**Example:** + +Run: + + ./rvs -c conf/peqt_single.conf -A regular PEQT configuration file looks like this: +Configuration (`conf/peqt_single.conf`, first action): actions: - name: pcie_act_1 + device: all module: peqt capability: link_cap_max_speed: @@ -1403,7 +1357,7 @@ A regular PEQT configuration file looks like this: link_stat_neg_width: slot_pwr_limit_value: slot_physical_num: - device_id: + deviceid: vendor_id: kernel_driver: dev_serial_num: @@ -1415,121 +1369,45 @@ A regular PEQT configuration file looks like this: atomic_op_32_completer: atomic_op_64_completer: atomic_op_128_CAS_completer: - device: all ```{note} -- When setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them -- There are no regular expression for this `.conf` file, therefore RVS will report `true` if at least one AMD compatible GPU is registered within the system. Otherwise it will report `false`. +- When setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them. +- With no regular expressions specified, RVS reports `TRUE` if at least one AMD compatible GPU is registered within the system. Otherwise it reports `FALSE`. ``` -The Power Budgeting capability is a dynamic one, having the following form: - - __ - -Where: - - PM_State = D0/D1/D2/D3 - Type=PMEAux/Auxiliary/Idle/Sustained/Maximum - PowerRail = Power_12V/Power_3_3V/Power_1_5V_1_8V/Thermal - -When the RVS tool runs against such a configuration file, it will query for the -all the PCIe capabilities specified under the capability list (and log the -corresponding values) for all the AMD compatible GPUs. For those PCIe -capabilities that are not supported by the HW platform were the RVS is running, -a "NOT SUPPORTED" message will be logged. - -The output for such a configuration file may look like this: - - - [INFO ] [177628.401176] pcie_act_1 peqt D0_Maximum_Power_12V NOT SUPPORTED - [INFO ] [177628.401229] pcie_act_1 peqt D0_Maximum_Power_3_3V NOT SUPPORTED - [INFO ] [177628.401248] pcie_act_1 peqt D0_Sustained_Power_12V NOT SUPPORTED - [INFO ] [177628.401269] pcie_act_1 peqt D0_Sustained_Power_3_3V NOT SUPPORTED - [INFO ] [177628.401282] pcie_act_1 peqt atomic_op_128_CAS_completer FALSE - [INFO ] [177628.401291] pcie_act_1 peqt atomic_op_32_completer FALSE - [INFO ] [177628.401303] pcie_act_1 peqt atomic_op_64_completer FALSE - [INFO ] [177628.401311] pcie_act_1 peqt atomic_op_routing TRUE - [INFO ] [177628.401317] pcie_act_1 peqt dev_serial_num NOT SUPPORTED - [INFO ] [177628.401323] pcie_act_1 peqt device_id 26720 - [INFO ] [177628.401334] pcie_act_1 peqt kernel_driver amdgpu - [INFO ] [177628.401342] pcie_act_1 peqt link_cap_max_speed 8 GT/s - [INFO ] [177628.401352] pcie_act_1 peqt link_cap_max_width x16 - [INFO ] [177628.401359] pcie_act_1 peqt link_stat_cur_speed 8 GT/s - [INFO ] [177628.401367] pcie_act_1 peqt link_stat_neg_width x16 - [INFO ] [177628.401375] pcie_act_1 peqt slot_physical_num #0 - [INFO ] [177628.401396] pcie_act_1 peqt slot_pwr_limit_value 0.000W - [INFO ] [177628.401402] pcie_act_1 peqt vendor_id 4098 - [INFO ] [177628.401656] pcie_act_1 peqt D0_Maximum_Power_12V NOT SUPPORTED - [INFO ] [177628.401675] pcie_act_1 peqt D0_Maximum_Power_3_3V NOT SUPPORTED - [INFO ] [177628.401692] pcie_act_1 peqt D0_Sustained_Power_12V NOT SUPPORTED - [INFO ] [177628.401709] pcie_act_1 peqt D0_Sustained_Power_3_3V NOT SUPPORTED - [INFO ] [177628.401719] pcie_act_1 peqt atomic_op_128_CAS_completer FALSE - [INFO ] [177628.401728] pcie_act_1 peqt atomic_op_32_completer FALSE - [INFO ] [177628.401736] pcie_act_1 peqt atomic_op_64_completer FALSE - [INFO ] [177628.401745] pcie_act_1 peqt atomic_op_routing TRUE - [INFO ] [177628.401750] pcie_act_1 peqt dev_serial_num NOT SUPPORTED - [INFO ] [177628.401757] pcie_act_1 peqt device_id 26720 - [INFO ] [177628.401771] pcie_act_1 peqt kernel_driver amdgpu - [INFO ] [177628.401781] pcie_act_1 peqt link_cap_max_speed 8 GT/s - [INFO ] [177628.401788] pcie_act_1 peqt link_cap_max_width x16 - [INFO ] [177628.401794] pcie_act_1 peqt link_stat_cur_speed 8 GT/s - [INFO ] [177628.401800] pcie_act_1 peqt link_stat_neg_width x16 - [INFO ] [177628.401806] pcie_act_1 peqt slot_physical_num #0 - [INFO ] [177628.401814] pcie_act_1 peqt slot_pwr_limit_value 0.000W - [INFO ] [177628.401819] pcie_act_1 peqt vendor_id 4098 - [RESULT] [177628.403781] pcie_act_1 peqt true - -**Example 2:** - -Another example of a configuration file, which queries for a smaller subset of PCIe capabilities but adds regular expressions check, is given below - - actions: - - name: pcie_act_1 - module: peqt - capability: - link_cap_max_speed: '^(2\.5 GT\/s|5 GT\/s|8 GT\/s)$' - link_cap_max_width: - link_stat_cur_speed: '^(2\.5 GT\/s|5 GT\/s|8 GT\/s)$' - link_stat_neg_width: - slot_pwr_limit_value: '[a-b][d-' - slot_physical_num: - device_id: - vendor_id: - kernel_driver: - device: all - -For this example, the expected PEQT check result is `TRUE` if: - -- At least one AMD compatible GPU is registered within the system and: -- All `` values for all AMD compatible GPUs match the given regular expression and -- All `` values for all AMD compatible GPUs match the given regular expression - -Please note that the `` regular expression is not valid and -will be skipped without affecting the PEQT module's check result, however, an -error will be logged out. - -**Example 3:** - -Another example with even more regular expressions is given below. The expected -PEQT check result is `true` if at least one AMD compatible GPU matching -`deviceid: 26720` from the device list is found and all the PCIe capability -values match their corresponding regular expressions. - - actions: - - name: pcie_act_1 - module: peqt - deviceid: 26720 - capability: - link_cap_max_speed: '^(2\.5 GT\/s|5 GT\/s|8 GT\/s)$' - link_cap_max_width: ^(x8|x16)$ - link_stat_cur_speed: '^(8 GT\/s)$' - link_stat_neg_width: ^(x8|x16)$ - kernel_driver: ^amdgpu$ - atomic_op_routing: ^((TRUE|FALSE){1})$ - atomic_op_32_completer: ^((TRUE|FALSE){1})$ - atomic_op_64_completer: ^((TRUE|FALSE){1})$ - atomic_op_128_CAS_completer: ^((TRUE|FALSE){1})$ - device: 3254 33367 +Sample output (first action, abridged): + + [RESULT] [302695.130515] Action name :pcie_act_1 + [RESULT] [302695.251177] Module name :peqt + [RESULT] [302695.289685] [pcie_act_1] peqt true + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | pcie_act_1 | PEQT | PASS | + +---------------------------------------------------------------------+ ## SMQT module The GPU SBIOS mapping qualification tool is designed to verify that a platform’s @@ -1964,149 +1842,76 @@ are emitted: ### Examples +**Example:** -**Example 1:** +Run: -Here all source GPUs (device: all) with all destination GPUs (peers: all) are -tested for p2p capability with no bandwidth testing (test_bandwidth: false). + ./rvs -c conf/pbqt_single.conf - actions: - - name: action_1 - device: all - module: pbqt - peers: all - test_bandwidth: false - -Note: setting `test_bandwidth: false` causes the module to exit with an error -in the current implementation. The P2P check result format shown below is -emitted before the exit when bandwidth testing is enabled. - -Possible result (with `test_bandwidth: true`) is: - - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - -From the output we can see the P2P topology between three GPUs. - - -**Example 2:** - -Here all source GPUs (device: all) with all destination GPUs (peers: all) are -tested for p2p capability including bandwidth testing (test_bandwidth: true) -with bidirectional transfers (bidirectional: true) and with immediate output -for each completed transfer (log_interval: 0) +Configuration (`conf/pbqt_single.conf`, first action): actions: - - name: action_1 + - name: xgmi_d2d_unidir_bandwidth device: all module: pbqt - log_interval: 0 - duration: 0 + log_interval: 5000 + duration: 30000 peers: all test_bandwidth: true - bidirectional: true - -When run with "-d 3" switch, possible result is: -When run with "-d 3" switch, possible result is: - - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 7.013 GBps - [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 6.615 GBps - [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 2.367 GBps - [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 7.504 GBps - [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 8.207 GBps - [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 7.680 GBps - [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 5.767 GBps duration: 0.368453 secs - [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 6.013 GBps duration: 0.498944 secs - [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.278 GBps duration: 0.380393 secs - [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 4.160 GBps duration: 0.484577 secs - [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.219 GBps duration: 0.407190 secs - [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.001 GBps duration: 0.562350 secs - -We can see that on this particular machine there are three GPUs and six -possible device-to-peer transfers. - -**Example 3:** - -Here some source GPUs (device: 50599) are targeting some destination GPUs -(peers: 33367 3254) with specified log interval (log_interval: 1000) and duration -(duration: 5000). Bandwidth is tested (test_bandwidth: true) but only -unidirectional (bidirectional: false) without parallel execution (parallel: -false). - - actions: - - name: action_1 - device: 50599 - module: pbqt - log_interval: 1000 - duration: 5000 - count: 0 - peers: 33367 3254 - test_bandwidth: true bidirectional: false parallel: false - -Possible output is: -Possible output is: - - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.517 GBps - [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.475 GBps - [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.476 GBps - [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.601 GBps - [action_1] p2p-bandwidth[1/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: false 4.539 GBps duration: 1.321909 secs - [action_1] p2p-bandwidth[2/2] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: false 4.551 GBps duration: 1.318517 secs - -From the last line of result, we can see that source GPU (ID 50599) can access -destination GPU (ID 33367) and that the bandwidth is approximately 4.5 GBps. - -**Example 4:** - -Here, all GPUs are targeted with bidirectional transfers and parallel execution -of tests: - - actions: - - name: action_1 - device: all - module: pbqt - log_interval: 1200 - duration: 4000 - peers: all - test_bandwidth: true - bidirectional: true - parallel: true - -Possible output is: -Possible output is: - - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] peers:true distance:56 HyperTransport:56 - [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.972 GBps - [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 8.183 GBps - [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 8.911 GBps - [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 7.690 GBps - [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 7.768 GBps - [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 4.589 GBps - [action_1] p2p-bandwidth[1/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 6.964 GBps duration: 0.287248 secs - [action_1] p2p-bandwidth[2/6] [GPU:: 4 - 3254 - 0000:04:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 3.960 GBps duration: 0.536554 secs - [action_1] p2p-bandwidth[3/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 5.442 GBps duration: 0.368977 secs - [action_1] p2p-bandwidth[4/6] [GPU:: 8 - 50599 - 0000:08:00.0] [GPU:: 12 - 33367 - 0000:0c:00.0] bidirectional: true 4.187 GBps duration: 0.477756 secs - [action_1] p2p-bandwidth[5/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 4 - 3254 - 0000:04:00.0] bidirectional: true 4.942 GBps duration: 0.607009 secs - [action_1] p2p-bandwidth[6/6] [GPU:: 12 - 33367 - 0000:0c:00.0] [GPU:: 8 - 50599 - 0000:08:00.0] bidirectional: true 3.828 GBps duration: 0.523495 secs + block_size: 1073741824 + device_id: all + +Sample output (first action, abridged): + + [RESULT] [302380.159634] Action name :xgmi_d2d_unidir_bandwidth + [RESULT] [302380.356991] Module name :pbqt + [RESULT] [302380.357340] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 3 - 27226 - 0000:15:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357342] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 4 - 36479 - 0000:65:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357344] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 5 - 17010 - 0000:75:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357345] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 6 - 1590 - 0000:85:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357346] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 7 - 51771 - 0000:95:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357347] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 8 - 11806 - 0000:e5:00.0] peers:true distance:15 xGMI:15 + [RESULT] [302380.357348] [xgmi_d2d_unidir_bandwidth] p2p [GPU:: 2 - 42583 - 0000:05:00.0] [GPU:: 9 - 57875 - 0000:f5:00.0] peers:true distance:15 xGMI:15 + ... + [RESULT] [302410.443673] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[48/56] [GPU:: 8 - 11806 - 0000:e5:00.0] [GPU:: 7 - 51771 - 0000:95:00.0] bidirectional: false 61.370 GBps duration: 0.227452 secs + [RESULT] [302410.444726] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[49/56] [GPU:: 8 - 11806 - 0000:e5:00.0] [GPU:: 9 - 57875 - 0000:f5:00.0] bidirectional: false 61.369 GBps duration: 0.227453 secs + [RESULT] [302410.445779] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[50/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 2 - 42583 - 0000:05:00.0] bidirectional: false 61.368 GBps duration: 0.227456 secs + [RESULT] [302410.446832] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[51/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 3 - 27226 - 0000:15:00.0] bidirectional: false 61.373 GBps duration: 0.227441 secs + [RESULT] [302410.447885] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[52/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 4 - 36479 - 0000:65:00.0] bidirectional: false 59.704 GBps duration: 0.233798 secs + [RESULT] [302410.448939] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[53/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 5 - 17010 - 0000:75:00.0] bidirectional: false 61.371 GBps duration: 0.227448 secs + [RESULT] [302410.449991] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[54/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 6 - 1590 - 0000:85:00.0] bidirectional: false 61.367 GBps duration: 0.227463 secs + [RESULT] [302410.451044] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[55/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 7 - 51771 - 0000:95:00.0] bidirectional: false 61.378 GBps duration: 0.227422 secs + [RESULT] [302410.452097] [xgmi_d2d_unidir_bandwidth] p2p-bandwidth[56/56] [GPU:: 9 - 57875 - 0000:f5:00.0] [GPU:: 8 - 11806 - 0000:e5:00.0] bidirectional: false 61.368 GBps duration: 0.227458 secs + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | xgmi_d2d_unidir_bandwidth | PBQT | PASS | + +---------------------------------------------------------------------+ ## PEBB module The PCIe Bandwidth Benchmark attempts to saturate the PCIe bus with DMA @@ -2329,88 +2134,84 @@ logged as a result: ### Examples -**Example 1:** - -Consider action: - - actions: - - name: action_1 - device: all - module: pebb - log_interval: 0 - duration: 0 - device_to_host: false - host_to_device: true - parallel: false +**Example:** -This will initiate host to device transfer to all GPUs with immediate output -(`parallel: false`, `log_interval: 0`) - -Output from this action might look like: - - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] distance:20 PCIe:20 - [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 5 - 50599 - 0000:08:00.0] distance:20 PCIe:20 - [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 2] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:20 PCIe:20 - [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 12.233 GBps - [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 12.227 GBps - [action_1] pcie-bandwidth [3/12] [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 11.770 GBps - [action_1] pcie-bandwidth [4/12] [CPU:: 3] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::false 11.313 GBps - [action_1] pcie-bandwidth [5/12] [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 12.218 GBps - [action_1] pcie-bandwidth [6/12] [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.292 GBps - [action_1] pcie-bandwidth [7/12] [CPU:: 2] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.456 GBps - [action_1] pcie-bandwidth [8/12] [CPU:: 3] [GPU:: 5 - 50599 - 0000:08:00.0] h2d::true d2h::false 10.614 GBps - [action_1] pcie-bandwidth [9/12] [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.222 GBps - [action_1] pcie-bandwidth [10/12] [CPU:: 1] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.215 GBps - [action_1] pcie-bandwidth [11/12] [CPU:: 2] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.219 GBps - [action_1] pcie-bandwidth [12/12] [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::false 12.219 GBps duration: 0.000780 secs +Run: -**Example 2:** + ./rvs -c conf/pebb_single.conf -Consider action: +Configuration (`conf/pebb_single.conf`, first action): actions: - - name: action_1 + - name: pcie_h2d_bandwidth device: all module: pebb - log_interval: 500 - duration: 5000 - device_to_host: true + log_interval: 5000 + duration: 30000 + device_to_host: false host_to_device: true - parallel: true - -Here, although parallel execution of transfers is requested, log_interval is to -short for some transfers to complete. For them, cumulative average is displayed -and marked with (*): - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] distance:20 PCIe:20 - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 1] [GPU:: 5 - 50599 - 0000:08:00.0] distance:36 HyperTransport:36 - [action_1] pcie-bandwidth [CPU:: 0] [GPU:: 6 - 33367 - 0000:0c:00.0] distance:36 HyperTransport:36 - ... - [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 1.489 GBps - [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 2.701 GBps - ... - [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.793 GBps - [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.872 GBps (*) - ... - [action_1] pcie-bandwidth [1/12] [CPU:: 0] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.309 GBps duration: 0.061316 secs - [action_1] pcie-bandwidth [2/12] [CPU:: 1] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 16.871 GBps duration: 0.118547 secs - [action_1] pcie-bandwidth [3/12] [CPU:: 2] [GPU:: 4 - 3254 - 0000:04:00.0] h2d::true d2h::true 13.360 GBps duration: 0.149705 secs + parallel: false + block_size: 1073741824 + +Sample output (first action, abridged): + + [RESULT] [302349.492047] Action name :pcie_h2d_bandwidth + [RESULT] [302349.671479] Module name :pebb + [RESULT] [302349.671823] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 2 - 42583 - 0000:05:00.0] distance:20 PCIe:20 + [RESULT] [302349.671837] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 2 - 42583 - 0000:05:00.0] distance:52 PCIe:52 + [RESULT] [302349.671839] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 3 - 27226 - 0000:15:00.0] distance:20 PCIe:20 + [RESULT] [302349.671840] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 3 - 27226 - 0000:15:00.0] distance:52 PCIe:52 + [RESULT] [302349.671841] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 4 - 36479 - 0000:65:00.0] distance:20 PCIe:20 + [RESULT] [302349.671842] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 4 - 36479 - 0000:65:00.0] distance:52 PCIe:52 + [RESULT] [302349.671843] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 5 - 17010 - 0000:75:00.0] distance:20 PCIe:20 + [RESULT] [302349.671844] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 5 - 17010 - 0000:75:00.0] distance:52 PCIe:52 + [RESULT] [302349.671846] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 6 - 1590 - 0000:85:00.0] distance:52 PCIe:52 + [RESULT] [302349.671847] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 6 - 1590 - 0000:85:00.0] distance:20 PCIe:20 + [RESULT] [302349.671848] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 7 - 51771 - 0000:95:00.0] distance:52 PCIe:52 + [RESULT] [302349.671849] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 7 - 51771 - 0000:95:00.0] distance:20 PCIe:20 + [RESULT] [302349.671850] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 8 - 11806 - 0000:e5:00.0] distance:52 PCIe:52 + [RESULT] [302349.671851] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 8 - 11806 - 0000:e5:00.0] distance:20 PCIe:20 + [RESULT] [302349.671852] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 0] [GPU:: 9 - 57875 - 0000:f5:00.0] distance:52 PCIe:52 + [RESULT] [302349.671853] [pcie_h2d_bandwidth] pcie-bandwidth [CPU:: 1] [GPU:: 9 - 57875 - 0000:f5:00.0] distance:20 PCIe:20 + [RESULT] [302379.847423] [pcie_h2d_bandwidth] pcie-bandwidth [ 1/16] [CPU:: 0] [GPU:: 2 - 42583 - 0000:05:00.0] h2d::true d2h::false 57.678 GBps duration: 0.223392 secs + [RESULT] [302379.847438] [pcie_h2d_bandwidth] pcie-bandwidth [ 2/16] [CPU:: 1] [GPU:: 2 - 42583 - 0000:05:00.0] h2d::true d2h::false 54.034 GBps duration: 0.238461 secs ... - [action_1] pcie-bandwidth [12/12] [CPU:: 3] [GPU:: 6 - 33367 - 0000:0c:00.0] h2d::true d2h::true 16.193 GBps duration: 0.123525 secs - -Please note that in link information results, some records could be marked with -(R). This means, that communication is possible if initiated by the destination -NUMA node HSA agent. + [RESULT] [302379.847449] [pcie_h2d_bandwidth] pcie-bandwidth [ 9/16] [CPU:: 0] [GPU:: 6 - 1590 - 0000:85:00.0] h2d::true d2h::false 57.708 GBps duration: 0.204669 secs + [RESULT] [302379.847451] [pcie_h2d_bandwidth] pcie-bandwidth [10/16] [CPU:: 1] [GPU:: 6 - 1590 - 0000:85:00.0] h2d::true d2h::false 55.223 GBps duration: 0.213882 secs + [RESULT] [302379.847453] [pcie_h2d_bandwidth] pcie-bandwidth [11/16] [CPU:: 0] [GPU:: 7 - 51771 - 0000:95:00.0] h2d::true d2h::false 57.708 GBps duration: 0.204671 secs + [RESULT] [302379.847454] [pcie_h2d_bandwidth] pcie-bandwidth [12/16] [CPU:: 1] [GPU:: 7 - 51771 - 0000:95:00.0] h2d::true d2h::false 57.708 GBps duration: 0.204671 secs + [RESULT] [302379.847472] [pcie_h2d_bandwidth] pcie-bandwidth [13/16] [CPU:: 0] [GPU:: 8 - 11806 - 0000:e5:00.0] h2d::true d2h::false 57.708 GBps duration: 0.204672 secs + [RESULT] [302379.847474] [pcie_h2d_bandwidth] pcie-bandwidth [14/16] [CPU:: 1] [GPU:: 8 - 11806 - 0000:e5:00.0] h2d::true d2h::false 57.708 GBps duration: 0.204670 secs + [RESULT] [302379.847475] [pcie_h2d_bandwidth] pcie-bandwidth [15/16] [CPU:: 0] [GPU:: 9 - 57875 - 0000:f5:00.0] h2d::true d2h::false 57.709 GBps duration: 0.204668 secs + [RESULT] [302379.847476] [pcie_h2d_bandwidth] pcie-bandwidth [16/16] [CPU:: 1] [GPU:: 9 - 57875 - 0000:f5:00.0] h2d::true d2h::false 57.710 GBps duration: 0.204666 secs + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | pcie_h2d_bandwidth | PEBB | PASS | + +---------------------------------------------------------------------+ ## GST module @@ -2625,125 +2426,92 @@ of the run. Otherwise the result is `met: FALSE`. ### Examples -When running the GST module, users should provide at least an action name, -the module name (gst), a list of GPU IDs, the test duration and a target stress -value (gigaflops). Thus, the most basic configuration file looks like this: +**Example:** - actions: - - name: action_gst_1 - module: gst - device: all - target_stress: 3500 - duration: 8000 - -For the above configuration file, all the missing configuration keys will have -their default -values (for example: `copy_matrix=true`, `matrix_size_a/b/c=5760`). For more -information about the default -values, see Common configuration keys -and Configuration keys. - -When the RVS tool runs against such a configuration file, it will do the -following: - - run the stress test on all available (and compatible) AMD GPUs, one after -the other - - emit, each `log_interval` (for example: 1000 ms), a result message -containing the GFLOPS value achieved by the current GPU: - - ``` - [action_gst_1] [GPU:: 33367] GFLOPS 3535.670231 - ``` - - - log the final result when the stress test completes: - - ``` - [action_gst_1] [GPU:: 33367] GFLOPS 4066.020766 Target GFLOPS: 3500.000000 met: TRUE - ``` - -If a mandatory configuration key is missing, the RVS tool will log an error -message and terminate the execution of the current module. For example, the -following configuration file will cause the RVS to terminate with the -following error message: `RVS-ERROR [GST] [action_gst_1] key 'target_stress' was not found` +Run: - actions: - - name: action_gst_1 - module: gst - device: all - duration: 8000 + ./rvs -c conf/gst_single.conf -A more complex configuration file looks like this: +Configuration (`conf/gst_single.conf`, first action): actions: - - name: action_1 - device: 50599 33367 + - name: gst-Tflops-2K2K2K-trig-fp4 + device: all module: gst parallel: false - count: 12 - wait: 100 - duration: 7000 - ramp_interval: 3000 - log_interval: 1000 - max_violations: 2 + duration: 10000 + ramp_interval: 5000 + log_interval: 3000 + max_violations: 5 copy_matrix: false - target_stress: 5000 - tolerance: 0.07 - matrix_size_a: 5760 - matrix_size_b: 5760 - matrix_size_c: 5760 - -For this configuration file, the RVS tool will: - - run the stress test only for the GPUs having the ID 50599 or 33367. To -get all the available GPU IDs, run __RVS__ tool with __-g__ option - - run the test on the selected GPUs, one after the other - - run each test, 12 times - - only copy the matrices to the GPUs at the beginning of the test - - wait 100ms before each test execution - - try to reach 5000 gflops in maximum 3000ms - - if `target_stress` (5000) is achieved in the `ramp_interval` (3000 ms) -it will attempt to run the test for the rest of the duration, sustaining the -stress load during that time - - allow a 7% `target_stress` tolerance (each `target_stress` -violation will generate a stress violation message as shown in the first -example) - - allow only 2 `target_stress` violations. Exceeding the -`max_violations` will not terminate the test, but RVS will mark the -test result as "fail". - -The output for such a configuration may look like this: - - [action_1] [GPU:: 50599] GFLOPS 6471.614725 - [action_1] [GPU:: 50599] GFLOPS 5189.993529 - [action_1] [GPU:: 50599] GFLOPS 5220.373979 - [action_1] [GPU:: 50599] GFLOPS 5225.472000 - [action_1] [GPU:: 50599] GFLOPS 5169.935583 - [action_1] [GPU:: 50599] GFLOPS 6471.614725 Target GFLOPS: 5000.000000 met: TRUE - [action_1] [GPU:: 33367] GFLOPS 6558.348080 - [action_1] [GPU:: 33367] GFLOPS 5215.285895 - [action_1] [GPU:: 33367] GFLOPS 5164.945297 - [action_1] [GPU:: 33367] GFLOPS 5210.207720 - [action_1] [GPU:: 33367] GFLOPS 5205.139424 - [action_1] [GPU:: 33367] GFLOPS 6558.348080 Target GFLOPS: 5000.000000 met: TRUE - -When setting the parallel to true, RVS will run the stress tests on -all selected GPUs in parallel and the output may look like this: - - [action_1] [GPU:: 33367] GFLOPS 6558.348080 - [action_1] [GPU:: 50599] GFLOPS 6484.532120 - [action_1] [GPU:: 33367] GFLOPS 5215.285895 - [action_1] [GPU:: 50599] GFLOPS 5200.080980 - [action_1] [GPU:: 33367] GFLOPS 5164.945297 - [action_1] [GPU:: 50599] GFLOPS 5159.964636 - [action_1] [GPU:: 33367] GFLOPS 5210.207720 - [action_1] [GPU:: 50599] GFLOPS 5195.032357 - [action_1] [GPU:: 33367] GFLOPS 5169.935583 - [action_1] [GPU:: 50599] GFLOPS 5154.993572 - [action_1] [GPU:: 33367] GFLOPS 6558.348080 Target GFLOPS: 5000.000000 met: TRUE - [action_1] [GPU:: 50599] GFLOPS 6484.532120 Target GFLOPS: 5000.000000 met: TRUE - -It is important that all the configuration keys will be adjusted/fine-tuned -according to the actual GPUs and HW platform capabilities. For example, a matrix -size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 -GPUs. + target_stress: 0 + tolerance: 0.1 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + data_type: fp4 + +Sample output (first action, abridged): + + [RESULT] [301995.91241 ] Action name :gst-Tflops-2K2K2K-trig-fp4 + [RESULT] [301995.175394] Module name :gst + [RESULT] [301995.794012] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] Start of GPU ramp up + [RESULT] [302001.161732] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 536870 + [RESULT] [302002.161726] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] End of GPU ramp up + [RESULT] [302005.176647] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 1059931 + [RESULT] [302008.187367] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 1055687 + [RESULT] [302011.194700] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 1056873 + [RESULT] [302014.199261] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 1063560 + [RESULT] [302017.167195] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 42583] GFLOPS 1063560 Target GFLOPS: 0 met: TRUE + [RESULT] [302017.168168] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] Start of GPU ramp up + [RESULT] [302022.421856] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 536870 + [RESULT] [302023.421863] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] End of GPU ramp up + [RESULT] [302026.422111] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 1065100 + [RESULT] [302029.437823] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 1065326 + [RESULT] [302032.447003] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 1067645 + [RESULT] [302035.454318] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 1068301 + [RESULT] [302038.430577] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 27226] GFLOPS 1068301 Target GFLOPS: 0 met: TRUE + [RESULT] [302038.431686] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 36479] Start of GPU ramp up + [RESULT] [302043.682076] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 36479] GFLOPS 554189 + ... + [RESULT] [302141.857878] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 11806] GFLOPS 1072748 + [RESULT] [302144.843455] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 11806] GFLOPS 1073132 Target GFLOPS: 0 met: TRUE + [RESULT] [302144.844774] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] Start of GPU ramp up + [RESULT] [302150.131420] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 554189 + [RESULT] [302151.131405] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] End of GPU ramp up + [RESULT] [302154.146042] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 1060026 + [RESULT] [302157.154100] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 1056631 + [RESULT] [302160.164765] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 1061420 + [RESULT] [302163.173056] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 1056547 + [RESULT] [302166.136604] [gst-Tflops-2K2K2K-trig-fp4] [GPU:: 57875] GFLOPS 1061420 Target GFLOPS: 0 met: TRUE + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | gst-Tflops-2K2K2K-trig-fp4 | GST | PASS | + +---------------------------------------------------------------------+ ## IET module @@ -2947,107 +2715,99 @@ The test passes if the peak power measured during the run meets or exceeds ### Examples -**Example 1:** - -A regular IET configuration file looks like this: - - actions: - - name: action_1 - device: all - module: iet - parallel: false - count: 2 - wait: 100 - duration: 10000 - sample_interval: 1 - target_power: 135 - tolerance: 0.1 - matrix_size: 5760 +**Example:** -```{note} -- when setting the `device` configuration key to `all`, the RVS will detect all the AMD compatible GPUs and run the test on all of them -- the test will run 2 times on each GPU (count = 2) -- `sample_interval` is in seconds; values below 1 are raised to 1 -``` +Run: -When the RVS tool runs against such a configuration file, it will do the following: + ./rvs -c conf/iet_stress.conf -- run the test on all AMD compatible GPUs +Configuration (`conf/iet_stress.conf`, first action): -- emit, each `sample_interval` (1 second), a result message containing the -measured power for the current GPU: - - ``` - [action_1] [GPU:: 50599] Power(W) 136.878342 - ``` - -- log the test result when the test completes: - - ``` - [action_1] [GPU:: 50599] pass: TRUE - ``` - -The output for such a configuration file may look like this: - - [action_1] [GPU:: 33367] Power(W) 136.934479 - [action_1] [GPU:: 33367] Power(W) 138.421844 - [action_1] [GPU:: 33367] Power(W) 138.394608 - ... - [action_1] [GPU:: 33367] Power(W) 139.231918 - [action_1] [GPU:: 33367] pass: TRUE - [action_1] [GPU:: 3254] Power(W) 139.363525 - [action_1] [GPU:: 3254] Power(W) 138.661453 - ... - [action_1] [GPU:: 3254] Power(W) 140.069687 - [action_1] [GPU:: 3254] pass: TRUE - [action_1] [GPU:: 50599] Power(W) 137.205032 - [action_1] [GPU:: 50599] Power(W) 136.137115 - ... - [action_1] [GPU:: 50599] Power(W) 139.753464 - [action_1] [GPU:: 50599] pass: TRUE - - -**Example 2:** - -Another configuration file with a tighter tolerance: - - - name: action_1 + actions: + - name: iet-stress-1400W-true device: all module: iet - parallel: false - count: 1 - wait: 100 - duration: 8000 - sample_interval: 1 - target_power: 80 - tolerance: 0.06 - matrix_size: 5760 - -The output for such a configuration file may look like this: - - [action_1] [GPU:: 33367] Power(W) 84.186142 - [action_1] [GPU:: 33367] Power(W) 77.001945 - [action_1] [GPU:: 33367] Power(W) 82.063576 - [action_1] [GPU:: 33367] pass: TRUE - [action_1] [GPU:: 3254] Power(W) 78.842796 - [action_1] [GPU:: 3254] Power(W) 79.938454 - ... - [action_1] [GPU:: 3254] Power(W) 74.615120 - [action_1] [GPU:: 3254] pass: FALSE - [action_1] [GPU:: 50599] Power(W) 81.560165 - [action_1] [GPU:: 50599] Power(W) 75.057304 + parallel: true + duration: 180000 + sample_interval: 5000 + target_power: 1400 + tolerance: 0.1 + matrix_size_a: 8640 + matrix_size_b: 8640 + matrix_size_c: 8640 + data_type: fp16_r + out_data_type: fp32_r + compute_type: f32_r + lda: 8640 + ldb: 8640 + ldc: 8640 + +Sample output (first action, abridged): + + [RESULT] [302166.984877] Action name :iet-stress-1400W-true + [RESULT] [302167.47707 ] Module name :iet + [RESULT] [302167.678963] [iet-stress-1400W-true] [GPU:: 42583] Power(W) 241.000000 + [RESULT] [302167.679266] [iet-stress-1400W-true] [GPU:: 36479] Power(W) 238.000000 + [RESULT] [302167.679363] [iet-stress-1400W-true] [GPU:: 17010] Power(W) 242.000000 + [RESULT] [302167.679366] [iet-stress-1400W-true] [GPU:: 27226] Power(W) 251.000000 + [RESULT] [302167.686277] [iet-stress-1400W-true] [GPU:: 1590] Power(W) 244.000000 + [RESULT] [302167.686419] [iet-stress-1400W-true] [GPU:: 57875] Power(W) 247.000000 + [RESULT] [302167.686591] [iet-stress-1400W-true] [GPU:: 11806] Power(W) 243.000000 + [RESULT] [302167.686605] [iet-stress-1400W-true] [GPU:: 51771] Power(W) 239.000000 + [RESULT] [302172.680300] [iet-stress-1400W-true] [GPU:: 36479] Power(W) 1398.000000 + [RESULT] [302172.680303] [iet-stress-1400W-true] [GPU:: 42583] Power(W) 1398.000000 + [RESULT] [302172.680570] [iet-stress-1400W-true] [GPU:: 27226] Power(W) 1398.000000 + [RESULT] [302172.680606] [iet-stress-1400W-true] [GPU:: 17010] Power(W) 1398.000000 + [RESULT] [302172.687273] [iet-stress-1400W-true] [GPU:: 57875] Power(W) 1399.000000 + [RESULT] [302172.687390] [iet-stress-1400W-true] [GPU:: 1590] Power(W) 1399.000000 + [RESULT] [302172.687638] [iet-stress-1400W-true] [GPU:: 11806] Power(W) 1400.000000 + [RESULT] [302172.687845] [iet-stress-1400W-true] [GPU:: 51771] Power(W) 1399.000000 + [RESULT] [302177.681560] [iet-stress-1400W-true] [GPU:: 36479] Power(W) 1395.000000 + [RESULT] [302177.681561] [iet-stress-1400W-true] [GPU:: 42583] Power(W) 1393.000000 + [RESULT] [302177.681698] [iet-stress-1400W-true] [GPU:: 27226] Power(W) 1394.000000 + [RESULT] [302177.681724] [iet-stress-1400W-true] [GPU:: 17010] Power(W) 1395.000000 ... - [action_1] [GPU:: 50599] Power(W) 80.200668 - [action_1] [GPU:: 50599] pass: TRUE - - -- All the missing configuration keys (if any) will have their default values. For more information about the default values please consult the dedicated sections (3.3 Common Configuration Keys and 13.1 Module specific keys). -- If a mandatory configuration key is missing, the RVS tool will log an error message and terminate the execution of the current module. For example, if the target_power is missing, the RVS tool will terminate with the following error message: `RVS-ERROR [IET] [action_1] key 'target_power' was not found` -- All the configuration keys will be adjusted/fine-tuned according to the actual GPUs and HW platform capabilities. - - For example, a matrix size of 5760 should fit the VEGA 10 GPUs while 8640 should work with the VEGA 20 GPUs - - For small` target_power` values (for example: 30-40W), the `sample_interval` should be increased, otherwise the IET may fail either to achieve the given `target_power` or to sustain it (for example: `ramp_interval = 1500` for `target_power = 40`). In case there are problems reaching/sustaining the given `target_power`: - - Increase the `ramp_interval` and/or the tolerance value(s) and try again (in case of a 'ramp time exceeded' message) - - Increase the tolerance value (in case too many 'power violation message' are logged out) + [RESULT] [302347.724033] [iet-stress-1400W-true] [GPU:: 42583] Power(W) 1399.000000 + [RESULT] [302347.724905] [iet-stress-1400W-true] [GPU:: 27226] pass: TRUE + [RESULT] [302347.727817] [iet-stress-1400W-true] [GPU:: 17010] pass: TRUE + [RESULT] [302347.729796] [iet-stress-1400W-true] [GPU:: 42583] pass: TRUE + [RESULT] [302347.730984] [iet-stress-1400W-true] [GPU:: 11806] Power(W) 1400.000000 + [RESULT] [302347.730984] [iet-stress-1400W-true] [GPU:: 1590] Power(W) 1401.000000 + [RESULT] [302347.730997] [iet-stress-1400W-true] [GPU:: 57875] Power(W) 1400.000000 + [RESULT] [302347.731021] [iet-stress-1400W-true] [GPU:: 51771] Power(W) 1399.000000 + [RESULT] [302347.732052] [iet-stress-1400W-true] [GPU:: 36479] pass: TRUE + [RESULT] [302347.737108] [iet-stress-1400W-true] [GPU:: 1590] pass: TRUE + [RESULT] [302347.739075] [iet-stress-1400W-true] [GPU:: 11806] pass: TRUE + [RESULT] [302347.740868] [iet-stress-1400W-true] [GPU:: 51771] pass: TRUE + [RESULT] [302347.742768] [iet-stress-1400W-true] [GPU:: 57875] pass: TRUE + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | iet-stress-1400W-true | IET | PASS | + +---------------------------------------------------------------------+ ## Pulse Module @@ -3234,9 +2994,13 @@ no errors. ### Examples -**Example 1:** +**Example:** + +Run: -Run all tests in parallel on all GPUs, excluding bit fade (9) and stress (10): + ./rvs -c conf/mem.conf + +Configuration (`conf/mem.conf`, first action): actions: - name: action_1 @@ -3251,21 +3015,70 @@ Run all tests in parallel on all GPUs, excluding bit fade (9) and stress (10): thrds_per_blk: 64 stress: true num_iter: 50000 - exclude: 9 10 - -Run with: - ./rvs -c conf/mem.conf -d 3 - -The test passes if no memory errors are detected on any GPU. The module logs -a result line per test at INFO level using 1-based test numbering: - - [INFO ][][action_1] mem Test 1 : PASS - [INFO ][][action_1] mem Test 2 : PASS +Sample output (first action, abridged): + + [RESULT] [302697.357999] Action name :action_1 + [RESULT] [302697.415572] Module name :mem + [RESULT] [302697.637264] [action_1] mem The following memory tests will run + [RESULT] [302697.637269] =============== Test 1 [Walking 1 bit] + [RESULT] [302697.637270] =============== Test 2 [Own address test] + [RESULT] [302697.637270] =============== Test 3 [Moving inversions, ones&zeros] + [RESULT] [302697.637271] =============== Test 4 [Moving inversions, 8 bit pat] + [RESULT] [302697.637271] =============== Test 5 [Moving inversions, random pattern] + [RESULT] [302697.637271] =============== Test 6 [Block move, 64 moves] + [RESULT] [302697.637271] =============== Test 7 [Moving inversions, 32 bit pat] + [RESULT] [302697.637272] =============== Test 8 [Random number sequence] + [RESULT] [302697.637272] =============== Test 9 [Modulo 20, random pattern] + [RESULT] [302697.869004] [action_1] mem Test 1: Change one bit memory addresss + [RESULT] [302697.872232] [action_1] mem Test 1: Change one bit memory addresss + [RESULT] [302697.890031] [action_1] mem Test 1: Change one bit memory addresss + [RESULT] [302697.893155] [action_1] mem Test 1: Change one bit memory addresss + [RESULT] [302697.895754] [action_1] mem Test 1 : PASS + [RESULT] [302697.895771] [action_1] mem Test 2: Each Memory location is filled with its own address + [RESULT] [302697.896227] [action_1] mem Test 1: Change one bit memory addresss + [RESULT] [302697.900155] [action_1] mem Test 1 : PASS + [RESULT] [302697.900173] [action_1] mem Test 2: Each Memory location is filled with its own address + [RESULT] [302697.903915] [action_1] mem Test 1: Change one bit memory addresss ... - -A summary JSON record with `errors` and `pass` fields is also emitted when -JSON output is enabled (`-j`). + [RESULT] [302732.976817] [action_1] mem Test 11: elapsedtime = 1986.538940 bandwidth = 6443.431641GB/s + [RESULT] [302732.978980] [action_1] mem Test 11 : PASS + [RESULT] [302733.171129] [action_1] mem Test 11: elapsedtime = 1989.459717 bandwidth = 6433.972168GB/s + [RESULT] [302733.173334] [action_1] mem Test 11 : PASS + [RESULT] [302733.208421] [action_1] mem Test 11: elapsedtime = 1974.268921 bandwidth = 6483.477539GB/s + [RESULT] [302733.210793] [action_1] mem Test 11 : PASS + [RESULT] [302730.722708] [action_1] mem Test 11: elapsedtime = 1964.402588 bandwidth = 6516.041016GB/s + [RESULT] [302730.724818] [action_1] mem Test 11 : PASS + [RESULT] [302731.757998] [action_1] mem Test 11: elapsedtime = 2002.477539 bandwidth = 6392.145508GB/s + [RESULT] [302731.760200] [action_1] mem Test 11 : PASS + + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | action_1 | MEM | PASS | + +---------------------------------------------------------------------+ ## BABEL module @@ -3374,30 +3187,83 @@ kernel. ### Examples -**Example 1:** +**Example:** -Run all BABEL kernels with a 32 MB buffer, 5000 iterations, double precision: +Run: + + ./rvs -c conf/babel.conf -d 3 + +Configuration (`conf/babel.conf`, first action): actions: - - name: action_1 + - name: babel-double-825MiB device: all module: babel - parallel: true + parallel: false count: 1 - num_iter: 5000 + num_iter: 2000 duration: 0 - array_size: 33554432 + array_size: 865075200 test_type: 2 mibibytes: false o/p_csv: false - copy: true read: true write: true + copy: true mul: true add: true dot: true triad: true + dwords_per_lane: 4 + chunks_per_block: 1 + tb_size: 512 + +Sample output (first action, abridged): + + [RESULT] [302411.15197 ] Action name :babel-double-825MiB + [RESULT] [302411.96856 ] Module name :babel + [RESULT] [302411.735270] [babel-double-825MiB] [GPU:: 42583] Starting the Babel memory stress test + [RESULT] [302411.735337] Running kernels 2000 times, Precision: double + [RESULT] [302411.735378] Array size: 6920.6 MB (=6.9 GB), Total size: 20761.8 MB (=20.8 GB) + + [RESULT] [302446.903905] + --------------------------------------------------------------------------------- + GPU Id Function MBytes/sec Max MB/s Min MB/s Avg MB/s + --------------------------------------------------------------------------------- + 42583 Read 7090191.900 7090191.900 6638148.386 7019091.298 + 42583 Write 6645670.223 6645670.223 5618652.956 6106108.680 + 42583 Copy 6224488.986 6224488.986 6037686.546 6150313.849 + 42583 Mul 6238685.230 6238685.230 6056284.950 6152982.512 + 42583 Add 6008723.700 6008723.700 5485279.487 5919255.626 + 42583 Triad 6031416.066 6031416.066 5879289.313 5950804.403 + 42583 Dot 5844542.436 5844542.436 4912455.933 5806381.609 + --------------------------------------------------------------------------------- + ... -Run with: - - ./rvs -c conf/babel.conf -d 3 + +=====================================================================+ + | ROCm Validation Suite (RVS) Summary | + +=====================================================================+ + | System Overview | + +---------------------------------------------------------------------+ + | Operating System | Ubuntu 22.04.5 LTS | + | RVS version | 1.6.75 | + | ROCm version | 7.2.1-81 | + | amdgpu version | 6.16.13 | + | GPUs | 8 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 42583 | AMD Instinct MI355X - 27226 | + | 0 - 2 - 0000:05:00.0 | 1 - 3 - 0000:15:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 36479 | AMD Instinct MI355X - 17010 | + | 2 - 4 - 0000:65:00.0 | 3 - 5 - 0000:75:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 1590 | AMD Instinct MI355X - 51771 | + | 4 - 6 - 0000:85:00.0 | 5 - 7 - 0000:95:00.0 | + +---------------------------------------------------------------------+ + | AMD Instinct MI355X - 11806 | AMD Instinct MI355X - 57875 | + | 6 - 8 - 0000:e5:00.0 | 7 - 9 - 0000:f5:00.0 | + +=====================================================================+ + | Action Name | Module | Result | + +=====================================================================+ + | babel-double-825MiB | BABEL | PASS | + +---------------------------------------------------------------------+ From cbafd04016b0f05cb58bf4210bc7fae0be6dd1ab Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 21 Jul 2026 16:32:06 -0500 Subject: [PATCH 245/275] Corrected the conf. files used. --- docs/ug1main.md | 61 ++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index aa8be8b98..b918fe167 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -1846,9 +1846,9 @@ are emitted: Run: - ./rvs -c conf/pbqt_single.conf + ./rvs -c conf/MI355X/pbqt_single.conf -Configuration (`conf/pbqt_single.conf`, first action): +Configuration (`conf/MI355X/pbqt_single.conf`, first action): actions: - name: xgmi_d2d_unidir_bandwidth @@ -2138,20 +2138,20 @@ logged as a result: Run: - ./rvs -c conf/pebb_single.conf + ./rvs -c conf/MI355X/pebb_single.conf -Configuration (`conf/pebb_single.conf`, first action): +Configuration (`conf/MI355X/pebb_single.conf`, first action): actions: - name: pcie_h2d_bandwidth device: all module: pebb - log_interval: 5000 duration: 30000 device_to_host: false host_to_device: true parallel: false block_size: 1073741824 + link_type: 2 Sample output (first action, abridged): @@ -2430,26 +2430,34 @@ of the run. Otherwise the result is `met: FALSE`. Run: - ./rvs -c conf/gst_single.conf + ./rvs -c conf/MI355X/gst_single.conf -Configuration (`conf/gst_single.conf`, first action): +Configuration (`conf/MI355X/gst_single.conf`, first action): actions: - name: gst-Tflops-2K2K2K-trig-fp4 device: all module: gst - parallel: false - duration: 10000 - ramp_interval: 5000 log_interval: 3000 - max_violations: 5 + ramp_interval: 5000 + duration: 15000 + hot_calls: 1000 copy_matrix: false target_stress: 0 - tolerance: 0.1 matrix_size_a: 2048 matrix_size_b: 2048 matrix_size_c: 2048 - data_type: fp4 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt Sample output (first action, abridged): @@ -2719,28 +2727,25 @@ The test passes if the peak power measured during the run meets or exceeds Run: - ./rvs -c conf/iet_stress.conf + ./rvs -c conf/MI355X/iet_stress.conf -Configuration (`conf/iet_stress.conf`, first action): +Configuration (`conf/MI355X/iet_stress.conf`, first action): actions: - name: iet-stress-1400W-true device: all module: iet parallel: true - duration: 180000 + duration: 600000 + ramp_interval: 1000 sample_interval: 5000 + log_interval: 5000 target_power: 1400 - tolerance: 0.1 - matrix_size_a: 8640 - matrix_size_b: 8640 - matrix_size_c: 8640 - data_type: fp16_r - out_data_type: fp32_r - compute_type: f32_r - lda: 8640 - ldb: 8640 - ldc: 8640 + tolerance: 0.01 + bw_workload: true + cp_workload: false + wg_count: 256 + nt_loads: true Sample output (first action, abridged): @@ -3191,9 +3196,9 @@ kernel. Run: - ./rvs -c conf/babel.conf -d 3 + ./rvs -c conf/MI355X/babel.conf -Configuration (`conf/babel.conf`, first action): +Configuration (`conf/MI355X/babel.conf`, first action): actions: - name: babel-double-825MiB From 51cec1fccb44365ad88c33cf22a0d691963db80b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid <88209527+jkottiku@users.noreply.github.com> Date: Thu, 23 Jul 2026 14:14:35 -0700 Subject: [PATCH 246/275] Apply suggestions from code review Co-authored-by: yugang-amd --- docs/ug1main.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/ug1main.md b/docs/ug1main.md index b918fe167..1a84d231c 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -478,8 +478,6 @@ Each of the GPU nodes in the directory is identified with a number, indicating the device index of the GPU. Use the `device_index` common key to target specific GPUs by their topology node index. -Note: GPUP ignores the `count`, `duration`, `wait`, `parallel`, and -`log_interval` common keys — each action performs a single-pass property dump. ### Module specific keys @@ -1020,7 +1018,6 @@ The purpose of the RCQT is to provide an extensible, OS independent and scriptable interface capable for performing the configuration checks required for ROCm support. The checks in this module do not target a specific device. -\n\n Two types of actions are performed by RCQT, selected by which configuration key is present — not by the action name: @@ -1031,7 +1028,6 @@ verifying the installed versions. 2) **Packages installation check** — triggered when `rpmpackagelist` or `debpackagelist` is present. Checks whether the listed packages are installed. -Note: the `device` key is ignored by RCQT; checks are platform-wide. This feature is used to check installed packages on the system. It provides checks for installed packages and the currently available package versions, if @@ -1933,9 +1929,9 @@ will be considered. The default value is true. parallelBool Controls whether transfers run in parallel across all CPU–GPU paths or one -by one.\n -- true – Run all test transfers in parallel.\n -- false – Run test transfers one by one. +by one. +`true` – Run all test transfers in parallel. +`false` – Run test transfers one by one. durationInteger @@ -1946,11 +1942,11 @@ seconds). log_intervalInteger This is a positive integer, given in milliseconds, that specifies an interval over which the moving average of the bandwidth will be calculated and logged. The -default value is 1000 (1 second). It must be smaller than the duration key.\n +default value is 1000 (1 second). It must be smaller than the duration key. If this key is 0 (zero), results are displayed as soon as the test transfer is completed. block_sizeCollection of Integers -Optional. Defines list of block sizes to be used in transfer tests.\n +Optional. Defines list of block sizes to be used in transfer tests. If "all" or missing list of block sizes used in rocm_bandwidth_test is used: - 1 * 1024 - 2 * 1024 @@ -2565,7 +2561,7 @@ pass. The default value is 0. Note: this key is parsed but not used by the worker in the current implementation. sample_intervalInteger The interval between power samples, specified in seconds. The default -value is 1 (1 second). If a value less than 1 is specified it is raised to 1. +value is 1 (1 second). If a value less than 1 is specified, it is raised to 1. log_intervalInteger This is a positive integer, given in milliseconds, that specifies a logging From 39fafc9f94f3cfe6467d4ec9f1e8d807699e02e5 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 24 Jul 2026 13:30:28 -0500 Subject: [PATCH 247/275] Add tolerance for iet stress. --- rvs/conf/MI300X-HF/iet_stress.conf | 2 ++ rvs/conf/MI300X/iet_stress.conf | 2 ++ rvs/conf/MI325X/iet_stress.conf | 2 ++ 3 files changed, 6 insertions(+) diff --git a/rvs/conf/MI300X-HF/iet_stress.conf b/rvs/conf/MI300X-HF/iet_stress.conf index 952c3c0de..146ff148d 100644 --- a/rvs/conf/MI300X-HF/iet_stress.conf +++ b/rvs/conf/MI300X-HF/iet_stress.conf @@ -34,6 +34,7 @@ # Set matrix_size to 28000. # Test duration set to 10 mins. # Target power set to 850W for each GPU. +# Power tolerance of 1% (8.5W). # # Run test with: # cd bin @@ -53,6 +54,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 850 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI300X/iet_stress.conf b/rvs/conf/MI300X/iet_stress.conf index fa2885e3e..5157cd07e 100644 --- a/rvs/conf/MI300X/iet_stress.conf +++ b/rvs/conf/MI300X/iet_stress.conf @@ -34,6 +34,7 @@ # Set matrix_size to 28000. # Test duration set to 10 mins. # Target power set to 750W for each GPU. +# Power tolerance of 1% (7.5W). # # Run test with: # cd bin @@ -53,6 +54,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 750 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI325X/iet_stress.conf b/rvs/conf/MI325X/iet_stress.conf index d92bca9e6..613bc1a39 100644 --- a/rvs/conf/MI325X/iet_stress.conf +++ b/rvs/conf/MI325X/iet_stress.conf @@ -34,6 +34,7 @@ # Set matrix_size to 28000. # Test duration set to 10 mins. # Target power set to 1000W for each GPU. +# Power tolerance of 1% (10W). # # Run test with: # cd bin @@ -53,6 +54,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 1000 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 From 58c93f39330b5ef505b907c5fd6df394fc5efe35 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 27 Jul 2026 13:38:52 -0500 Subject: [PATCH 248/275] MI450X support --- CMakeLists.txt | 3 +- CMakePciutilsDownload.cmake | 2 +- CMakeTransferBenchCLI.cmake | 2 +- external/TransferBench | 2 +- rvs/conf/MI450X/babel.conf | 60 +++++ rvs/conf/MI450X/gst_single.conf | 102 +++++++ rvs/conf/MI450X/iet_stress.conf | 64 +++++ rvs/conf/MI450X/levels/rvs_level_1.conf | 37 +++ rvs/conf/MI450X/levels/rvs_level_2.conf | 80 ++++++ rvs/conf/MI450X/levels/rvs_level_3.conf | 253 ++++++++++++++++++ rvs/conf/MI450X/levels/rvs_level_4.conf | 336 ++++++++++++++++++++++++ rvs/conf/MI450X/levels/rvs_level_5.conf | 336 ++++++++++++++++++++++++ rvs/conf/MI450X/pbqt_single.conf | 108 ++++++++ rvs/conf/MI450X/pebb_single.conf | 120 +++++++++ src/gpu_util.cpp | 3 +- 15 files changed, 1503 insertions(+), 5 deletions(-) create mode 100644 rvs/conf/MI450X/babel.conf create mode 100644 rvs/conf/MI450X/gst_single.conf create mode 100644 rvs/conf/MI450X/iet_stress.conf create mode 100644 rvs/conf/MI450X/levels/rvs_level_1.conf create mode 100644 rvs/conf/MI450X/levels/rvs_level_2.conf create mode 100644 rvs/conf/MI450X/levels/rvs_level_3.conf create mode 100644 rvs/conf/MI450X/levels/rvs_level_4.conf create mode 100644 rvs/conf/MI450X/levels/rvs_level_5.conf create mode 100644 rvs/conf/MI450X/pbqt_single.conf create mode 100644 rvs/conf/MI450X/pebb_single.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index b275c74f9..6f9366e80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -524,6 +524,7 @@ if(RVS_BUILD_TESTS) message(FATAL_ERROR "Build step for googletest failed: ${result}") endif() execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/googletest-src -B${CMAKE_BINARY_DIR}/googletest-build + -DCMAKE_POSITION_INDEPENDENT_CODE=ON RESULT_VARIABLE result WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-src ) if(result) @@ -804,7 +805,7 @@ if(BUILD_ADDRESS_SANITIZER) set(ASAN_LD_FLAGS "-fuse-ld=lld") endif() -set(HCC_CXX_FLAGS "-fno-gpu-rdc --offload-arch=gfx90a --offload-arch=gfx1030 --offload-arch=gfx803 --offload-arch=gfx900 --offload-arch=gfx906 --offload-arch=gfx908 --offload-arch=gfx1101 --offload-arch=gfx942 --offload-arch=gfx1200 --offload-arch=gfx1201 --offload-arch=gfx1100 --offload-arch=gfx950") +set(HCC_CXX_FLAGS "-fno-gpu-rdc --offload-arch=gfx90a --offload-arch=gfx1030 --offload-arch=gfx803 --offload-arch=gfx900 --offload-arch=gfx906 --offload-arch=gfx908 --offload-arch=gfx1101 --offload-arch=gfx942 --offload-arch=gfx1200 --offload-arch=gfx1201 --offload-arch=gfx1100 --offload-arch=gfx950 --offload-arch=gfx1250") add_subdirectory(rvslib) add_subdirectory(rvs) diff --git a/CMakePciutilsDownload.cmake b/CMakePciutilsDownload.cmake index 9cf38edfd..574e61a0a 100644 --- a/CMakePciutilsDownload.cmake +++ b/CMakePciutilsDownload.cmake @@ -1,6 +1,6 @@ ################################################################################ ## -## Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +## Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. ## ## MIT LICENSE: ## Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/CMakeTransferBenchCLI.cmake b/CMakeTransferBenchCLI.cmake index cbcdff82f..69e150fb9 100644 --- a/CMakeTransferBenchCLI.cmake +++ b/CMakeTransferBenchCLI.cmake @@ -52,7 +52,7 @@ set(TRANSFERBENCH_BUILD_DIR "${CMAKE_BINARY_DIR}/TransferBench-cli-build") # Source of truth: TransferBench build_packages_local.sh DEFAULT_GPU_TARGETS set(TRANSFERBENCH_GPU_TARGETS - "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201" + "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201;gfx1250" CACHE STRING "GPU targets to build TransferBench for") set(_tb_cmake_args diff --git a/external/TransferBench b/external/TransferBench index c78c4aec9..5fbfa95a1 160000 --- a/external/TransferBench +++ b/external/TransferBench @@ -1 +1 @@ -Subproject commit c78c4aec95e5e8317ddecdf6e224443f63473312 +Subproject commit 5fbfa95a1111a7f33f20b9780e5f22bf739f82fa diff --git a/rvs/conf/MI450X/babel.conf b/rvs/conf/MI450X/babel.conf new file mode 100644 index 000000000..3cacca688 --- /dev/null +++ b/rvs/conf/MI450X/babel.conf @@ -0,0 +1,60 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# BABEL test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by white space (e.g.: device: 50599 3245) +# Set parallel execution to false +# Set array size to reflect the buffer you want to test +# Set run count to 1 (test will run once) +# + +actions: +- name: babel-float-1950MiB + device: all + module: babel # Name of the module + parallel: true # Parallel true or false + count: 1 # Number of times you want to repeat the test from the begin ( A clean start every time) + num_iter: 20000 # Number of iterations, this many kernels are launched simultaneosuly and stresses the system + array_size: 2044723200 # Array size the test operates, this is 1950 MiB + test_type: 1 # type of test, 1: Float, 2: Double, 3: Triad float, 4: Triad double + mibibytes: false # mibibytes (MiB) or megabytes (MB), true for MiB + o/p_csv: false # o/p as csv file + read: true # read operation + write: false # write operation + copy: false # copy operation + mul: false # mul operation + add: false # add operation + dot: false # dot operation + triad: true # triad operation + dwords_per_lane: 4 # Number of dwords per lane + chunks_per_block: 4 # Number of chunks per block + tb_size: 1024 # Thread block size + data_init: gpu_norm_dist # Data initialization + nontemporal: write # Non-Temporal + diff --git a/rvs/conf/MI450X/gst_single.conf b/rvs/conf/MI450X/gst_single.conf new file mode 100644 index 000000000..bbb4847dc --- /dev/null +++ b/rvs/conf/MI450X/gst_single.conf @@ -0,0 +1,102 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: gst-4K*4K*32K-trig-fp8 + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + parallel: true + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: fp32_r + compute_type: fp32_r + lda: 0 + ldb: 0 + ldc: 0 + ldd: 0 + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-4K*4K*16K-trig-bf16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + parallel: true + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + +- name: gst-16*64K*16K-trig-fp16 + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + parallel: true + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 16 + matrix_size_b: 65536 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + diff --git a/rvs/conf/MI450X/iet_stress.conf b/rvs/conf/MI450X/iet_stress.conf new file mode 100644 index 000000000..9f5ee1ea5 --- /dev/null +++ b/rvs/conf/MI450X/iet_stress.conf @@ -0,0 +1,64 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +# IET stress test +# +# Preconditions: +# Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g +# option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify +# all the GPUs IDs separated by comma. +# Set parallel execution to true (gemm workload execution on all GPUs in parallel) +# Set gemm operation type as dgemm. +# Set matrix_size to 28000. +# Test duration set to 10 mins. +# +# Run test with: +# cd bin +# ./rvs -c conf/MI450X/iet_stress.conf +# +# Expected result: +# The test on each GPU passes (TRUE) if the GPU achieves power target. +# + +actions: +- name: iet-stress-dgemm-true + device: all + module: iet + parallel: true + duration: 600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 0 + tolerance: 0 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand + diff --git a/rvs/conf/MI450X/levels/rvs_level_1.conf b/rvs/conf/MI450X/levels/rvs_level_1.conf new file mode 100644 index 000000000..501a3770f --- /dev/null +++ b/rvs/conf/MI450X/levels/rvs_level_1.conf @@ -0,0 +1,37 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: + +- name: metapackage-validation + device: all + module: rcqt + package: rocm-hip-sdk rocm-hip-libraries rocm-ml-libraries rocm-ml-sdk amdgpu-dkms rocm-language-runtime rocm-openmp-sdk rocm-utils rocm-opencl-sdk rocm-opencl-runtime rocm-hip-runtime rocm-developer-tools + +- name: packagelist-install-validation + device: all + module: rcqt + rpmpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-devel rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-devel hipcub-devel rocsolver rocsparse rocsolver-devel rocminfo hipfft-devel rocm-gdb rocm-dbgapi rocfft hipblas-devel rocthrust-devel openmp-extras-runtime openmp-extras-devel comgr rccl rocblas hipblas roctracer-devel hip-doc rocrand hsa-rocr hipfft hipsparse-devel rocsparse-devel rocrand-devel rocm-opencl hip-devel rocprim-devel hipsolver-devel rocfft-devel hsa-amd-aqlprofile hipify-clang miopen-hip-devel rocm-llvm hip-runtime-amd hip-samples rocalution-devel rccl-devel hipsolver rocprofiler-devel miopen-hip rocm-cmake hipsparse rocblas-devel rocm-opencl-devel + debpackagelist: rocm-hip-libraries rocm-core rocm-hip-runtime-dev rocm-language-runtime rocm-hip-runtime rocm-hip-sdk rocm-utils rocm-smi-lib rocalution rocm-debug-agent rocm-device-libs hsa-rocr-dev hipcub-dev rocsolver rocsparse rocsolver-dev rocminfo hipfft-dev rocm-gdb rocm-dbgapi rocfft hipblas-dev rocthrust-dev openmp-extras-runtime openmp-extras-dev comgr rccl rocblas hipblas roctracer-dev hip-doc rocrand hsa-rocr hipfft hipsparse-dev rocsparse-dev rocrand-dev rocm-opencl hip-dev rocprim-dev hipsolver-dev rocfft-dev hsa-amd-aqlprofile hipify-clang miopen-hip-dev rocm-llvm hip-runtime-amd hip-samples rocalution-dev rccl-dev hipsolver rocprofiler-dev miopen-hip rocm-cmake hipsparse rocblas-dev rocm-opencl-dev diff --git a/rvs/conf/MI450X/levels/rvs_level_2.conf b/rvs/conf/MI450X/levels/rvs_level_2.conf new file mode 100644 index 000000000..90122985a --- /dev/null +++ b/rvs/conf/MI450X/levels/rvs_level_2.conf @@ -0,0 +1,80 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: pcie_capability + device: all + module: peqt + capability: + link_cap_max_speed: + link_cap_max_width: + link_stat_cur_speed: + link_stat_neg_width: + slot_pwr_limit_value: + slot_physical_num: + deviceid: + vendor_id: + kernel_driver: + +- name: hbm_basic + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 2044723200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + subtest: 0 + dwords_per_lane: 4 + chunks_per_block: 4 + tb_size: 1024 + data_init: gpu_norm_dist + nontemporal: write + +- name: xgmi_interface + device: all + module: pbqt + log_interval: 5000 + duration: 20000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: true + block_size: 67108864 + device_id: all + +- name: pcie_interface + device: all + module: pebb + duration: 20000 + device_to_host: false + host_to_device: true + parallel: true + block_size: 67108864 + link_type: 2 diff --git a/rvs/conf/MI450X/levels/rvs_level_3.conf b/rvs/conf/MI450X/levels/rvs_level_3.conf new file mode 100644 index 000000000..c60e43b96 --- /dev/null +++ b/rvs/conf/MI450X/levels/rvs_level_3.conf @@ -0,0 +1,253 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_mid + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 2044723200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + dwords_per_lane: 4 + chunks_per_block: 4 + tb_size: 1024 + data_init: gpu_norm_dist + nontemporal: write + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: fp32_r + compute_type: fp32_r + lda: 0 + ldb: 0 + ldc: 0 + ldd: 0 + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 5000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 16 + matrix_size_b: 65536 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true diff --git a/rvs/conf/MI450X/levels/rvs_level_4.conf b/rvs/conf/MI450X/levels/rvs_level_4.conf new file mode 100644 index 000000000..938e37e80 --- /dev/null +++ b/rvs/conf/MI450X/levels/rvs_level_4.conf @@ -0,0 +1,336 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 100 + array_size: 2044723200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + tb_size: 1024 + data_init: gpu_norm_dist + nontemporal: write + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 1 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: fp32_r + compute_type: fp32_r + lda: 0 + ldb: 0 + ldc: 0 + ldd: 0 + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 16 + matrix_size_b: 65536 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 10000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 60000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 0 + tolerance: 0 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand diff --git a/rvs/conf/MI450X/levels/rvs_level_5.conf b/rvs/conf/MI450X/levels/rvs_level_5.conf new file mode 100644 index 000000000..d2de75dcf --- /dev/null +++ b/rvs/conf/MI450X/levels/rvs_level_5.conf @@ -0,0 +1,336 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +- name: hbm_full + device: all + module: babel + parallel: true + count: 1 + num_iter: 10000 + array_size: 2044723200 + test_type: 2 + mibibytes: false + o/p_csv: false + read: true + write: true + copy: true + mul: true + add: true + triad: true + dot: true + dwords_per_lane: 4 + chunks_per_block: 4 + tb_size: 1024 + data_init: gpu_norm_dist + nontemporal: write + +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 900000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +- name: xgmi_d2d_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 900000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +- name: memtest + device: all + module: mem + parallel: true + count: 20 + wait: 100 + mapped_memory: false + mem_blocks: 128 + num_passes: 500 + thrds_per_blk: 64 + stress: true + num_iter: 200000 + +- name: compute-fp4-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp4_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e3m2_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-bf6-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 2048 + matrix_size_b: 2048 + matrix_size_c: 2048 + scale_a: block + scale_b: block + matrix_init: trig + data_type: fp6_e2m3_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.5 + beta: 2 + blas_source: hipblaslt + parallel: true + +- name: compute-fp8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 32768 + matrix_init: trig + data_type: fp8_e4m3_r + out_data_type: fp32_r + compute_type: fp32_r + lda: 0 + ldb: 0 + ldc: 0 + ldd: 0 + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf8-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 10000 + copy_matrix: false + target_stress: 1854000 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp8_e5m2_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 1 + transb: 0 + alpha: 1.000000 + beta: 0.000000 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 16 + matrix_size_b: 65536 + matrix_size_c: 16384 + matrix_init: trig + data_type: fp16_r + out_data_type: fp16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-bf16-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 60 + copy_matrix: false + target_stress: 0 + matrix_size_a: 4096 + matrix_size_b: 4096 + matrix_size_c: 16384 + matrix_init: trig + data_type: bf16_r + out_data_type: bf16_r + compute_type: fp32_r + transa: 0 + transb: 0 + alpha: 1 + beta: 0 + rotating: 512 + blas_source: hipblaslt + parallel: true + +- name: compute-fp32-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 3072 + matrix_size_b: 3072 + matrix_size_c: 3072 + matrix_init: trig + data_type: fp32_r + lda: 3072 + ldb: 3072 + ldc: 3072 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: compute-fp64-trig + device: all + module: gst + log_interval: 3000 + ramp_interval: 2000 + duration: 900000 + hot_calls: 1000 + copy_matrix: false + target_stress: 0 + matrix_size_a: 8192 + matrix_size_b: 8192 + matrix_size_c: 8192 + matrix_init: trig + data_type: fp64_r + compute_type: fp64_r + lda: 8192 + ldb: 8192 + ldc: 8192 + transa: 1 + transb: 0 + alpha: 1 + beta: 0 + blas_source: hipblaslt + parallel: true + +- name: power-stress + device: all + module: iet + parallel: true + duration: 3600000 + ramp_interval: 10000 + sample_interval: 5000 + log_interval: 5000 + target_power: 0 + tolerance: 0 + matrix_size: 28000 + ops_type: dgemm + lda: 28000 + ldb: 28000 + ldc: 28000 + alpha: 1 + beta: 1 + matrix_init: hiprand diff --git a/rvs/conf/MI450X/pbqt_single.conf b/rvs/conf/MI450X/pbqt_single.conf new file mode 100644 index 000000000..876556c17 --- /dev/null +++ b/rvs/conf/MI450X/pbqt_single.conf @@ -0,0 +1,108 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using RVS native method via SDMA +- name: xgmi_d2d_unidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test +# using RVS native method via SDMA +- name: xgmi_d2d_bidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via SDMA +- name: xgmi_d2d_unidir_tb_dma + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 2 + hot_calls: 5 + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_gfx + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: gfx + subexecutor: 16 + warm_calls: 2 + hot_calls: 5 + +# All-to-All bandwidth test using TransferBench via GFX +- name: xgmi_d2d_unidir_tb_a2a + device: all + module: pbqt + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 268435456 + device_id: all + transfer_method: transferbench + transferbench_test: alltoall + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + gfx_unroll: 2 + diff --git a/rvs/conf/MI450X/pebb_single.conf b/rvs/conf/MI450X/pebb_single.conf new file mode 100644 index 000000000..11a510a56 --- /dev/null +++ b/rvs/conf/MI450X/pebb_single.conf @@ -0,0 +1,120 @@ +# ################################################################################ +# # +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### + +actions: +# Host-to-Device/CPU-to-GPU bandwidth test using RVS native method via SDMA +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +# Device-to-Host/GPU-to-CPU bandwidth test using RVS native method via SDMA +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via SDMA +- name: pcie_h2d_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: gpu + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via SDMA +- name: pcie_d2h_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: gpu + destination_memory: cpu + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via GFX +- name: pcie_h2d_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: "null" + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX +- name: pcie_d2h_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: "null" + destination_memory: cpu + diff --git a/src/gpu_util.cpp b/src/gpu_util.cpp index 560aa1271..885416655 100644 --- a/src/gpu_util.cpp +++ b/src/gpu_util.cpp @@ -56,7 +56,8 @@ const std::map gpu_dev_map = { {0x74a5, "MI325X"}, // MI325X {0x75a0, "MI350X"}, // MI350X AC {0x75a3, "MI355X"}, // MI355X LC - {0x75a8, "MI350P"} // MI350P workstation (450W / 600W disambiguated by power cap) + {0x75a8, "MI350P"}, // MI350P workstation (450W / 600W disambiguated by power cap) + {0x75c1, "MI450X"} // MI450X }; using std::vector; From 82c61d4692110e53941c4352ba3313d7f166d516 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 28 Jul 2026 17:06:25 -0500 Subject: [PATCH 249/275] Add gfx1250 support in build script. --- build_packages_local.sh | 2 +- rvs/conf/MI450X/babel.conf | 2 +- rvs/conf/MI450X/pbqt_single.conf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build_packages_local.sh b/build_packages_local.sh index 1f7f990ca..2bd48ecbe 100644 --- a/build_packages_local.sh +++ b/build_packages_local.sh @@ -12,7 +12,7 @@ BUILD_TYPE="${BUILD_TYPE:-Release}" BUILD_TRANSFERBENCH_CLI="${BUILD_TRANSFERBENCH_CLI:-OFF}" # TransferBench offload archs (independent of GPU_FAMILY SDK tarball selection). # Source of truth: TransferBench build_packages_local.sh DEFAULT_GPU_TARGETS. -DEFAULT_GPU_TARGETS="gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201" +DEFAULT_GPU_TARGETS="gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1200;gfx1201;gfx1250" TRANSFERBENCH_GPU_TARGETS="${TRANSFERBENCH_GPU_TARGETS:-${GPU_TARGETS:-$DEFAULT_GPU_TARGETS}}" BUILD_DIR="./build" ROCM_INSTALL_DIR="$HOME/rocm-sdk" diff --git a/rvs/conf/MI450X/babel.conf b/rvs/conf/MI450X/babel.conf index 3cacca688..ef2716a80 100644 --- a/rvs/conf/MI450X/babel.conf +++ b/rvs/conf/MI450X/babel.conf @@ -29,7 +29,7 @@ # Set device to all. If you need to run the rvs only on a subset of GPUs, please run rvs with -g # option, collect the GPUs IDs (e.g.: GPU[ 5 - 50599] -> 50599 is the GPU ID) and then specify # all the GPUs IDs separated by white space (e.g.: device: 50599 3245) -# Set parallel execution to false +# Set parallel execution to true # Set array size to reflect the buffer you want to test # Set run count to 1 (test will run once) # diff --git a/rvs/conf/MI450X/pbqt_single.conf b/rvs/conf/MI450X/pbqt_single.conf index 876556c17..c903a34a4 100644 --- a/rvs/conf/MI450X/pbqt_single.conf +++ b/rvs/conf/MI450X/pbqt_single.conf @@ -26,7 +26,7 @@ actions: # Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test # using RVS native method via SDMA -- name: xgmi_d2d_unidir_bandwidth +- name: xgmi_d2d_unidir_bandwidth device: all module: pbqt log_interval: 5000 @@ -40,7 +40,7 @@ actions: # Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test # using RVS native method via SDMA -- name: xgmi_d2d_bidir_bandwidth +- name: xgmi_d2d_bidir_bandwidth device: all module: pbqt log_interval: 5000 From c80c57e518cfd7f8884f764de8e1f79ed505e7fc Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Jul 2026 18:41:18 +0530 Subject: [PATCH 250/275] Update peqt for domain usage for pcie --- peqt.so/src/action.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/peqt.so/src/action.cpp b/peqt.so/src/action.cpp index cc39d5f3f..2a43f1444 100644 --- a/peqt.so/src/action.cpp +++ b/peqt.so/src/action.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -201,7 +201,7 @@ bool peqt_action::get_gpu_all_pcie_capabilities(struct pci_dev *dev, if (bjson){ json_pcaps_node = json_node_create(MODULE_NAME, action_name.c_str(), rvs::logresults); - + if (json_pcaps_node != NULL) { rvs::lp::AddString(json_pcaps_node, RVS_JSON_LOG_GPU_ID_KEY, std::to_string(gpu_id)); @@ -215,7 +215,7 @@ bool peqt_action::get_gpu_all_pcie_capabilities(struct pci_dev *dev, string prop_name = it->first.substr(it->first.find_last_of(".") + 1); bool prop_found = false; for (i = 0; i < PCI_DEV_NUM_CAPABILITIES; i++) { - if ((prop_name == pcie_cap_names[i]) && + if ((prop_name == pcie_cap_names[i]) && ( dev != NULL )){ prop_found = true; // call the capability's corresponding function @@ -264,6 +264,9 @@ bool peqt_action::get_gpu_all_pcie_capabilities(struct pci_dev *dev, map::iterator it_pb_pm_state = pb_op_pm_states_encodings_map.find (prop_name.substr(0, pos_pb_pm_state)); + if (it_pb_pm_state == pb_op_pm_states_encodings_map.end()) { + continue; + } uint8_t pb_op_pm_state = it_pb_pm_state->second; std::size_t pos_pb_type = @@ -273,11 +276,17 @@ bool peqt_action::get_gpu_all_pcie_capabilities(struct pci_dev *dev, pb_op_pm_types_encodings_map.find (prop_name.substr(pos_pb_pm_state + 1, pos_pb_type - pos_pb_pm_state - 1)); + if (it_pb_type == pb_op_pm_types_encodings_map.end()) { + continue; + } uint8_t pb_op_pm_type = it_pb_type->second; map::iterator it_pb_power_rail = pb_op_pm_power_rails_encodings_map.find (prop_name.substr(pos_pb_type + 1)); + if (it_pb_power_rail == pb_op_pm_power_rails_encodings_map.end()) { + continue; + } uint8_t pb_op_power_rail = it_pb_power_rail->second; // query for power budgeting capabilities get_pwr_budgeting(dev, pb_op_pm_state, pb_op_pm_type, @@ -358,7 +367,7 @@ int peqt_action::run(void) { return -1; } if (bjson){ - json_add_primary_fields(std::string(MODULE_NAME), action_name); + json_add_primary_fields(std::string(MODULE_NAME), action_name); } // get the pci_access structure pacc = pci_alloc(); @@ -437,11 +446,12 @@ int peqt_action::run(void) { // computes the actual dev's location_id (sysfs entry) uint16_t dev_location_id = ((((uint16_t) (dev->bus)) << 8) | ((uint16_t) (dev->dev)) << 3 | ((uint16_t) (dev->func)) ); + uint16_t dev_domain = static_cast(dev->domain); // check if this pci_dev corresponds to one of the AMD GPUs uint16_t gpu_id; - // if not and AMD GPU just continue - if (rvs::gpulist::location2gpu(dev_location_id, &gpu_id)) { + // if not an AMD GPU just continue + if (rvs::gpulist::domlocation2gpu(dev_domain, dev_location_id, &gpu_id)) { RVSTRACE_ continue; } @@ -508,7 +518,7 @@ int peqt_action::run(void) { rvs::lp::Log(msg, rvs::logresults); if (bjson) { - rvs::lp::JsonActionEndNodeCreate(); + rvs::lp::JsonActionEndNodeCreate(); } action_result.state = rvs::actionstate::ACTION_COMPLETED; @@ -521,5 +531,3 @@ int peqt_action::run(void) { RVSTRACE_ return pci_infra_qual_result ? 0 : -1; } - - From ca7a505da632a82caeb124533ed8ff93eaebb2b7 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Jul 2026 18:43:14 +0530 Subject: [PATCH 251/275] use sys fs for kernel and harden checks for pwr budgeting --- src/pci_caps.cpp | 136 ++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 72 deletions(-) diff --git a/src/pci_caps.cpp b/src/pci_caps.cpp index 75e3f8f3c..061ee785a 100644 --- a/src/pci_caps.cpp +++ b/src/pci_caps.cpp @@ -1,6 +1,6 @@ /******************************************************************************** * - * Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -81,7 +81,7 @@ unsigned int pci_dev_find_cap_offset(struct pci_dev *dev, unsigned char cap, * gets the max link speed * @param dev a pci_dev structure containing the PCI device information * @param buff pre-allocated char buffer - * @return + * @return */ void get_link_cap_max_speed(struct pci_dev *dev, char *buff) { const char *link_max_speed; @@ -129,7 +129,7 @@ void get_link_cap_max_speed(struct pci_dev *dev, char *buff) { * gets the PCI dev max link width * @param dev a pci_dev structure containing the PCI device information * @param buff pre-allocated char buffer - * @return + * @return */ void get_link_cap_max_width(struct pci_dev *dev, char *buff) { // get pci dev capabilities offset @@ -150,7 +150,7 @@ void get_link_cap_max_width(struct pci_dev *dev, char *buff) { * gets the current link speed * @param dev a pci_dev structure containing the PCI device information * @param buff pre-allocated char buffer - * @return + * @return */ void get_link_stat_cur_speed(struct pci_dev *dev, char *buff) { const char *link_cur_speed; @@ -198,7 +198,7 @@ void get_link_stat_cur_speed(struct pci_dev *dev, char *buff) { * gets the negotiated link width * @param dev a pci_dev structure containing the PCI device information * @param buff pre-allocated char buffer - * @return + * @return */ void get_link_stat_neg_width(struct pci_dev *dev, char *buff) { // get pci dev capabilities offset @@ -219,7 +219,7 @@ void get_link_stat_neg_width(struct pci_dev *dev, char *buff) { * gets the power limit value * @param dev a pci_dev structure containing the PCI device information * @param buff pre-allocated char buffer - * @return + * @return */ void get_slot_pwr_limit_value(struct pci_dev *dev, char *buff) { // get pci dev capabilities offset @@ -266,8 +266,8 @@ void get_slot_pwr_limit_value(struct pci_dev *dev, char *buff) { /** * gets PCI dev physical slot number * @param dev a pci_dev structure containing the PCI device information - * @param buff pre-allocated char buffer - * @return + * @param buff pre-allocated char buffer + * @return */ void get_slot_physical_num(struct pci_dev *dev, char *buff) { // get pci dev capabilities offset @@ -286,8 +286,8 @@ void get_slot_physical_num(struct pci_dev *dev, char *buff) { /** * gets PCI dev bus id * @param dev a pci_dev structure containing the PCI device information - * @param buff pre-allocated char buffer - * @return + * @param buff pre-allocated char buffer + * @return */ void get_pci_bus_id(struct pci_dev *dev, char *buff) { snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%0X", dev->bus); @@ -296,8 +296,8 @@ void get_pci_bus_id(struct pci_dev *dev, char *buff) { /** * gets PCI device id (it appears as a function just to keep compatibility with the array of pointer to function) * @param dev a pci_dev structure containing the PCI device information - * @param buff pre-allocated char buffer - * @return + * @param buff pre-allocated char buffer + * @return */ void get_device_id(struct pci_dev *dev, char *buff) { snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%u", dev->device_id); @@ -306,8 +306,8 @@ void get_device_id(struct pci_dev *dev, char *buff) { /** * gets PCI device's vendor id (it appears as a function just to keep compatibility with the array of pointer to function) * @param dev a pci_dev structure containing the PCI device information - * @param buff pre-allocated char buffer - * @return + * @param buff pre-allocated char buffer + * @return */ void get_vendor_id(struct pci_dev *dev, char *buff) { snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%u", dev->vendor_id); @@ -317,51 +317,39 @@ void get_vendor_id(struct pci_dev *dev, char *buff) { * gets the PCI dev driver name * @param dev a pci_dev structure containing the PCI device information * @param buf pre-allocated char buffer - * @return + * @return */ void get_kernel_driver(struct pci_dev *dev, char *buff) { - char name[1024], *drv, *base; + char name[256]; + char link_target[PCI_CAP_DATA_MAX_BUF_SIZE]; + char *drv; int n; - buff[0] = '\0'; - - //returning from here as there are other ways, this is - //not supported any longer - //the more simpler way is sudo dkms status snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%s", PCI_CAP_NOT_SUPPORTED); - if (dev->access == NULL) { - return; - } - - if (dev->access->method != PCI_ACCESS_SYS_BUS_PCI) { - return; - } - - base = pci_get_param(dev->access, const_cast("sysfs.path")); - if (!base || !base[0]) { + if (dev == NULL) { return; } - n = snprintf(name, sizeof(name), "%s/devices/%04x:%02x:%02x.%d/driver", - base, dev->domain, dev->bus, dev->dev, dev->func); + n = snprintf(name, sizeof(name), + "/sys/bus/pci/devices/%04x:%02x:%02x.%d/driver", + dev->domain, dev->bus, dev->dev, dev->func); if (n < 0 || n >= static_cast(sizeof(name))) { return; } - n = readlink(name, buff, PCI_CAP_DATA_MAX_BUF_SIZE); + n = readlink(name, link_target, PCI_CAP_DATA_MAX_BUF_SIZE - 1); if (n < 0) { return; } - if (n >= PCI_CAP_DATA_MAX_BUF_SIZE) { - return; - } - - buff[n] = 0; + link_target[n] = '\0'; - if ((drv = strrchr(buff, '/')) != NULL) + if ((drv = strrchr(link_target, '/')) != NULL) { snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%s", drv + 1); + } else { + snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%s", link_target); + } } /** @@ -405,39 +393,43 @@ void get_pwr_budgeting(struct pci_dev *dev, uint8_t pb_pm_state, snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%s", PCI_CAP_NOT_SUPPORTED); - if (cap_offset_pwbgd != 0) { - i = 0; - - do { - // Data select register size is 1 byte, it will select the DWORD(4 bytes) - // from budgeting data register corresponding to state. - // dont proceed if write to register fails - int rt = pci_write_byte(dev, cap_offset_pwbgd + PCI_PWR_DSR, i); - if(!rt){// 0 indicates error in writing - ++i; - continue; - } - w = pci_read_word(dev, cap_offset_pwbgd + PCI_PWR_DATA); - - if (!w) - return; - - pb_act_pm_state = PCI_PWR_DATA_PM_STATE(w); - pb_act_type = PCI_PWR_DATA_TYPE(w); - pb_act_power_rail = PCI_PWR_DATA_RAIL(w); - - if (pb_act_pm_state == pb_pm_state && pb_act_type == pb_type && - pb_act_power_rail == pb_power_rail) { - base = PCI_PWR_DATA_BASE(w); - scale = PCI_PWR_DATA_SCALE(w); - snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%.3fW", - base * pow(10, -scale)); - return; - } - - i++; - } while (i <= DSR_MAX_VAL); // DSR size is 1 byte, no need to run forever + if (cap_offset_pwbgd == 0 || dev->no_config_access || dev->access == NULL) { + return; } + + i = 0; + + do { + // Data select register size is 1 byte, it will select the DWORD(4 bytes) + // from budgeting data register corresponding to state. + // dont proceed if write to register fails + int rt = pci_write_byte(dev, cap_offset_pwbgd + PCI_PWR_DSR, i); + if (!rt) { // 0 indicates error in writing + ++i; + continue; + } + w = pci_read_word(dev, cap_offset_pwbgd + PCI_PWR_DATA); + + if (!w) { + ++i; + continue; + } + + pb_act_pm_state = PCI_PWR_DATA_PM_STATE(w); + pb_act_type = PCI_PWR_DATA_TYPE(w); + pb_act_power_rail = PCI_PWR_DATA_RAIL(w); + + if (pb_act_pm_state == pb_pm_state && pb_act_type == pb_type && + pb_act_power_rail == pb_power_rail) { + base = PCI_PWR_DATA_BASE(w); + scale = PCI_PWR_DATA_SCALE(w); + snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%.3fW", + base * pow(10, -scale)); + return; + } + + i++; + } while (i <= DSR_MAX_VAL); // DSR size is 1 byte, no need to run forever } /** From ba2551ed37111bbaba35c85d070298ea12fde0bf Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Jul 2026 18:45:08 +0530 Subject: [PATCH 252/275] use domain for pcie devices --- pesm.so/src/worker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pesm.so/src/worker.cpp b/pesm.so/src/worker.cpp index 8915903f8..61d770d1d 100644 --- a/pesm.so/src/worker.cpp +++ b/pesm.so/src/worker.cpp @@ -141,10 +141,11 @@ void Worker::run() { // computes the actual dev's location_id (sysfs entry) uint16_t dev_location_id = ((((uint16_t)(dev->bus)) << 8) | (((uint16_t)(dev->dev)) << 3) | ((uint16_t)(dev->func))) ; + uint16_t dev_domain = static_cast(dev->domain); uint16_t gpu_id; - // if not and AMD GPU just continue - if (rvs::gpulist::location2gpu(dev_location_id, &gpu_id)) + // if not an AMD GPU just continue + if (rvs::gpulist::domlocation2gpu(dev_domain, dev_location_id, &gpu_id)) continue; uint16_t gpu_idx; @@ -332,4 +333,3 @@ void Worker::stop() { catch(...) { } } - From faee14ff21f70b591d36c05194ea8d9fa17f86de Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Jul 2026 18:46:25 +0530 Subject: [PATCH 253/275] use domain for pcie devices --- smqt.so/src/action.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smqt.so/src/action.cpp b/smqt.so/src/action.cpp index 0d212c6ab..a00bd35a8 100644 --- a/smqt.so/src/action.cpp +++ b/smqt.so/src/action.cpp @@ -1,5 +1,5 @@ /******************************************************************************** - * + * * Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. * * MIT LICENSE: @@ -176,7 +176,7 @@ bool smqt_action::get_all_smqt_config_keys() { * @brief Implements action functionality * Check if the sizes and addresses of BARs match the given ones * @return 0 - success, non-zero otherwise - * */ + * */ int smqt_action::run(void) { bool global_pass = true; @@ -229,10 +229,11 @@ int smqt_action::run(void) { // computes the actual dev's location_id (sysfs entry) uint16_t dev_location_id = ((((uint16_t) (dev->bus)) << 8) | ((uint16_t) (dev->dev)) << 3 | ((uint16_t) (dev->func)) ); + uint16_t dev_domain = static_cast(dev->domain); uint16_t gpu_id; - // if not and AMD GPU just continue - if (rvs::gpulist::location2gpu(dev_location_id, &gpu_id)) + // if not an AMD GPU just continue + if (rvs::gpulist::domlocation2gpu(dev_domain, dev_location_id, &gpu_id)) continue; #ifdef RVS_UNIT_TEST @@ -379,4 +380,3 @@ int smqt_action::run(void) { return global_pass ? 0 : -1; } - From d7a603ccc9aecfd5ba61b96d36a123039f014138 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Wed, 29 Jul 2026 21:40:55 +0530 Subject: [PATCH 254/275] dev->no_config_access is not part of pci v3.7.0 which we are building against --- src/pci_caps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pci_caps.cpp b/src/pci_caps.cpp index 061ee785a..d833a7ff2 100644 --- a/src/pci_caps.cpp +++ b/src/pci_caps.cpp @@ -393,7 +393,7 @@ void get_pwr_budgeting(struct pci_dev *dev, uint8_t pb_pm_state, snprintf(buff, PCI_CAP_DATA_MAX_BUF_SIZE, "%s", PCI_CAP_NOT_SUPPORTED); - if (cap_offset_pwbgd == 0 || dev->no_config_access || dev->access == NULL) { + if (cap_offset_pwbgd == 0 || dev->access == NULL) { return; } From 1092e7fb17ca950d6dfe024c76fc0b7fd9a92e32 Mon Sep 17 00:00:00 2001 From: pmoutsias-amd Date: Wed, 29 Jul 2026 15:51:16 -0400 Subject: [PATCH 255/275] fix: switch to rocm-extras flavor (#1267) --- docs/conf.py | 11 ++--------- docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 14 +++++--------- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6fde86237..d536b9ce9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,18 +31,11 @@ extensions = ["rocm_docs"] html_theme = "rocm_docs_theme" html_theme_options = { - "flavor": "generic", + "flavor": "rocm-extras", "header_title": f"ROCm™ RVS 1.5.122", "header_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.5.122/", "version_list_link": f"https://rocm.docs.amd.com/projects/ROCmValidationSuite/en/docs-1.5.122/versions.html", - "nav_secondary_items": { - "GitHub": "https://github.com/ROCm/ROCmValidationSuite", - "Community": "https://github.com/ROCm/ROCm/discussions", - "Blogs": "https://rocm.blogs.amd.com/", - "System and Infra Docs": "https://instinct.docs.amd.com/", - "Support": "https://github.com/ROCm/ROCmValidationSuite/issues/new/choose", - }, - "link_main_doc": False, +"link_main_doc": True, } external_projects_current_project = "rocmvalidationsuite" diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index d9644348b..e30b1f824 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==1.35.0 +rocm-docs-core @ git+https://github.com/ROCm/rocm-docs-core.git@develop diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index 04b5a70ab..fa1daa257 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --cert=None --client-cert=None --index-url=None --pip-args=None requirements.in -# +# This file was autogenerated by uv via the following command: +# uv pip compile /home/pmoutsia/ROCmValidationSuite/docs/sphinx/requirements.in --python-version 3.10 --output-file /home/pmoutsia/ROCmValidationSuite/docs/sphinx/requirements.txt accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==1.0.0 @@ -160,7 +156,7 @@ pygments==2.20.0 # ipython # pydata-sphinx-theme # sphinx -pyjwt[crypto]==2.13.0 +pyjwt==2.13.0 # via pygithub pynacl==1.6.2 # via pygithub @@ -185,8 +181,8 @@ requests==2.34.2 # via # pygithub # sphinx -rocm-docs-core==1.35.0 - # via -r requirements.in +rocm-docs-core @ git+https://github.com/ROCm/rocm-docs-core.git@develop + # via -r ROCmValidationSuite/docs/sphinx/requirements.in rpds-py==0.30.0 # via # jsonschema From 7f99bc1f162e4ff21cf8a762e297a80cb0c8017d Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 29 Jul 2026 17:34:49 -0500 Subject: [PATCH 256/275] Fix test_bandwidth as false reporting failure. --- pbqt.so/src/action_run.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pbqt.so/src/action_run.cpp b/pbqt.so/src/action_run.cpp index 68547e053..9cdb7d4e8 100644 --- a/pbqt.so/src/action_run.cpp +++ b/pbqt.so/src/action_run.cpp @@ -134,18 +134,25 @@ int pbqt_action::run() { return sts; } - if (!prop_test_bandwidth || test_array.size() < 1) { + if (!prop_test_bandwidth) { RVSTRACE_ - // do cleanup - destroy_threads(); + destroy_threads(); + action_result.state = rvs::actionstate::ACTION_COMPLETED; + action_result.status = rvs::actionstatus::ACTION_SUCCESS; + action_result.output = "PBQT Module action " + action_name + " completed"; + action_callback(&action_result); + if (bjson) { rvs::lp::JsonActionEndNodeCreate(); } + return 0; + } - action_result.state = rvs::actionstate::ACTION_COMPLETED; + if (test_array.size() < 1) { + RVSTRACE_ + destroy_threads(); + action_result.state = rvs::actionstate::ACTION_COMPLETED; action_result.status = rvs::actionstatus::ACTION_FAILED; action_result.output = "Parameters not valid. Nothing to execute !!!"; action_callback(&action_result); - if(bjson){ - rvs::lp::JsonActionEndNodeCreate(); - } + if (bjson) { rvs::lp::JsonActionEndNodeCreate(); } return -1; } From f274b330116dcccbab3b3808c3068828e3ac1647 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 29 Jul 2026 17:23:36 -0400 Subject: [PATCH 257/275] Adding the files to run RVS pipeline in docker Signed-off-by: Urvashi Tiwari --- .github/docker/rvs-nightly-rocm/Dockerfile | 39 +++ .../rvs-nightly-rocm/build-rocm-image.sh | 153 ++++++++++ .github/docker/rvs-nightly-rocm/env-rocm.sh | 6 + .../rvs-nightly-rocm/setup-on-runner.sh | 12 + .../workflows/rvs-nightly-docker-tests.yml | 263 ++++++++++++++++++ rvs_nightly_docker.sh | 180 ++++++++++++ 6 files changed, 653 insertions(+) create mode 100644 .github/docker/rvs-nightly-rocm/Dockerfile create mode 100755 .github/docker/rvs-nightly-rocm/build-rocm-image.sh create mode 100755 .github/docker/rvs-nightly-rocm/env-rocm.sh create mode 100755 .github/docker/rvs-nightly-rocm/setup-on-runner.sh create mode 100644 .github/workflows/rvs-nightly-docker-tests.yml create mode 100755 rvs_nightly_docker.sh diff --git a/.github/docker/rvs-nightly-rocm/Dockerfile b/.github/docker/rvs-nightly-rocm/Dockerfile new file mode 100644 index 000000000..cfb287b56 --- /dev/null +++ b/.github/docker/rvs-nightly-rocm/Dockerfile @@ -0,0 +1,39 @@ +# ROCm nightly-test runtime image — same SDK tarball layout as build_packages_local.sh +# (therock-dist-linux--.tar.gz from multiarch or release listing). +# +# Build on any docker host (typically the self-hosted runner): +# ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh \ +# --rocm-version 7.14.0a20260528 --gpu-family gfx110X-all + +FROM ubuntu:24.04 + +ARG ROCM_VERSION +ARG GPU_FAMILY=gfx110X-all +ARG ROCM_SDK_BASE_URL + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + tar \ + pciutils \ + kmod \ + && rm -rf /var/lib/apt/lists/* + +RUN test -n "${ROCM_VERSION}" && test -n "${ROCM_SDK_BASE_URL}" + +RUN mkdir -p /opt/rocm/install \ + && wget -q -O /tmp/rocm-sdk.tar.gz \ + "${ROCM_SDK_BASE_URL%/}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" \ + && tar -xzf /tmp/rocm-sdk.tar.gz -C /opt/rocm/install --strip-components=1 \ + && rm -f /tmp/rocm-sdk.tar.gz \ + && test -x /opt/rocm/install/bin/rocminfo + +COPY env-rocm.sh /etc/profile.d/rocm-env.sh + +ENV ROCM_PATH=/opt/rocm/install +ENV TARGET_ROCM_PATH=/opt/rocm/install +ENV ROCM_VERSION=${ROCM_VERSION} +ENV GPU_FAMILY=${GPU_FAMILY} +ENV LD_LIBRARY_PATH=/opt/rocm/install/lib/rocm_sysdeps/lib:/opt/rocm/install/lib/llvm/lib:/opt/rocm/install/lib + +WORKDIR /workspace diff --git a/.github/docker/rvs-nightly-rocm/build-rocm-image.sh b/.github/docker/rvs-nightly-rocm/build-rocm-image.sh new file mode 100755 index 000000000..755f1fa54 --- /dev/null +++ b/.github/docker/rvs-nightly-rocm/build-rocm-image.sh @@ -0,0 +1,153 @@ +#!/usr/bin/env bash +# Build (and tag) the ROCm runtime docker image for RVS nightly docker tests. +# Uses the same multiarch / release tarball URLs as build_packages_local.sh. +# +# Examples: +# ./build-rocm-image.sh --channel nightly --gpu-family gfx110X-all +# ./build-rocm-image.sh --rocm-version 7.14.0a20260528 --gpu-family gfx110X-all +# ./build-rocm-image.sh --from-tarball amdrocm7-rvs-1.4.21-r0714.20260724-Linux.tar.gz +# (requires *-Linux.tar.gz with -rMMmm.yyyymmdd-; nightly pins exact 7.14.0a20260724 SDK) +# ./build-rocm-image.sh --channel nightly --tag rvs-nightly-rocm:latest + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +ROCM_VERSION="" +GPU_FAMILY="${GPU_FAMILY:-gfx110X-all}" +CHANNEL="nightly" +IMAGE_TAG="" +ROCM_SDK_BASE_URL="" +FROM_TARBALL="" + +NIGHTLY_INDEX="${ROCM_SDK_NIGHTLY_INDEX_URL:-https://rocm.nightlies.amd.com/tarball-multi-arch/}" +NIGHTLY_BASE="${ROCM_SDK_NIGHTLY_BASE_URL:-https://rocm.nightlies.amd.com/tarball-multi-arch}" +RELEASE_LIST="${ROCM_SDK_RELEASE_URL:-https://repo.amd.com/rocm/tarball/}" +RELEASE_BASE="${ROCM_SDK_RELEASE_BASE_URL:-https://repo.amd.com/rocm/tarball}" + +usage() { + sed -n '2,8p' "$0" + exit 1 +} + +resolve_sdk_base() { + local ver="$1" + if echo "$ver" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+a[0-9]+'; then + ROCM_SDK_BASE_URL="$NIGHTLY_BASE" + elif echo "$ver" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then + ROCM_SDK_BASE_URL="$RELEASE_BASE" + else + echo "::error::Unrecognized ROCm version format: $ver" >&2 + exit 1 + fi +} + +fetch_latest_version() { + local mode="$1" + local listing_tmp versions + listing_tmp="$(mktemp)" + if [ "$mode" = "nightly" ]; then + wget -q -O "$listing_tmp" "$NIGHTLY_INDEX" + versions=$(grep -oE "therock-dist-linux-${GPU_FAMILY}-[0-9]+\.[0-9]+\.[0-9]+a[0-9]+" "$listing_tmp" \ + | sed "s|^therock-dist-linux-${GPU_FAMILY}-||" | sort -V | tail -1) + else + wget -q -O "$listing_tmp" "$RELEASE_LIST" + versions=$(grep -oE "therock-dist-linux-${GPU_FAMILY}-[0-9]+\.[0-9]+\.[0-9]+" "$listing_tmp" \ + | sed "s|^therock-dist-linux-${GPU_FAMILY}-||" | sort -V | tail -1) + fi + rm -f "$listing_tmp" + if [ -z "$versions" ]; then + echo "::error::No SDK version found for ${GPU_FAMILY} (${mode})" >&2 + exit 1 + fi + ROCM_VERSION="$versions" +} + +# Match SDK to RVS *-Linux.tar.gz release tag (rMMmm.yyyymmdd), same encoding as +# build_packages_local.sh CPACK release (r.). +resolve_rocm_from_tarball() { + local name="$1" + local base="${name##*/}" + local major minor build_date exact listing_tmp sdk_file prefix + + if [[ "$base" != *-Linux.tar.gz ]]; then + echo "::error::--from-tarball requires a *-Linux.tar.gz relocatable tarball; got: ${base}" >&2 + exit 1 + fi + + if [[ "$base" =~ -r([0-9]{2})([0-9]{2})\.([0-9]{8})-Linux\.tar\.gz$ ]]; then + major=$((10#${BASH_REMATCH[1]})) + minor=$((10#${BASH_REMATCH[2]})) + build_date="${BASH_REMATCH[3]}" + else + echo "::error::Cannot parse ROCm version from tar tarball (expected ...-rMMmm.yyyymmdd-Linux.tar.gz): ${base}" >&2 + exit 1 + fi + + if [ "$CHANNEL" = "release" ]; then + prefix="${major}.${minor}." + listing_tmp="$(mktemp)" + wget -q -O "$listing_tmp" "$RELEASE_LIST" + ROCM_VERSION=$(grep -oE "therock-dist-linux-${GPU_FAMILY}-${prefix}[0-9]+" "$listing_tmp" \ + | sed "s|^therock-dist-linux-${GPU_FAMILY}-||" | sort -V | tail -1) + rm -f "$listing_tmp" + sdk_file="therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" + resolve_sdk_base "$ROCM_VERSION" + else + exact="${major}.${minor}.0a${build_date}" + sdk_file="therock-dist-linux-${GPU_FAMILY}-${exact}.tar.gz" + listing_tmp="$(mktemp)" + wget -q -O "$listing_tmp" "$NIGHTLY_INDEX" + if ! grep -qF "$sdk_file" "$listing_tmp"; then + rm -f "$listing_tmp" + echo "::error::No multiarch SDK ${exact} for tar ${base} (missing ${sdk_file} on ${NIGHTLY_INDEX})" >&2 + exit 1 + fi + rm -f "$listing_tmp" + ROCM_VERSION="$exact" + ROCM_SDK_BASE_URL="$NIGHTLY_BASE" + fi + + if [ -z "$ROCM_VERSION" ]; then + echo "::error::No ${CHANNEL} SDK found for ROCm ${major}.${minor} (${GPU_FAMILY}) from tar ${base}" >&2 + exit 1 + fi + echo "Resolved ROCm ${ROCM_VERSION} from tar tarball ${base} (r$(printf '%02d%02d' "$major" "$minor").${build_date})" +} + +while [ $# -gt 0 ]; do + case "$1" in + --rocm-version) ROCM_VERSION="$2"; shift 2 ;; + --from-tarball) FROM_TARBALL="$2"; shift 2 ;; + --gpu-family) GPU_FAMILY="$2"; shift 2 ;; + --channel) CHANNEL="$2"; shift 2 ;; + --tag) IMAGE_TAG="$2"; shift 2 ;; + -h|--help) usage ;; + *) echo "Unknown arg: $1" >&2; usage ;; + esac +done + +if [ -n "$FROM_TARBALL" ]; then + resolve_rocm_from_tarball "$(basename "$FROM_TARBALL")" +elif [ -z "$ROCM_VERSION" ]; then + fetch_latest_version "$CHANNEL" +fi + +resolve_sdk_base "$ROCM_VERSION" +IMAGE_TAG="${IMAGE_TAG:-rvs-nightly-rocm:${ROCM_VERSION}}" + +echo "Building docker image ${IMAGE_TAG}" +echo " ROCm version : ${ROCM_VERSION}" +echo " GPU family : ${GPU_FAMILY}" +echo " SDK base URL : ${ROCM_SDK_BASE_URL}" + +docker build \ + -f "${SCRIPT_DIR}/Dockerfile" \ + --build-arg "ROCM_VERSION=${ROCM_VERSION}" \ + --build-arg "GPU_FAMILY=${GPU_FAMILY}" \ + --build-arg "ROCM_SDK_BASE_URL=${ROCM_SDK_BASE_URL}" \ + -t "${IMAGE_TAG}" \ + "${SCRIPT_DIR}" + +docker tag "${IMAGE_TAG}" "rvs-nightly-rocm:latest" +echo "::notice::Tagged ${IMAGE_TAG} and rvs-nightly-rocm:latest" diff --git a/.github/docker/rvs-nightly-rocm/env-rocm.sh b/.github/docker/rvs-nightly-rocm/env-rocm.sh new file mode 100755 index 000000000..d18dfb416 --- /dev/null +++ b/.github/docker/rvs-nightly-rocm/env-rocm.sh @@ -0,0 +1,6 @@ +# Source in container shells: sets ROCm runtime paths (TheRock multiarch layout). +ROCM_PATH="${ROCM_PATH:-/opt/rocm/install}" +TARGET_ROCM_PATH="${TARGET_ROCM_PATH:-$ROCM_PATH}" +export ROCM_PATH TARGET_ROCM_PATH +export PATH="${ROCM_PATH}/bin:${PATH}" +export LD_LIBRARY_PATH="${ROCM_PATH}/lib/rocm_sysdeps/lib:${ROCM_PATH}/lib/llvm/lib:${ROCM_PATH}/lib:${LD_LIBRARY_PATH:-}" diff --git a/.github/docker/rvs-nightly-rocm/setup-on-runner.sh b/.github/docker/rvs-nightly-rocm/setup-on-runner.sh new file mode 100755 index 000000000..885016f4b --- /dev/null +++ b/.github/docker/rvs-nightly-rocm/setup-on-runner.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Run on the self-hosted GPU runner host to build the ROCm-matched docker image. +# +# cd ROCmValidationSuite +# ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh [--channel nightly|release] +# ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh --from-tarball amdrocm7-rvs-....tar.gz + +set -euo pipefail +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" +cd "$ROOT" +chmod +x .github/docker/rvs-nightly-rocm/build-rocm-image.sh +exec .github/docker/rvs-nightly-rocm/build-rocm-image.sh "$@" diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml new file mode 100644 index 000000000..795a701e0 --- /dev/null +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -0,0 +1,263 @@ +name: RVS Nightly Tests (Docker) + +# Same RVS *-Linux.tar.gz flow as rvs-nightly-tests.yml, but install + level 4 run inside a +# ROCm-matched docker container on the self-hosted GPU runner (no SSH target node). +# ROCm SDK version is derived from the tar tarball name (-rMMmm.yyyymmdd-Linux.tar.gz). +# +# Prerequisites: +# - Build the image on the runner: .github/docker/rvs-nightly-rocm/build-rocm-image.sh +# - Set vars.RVS_NIGHTLY_DOCKER_IMAGE (default rvs-nightly-rocm:latest) +# - Runner must have docker, /dev/kfd, /dev/dri, and GPU access +# +# See README_NIGHTLY_TESTS.md for tarball index / secrets (RVS_TARBALL_INDEX_URL). + +on: + workflow_dispatch: + inputs: + trigger_event: + description: 'Label for report only (e.g. schedule or push); optional' + required: false + default: '' + tarball_url: + description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL)' + required: false + default: '' + docker_image: + description: 'ROCm runtime image (default: vars.RVS_NIGHTLY_DOCKER_IMAGE or rvs-nightly-rocm:latest)' + required: false + default: '' + build_docker_image: + description: 'Build rvs-nightly-rocm image from RVS tarball ROCm version before tests (slow; usually pre-built on runner)' + required: false + type: boolean + default: false + remote_work_dir: + description: 'Logical work dir label for reports (default: /tmp/rvs-nightly-docker-)' + required: false + default: '' + +permissions: + contents: read + +concurrency: + group: rvs-nightly-docker-${{ github.workflow }} + cancel-in-progress: false + +env: + TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} + RVS_NIGHTLY_DOCKER_IMAGE: ${{ inputs.docker_image || vars.RVS_NIGHTLY_DOCKER_IMAGE || 'rvs-nightly-rocm:latest' }} + TARGET_ROCM_PATH: /opt/rocm/install + +jobs: + install-rvs-in-docker: + name: Install RVS in docker + runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 120 + outputs: + tarball_url: ${{ steps.resolve.outputs.tarball_url }} + tarball_name: ${{ steps.resolve.outputs.tarball_name }} + remote_work_dir: ${{ steps.prepare.outputs.remote_work_dir }} + rocm_major: ${{ steps.prepare.outputs.rocm_major }} + install_dir: ${{ steps.prepare.outputs.install_dir }} + rvs_bin: ${{ steps.prepare.outputs.rvs_bin }} + env: + TARGET_ROCM_PATH: /opt/rocm/install + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Resolve latest tarball URL + id: resolve + env: + INPUT_URL: ${{ inputs.tarball_url }} + WORKFLOW_RUN_EVENT: ${{ inputs.trigger_event }} + run: | + set -euo pipefail + INDEX_URL="${TARBALL_INDEX_URL:-}" + if [ -z "${INPUT_URL:-}" ] && [ -z "${INDEX_URL}" ]; then + echo "::error::No tarball index URL (set RVS_TARBALL_INDEX_URL) and no tarball_url input." + exit 1 + fi + fetch_latest() { + local idx="$1" + local html raw name + html="$(curl -sSL --max-time 60 --retry 2 --retry-delay 2 "$idx" 2>/dev/null || true)" + raw="$(printf '%s' "$html" | grep -oE 'amdrocm[0-9]*-rvs-[0-9A-Za-z._\-]+-Linux\.tar\.gz' 2>/dev/null || true)" + name="$(printf '%s\n' "$raw" | sort -uV | tail -n 1 || true)" + [ -n "$name" ] || return 1 + printf '%s/%s\n' "${idx%/}" "$name" + } + if [ -n "${INPUT_URL:-}" ]; then + URL="$INPUT_URL" + else + URL="$(fetch_latest "$INDEX_URL")" + fi + [ -n "${URL:-}" ] || { echo "::error::Could not resolve tarball URL"; exit 1; } + NAME="$(basename "$URL")" + if [[ "$NAME" != *-Linux.tar.gz ]]; then + echo "::error::Docker nightly tests require a *-Linux.tar.gz relocatable tarball; got: ${NAME}" >&2 + exit 1 + fi + if [[ "$NAME" != *-r[0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9]-Linux.tar.gz ]]; then + echo "::error::Tar tarball must include -rMMmm.yyyymmdd- (e.g. -r0715.20260724-Linux.tar.gz); got: ${NAME}" >&2 + exit 1 + fi + { + echo "tarball_url<> "$GITHUB_OUTPUT" + { + echo "TARBALL_URL<> "$GITHUB_ENV" + echo "Latest tarball : $NAME" + + - name: Validate configuration and derive paths + id: prepare + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} + INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} + GITHUB_RUN_ID: ${{ github.run_id }} + TARGET_NODE: localhost + run: | + chmod +x rvs_nightly_test.sh + ./rvs_nightly_test.sh validate-config + + - name: Export paths for remaining steps + run: | + { + echo "REMOTE_WORK_DIR=${{ steps.prepare.outputs.remote_work_dir }}" + echo "ROCM_MAJOR=${{ steps.prepare.outputs.rocm_major }}" + echo "INSTALL_DIR=${{ steps.prepare.outputs.install_dir }}" + echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" + } >> "$GITHUB_ENV" + + - name: Build ROCm docker image matching RVS tarball + if: inputs.build_docker_image + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} + run: | + chmod +x .github/docker/rvs-nightly-rocm/build-rocm-image.sh + ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh --from-tarball "$TARBALL_NAME" + + - name: Pull ROCm docker image + run: | + chmod +x rvs_nightly_docker.sh + ./rvs_nightly_docker.sh pull-image + + - name: Download RVS tarball + run: ./rvs_nightly_test.sh download-tarball + + - name: Verify ROCm in docker + run: ./rvs_nightly_docker.sh verify-rocm + + - name: Install RVS in docker + run: ./rvs_nightly_docker.sh install-rvs + + run-rvs-level-4-in-docker: + name: Run RVS level 4 in docker + needs: [install-rvs-in-docker] + runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} + timeout-minutes: 180 + outputs: + rc: ${{ steps.level4.outputs.rc }} + start: ${{ steps.level4.outputs.start }} + end: ${{ steps.level4.outputs.end }} + rvs_version: ${{ steps.versions.outputs.rvs_version }} + target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} + env: + TARGET_ROCM_PATH: /opt/rocm/install + REMOTE_WORK_DIR: ${{ needs.install-rvs-in-docker.outputs.remote_work_dir }} + ROCM_MAJOR: ${{ needs.install-rvs-in-docker.outputs.rocm_major }} + INSTALL_DIR: ${{ needs.install-rvs-in-docker.outputs.install_dir }} + RVS_BIN: ${{ needs.install-rvs-in-docker.outputs.rvs_bin }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Download RVS tarball for docker mount + env: + TARBALL_URL: ${{ needs.install-rvs-in-docker.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.install-rvs-in-docker.outputs.tarball_name }} + run: | + chmod +x rvs_nightly_test.sh rvs_nightly_docker.sh + ./rvs_nightly_test.sh download-tarball + + - name: Run RVS level 4 in docker + id: level4 + run: ./rvs_nightly_docker.sh run-level4 + + - name: Capture RVS and ROCm versions from docker + id: versions + if: always() + run: ./rvs_nightly_docker.sh capture-versions + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-nightly-docker-logs-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + create-test-report: + name: Create Test Report + needs: [install-rvs-in-docker, run-rvs-level-4-in-docker] + runs-on: ${{ vars.RUNNER_LABEL_UTILITY || 'ubuntu-latest' }} + if: always() && !cancelled() && needs.install-rvs-in-docker.result == 'success' && needs.run-rvs-level-4-in-docker.result != 'skipped' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Download test logs + uses: actions/download-artifact@v4 + with: + name: rvs-nightly-docker-logs-${{ github.run_id }} + path: ./reports + continue-on-error: true + + - name: Build test report + id: report + env: + TARBALL_URL: ${{ needs.install-rvs-in-docker.outputs.tarball_url }} + TARBALL_NAME: ${{ needs.install-rvs-in-docker.outputs.tarball_name }} + TARGET_ROCM_PATH: /opt/rocm/install + REMOTE_WORK_DIR: ${{ needs.install-rvs-in-docker.outputs.remote_work_dir }} + RVS_BIN: ${{ needs.install-rvs-in-docker.outputs.rvs_bin }} + RVS_LEVEL4_RC: ${{ needs.run-rvs-level-4-in-docker.outputs.rc }} + RVS_LEVEL4_START: ${{ needs.run-rvs-level-4-in-docker.outputs.start }} + RVS_LEVEL4_END: ${{ needs.run-rvs-level-4-in-docker.outputs.end }} + RVS_VERSION: ${{ needs.run-rvs-level-4-in-docker.outputs.rvs_version }} + TARGET_ROCM_VERSION: ${{ needs.run-rvs-level-4-in-docker.outputs.target_rocm_version }} + GITHUB_RUN_ID: ${{ github.run_id }} + GITHUB_SERVER_URL: ${{ github.server_url }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_EVENT_NAME: ${{ inputs.trigger_event || github.event_name }} + run: | + chmod +x rvs_nightly_test.sh + mkdir -p ./reports + ./rvs_nightly_test.sh build-report + + - name: Upload report and logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: rvs-nightly-docker-report-${{ github.run_id }} + path: ./reports/ + retention-days: 30 + if-no-files-found: warn + + - name: Fail the workflow if level 4 failed + if: steps.report.outputs.overall == 'FAIL' || needs.run-rvs-level-4-in-docker.result == 'failure' + run: | + echo "::error::RVS docker test failure — level4 rc=${{ needs.run-rvs-level-4-in-docker.outputs.rc }}" + exit 1 diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh new file mode 100755 index 000000000..b08b431d1 --- /dev/null +++ b/rvs_nightly_docker.sh @@ -0,0 +1,180 @@ +#!/usr/bin/env bash +################################################################################ +# Run RVS nightly install + level 4 inside a ROCm-matched docker container on the +# self-hosted runner (GPU passthrough). +################################################################################ + +set -euo pipefail + +DOCKER_IMAGE="${RVS_NIGHTLY_DOCKER_IMAGE:-rvs-nightly-rocm:latest}" +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +usage() { + cat <<'EOF' +Usage: rvs_nightly_docker.sh + +Commands: + pull-image Ensure docker image is present locally + verify-rocm rocminfo + amd-smi inside container + install-rvs Extract RVS tarball under /opt/rocm/extras- in container + run-level4 rvs -r 4 inside container + capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT + run-pipeline verify-rocm → install-rvs → run-level4 +EOF +} + +require_env() { + local n="$1" + if [ -z "${!n:-}" ]; then + echo "::error::Required environment variable $n is not set" >&2 + exit 1 + fi +} + +docker_gpu_opts() { + echo --ipc=host --network=host \ + --device=/dev/kfd \ + --device=/dev/dri \ + --group-add video \ + --cap-add=SYS_PTRACE \ + --security-opt seccomp=unconfined +} + +cmd_pull_image() { + if docker image inspect "$DOCKER_IMAGE" >/dev/null 2>&1; then + echo "::notice::Image ${DOCKER_IMAGE} already present locally." + return 0 + fi + echo "Pulling ${DOCKER_IMAGE} ..." + docker pull "$DOCKER_IMAGE" +} + +docker_run() { + # shellcheck disable=SC2046 + docker run --rm \ + $(docker_gpu_opts) \ + -v "${REPO_ROOT}:/workspace" \ + -v "${REPO_ROOT}/pkg:/pkg:ro" \ + -v "${REPO_ROOT}/reports:/reports" \ + -w /workspace \ + -e ROCM_PATH=/opt/rocm/install \ + -e TARGET_ROCM_PATH=/opt/rocm/install \ + "$DOCKER_IMAGE" \ + bash -lc "$1" +} + +cmd_verify_rocm() { + docker_run ' + source /etc/profile.d/rocm-env.sh + echo "=== rocminfo ===" + rocminfo + echo "=== amd-smi version ===" + amd-smi version + ' +} + +cmd_install_rvs() { + require_env TARBALL_NAME + require_env ROCM_MAJOR + require_env INSTALL_DIR + require_env RVS_BIN + require_env REMOTE_WORK_DIR + + local pkg_host="${REPO_ROOT}/pkg/${TARBALL_NAME}" + if [ ! -f "$pkg_host" ]; then + echo "::error::RVS tarball not found at ${pkg_host}" >&2 + exit 1 + fi + + docker_run " + source /etc/profile.d/rocm-env.sh + set -euo pipefail + PKG=/pkg/${TARBALL_NAME} + INSTALL_DIR=${INSTALL_DIR} + RVS_BIN=${RVS_BIN} + mkdir -p \"\${INSTALL_DIR}\" + tar -xzf \"\${PKG}\" -C \"\${INSTALL_DIR}\" + export LD_LIBRARY_PATH=\"\${INSTALL_DIR}/lib:\${LD_LIBRARY_PATH}\" + if [ ! -x \"\${RVS_BIN}\" ]; then + echo \"::error::rvs binary missing at \${RVS_BIN}\" >&2 + exit 1 + fi + echo \"::notice::Installed RVS at \${RVS_BIN}\" + ldd \"\${RVS_BIN}\" | grep 'not found' && exit 1 || true + \"\${RVS_BIN}\" --version + " +} + +cmd_run_level4() { + require_env INSTALL_DIR + require_env RVS_BIN + require_env REMOTE_WORK_DIR + + mkdir -p "${REPO_ROOT}/reports" + local start end rc + start="$(date -u +%FT%TZ)" + + set +e + docker_run " + source /etc/profile.d/rocm-env.sh + set -euo pipefail + export LD_LIBRARY_PATH=\"${INSTALL_DIR}/lib:\${LD_LIBRARY_PATH}\" + mkdir -p /reports + ${RVS_BIN} -r 4 2>&1 | tee /reports/rvs_level_4.log + exit \${PIPESTATUS[0]} + " + rc=$? + set -e + end="$(date -u +%FT%TZ)" + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rc=$rc" >> "$GITHUB_OUTPUT" + echo "start=$start" >> "$GITHUB_OUTPUT" + echo "end=$end" >> "$GITHUB_OUTPUT" + fi + return 0 +} + +cmd_capture_versions() { + require_env RVS_BIN + require_env INSTALL_DIR + + local rvs_version target_rocm_version + rvs_version=$(docker_run " + source /etc/profile.d/rocm-env.sh + export LD_LIBRARY_PATH=\"${INSTALL_DIR}/lib:\${LD_LIBRARY_PATH}\" + ${RVS_BIN} --version 2>/dev/null | head -1 + " | tail -1) + target_rocm_version=$(docker_run " + cat /opt/rocm/install/.info/version 2>/dev/null \ + || cat /opt/rocm/install/share/doc/rocm-core/version 2>/dev/null \ + || echo unknown + " | tail -1) + + if [ -n "${GITHUB_OUTPUT:-}" ]; then + echo "rvs_version=${rvs_version:-unknown}" >> "$GITHUB_OUTPUT" + echo "target_rocm_version=${target_rocm_version:-unknown}" >> "$GITHUB_OUTPUT" + fi +} + +cmd_run_pipeline() { + cmd_verify_rocm + cmd_install_rvs + cmd_run_level4 +} + +main() { + [ $# -ge 1 ] || { usage; exit 1; } + case "$1" in + pull-image) cmd_pull_image ;; + verify-rocm) cmd_verify_rocm ;; + install-rvs) cmd_install_rvs ;; + run-level4) cmd_run_level4 ;; + capture-versions) cmd_capture_versions ;; + run-pipeline) cmd_run_pipeline ;; + -h|--help) usage ;; + *) echo "Unknown command: $1" >&2; usage; exit 1 ;; + esac +} + +main "$@" From 78a1dd44d9b2282e6c93e8d82e0b53b946d12718 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 29 Jul 2026 17:50:29 -0400 Subject: [PATCH 258/275] Fixed an issue Signed-off-by: Urvashi Tiwari --- rvs_nightly_docker.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh index b08b431d1..d0e783985 100755 --- a/rvs_nightly_docker.sh +++ b/rvs_nightly_docker.sh @@ -31,6 +31,12 @@ require_env() { fi } +host_rvs_install_dir() { + require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR + printf '%s/extras-%s' "${REMOTE_WORK_DIR%/}" "$ROCM_MAJOR" +} + docker_gpu_opts() { echo --ipc=host --network=host \ --device=/dev/kfd \ @@ -50,9 +56,17 @@ cmd_pull_image() { } docker_run() { + local -a install_mount=() + if [ -n "${INSTALL_DIR:-}" ] && [ -n "${REMOTE_WORK_DIR:-}" ] && [ -n "${ROCM_MAJOR:-}" ]; then + local host_install + host_install="$(host_rvs_install_dir)" + mkdir -p "$host_install" + install_mount=(-v "${host_install}:${INSTALL_DIR}") + fi # shellcheck disable=SC2046 docker run --rm \ $(docker_gpu_opts) \ + "${install_mount[@]}" \ -v "${REPO_ROOT}:/workspace" \ -v "${REPO_ROOT}/pkg:/pkg:ro" \ -v "${REPO_ROOT}/reports:/reports" \ @@ -109,6 +123,14 @@ cmd_run_level4() { require_env INSTALL_DIR require_env RVS_BIN require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR + + local host_install + host_install="$(host_rvs_install_dir)" + if [ ! -x "${host_install}/bin/rvs" ]; then + echo "::error::RVS not installed at ${host_install}/bin/rvs — run install-rvs first (same REMOTE_WORK_DIR=${REMOTE_WORK_DIR})" >&2 + exit 1 + fi mkdir -p "${REPO_ROOT}/reports" local start end rc @@ -138,6 +160,8 @@ cmd_run_level4() { cmd_capture_versions() { require_env RVS_BIN require_env INSTALL_DIR + require_env REMOTE_WORK_DIR + require_env ROCM_MAJOR local rvs_version target_rocm_version rvs_version=$(docker_run " @@ -158,6 +182,7 @@ cmd_capture_versions() { } cmd_run_pipeline() { + require_env REMOTE_WORK_DIR cmd_verify_rocm cmd_install_rvs cmd_run_level4 From 9671c25d55512e7487538b79cfe09ded95930e37 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Fri, 31 Jul 2026 10:20:32 +0000 Subject: [PATCH 259/275] Fix PBQT peer-only mode JSON GPU IDs and action result. . 1. Use gpu_id[i] instead of gpu_id[srcnode] when logging peer connectivity JSON so srcgpu matches text logs on systems where HSA node IDs differ from enumeration indices. 2. Return ACTION_SUCCESS for test_bandwidth: false after create_threads() completes instead of failing with nothing to execute. 3. Add MI350P pbqt/pebb configs, --- pbqt.so/src/action.cpp | 2 +- pbqt.so/src/action_run.cpp | 22 ++++- rvs/conf/MI350P-450W/pbqt_single.conf | 118 ++++++++++++++++++++++++ rvs/conf/MI350P-450W/pebb_single.conf | 127 ++++++++++++++++++++++++++ rvs/conf/MI350P-600W/pbqt_single.conf | 118 ++++++++++++++++++++++++ rvs/conf/MI350P-600W/pebb_single.conf | 127 ++++++++++++++++++++++++++ 6 files changed, 508 insertions(+), 6 deletions(-) create mode 100644 rvs/conf/MI350P-450W/pbqt_single.conf create mode 100644 rvs/conf/MI350P-450W/pebb_single.conf create mode 100644 rvs/conf/MI350P-600W/pbqt_single.conf create mode 100644 rvs/conf/MI350P-600W/pebb_single.conf diff --git a/pbqt.so/src/action.cpp b/pbqt.so/src/action.cpp index c8b4e0598..c57456e36 100644 --- a/pbqt.so/src/action.cpp +++ b/pbqt.so/src/action.cpp @@ -540,7 +540,7 @@ int pbqt_action::create_threads() { if (prop_test_bandwidth) { valid_pairs.push_back({srcnode, dstnode, pbconn}); } else { - log_json_data(std::to_string(gpu_id[srcnode]), std::to_string(gpu_id[j]), rvs::logresults, + log_json_data(std::to_string(gpu_id[i]), std::to_string(gpu_id[j]), rvs::logresults, pbconn, "NA" ); } diff --git a/pbqt.so/src/action_run.cpp b/pbqt.so/src/action_run.cpp index 68547e053..4d3c63388 100644 --- a/pbqt.so/src/action_run.cpp +++ b/pbqt.so/src/action_run.cpp @@ -134,18 +134,30 @@ int pbqt_action::run() { return sts; } - if (!prop_test_bandwidth || test_array.size() < 1) { + if (!prop_test_bandwidth) { + RVSTRACE_ + if (bjson) { + rvs::lp::JsonActionEndNodeCreate(); + } + + action_result.state = rvs::actionstate::ACTION_COMPLETED; + action_result.status = rvs::actionstatus::ACTION_SUCCESS; + action_result.output = "PBQT Module action " + action_name + " completed"; + action_callback(&action_result); + return 0; + } + + if (test_array.size() < 1) { RVSTRACE_ - // do cleanup destroy_threads(); action_result.state = rvs::actionstate::ACTION_COMPLETED; action_result.status = rvs::actionstatus::ACTION_FAILED; action_result.output = "Parameters not valid. Nothing to execute !!!"; action_callback(&action_result); - if(bjson){ - rvs::lp::JsonActionEndNodeCreate(); - } + if (bjson) { + rvs::lp::JsonActionEndNodeCreate(); + } return -1; } diff --git a/rvs/conf/MI350P-450W/pbqt_single.conf b/rvs/conf/MI350P-450W/pbqt_single.conf new file mode 100644 index 000000000..19f968f0c --- /dev/null +++ b/rvs/conf/MI350P-450W/pbqt_single.conf @@ -0,0 +1,118 @@ +# ################################################################################ +# # +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# +# PBQT peer bandwidth tests for AMD Instinct MI350P (PCIe-attached). +# MI350P GPUs are connected via PCIe (typical hop count 2), not XGMI. Do not use +# MI350X configs: TransferBench all-to-all defaults to a2a_direct=1, which only +# includes hop-count-1 (direct XGMI) pairs and yields no valid transfers on MI350P. +# +# Usage: +# ./rvs -c conf/MI350P-450W/pbqt_single.conf +# ./rvs -m pbqt + +actions: +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using RVS native method via SDMA +- name: pcie_d2d_unidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test +# using RVS native method via SDMA +- name: pcie_d2d_bidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via SDMA +- name: pcie_d2d_unidir_tb_dma + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 2 + hot_calls: 5 + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via GFX +- name: pcie_d2d_unidir_tb_gfx + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: gfx + subexecutor: 16 + warm_calls: 2 + hot_calls: 5 + +# All-to-All bandwidth test using TransferBench via GFX +# a2a_direct: 0 — include PCIe-connected pairs (hop count > 1); default 1 is XGMI-only +- name: pcie_d2d_unidir_tb_a2a + device: all + module: pbqt + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 268435456 + device_id: all + transfer_method: transferbench + transferbench_test: alltoall + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + gfx_unroll: 2 + a2a_direct: 0 diff --git a/rvs/conf/MI350P-450W/pebb_single.conf b/rvs/conf/MI350P-450W/pebb_single.conf new file mode 100644 index 000000000..1e49a1652 --- /dev/null +++ b/rvs/conf/MI350P-450W/pebb_single.conf @@ -0,0 +1,127 @@ +# ################################################################################ +# # +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# +# PEBB bandwidth tests for AMD Instinct MI350P (PCIe-attached). +# Host/device transfers use link_type 2 (PCIe). Do not use MI350X configs on +# MI350P; GPU-to-GPU topology differs (PCIe hop count 2 vs XGMI on MI350X). +# +# Usage: +# ./rvs -c conf/MI350P-450W/pebb_single.conf +# ./rvs -m pebb + +actions: +# Host-to-Device/CPU-to-GPU bandwidth test using RVS native method via SDMA +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +# Device-to-Host/GPU-to-CPU bandwidth test using RVS native method via SDMA +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via SDMA +- name: pcie_h2d_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: gpu + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via SDMA +- name: pcie_d2h_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: gpu + destination_memory: cpu + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via GFX +- name: pcie_h2d_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: "null" + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX +- name: pcie_d2h_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: "null" + destination_memory: cpu diff --git a/rvs/conf/MI350P-600W/pbqt_single.conf b/rvs/conf/MI350P-600W/pbqt_single.conf new file mode 100644 index 000000000..e11290e04 --- /dev/null +++ b/rvs/conf/MI350P-600W/pbqt_single.conf @@ -0,0 +1,118 @@ +# ################################################################################ +# # +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# +# PBQT peer bandwidth tests for AMD Instinct MI350P (PCIe-attached). +# MI350P GPUs are connected via PCIe (typical hop count 2), not XGMI. Do not use +# MI350X configs: TransferBench all-to-all defaults to a2a_direct=1, which only +# includes hop-count-1 (direct XGMI) pairs and yields no valid transfers on MI350P. +# +# Usage: +# ./rvs -c conf/MI350P-600W/pbqt_single.conf +# ./rvs -m pbqt + +actions: +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using RVS native method via SDMA +- name: pcie_d2d_unidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU bidirectional bandwidth test +# using RVS native method via SDMA +- name: pcie_d2d_bidir_bandwidth + device: all + module: pbqt + log_interval: 5000 + duration: 30000 + peers: all + test_bandwidth: true + bidirectional: true + parallel: false + block_size: 1073741824 + device_id: all + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via SDMA +- name: pcie_d2d_unidir_tb_dma + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 2 + hot_calls: 5 + +# Peer-to-Peer/Device-to-Device/GPU-to-GPU unidirectional bandwidth test +# using TransferBench via GFX +- name: pcie_d2d_unidir_tb_gfx + device: all + module: pbqt + duration: 0 + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 1073741824 + device_id: all + transfer_method: transferbench + executor: gfx + subexecutor: 16 + warm_calls: 2 + hot_calls: 5 + +# All-to-All bandwidth test using TransferBench via GFX +# a2a_direct: 0 — include PCIe-connected pairs (hop count > 1); default 1 is XGMI-only +- name: pcie_d2d_unidir_tb_a2a + device: all + module: pbqt + peers: all + test_bandwidth: true + bidirectional: false + parallel: false + block_size: 268435456 + device_id: all + transfer_method: transferbench + transferbench_test: alltoall + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + gfx_unroll: 2 + a2a_direct: 0 diff --git a/rvs/conf/MI350P-600W/pebb_single.conf b/rvs/conf/MI350P-600W/pebb_single.conf new file mode 100644 index 000000000..06a8ecb58 --- /dev/null +++ b/rvs/conf/MI350P-600W/pebb_single.conf @@ -0,0 +1,127 @@ +# ################################################################################ +# # +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# # +# # MIT LICENSE: +# # Permission is hereby granted, free of charge, to any person obtaining a copy of +# # this software and associated documentation files (the "Software"), to deal in +# # the Software without restriction, including without limitation the rights to +# # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# # of the Software, and to permit persons to whom the Software is furnished to do +# # so, subject to the following conditions: +# # +# # The above copyright notice and this permission notice shall be included in all +# # copies or substantial portions of the Software. +# # +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# # SOFTWARE. +# # +# ############################################################################### +# +# PEBB bandwidth tests for AMD Instinct MI350P (PCIe-attached). +# Host/device transfers use link_type 2 (PCIe). Do not use MI350X configs on +# MI350P; GPU-to-GPU topology differs (PCIe hop count 2 vs XGMI on MI350X). +# +# Usage: +# ./rvs -c conf/MI350P-600W/pebb_single.conf +# ./rvs -m pebb + +actions: +# Host-to-Device/CPU-to-GPU bandwidth test using RVS native method via SDMA +- name: pcie_h2d_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + +# Device-to-Host/GPU-to-CPU bandwidth test using RVS native method via SDMA +- name: pcie_d2h_bandwidth + device: all + module: pebb + duration: 30000 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via SDMA +- name: pcie_h2d_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: gpu + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via SDMA +- name: pcie_d2h_bandwidth_tb_dma + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: dma + subexecutor: 1 + warm_calls: 3 + hot_calls: 10 + source_memory: gpu + destination_memory: cpu + +# Host-to-Device/CPU-to-GPU bandwidth test using TransferBench via GFX +- name: pcie_h2d_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: false + host_to_device: true + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: cpu + destination_memory: "null" + +# Device-to-Host/GPU-to-CPU bandwidth test using TransferBench via GFX +- name: pcie_d2h_bandwidth_tb_gfx + device: all + module: pebb + duration: 0 + device_to_host: true + host_to_device: false + parallel: false + block_size: 1073741824 + link_type: 2 + transfer_method: transferbench + executor: gfx + subexecutor: 8 + warm_calls: 3 + hot_calls: 10 + source_memory: "null" + destination_memory: cpu From 7a83e522a846da98afc17baf0e5c568b08f51b1f Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 31 Jul 2026 13:18:21 -0400 Subject: [PATCH 260/275] Fixed the regular exp issue in the docker run Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-docker-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index 795a701e0..802daf50b 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -93,12 +93,12 @@ jobs: URL="$(fetch_latest "$INDEX_URL")" fi [ -n "${URL:-}" ] || { echo "::error::Could not resolve tarball URL"; exit 1; } - NAME="$(basename "$URL")" + NAME="$(basename "$URL" | tr -d '\r\n')" if [[ "$NAME" != *-Linux.tar.gz ]]; then echo "::error::Docker nightly tests require a *-Linux.tar.gz relocatable tarball; got: ${NAME}" >&2 exit 1 fi - if [[ "$NAME" != *-r[0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9]-Linux.tar.gz ]]; then + if [[ ! "$NAME" =~ -r[0-9]{4}\.[0-9]{8}-Linux\.tar\.gz$ ]]; then echo "::error::Tar tarball must include -rMMmm.yyyymmdd- (e.g. -r0715.20260724-Linux.tar.gz); got: ${NAME}" >&2 exit 1 fi From 5c6128b333d6f26af5790292acc7eadf7275d4c7 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 29 Jul 2026 18:24:10 -0500 Subject: [PATCH 261/275] Babel sustained-mode support. --- babel.so/include/HIPStream.h | 5 + babel.so/include/action.h | 4 + babel.so/include/rvs_memworker.h | 7 + babel.so/src/action.cpp | 7 + babel.so/src/rvs_memworker.cpp | 4 +- babel.so/src/rvs_stream.cpp | 129 +++++++++++++- babel.so/src/rvs_stress.cpp | 296 ++++++++++++++++++++++++++----- docs/schemas/babel.schema | 5 +- docs/ug1main.md | 7 + 9 files changed, 419 insertions(+), 45 deletions(-) diff --git a/babel.so/include/HIPStream.h b/babel.so/include/HIPStream.h index 5b50ffa58..1d85622b4 100644 --- a/babel.so/include/HIPStream.h +++ b/babel.so/include/HIPStream.h @@ -51,7 +51,12 @@ class HIPStream : public Stream int nt_mode = 1; // NT_ALL + // sustained mode: skip per-iteration sync, single sync after all iterations. + bool sustained_mode = false; + public: + void set_sustained_mode(bool mode) { sustained_mode = mode; } + void sustained_sync(); HIPStream(const unsigned int, const bool, const int, const unsigned int, const unsigned int, const unsigned int, const std::string& nontemporal = "all"); diff --git a/babel.so/include/action.h b/babel.so/include/action.h index c4290a613..ecbc7a389 100644 --- a/babel.so/include/action.h +++ b/babel.so/include/action.h @@ -58,6 +58,7 @@ using std::map; #define RVS_CONF_DATA_INIT "data_init" #define RVS_CONF_NONTEMPORAL "nontemporal" #define RVS_CONF_DURATION "duration" +#define RVS_CONF_SUSTAINED "sustained" #define MEM_DEFAULT_ARRAY_SIZE 33554432 // 32 MB #define MEM_DEFAULT_NUM_ITER 100 @@ -71,6 +72,7 @@ using std::map; #define MEM_DEFAULT_TEST_ENABLE false #define MEM_DEFAULT_DATA_INIT "default" #define MEM_DEFAULT_NONTEMPORAL "all" +#define MEM_DEFAULT_SUSTAINED false #define MEM_NO_COMPATIBLE_GPUS "No AMD compatible GPU found!" #define FLOATING_POINT_REGEX "^[0-9]*\\.?[0-9]+$" @@ -133,6 +135,8 @@ class mem_action: public rvs::actionbase { std::string data_init; //! non-temporal access mode ("none", "all", "read" or "write") std::string nontemporal; + //! sustained mode: back-to-back launches, single sync, average BW only + bool sustained; // configuration properties getters bool get_all_mem_config_keys(void); diff --git a/babel.so/include/rvs_memworker.h b/babel.so/include/rvs_memworker.h index af14ad7f6..29dbba2a2 100644 --- a/babel.so/include/rvs_memworker.h +++ b/babel.so/include/rvs_memworker.h @@ -276,6 +276,11 @@ class MemWorker : public rvs::ThreadBase { //! returns non-temporal access mode const std::string& get_nontemporal(void) { return nontemporal; } + //! sets sustained mode + void set_sustained(bool _sustained) { sustained = _sustained; } + //! returns sustained mode + bool get_sustained(void) { return sustained; } + static void set_use_json(bool _bjson) { bjson = _bjson; } //! returns the JSON flag static bool get_use_json(void) { return bjson; } @@ -322,6 +327,8 @@ class MemWorker : public rvs::ThreadBase { std::string data_init; //! non-temporal access mode std::string nontemporal; + //! sustained mode: back-to-back launches, single sync, average BW only + bool sustained; //! TRUE if JSON output is required static bool bjson; diff --git a/babel.so/src/action.cpp b/babel.so/src/action.cpp index 74b6a5fb8..b80083af9 100644 --- a/babel.so/src/action.cpp +++ b/babel.so/src/action.cpp @@ -114,6 +114,7 @@ bool mem_action::do_mem_stress_test(map mem_gpus_device_index) { workers[i].set_tb_size(tb_size); workers[i].set_data_init(data_init); workers[i].set_nontemporal(nontemporal); + workers[i].set_sustained(sustained); i++; } @@ -342,6 +343,12 @@ bool mem_action::get_all_mem_config_keys(void) { bsts = false; } + if (property_get(RVS_CONF_SUSTAINED, &sustained, MEM_DEFAULT_SUSTAINED)) { + msg = "invalid '" + std::string(RVS_CONF_SUSTAINED) + "' key value"; + rvs::lp::Err(msg, MODULE_NAME_CAPS, action_name); + bsts = false; + } + return bsts; } diff --git a/babel.so/src/rvs_memworker.cpp b/babel.so/src/rvs_memworker.cpp index 9b08a62ab..3916aa71d 100644 --- a/babel.so/src/rvs_memworker.cpp +++ b/babel.so/src/rvs_memworker.cpp @@ -41,7 +41,7 @@ bool MemWorker::bjson = false; extern bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration); + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained); #define FLOAT_TEST 1 #define DOUBLE_TEST 2 @@ -86,6 +86,6 @@ void MemWorker::run() { result = run_babel(device, num_iterations, array_size, output_csv, mibibytes, test_type, dwords_per_lane, chunks_per_block, tb_size, - MemWorker::bjson, action_name, &test, data_init, nontemporal, duration); + MemWorker::bjson, action_name, &test, data_init, nontemporal, duration, sustained); } diff --git a/babel.so/src/rvs_stream.cpp b/babel.so/src/rvs_stream.cpp index 0879d8752..2de3ebd45 100644 --- a/babel.so/src/rvs_stream.cpp +++ b/babel.so/src/rvs_stream.cpp @@ -93,6 +93,18 @@ enum NTMode { NT_NONE = 0, NT_ALL = 1, NT_READ = 2, NT_WRITE = 3 }; grid, block, smem, stop, __VA_ARGS__); break; \ } +#define NT_KERNEL_LAUNCH_ASYNC(kernel, epl, cpb, T, grid, block, ...) \ + switch (nt_mode) { \ + case NT_NONE: hipLaunchKernelGGL((kernel),\ + grid, block, 0, nullptr, __VA_ARGS__); break; \ + case NT_READ: hipLaunchKernelGGL((kernel),\ + grid, block, 0, nullptr, __VA_ARGS__); break; \ + case NT_WRITE: hipLaunchKernelGGL((kernel),\ + grid, block, 0, nullptr, __VA_ARGS__); break; \ + default: hipLaunchKernelGGL((kernel),\ + grid, block, 0, nullptr, __VA_ARGS__); break; \ + } + #define NT_KERNEL_LAUNCH_DOT_SYNC(kernel, epl, cpb, T, tbs, grid, block, smem, stop, ...) \ switch (nt_mode) { \ case NT_NONE: hipLaunchKernelSynchronous((kernel), \ @@ -142,7 +154,8 @@ HIPStream::HIPStream(const unsigned int ARRAY_SIZE, const bool event_timing, const int device_index, const unsigned int _dwords_per_lane, const unsigned int _chunks_per_block, const unsigned int _threads_per_block, const std::string& nontemporal) : array_size{ARRAY_SIZE}, evt_timing(event_timing), - dwords_per_lane(_dwords_per_lane), chunks_per_block(_chunks_per_block), tb_size(_threads_per_block) + dwords_per_lane(_dwords_per_lane), chunks_per_block(_chunks_per_block), tb_size(_threads_per_block), + sustained_mode(false) { std::string msg; @@ -231,6 +244,12 @@ HIPStream::~HIPStream() check_error(hipEventDestroy(coherent_ev)); } +template +void HIPStream::sustained_sync() +{ + check_error(hipDeviceSynchronize()); +} + template __global__ void init_kernel(T * a, T * b, T * c, T initA, T initB, T initC) @@ -396,6 +415,24 @@ template float HIPStream::read() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else + NT_KERNEL_LAUNCH_ASYNC(read_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) @@ -457,6 +494,24 @@ template float HIPStream::write() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_c) + else + NT_KERNEL_LAUNCH_ASYNC(write_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) @@ -518,6 +573,24 @@ template float HIPStream::copy() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + else + NT_KERNEL_LAUNCH_ASYNC(copy_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) @@ -579,6 +652,24 @@ template float HIPStream::mul() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + else + NT_KERNEL_LAUNCH_ASYNC(mul_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_b, d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) @@ -641,6 +732,24 @@ template float HIPStream::add() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else + NT_KERNEL_LAUNCH_ASYNC(add_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) @@ -704,6 +813,24 @@ template float HIPStream::triad() { float kernel_time = 0.; + if (sustained_mode) + { + if(elements_per_lane == 4 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 4, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 1) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 2, 1, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 2) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 2, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 4 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 4, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else if(elements_per_lane == 2 && chunks_per_block == 4) + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 2, 4, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + else + NT_KERNEL_LAUNCH_ASYNC(triad_kernel, 4, 2, T, dim3(block_cnt), dim3(tb_size), d_a, d_b, d_c) + return 0.f; + } if (evt_timing) { if(elements_per_lane == 4 && chunks_per_block == 1) diff --git a/babel.so/src/rvs_stress.cpp b/babel.so/src/rvs_stress.cpp index 974f27b81..3fd2f05af 100644 --- a/babel.so/src/rvs_stress.cpp +++ b/babel.so/src/rvs_stress.cpp @@ -41,40 +41,40 @@ void check_solution(const unsigned int ntimes, std::vector& a, std::vector template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration); + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained); template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration); + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained); void parseArguments(int argc, char *argv[]); bool run_babel(std::pair device, int num_times, int array_size, bool output_csv, bool mibibytes, int test_type, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration) { + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained) { bool result = false; switch(test_type) { case FLOAT_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal, duration); + json, action, test, data_init, nontemporal, duration, sustained); break; case DOUBLE_TEST: result = run_stress(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal, duration); + json, action, test, data_init, nontemporal, duration, sustained); break; case TRAID_FLOAT: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal, duration); + json, action, test, data_init, nontemporal, duration, sustained); break; case TRIAD_DOUBLE: result = run_triad(device, num_times, array_size, output_csv, mibibytes, dwords_per_lane, chunks_per_block, tb_size, - json, action, test, data_init, nontemporal, duration); + json, action, test, data_init, nontemporal, duration, sustained); break; default: @@ -88,7 +88,7 @@ bool run_babel(std::pair device, int num_times, int array_size, b template bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration) + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained) { std::string msg; std::streamsize ss = std::cout.precision(); @@ -154,6 +154,169 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, stream->init_arrays(startA, startB, startC); } + // shared by both sustained and normal paths + std::string labels[total_babel_subtests] = {"Read","Write","Copy","Mul","Add","Triad","Dot"}; + size_t sizes[total_babel_subtests] = { + 1 * sizeof(T) * ARRAY_SIZE, + 1 * sizeof(T) * ARRAY_SIZE, + 2 * sizeof(T) * ARRAY_SIZE, + 2 * sizeof(T) * ARRAY_SIZE, + 3 * sizeof(T) * ARRAY_SIZE, + 3 * sizeof(T) * ARRAY_SIZE, + 2 * sizeof(T) * ARRAY_SIZE + }; + bool test_enable[total_babel_subtests] = { + test->read, test->write, test->copy, test->mul, test->add, test->triad, test->dot + }; + const double bw_scale = mibibytes ? pow(2.0, -20.0) : 1.0E-6; + uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); + uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); + auto format_bw = [](double val) -> std::string { + std::ostringstream oss; + oss << std::fixed << std::setprecision(3) << val; + return oss.str(); + }; + std::string iter_key = time_based ? "duration_ms" : "iterations"; + std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); + + // ---- Sustained mode: back-to-back launches, single sync per kernel ---- + if (sustained) + { + stream->set_sustained_mode(true); + + std::chrono::high_resolution_clock::time_point t1, t2; + + if (output_as_csv) + { + sstr << "gpu_id" << csv_separator + << "function" << csv_separator + << "num_times" << csv_separator + << "n_elements" << csv_separator + << "sizeof" << csv_separator + << ((mibibytes) ? "max_mibytes_per_sec" : "max_mbytes_per_sec") << csv_separator + << ((mibibytes) ? "mibps_at_min_t" : "mbps_at_min_t") << csv_separator + << ((mibibytes) ? "mibps_at_max_t" : "mbps_at_max_t") << csv_separator + << ((mibibytes) ? "mibps_at_avg_t" : "mbps_at_avg_t") << std::endl; + } + else + { + sstr << "\n---------------------------------------------------------------------------------" << std::endl + << std::left << std::setw(12) << "GPU Id" + << std::left << std::setw(12) << "Function" + << std::left << std::setw(15) << ((mibibytes) ? "MiBytes/sec" : "MBytes/sec") + << std::left << std::setw(15) << ((mibibytes) ? "Max MiB/s" : "Max MB/s") + << std::left << std::setw(15) << ((mibibytes) ? "Min MiB/s" : "Min MB/s") + << std::left << std::setw(15) << ((mibibytes) ? "Avg MiB/s" : "Avg MB/s") + << std::endl + << "---------------------------------------------------------------------------------" << std::endl + << std::fixed; + } + + void* json_root = nullptr; + void* json_results = nullptr; + if (json) { + unsigned int sec, usec; + rvs::lp::get_ticks(&sec, &usec); + json_root = rvs::lp::LogRecordCreate(module_name.c_str(), action.c_str(), + rvs::logresults, sec, usec, true); + if (json_root) { + rvs::lp::AddString(json_root, "gpu_id", std::to_string(device.second)); + uint16_t gpu_index = 0; + rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); + rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); + rvs::lp::AddString(json_root, "array_size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "total_size", std::to_string(total_size)); + rvs::lp::AddString(json_root, iter_key, iter_val); + json_results = rvs::lp::JsonNestedListCreate("results", rvs::logresults); + } + } + + for (int i = 0; i < total_babel_subtests; ++i) + { + if (!test_enable[i]) continue; + + uint64_t actual_k = 0; + t1 = std::chrono::high_resolution_clock::now(); + auto duration_limit = std::chrono::milliseconds(duration); + for (uint64_t k = 0; !time_based ? (k < (uint64_t)num_times) : true; k++) { + if (time_based) { + if (std::chrono::high_resolution_clock::now() - t1 >= duration_limit) break; + } + switch (i) { + case 0: stream->read(); break; + case 1: stream->write(); break; + case 2: stream->copy(); break; + case 3: stream->mul(); break; + case 4: stream->add(); break; + case 5: stream->triad(); break; + case 6: stream->dot(); break; + } + actual_k++; + } + // dot() always syncs internally; for all others, issue the single batch sync + if (i != 6) stream->sustained_sync(); + t2 = std::chrono::high_resolution_clock::now(); + + double total_s = std::chrono::duration_cast>(t2 - t1).count(); + double avg_s = total_s / actual_k; + double avg_bw = (bw_scale * sizes[i]) / avg_s; + + if (output_as_csv) + { + sstr << device.second << csv_separator + << labels[i] << csv_separator + << actual_k << csv_separator + << ARRAY_SIZE << csv_separator + << sizeof(T) << csv_separator + << avg_bw << csv_separator + << avg_bw << csv_separator + << avg_bw << csv_separator + << avg_bw << std::endl; + } + else + { + sstr << std::left << std::setw(12) << device.second + << std::left << std::setw(12) << labels[i] + << std::left << std::setw(15) << format_bw(avg_bw) + << std::left << std::setw(15) << format_bw(avg_bw) + << std::left << std::setw(15) << format_bw(avg_bw) + << std::left << std::setw(15) << format_bw(avg_bw) + << std::endl; + } + + if (json && json_results) { + const char* key = mibibytes ? "mibytes_per_sec" : "mbytes_per_sec"; + const char* peak_key = mibibytes ? "max_mibytes_per_sec" : "max_mbytes_per_sec"; + const char* worst_key = mibibytes ? "min_mibytes_per_sec" : "min_mbytes_per_sec"; + const char* avg_key = mibibytes ? "avg_mibytes_per_sec" : "avg_mbytes_per_sec"; + void* subtest_node = rvs::lp::LogRecordCreate(module_name.c_str(), + labels[i].c_str(), rvs::logresults, 0, 0, true); + if (subtest_node) { + rvs::lp::AddString(subtest_node, "subtest", labels[i]); + rvs::lp::AddString(subtest_node, key, format_bw(avg_bw)); + rvs::lp::AddString(subtest_node, peak_key, format_bw(avg_bw)); + rvs::lp::AddString(subtest_node, worst_key, format_bw(avg_bw)); + rvs::lp::AddString(subtest_node, avg_key, format_bw(avg_bw)); + rvs::lp::AddString(subtest_node, "pass", "true"); + rvs::lp::AddNode(json_results, subtest_node); + } + } + } + + sstr << "---------------------------------------------------------------------------------" << std::endl; + rvs::lp::Log(sstr.str(), rvs::logresults); + + if (json && json_root && json_results) { + rvs::lp::AddNode(json_root, json_results); + rvs::lp::LogRecordFlush(json_root, true); + } + + stream->set_sustained_mode(false); + delete stream; + return true; + } + // ---- End sustained mode ---- + // List of times std::vector> timings(total_babel_subtests); @@ -275,37 +438,6 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, << std::fixed; } - uint64_t arr_size = (uint64_t)ARRAY_SIZE * sizeof(T); - uint64_t total_size = 3ULL * ARRAY_SIZE * sizeof(T); - std::string iter_key = time_based ? "duration_ms" : "iterations"; - std::string iter_val = time_based ? std::to_string(duration) : std::to_string(num_times); - - std::string labels[total_babel_subtests] = {"Read","Write","Copy", "Mul", "Add", "Triad", "Dot"}; - size_t sizes[total_babel_subtests] = { - 1 * sizeof(T) * ARRAY_SIZE, - 1 * sizeof(T) * ARRAY_SIZE, - 2 * sizeof(T) * ARRAY_SIZE, - 2 * sizeof(T) * ARRAY_SIZE, - 3 * sizeof(T) * ARRAY_SIZE, - 3 * sizeof(T) * ARRAY_SIZE, - 2 * sizeof(T) * ARRAY_SIZE - }; - - bool test_enable[total_babel_subtests] = { - test->read, - test->write, - test->copy, - test->mul, - test->add, - test->triad, - test->dot}; - - auto format_bw = [](double val) -> std::string { - std::ostringstream oss; - oss << std::fixed << std::setprecision(3) << val; - return oss.str(); - }; - // Build single JSON node per GPU: metadata + nested "results" array void* json_root = nullptr; void* json_results = nullptr; @@ -336,7 +468,6 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, // Calculate average; ignore the first result double average = std::accumulate(timings[i].begin()+1, timings[i].end(), 0.0) / (double)(effective_num_times - 1); - const double bw_scale = (mibibytes) ? pow(2.0, -20.0) : 1.0E-6; // Display results if (output_as_csv) { @@ -404,7 +535,7 @@ bool run_stress(std::pair device, int num_times, int ARRAY_SIZE, template bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, bool output_as_csv, bool mibibytes, uint16_t dwords_per_lane, uint16_t chunks_per_block, uint16_t tb_size, bool json, std::string action, subtest *test, - const std::string& data_init, const std::string& nontemporal, uint64_t duration) + const std::string& data_init, const std::string& nontemporal, uint64_t duration, bool sustained) { std::string msg; triad_only = true; @@ -468,6 +599,89 @@ bool run_triad(std::pair device, int num_times, int ARRAY_SIZE, b stream->init_arrays(startA, startB, startC); } + // ---- Sustained mode: back-to-back triad launches, single sync ---- + if (sustained) + { + stream->set_sustained_mode(true); + + std::chrono::high_resolution_clock::time_point t1, t2; + uint64_t actual_k = 0; + t1 = std::chrono::high_resolution_clock::now(); + auto duration_limit = std::chrono::milliseconds(duration); + for (uint64_t k = 0; !time_based ? (k < (uint64_t)num_times) : true; k++) { + if (time_based) { + if (std::chrono::high_resolution_clock::now() - t1 >= duration_limit) break; + } + stream->triad(); + actual_k++; + } + stream->sustained_sync(); + t2 = std::chrono::high_resolution_clock::now(); + + double runtime = std::chrono::duration_cast>(t2 - t1).count(); + double total_bytes = 3.0 * sizeof(T) * ARRAY_SIZE * actual_k; + double bandwidth = ((mibibytes) ? pow(2.0, -30.0) : 1.0E-9) * (total_bytes / runtime); + + std::stringstream sstr2; + if (output_as_csv) + { + sstr2 << "gpu_id" << csv_separator + << "function" << csv_separator + << "num_times" << csv_separator + << "n_elements" << csv_separator + << "sizeof" << csv_separator + << ((mibibytes) ? "gibytes_per_sec" : "gbytes_per_sec") << csv_separator + << "runtime" + << std::endl + << device.second << csv_separator + << "Triad" << csv_separator + << actual_k << csv_separator + << ARRAY_SIZE << csv_separator + << sizeof(T) << csv_separator + << bandwidth << csv_separator + << runtime + << std::endl; + } + else + { + sstr2 << "--------------------------------" + << std::endl << std::fixed + << "GPU Id: " << std::left << device.second << std::endl + << "Runtime (seconds): " << std::left << std::setprecision(5) + << runtime << std::endl + << "Bandwidth (" << ((mibibytes) ? "GiB/s" : "GB/s") << "): " + << std::left << std::setprecision(3) + << bandwidth << std::endl; + } + rvs::lp::Log(sstr2.str(), rvs::logresults); + + if (json) { + unsigned int sec, usec; + rvs::lp::get_ticks(&sec, &usec); + void* json_root = rvs::lp::LogRecordCreate(module_name.c_str(), action.c_str(), + rvs::logresults, sec, usec, true); + if (json_root) { + rvs::lp::AddString(json_root, "gpu_id", std::to_string(device.second)); + uint16_t gpu_index = 0; + rvs::gpulist::gpu2gpuindex(device.second, &gpu_index); + rvs::lp::AddString(json_root, "gpu_index", std::to_string(gpu_index)); + rvs::lp::AddString(json_root, "array_size", std::to_string(arr_size)); + rvs::lp::AddString(json_root, "total_size", std::to_string(total_size)); + rvs::lp::AddString(json_root, iter_key, iter_val); + const char* bw_key = mibibytes ? "bandwidth_gib_per_sec" : "bandwidth_gb_per_sec"; + rvs::lp::AddString(json_root, "runtime_sec", std::to_string(runtime)); + rvs::lp::AddString(json_root, bw_key, std::to_string(bandwidth)); + rvs::lp::AddString(json_root, "pass", "true"); + rvs::lp::LogRecordFlush(json_root, true); + } + } + + stream->set_sustained_mode(false); + delete stream; + return true; + } + // ---- End sustained mode ---- + // Declare timers std::chrono::high_resolution_clock::time_point t1, t2; diff --git a/docs/schemas/babel.schema b/docs/schemas/babel.schema index e294c94b3..719f01cfb 100644 --- a/docs/schemas/babel.schema +++ b/docs/schemas/babel.schema @@ -28,6 +28,9 @@ "duration_ms": { "type": "string" }, + "iterations": { + "type": "string" + }, "results": { "type": "array", "items": { @@ -59,7 +62,7 @@ "minItems": 1 } }, - "required": ["gpu_id", "gpu_index", "array_size", "total_size", "duration_ms", "results"] + "required": ["gpu_id", "gpu_index", "array_size", "total_size", "results"] }, "minItems": 1 } diff --git a/docs/ug1main.md b/docs/ug1main.md index 1a84d231c..fd0aa1417 100644 --- a/docs/ug1main.md +++ b/docs/ug1main.md @@ -3164,6 +3164,13 @@ is 2. tb_sizeInteger Thread block size (number of threads per block). The default value is 1024. +sustainedBool +If true, enables sustained mode: all kernels are launched back-to-back without +per-iteration synchronization, and a single synchronization is issued +after all iterations complete. Bandwidth is reported as the average across all +iterations in all four output columns (MBytes/sec, Max, Min, Avg). This mode +measures steady-state memory bandwidth under continuous load. The default value +is false. From 914e6f74619573e170682b5607844256e1562804 Mon Sep 17 00:00:00 2001 From: Manoj S K Date: Tue, 4 Aug 2026 16:46:16 +0530 Subject: [PATCH 262/275] Update pbqt_single.conf date banner --- rvs/conf/MI350P-450W/pbqt_single.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rvs/conf/MI350P-450W/pbqt_single.conf b/rvs/conf/MI350P-450W/pbqt_single.conf index 19f968f0c..02f990ea1 100644 --- a/rvs/conf/MI350P-450W/pbqt_single.conf +++ b/rvs/conf/MI350P-450W/pbqt_single.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of From 7b5c614a7b2ea476e2835ce63e226274a9aed553 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Mon, 3 Aug 2026 17:05:17 -0400 Subject: [PATCH 263/275] fixed docker permission issue Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-docker-tests.yml | 3 ++- rvs_nightly_docker.sh | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index 802daf50b..b8962f2ac 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -7,6 +7,7 @@ name: RVS Nightly Tests (Docker) # Prerequisites: # - Build the image on the runner: .github/docker/rvs-nightly-rocm/build-rocm-image.sh # - Set vars.RVS_NIGHTLY_DOCKER_IMAGE (default rvs-nightly-rocm:latest) +# - Runner service user must be in the docker group (not just your SSH user) # - Runner must have docker, /dev/kfd, /dev/dri, and GPU access # # See README_NIGHTLY_TESTS.md for tarball index / secrets (RVS_TARBALL_INDEX_URL). @@ -144,7 +145,7 @@ jobs: chmod +x .github/docker/rvs-nightly-rocm/build-rocm-image.sh ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh --from-tarball "$TARBALL_NAME" - - name: Pull ROCm docker image + - name: Verify ROCm docker image is present locally run: | chmod +x rvs_nightly_docker.sh ./rvs_nightly_docker.sh pull-image diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh index d0e783985..66089dce4 100755 --- a/rvs_nightly_docker.sh +++ b/rvs_nightly_docker.sh @@ -14,7 +14,7 @@ usage() { Usage: rvs_nightly_docker.sh Commands: - pull-image Ensure docker image is present locally + pull-image Verify docker access and that the image exists locally verify-rocm rocminfo + amd-smi inside container install-rvs Extract RVS tarball under /opt/rocm/extras- in container run-level4 rvs -r 4 inside container @@ -46,16 +46,28 @@ docker_gpu_opts() { --security-opt seccomp=unconfined } +check_docker() { + if docker info >/dev/null 2>&1; then + return 0 + fi + echo "::error::Cannot access Docker (/var/run/docker.sock). The GitHub Actions runner service user must be in the 'docker' group (sudo usermod -aG docker ; restart the runner). Note: your SSH login user may differ from the runner service account." >&2 + exit 1 +} + cmd_pull_image() { + check_docker if docker image inspect "$DOCKER_IMAGE" >/dev/null 2>&1; then echo "::notice::Image ${DOCKER_IMAGE} already present locally." return 0 fi - echo "Pulling ${DOCKER_IMAGE} ..." - docker pull "$DOCKER_IMAGE" + echo "::error::Docker image ${DOCKER_IMAGE} not found locally. Build on the runner host:" >&2 + echo " ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh --from-tarball " >&2 + echo "Or re-run the workflow with build_docker_image=true (requires docker group access for the runner user)." >&2 + exit 1 } docker_run() { + check_docker local -a install_mount=() if [ -n "${INSTALL_DIR:-}" ] && [ -n "${REMOTE_WORK_DIR:-}" ] && [ -n "${ROCM_MAJOR:-}" ]; then local host_install From 5574838d53212e28512d58da3d812d5836dd35d7 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 4 Aug 2026 12:30:53 -0400 Subject: [PATCH 264/275] Adds a new Docker-based RVS nightly test path alongside the existing SSH workflow Signed-off-by: Urvashi Tiwari --- .../workflows/rvs-nightly-docker-tests.yml | 87 ++++--- rvs_nightly_docker.sh | 212 ++++++++++++++---- rvs_nightly_test.sh | 10 +- 3 files changed, 234 insertions(+), 75 deletions(-) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index b8962f2ac..23c2e1793 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -1,16 +1,19 @@ name: RVS Nightly Tests (Docker) -# Same RVS *-Linux.tar.gz flow as rvs-nightly-tests.yml, but install + level 4 run inside a -# ROCm-matched docker container on the self-hosted GPU runner (no SSH target node). +# Build ROCm docker image on l003 (self-hosted runner), transfer to GPU target via +# scp + docker load, then install RVS and run level 4 inside docker on the target. # ROCm SDK version is derived from the tar tarball name (-rMMmm.yyyymmdd-Linux.tar.gz). # +# Flow: l003 docker build → docker save | scp → target docker load → target docker run +# RVS tarball is wget'd inside the container on the target (no scp of RVS tar). +# # Prerequisites: -# - Build the image on the runner: .github/docker/rvs-nightly-rocm/build-rocm-image.sh -# - Set vars.RVS_NIGHTLY_DOCKER_IMAGE (default rvs-nightly-rocm:latest) -# - Runner service user must be in the docker group (not just your SSH user) -# - Runner must have docker, /dev/kfd, /dev/dri, and GPU access +# - Build host (l003): docker build user in docker group +# - Target GPU node: docker, /dev/kfd, /dev/dri, SSH user in docker group +# - Secrets: RVS_TARGET_NODE, RVS_TARGET_SSH_KEY (optional RVS_TARGET_USER) +# - Secret: RVS_TARBALL_INDEX_URL # -# See README_NIGHTLY_TESTS.md for tarball index / secrets (RVS_TARBALL_INDEX_URL). +# See README_NIGHTLY_TESTS.md for SSH / tarball index configuration. on: workflow_dispatch: @@ -23,17 +26,25 @@ on: description: 'Override tarball URL (default: latest from index — secrets.RVS_TARBALL_INDEX_URL)' required: false default: '' + target_node: + description: 'GPU target hostname/IP (default: secrets.RVS_TARGET_NODE)' + required: false + default: '' + target_user: + description: 'SSH user on target (default: secrets.RVS_TARGET_USER)' + required: false + default: '' docker_image: description: 'ROCm runtime image (default: vars.RVS_NIGHTLY_DOCKER_IMAGE or rvs-nightly-rocm:latest)' required: false default: '' build_docker_image: - description: 'Build rvs-nightly-rocm image from RVS tarball ROCm version before tests (slow; usually pre-built on runner)' + description: 'Build rvs-nightly-rocm image on l003 from RVS tarball ROCm version before transfer' required: false type: boolean default: false remote_work_dir: - description: 'Logical work dir label for reports (default: /tmp/rvs-nightly-docker-)' + description: 'Work dir on target (default: /tmp/rvs-nightly-docker-)' required: false default: '' @@ -47,13 +58,17 @@ concurrency: env: TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} RVS_NIGHTLY_DOCKER_IMAGE: ${{ inputs.docker_image || vars.RVS_NIGHTLY_DOCKER_IMAGE || 'rvs-nightly-rocm:latest' }} + RVS_DOCKER_ON_TARGET: 'true' TARGET_ROCM_PATH: /opt/rocm/install + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} jobs: install-rvs-in-docker: - name: Install RVS in docker + name: Build image on l003 and install RVS in docker on target runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} - timeout-minutes: 120 + timeout-minutes: 180 outputs: tarball_url: ${{ steps.resolve.outputs.tarball_url }} tarball_name: ${{ steps.resolve.outputs.tarball_name }} @@ -71,7 +86,6 @@ jobs: id: resolve env: INPUT_URL: ${{ inputs.tarball_url }} - WORKFLOW_RUN_EVENT: ${{ inputs.trigger_event }} run: | set -euo pipefail INDEX_URL="${TARBALL_INDEX_URL:-}" @@ -121,13 +135,20 @@ jobs: id: prepare env: TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} - INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir }} + INPUT_REMOTE_WORK_DIR: ${{ inputs.remote_work_dir || format('/tmp/rvs-nightly-docker-{0}', github.run_id) }} + VAR_REMOTE_WORK_DIR: ${{ vars.RVS_REMOTE_WORK_DIR }} GITHUB_RUN_ID: ${{ github.run_id }} - TARGET_NODE: localhost run: | chmod +x rvs_nightly_test.sh + if [ -z "${TARGET_NODE:-}" ]; then + echo "::error::No target node (set secrets.RVS_TARGET_NODE or workflow input target_node)." >&2 + exit 1 + fi ./rvs_nightly_test.sh validate-config + - name: Setup SSH to target node + run: ./rvs_nightly_test.sh setup-ssh + - name: Export paths for remaining steps run: | { @@ -137,7 +158,7 @@ jobs: echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" } >> "$GITHUB_ENV" - - name: Build ROCm docker image matching RVS tarball + - name: Build ROCm docker image on l003 if: inputs.build_docker_image env: TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} @@ -145,22 +166,22 @@ jobs: chmod +x .github/docker/rvs-nightly-rocm/build-rocm-image.sh ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh --from-tarball "$TARBALL_NAME" - - name: Verify ROCm docker image is present locally + - name: Verify ROCm docker image on l003 run: | chmod +x rvs_nightly_docker.sh ./rvs_nightly_docker.sh pull-image - - name: Download RVS tarball - run: ./rvs_nightly_test.sh download-tarball + - name: Transfer docker image to target (save, scp, load) + run: ./rvs_nightly_docker.sh transfer-image-to-target - - name: Verify ROCm in docker + - name: Verify ROCm in docker on target run: ./rvs_nightly_docker.sh verify-rocm - - name: Install RVS in docker + - name: Install RVS in docker on target run: ./rvs_nightly_docker.sh install-rvs run-rvs-level-4-in-docker: - name: Run RVS level 4 in docker + name: Run RVS level 4 in docker on target needs: [install-rvs-in-docker] runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 180 @@ -172,33 +193,37 @@ jobs: target_rocm_version: ${{ steps.versions.outputs.target_rocm_version }} env: TARGET_ROCM_PATH: /opt/rocm/install + TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} + TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} + SSH_PRIVATE_KEY: ${{ secrets.RVS_TARGET_SSH_KEY }} + RVS_DOCKER_ON_TARGET: 'true' REMOTE_WORK_DIR: ${{ needs.install-rvs-in-docker.outputs.remote_work_dir }} ROCM_MAJOR: ${{ needs.install-rvs-in-docker.outputs.rocm_major }} INSTALL_DIR: ${{ needs.install-rvs-in-docker.outputs.install_dir }} RVS_BIN: ${{ needs.install-rvs-in-docker.outputs.rvs_bin }} + RVS_NIGHTLY_DOCKER_IMAGE: ${{ inputs.docker_image || vars.RVS_NIGHTLY_DOCKER_IMAGE || 'rvs-nightly-rocm:latest' }} steps: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - - name: Download RVS tarball for docker mount - env: - TARBALL_URL: ${{ needs.install-rvs-in-docker.outputs.tarball_url }} - TARBALL_NAME: ${{ needs.install-rvs-in-docker.outputs.tarball_name }} + - name: Setup SSH to target node run: | chmod +x rvs_nightly_test.sh rvs_nightly_docker.sh - ./rvs_nightly_test.sh download-tarball + ./rvs_nightly_test.sh setup-ssh - - name: Run RVS level 4 in docker + - name: Run RVS level 4 in docker on target id: level4 run: ./rvs_nightly_docker.sh run-level4 - - name: Capture RVS and ROCm versions from docker + - name: Capture RVS and ROCm versions from docker on target id: versions if: always() run: ./rvs_nightly_docker.sh capture-versions + - name: Collect logs from target + if: always() + run: ./rvs_nightly_test.sh collect-logs + - name: Upload test logs if: always() uses: actions/upload-artifact@v4 @@ -216,8 +241,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Download test logs uses: actions/download-artifact@v4 diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh index 66089dce4..200299a61 100755 --- a/rvs_nightly_docker.sh +++ b/rvs_nightly_docker.sh @@ -1,25 +1,33 @@ #!/usr/bin/env bash ################################################################################ -# Run RVS nightly install + level 4 inside a ROCm-matched docker container on the -# self-hosted runner (GPU passthrough). +# RVS nightly tests inside a ROCm-matched docker container. +# +# Default (RVS_DOCKER_ON_TARGET=true): build host (l003) saves the image, +# scp + docker load on the GPU target, then docker run on the target via SSH. +# Set RVS_DOCKER_ON_TARGET=false to run docker locally on the build host instead. ################################################################################ set -euo pipefail DOCKER_IMAGE="${RVS_NIGHTLY_DOCKER_IMAGE:-rvs-nightly-rocm:latest}" +DOCKER_IMAGE_ARCHIVE="${RVS_DOCKER_IMAGE_ARCHIVE:-rvs-nightly-rocm-image.tar.gz}" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" usage() { cat <<'EOF' Usage: rvs_nightly_docker.sh -Commands: - pull-image Verify docker access and that the image exists locally - verify-rocm rocminfo + amd-smi inside container - install-rvs Extract RVS tarball under /opt/rocm/extras- in container - run-level4 rvs -r 4 inside container - capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT - run-pipeline verify-rocm → install-rvs → run-level4 +Image transfer (build host l003 → target via scp + docker load): + transfer-image-to-target docker save | gzip, scp, docker load on target + verify-image-on-target Confirm image exists on target after load + +In-container steps (on target when RVS_DOCKER_ON_TARGET=true): + pull-image Verify image on build host (local) before transfer + verify-rocm rocminfo + amd-smi inside container + install-rvs Extract RVS tarball under /opt/rocm/extras- + run-level4 rvs -r 4 inside container + capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT + run-pipeline verify-rocm → install-rvs → run-level4 EOF } @@ -31,7 +39,38 @@ require_env() { fi } -host_rvs_install_dir() { +use_target_docker() { + case "${RVS_DOCKER_ON_TARGET:-true}" in + 0|false|False|no|NO) return 1 ;; + esac + if [ -n "${TARGET_NODE:-}" ] && [ "$TARGET_NODE" != "localhost" ] && [ "$TARGET_NODE" != "127.0.0.1" ]; then + return 0 + fi + if [ -z "${TARGET_NODE:-}" ] || [ "$TARGET_NODE" = "localhost" ] || [ "$TARGET_NODE" = "127.0.0.1" ]; then + if [ "${RVS_DOCKER_ON_TARGET:-true}" = "true" ] || [ "${RVS_DOCKER_ON_TARGET:-}" = "1" ]; then + echo "::error::RVS_DOCKER_ON_TARGET is enabled but TARGET_NODE is not set (use secrets.RVS_TARGET_NODE)." >&2 + exit 1 + fi + fi + return 1 +} + +require_ssh_config() { + if [ -z "${SSH_CONFIG_FILE:-}" ]; then + local ssh_env_file="${RUNNER_TEMP:-/tmp}/rvs_ssh_env.sh" + if [ -f "$ssh_env_file" ]; then + # shellcheck source=/dev/null + source "$ssh_env_file" + fi + fi + require_env SSH_CONFIG_FILE + if [ ! -f "$SSH_CONFIG_FILE" ]; then + echo "::error::SSH config missing at $SSH_CONFIG_FILE — run: ./rvs_nightly_test.sh setup-ssh" >&2 + exit 1 + fi +} + +target_rvs_install_dir() { require_env REMOTE_WORK_DIR require_env ROCM_MAJOR printf '%s/extras-%s' "${REMOTE_WORK_DIR%/}" "$ROCM_MAJOR" @@ -46,32 +85,29 @@ docker_gpu_opts() { --security-opt seccomp=unconfined } -check_docker() { +check_docker_local() { if docker info >/dev/null 2>&1; then return 0 fi - echo "::error::Cannot access Docker (/var/run/docker.sock). The GitHub Actions runner service user must be in the 'docker' group (sudo usermod -aG docker ; restart the runner). Note: your SSH login user may differ from the runner service account." >&2 + echo "::error::Cannot access Docker on the build host (/var/run/docker.sock). Add the runner user to the 'docker' group and restart the runner." >&2 exit 1 } -cmd_pull_image() { - check_docker - if docker image inspect "$DOCKER_IMAGE" >/dev/null 2>&1; then - echo "::notice::Image ${DOCKER_IMAGE} already present locally." +check_docker_on_target() { + require_ssh_config + if ssh -q -F "$SSH_CONFIG_FILE" rvs-target 'docker info >/dev/null 2>&1'; then return 0 fi - echo "::error::Docker image ${DOCKER_IMAGE} not found locally. Build on the runner host:" >&2 - echo " ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh --from-tarball " >&2 - echo "Or re-run the workflow with build_docker_image=true (requires docker group access for the runner user)." >&2 + echo "::error::Cannot access Docker on the target node. Ensure the SSH user is in the 'docker' group on the target." >&2 exit 1 } -docker_run() { - check_docker +docker_run_local() { + check_docker_local local -a install_mount=() if [ -n "${INSTALL_DIR:-}" ] && [ -n "${REMOTE_WORK_DIR:-}" ] && [ -n "${ROCM_MAJOR:-}" ]; then local host_install - host_install="$(host_rvs_install_dir)" + host_install="$(target_rvs_install_dir)" mkdir -p "$host_install" install_mount=(-v "${host_install}:${INSTALL_DIR}") fi @@ -79,8 +115,6 @@ docker_run() { docker run --rm \ $(docker_gpu_opts) \ "${install_mount[@]}" \ - -v "${REPO_ROOT}:/workspace" \ - -v "${REPO_ROOT}/pkg:/pkg:ro" \ -v "${REPO_ROOT}/reports:/reports" \ -w /workspace \ -e ROCM_PATH=/opt/rocm/install \ @@ -89,6 +123,83 @@ docker_run() { bash -lc "$1" } +target_docker_run() { + require_ssh_config + require_env REMOTE_WORK_DIR + check_docker_on_target + local inner_cmd="$1" + local gpu_opts install_vol escaped + gpu_opts=$(docker_gpu_opts) + install_vol="" + if [ -n "${INSTALL_DIR:-}" ] && [ -n "${ROCM_MAJOR:-}" ]; then + install_vol="-v ${REMOTE_WORK_DIR}/extras-${ROCM_MAJOR}:${INSTALL_DIR}" + fi + escaped=$(printf '%q' "$inner_cmd") + ssh -q -F "$SSH_CONFIG_FILE" rvs-target bash -s </dev/null 2>&1; then + echo "::notice::Image ${DOCKER_IMAGE} present on build host." + return 0 + fi + echo "::error::Docker image ${DOCKER_IMAGE} not found on build host. Run:" >&2 + echo " ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh --from-tarball " >&2 + echo "Or re-run the workflow with build_docker_image=true." >&2 + exit 1 +} + +cmd_transfer_image_to_target() { + require_ssh_config + require_env REMOTE_WORK_DIR + cmd_pull_image + local archive="${REPO_ROOT}/pkg/${DOCKER_IMAGE_ARCHIVE}" + mkdir -p "${REPO_ROOT}/pkg" + echo "Saving ${DOCKER_IMAGE} to ${archive} ..." + docker save "${DOCKER_IMAGE}" | gzip -1 > "${archive}" + ls -lh "${archive}" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '${REMOTE_WORK_DIR}/docker'" + echo "Copying image archive to target:${REMOTE_WORK_DIR}/docker/ ..." + scp -q -F "$SSH_CONFIG_FILE" "${archive}" \ + "rvs-target:${REMOTE_WORK_DIR}/docker/${DOCKER_IMAGE_ARCHIVE}" + echo "Loading image on target ..." + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "gzip -dc '${REMOTE_WORK_DIR}/docker/${DOCKER_IMAGE_ARCHIVE}' | docker load" + cmd_verify_image_on_target +} + +cmd_verify_image_on_target() { + require_ssh_config + check_docker_on_target + if ssh -q -F "$SSH_CONFIG_FILE" rvs-target "docker image inspect '${DOCKER_IMAGE}' >/dev/null 2>&1"; then + echo "::notice::Image ${DOCKER_IMAGE} present on target node." + return 0 + fi + echo "::error::Image ${DOCKER_IMAGE} not found on target after transfer." >&2 + exit 1 +} + cmd_verify_rocm() { docker_run ' source /etc/profile.d/rocm-env.sh @@ -101,25 +212,26 @@ cmd_verify_rocm() { cmd_install_rvs() { require_env TARBALL_NAME + require_env TARBALL_URL require_env ROCM_MAJOR require_env INSTALL_DIR require_env RVS_BIN require_env REMOTE_WORK_DIR - local pkg_host="${REPO_ROOT}/pkg/${TARBALL_NAME}" - if [ ! -f "$pkg_host" ]; then - echo "::error::RVS tarball not found at ${pkg_host}" >&2 - exit 1 - fi + local url_escaped + url_escaped=$(printf '%q' "$TARBALL_URL") docker_run " source /etc/profile.d/rocm-env.sh set -euo pipefail - PKG=/pkg/${TARBALL_NAME} + PKG=/tmp/${TARBALL_NAME} INSTALL_DIR=${INSTALL_DIR} RVS_BIN=${RVS_BIN} + echo \"Downloading RVS tarball inside container...\" + wget -q -O \"\${PKG}\" ${url_escaped} mkdir -p \"\${INSTALL_DIR}\" tar -xzf \"\${PKG}\" -C \"\${INSTALL_DIR}\" + rm -f \"\${PKG}\" export LD_LIBRARY_PATH=\"\${INSTALL_DIR}/lib:\${LD_LIBRARY_PATH}\" if [ ! -x \"\${RVS_BIN}\" ]; then echo \"::error::rvs binary missing at \${RVS_BIN}\" >&2 @@ -137,11 +249,19 @@ cmd_run_level4() { require_env REMOTE_WORK_DIR require_env ROCM_MAJOR - local host_install - host_install="$(host_rvs_install_dir)" - if [ ! -x "${host_install}/bin/rvs" ]; then - echo "::error::RVS not installed at ${host_install}/bin/rvs — run install-rvs first (same REMOTE_WORK_DIR=${REMOTE_WORK_DIR})" >&2 - exit 1 + if use_target_docker; then + require_ssh_config + if ! ssh -q -F "$SSH_CONFIG_FILE" rvs-target "test -x '${REMOTE_WORK_DIR}/extras-${ROCM_MAJOR}/bin/rvs'"; then + echo "::error::RVS not installed on target at ${REMOTE_WORK_DIR}/extras-${ROCM_MAJOR}/bin/rvs — run install-rvs first." >&2 + exit 1 + fi + else + local host_install + host_install="$(target_rvs_install_dir)" + if [ ! -x "${host_install}/bin/rvs" ]; then + echo "::error::RVS not installed at ${host_install}/bin/rvs — run install-rvs first." >&2 + exit 1 + fi fi mkdir -p "${REPO_ROOT}/reports" @@ -161,6 +281,12 @@ cmd_run_level4() { set -e end="$(date -u +%FT%TZ)" + if use_target_docker; then + mkdir -p "${REPO_ROOT}/reports" + scp -q -F "$SSH_CONFIG_FILE" "rvs-target:${REMOTE_WORK_DIR}/reports/rvs_level_4.log" \ + "${REPO_ROOT}/reports/" 2>/dev/null || echo "::warning::Could not copy rvs_level_4.log from target." + fi + if [ -n "${GITHUB_OUTPUT:-}" ]; then echo "rc=$rc" >> "$GITHUB_OUTPUT" echo "start=$start" >> "$GITHUB_OUTPUT" @@ -203,13 +329,15 @@ cmd_run_pipeline() { main() { [ $# -ge 1 ] || { usage; exit 1; } case "$1" in - pull-image) cmd_pull_image ;; - verify-rocm) cmd_verify_rocm ;; - install-rvs) cmd_install_rvs ;; - run-level4) cmd_run_level4 ;; - capture-versions) cmd_capture_versions ;; - run-pipeline) cmd_run_pipeline ;; - -h|--help) usage ;; + pull-image) cmd_pull_image ;; + transfer-image-to-target) cmd_transfer_image_to_target ;; + verify-image-on-target) cmd_verify_image_on_target ;; + verify-rocm) cmd_verify_rocm ;; + install-rvs) cmd_install_rvs ;; + run-level4) cmd_run_level4 ;; + capture-versions) cmd_capture_versions ;; + run-pipeline) cmd_run_pipeline ;; + -h|--help) usage ;; *) echo "Unknown command: $1" >&2; usage; exit 1 ;; esac } diff --git a/rvs_nightly_test.sh b/rvs_nightly_test.sh index 6c3644b49..ddef7cd01 100755 --- a/rvs_nightly_test.sh +++ b/rvs_nightly_test.sh @@ -107,6 +107,14 @@ cmd_setup_ssh() { } >> "$GITHUB_ENV" fi + # Persist for manual runs: rvs_nightly_docker.sh sources this if SSH_CONFIG_FILE is unset. + local ssh_env_file="${RUNNER_TEMP:-/tmp}/rvs_ssh_env.sh" + cat > "$ssh_env_file" <&2 exit 1 @@ -144,7 +152,7 @@ EOF echo "::notice::SSH connectivity OK." ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports'" + "mkdir -p '${REMOTE_WORK_DIR}/pkg' '${REMOTE_WORK_DIR}/reports' '${REMOTE_WORK_DIR}/docker'" } cmd_verify_rocm() { From 1a8b1b8bb29328bb1eca878d363ab500b06f40bb Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 4 Aug 2026 13:13:07 -0400 Subject: [PATCH 265/275] Removing hostname from code Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-docker-tests.yml | 14 +++++++------- rvs_nightly_docker.sh | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index 23c2e1793..b6afd3750 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -1,14 +1,14 @@ name: RVS Nightly Tests (Docker) -# Build ROCm docker image on l003 (self-hosted runner), transfer to GPU target via +# Build ROCm docker image on the self-hosted runner, transfer to GPU target via # scp + docker load, then install RVS and run level 4 inside docker on the target. # ROCm SDK version is derived from the tar tarball name (-rMMmm.yyyymmdd-Linux.tar.gz). # -# Flow: l003 docker build → docker save | scp → target docker load → target docker run +# Flow: build host docker build → docker save | scp → target docker load → target docker run # RVS tarball is wget'd inside the container on the target (no scp of RVS tar). # # Prerequisites: -# - Build host (l003): docker build user in docker group +# - Build host (self-hosted runner): docker build user in docker group # - Target GPU node: docker, /dev/kfd, /dev/dri, SSH user in docker group # - Secrets: RVS_TARGET_NODE, RVS_TARGET_SSH_KEY (optional RVS_TARGET_USER) # - Secret: RVS_TARBALL_INDEX_URL @@ -39,7 +39,7 @@ on: required: false default: '' build_docker_image: - description: 'Build rvs-nightly-rocm image on l003 from RVS tarball ROCm version before transfer' + description: 'Build rvs-nightly-rocm image on the build host from RVS tarball ROCm version before transfer' required: false type: boolean default: false @@ -66,7 +66,7 @@ env: jobs: install-rvs-in-docker: - name: Build image on l003 and install RVS in docker on target + name: Build image on runner and install RVS in docker on target runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 180 outputs: @@ -158,7 +158,7 @@ jobs: echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" } >> "$GITHUB_ENV" - - name: Build ROCm docker image on l003 + - name: Build ROCm docker image on build host if: inputs.build_docker_image env: TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} @@ -166,7 +166,7 @@ jobs: chmod +x .github/docker/rvs-nightly-rocm/build-rocm-image.sh ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh --from-tarball "$TARBALL_NAME" - - name: Verify ROCm docker image on l003 + - name: Verify ROCm docker image on build host run: | chmod +x rvs_nightly_docker.sh ./rvs_nightly_docker.sh pull-image diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh index 200299a61..700448a54 100755 --- a/rvs_nightly_docker.sh +++ b/rvs_nightly_docker.sh @@ -2,7 +2,7 @@ ################################################################################ # RVS nightly tests inside a ROCm-matched docker container. # -# Default (RVS_DOCKER_ON_TARGET=true): build host (l003) saves the image, +# Default (RVS_DOCKER_ON_TARGET=true): build host saves the image, # scp + docker load on the GPU target, then docker run on the target via SSH. # Set RVS_DOCKER_ON_TARGET=false to run docker locally on the build host instead. ################################################################################ @@ -17,7 +17,7 @@ usage() { cat <<'EOF' Usage: rvs_nightly_docker.sh -Image transfer (build host l003 → target via scp + docker load): +Image transfer (build host → target via scp + docker load): transfer-image-to-target docker save | gzip, scp, docker load on target verify-image-on-target Confirm image exists on target after load From 7ff84a875c6e6f554fc7ec752448c1c30d507dfb Mon Sep 17 00:00:00 2001 From: yugang-amd Date: Tue, 4 Aug 2026 20:23:52 -0400 Subject: [PATCH 266/275] Post release RVS install update (#1275) * Post release RVS install update * simplify instructions by using tabs * more simplifications * add "User setup" and "System-wide setup" tabs * swap tabs * add uninstall section etc. * relocate uninstall sections * remove duplicate section * remove duplicate instruction * add missing uninstall step for Ubuntu * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * Update docs/install/installation.rst Co-authored-by: Pratik Basyal * use intersphinx --------- Co-authored-by: Pratik Basyal --- docs/install/installation.rst | 313 +++++++++++++++++++++++++++++----- 1 file changed, 269 insertions(+), 44 deletions(-) diff --git a/docs/install/installation.rst b/docs/install/installation.rst index 7984f622f..38bc1fa4b 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -7,8 +7,7 @@ Install ROCm Validation Suite ***************************** ROCm Validation Suite (RVS) is supported on AMD Instinct and Radeon GPUs -supported by ROCm. See the `ROCm compatibility matrix -`__ for support information. +supported by ROCm. See the :doc:`ROCm compatibility matrix ` for support information. For advanced workflows, source builds, or custom configurations, see ``__. @@ -20,11 +19,51 @@ For advanced workflows, source builds, or custom configurations, see Prerequisites ============= -Install the ROCm Core SDK before installing RVS. For instructions, see `Install AMD ROCm -`__. Use the +Install the ROCm Core SDK before installing RVS. + +For instructions, see :doc:`Install AMD ROCm `. Use the selector panel on that page to view instructions appropriate for your system environment. +ROCm installation path +====================== + +The ROCm installation path depends on what installation method was selected during +ROCm installation. After installation, the ROCm Core SDK will be deployed to this +path location and contains all the core ROCm directories such as ``bin``, ``include``, +and ``lib``. When configuring the environment for RVS, you must set the +``ROCM_INSTALL_PATH`` environment variable to the ROCm core installation directory +```` based on the installation method used: + +.. tab-set:: + + .. tab-item:: Package manager + + .. code-block:: bash + + ROCM_INSTALL_PATH=/opt/rocm/core-7.14 # = /opt/rocm/core-7.14 + + .. tab-item:: pip + + Use within active python virtual environment: + + .. code-block:: bash + + ROCM_INSTALL_PATH=$(rocm-sdk path --root) # = rocm-sdk path of core installation + + .. tab-item:: Tarball + + .. code-block:: bash + + ROCM_INSTALL_PATH=/therock-tarball/install # = to default "therock-tarball" installation + + .. tab-item:: Runfile + + .. code-block:: bash + + ROCM_INSTALL_PATH=/opt/rocm/core-7.14 # = default /opt/rocm/core-7.14 installation (no target=) + ROCM_INSTALL_PATH=/rocm/core-7.14 # = target= + Package manager installation ============================= @@ -82,34 +121,48 @@ on top of the ROCm Core SDK. sudo dnf install amdrocm7-rvs -3. Complete the following post-installation step to set up your environment. Set ``ROCM_PATH`` to your ROCm Core SDK location. +3. Complete the following post-installation steps. - .. tab-set:: + Use the following commands to update your shell configuration file + (``~/.bashrc`` or ``~/.profile``) and add ROCm to your PATH. - .. tab-item:: User setup + a. Set the ROCm installation path based on the ROCm installation method + and ````: - .. code-block:: bash + .. code-block:: bash - tee -a ~/.bashrc << EOF - export ROCM_PATH=/opt/rocm - export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH - export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH - EOF + ROCM_INSTALL_PATH= # ie. /opt/rocm/core-7.14 - source ~/.bashrc + b. Configure your environment. - .. tab-item:: System-wide setup + .. tab-set:: - .. code-block:: bash + .. tab-item:: System-wide - sudo tee /etc/profile.d/set-rocm-env.sh << EOF - export ROCM_PATH=/opt/rocm - export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH - export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH - EOF + .. code-block:: bash + + sudo tee /etc/profile.d/set-rvs-env.sh << EOF + export EXTRAS_PATH=/opt/rocm/extras-7 + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF - sudo chmod +x /etc/profile.d/set-rocm-env.sh - source /etc/profile.d/set-rocm-env.sh + sudo chmod +x /etc/profile.d/set-rvs-env.sh + source /etc/profile.d/set-rvs-env.sh + + .. tab-item:: User + + .. code-block:: bash + + tee --append ~/.bashrc << EOF + export EXTRAS_PATH=/opt/rocm/extras-7 + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + source ~/.bashrc 4. Verify your installation. @@ -121,6 +174,75 @@ on top of the ROCm Core SDK. The ROCm repositories must be set up before installing RVS. This repository setup is part of the ROCm Core SDK installation. +Package manager uninstallation +=================================== + +1. Remove installed packages. + + .. tab-set:: + + .. tab-item:: Ubuntu + :sync: ubuntu + + .. code-block:: bash + + sudo apt autoremove amdrocm7-rvs + + .. tab-item:: RHEL + :sync: rhel + + .. code-block:: bash + + sudo dnf remove amdrocm7-rvs + +2. Remove RVS repositories. + + .. tab-set:: + + .. tab-item:: Ubuntu + :sync: ubuntu + + .. code-block:: bash + + # Remove RVS repositories + sudo rm /etc/apt/sources.list.d/rvs.list + + # Clear the cache and clean the system + sudo rm -rf /var/cache/apt/* + sudo apt clean all + sudo apt update + + .. tab-item:: RHEL + :sync: rhel + + .. code-block:: bash + + # Remove RVS repositories + sudo rm /etc/yum.repos.d/rvs.repo + + # Clear the cache and clean the system + sudo rm -rf /var/cache/dnf + sudo dnf clean all + +3. Remove RVS environment configuration. + + .. tab-set:: + + .. tab-item:: System-wide + + If you opted for a system-wide setup during the installation + process, remove the RVS environment variables. + + .. code-block:: bash + + sudo rm -f /etc/profile.d/set-rvs-env.sh + + .. tab-item:: User + + If you opted for a user-specific setup during the installation + process, remove the RVS environment configuration block from + your shell configuration file (``~/.bashrc`` or ``~/.profile``). + Tarball installation ==================== @@ -152,44 +274,147 @@ Use the following steps to install RVS using a tarball on top of the ROCm Core S 3. Extract the tarball to the ROCm Extras location. - Set ``ROCM_PATH`` to your ROCm Core SDK location, which varies depending on how you installed it. For example, if you installed the ROCm Core SDK using your Linux distribution's package manager: + RVS is part of the ROCm Extras set of tools that work with the ROCm Core SDK. + The ROCm Extras location (``EXTRAS_INSTALL_PATH``) can be set to a custom + location ````, but is typically set based on the ROCm installation + method used. + + .. code-block:: bash + + EXTRAS_INSTALL_PATH= # ie. = path to ROCm extras for RVS extract + + sudo mkdir -p $EXTRAS_INSTALL_PATH + sudo tar -xzf amdrocm7-rvs-1.5.122-579-Linux.tar.gz -C $EXTRAS_INSTALL_PATH + + **Recommended:** Set ``EXTRAS_INSTALL_PATH`` to a location within the root + install directory for the ROCm Core SDK. + + For example, if you installed the ROCm Core SDK using your Linux + distribution's package manager: .. code-block:: bash sudo mkdir -p /opt/rocm/extras-7 sudo tar -xzf amdrocm7-rvs-1.5.122-579-Linux.tar.gz -C /opt/rocm/extras-7 -4. Complete the following post-installation step to set up your environment. Set ``ROCM_PATH`` to your ROCm Core SDK location. +4. Complete the following post-installation steps. - .. tab-set:: + Use the following commands to update your shell configuration file + (``~/.bashrc`` or ``~/.profile``) and add Extras and ROCm to your PATH. - .. tab-item:: User setup + a. Set the ROCm installation path based on the ROCm installation method + and ````: - .. code-block:: bash + .. code-block:: bash - tee -a ~/.bashrc << EOF - export ROCM_PATH=/opt/rocm - export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH - export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH - EOF + ROCM_INSTALL_PATH= # ie. /opt/rocm/core-7.14 - source ~/.bashrc + b. Configure your environment. - .. tab-item:: System-wide setup + .. tab-set:: - .. code-block:: bash + .. tab-item:: System-wide - sudo tee /etc/profile.d/set-rocm-env.sh << EOF - export ROCM_PATH=/opt/rocm - export PATH=\$ROCM_PATH/extras-7/bin:\$ROCM_PATH/bin:\$PATH - export LD_LIBRARY_PATH=\$ROCM_PATH/extras-7/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH - EOF + .. tab-set:: + + .. tab-item:: Ubuntu + :sync: ubuntu + + .. code-block:: bash + + sudo tee /etc/profile.d/set-rvs-env.sh << EOF + export EXTRAS_PATH=$EXTRAS_INSTALL_PATH + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + sudo chmod +x /etc/profile.d/set-rvs-env.sh + source /etc/profile.d/set-rvs-env.sh + + .. tab-item:: RHEL + :sync: rhel - sudo chmod +x /etc/profile.d/set-rocm-env.sh - source /etc/profile.d/set-rocm-env.sh + .. code-block:: bash + + sudo tee /etc/profile.d/set-rvs-env.sh << EOF + export EXTRAS_PATH=/opt/rocm/extras-7 + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + sudo chmod +x /etc/profile.d/set-rvs-env.sh + source /etc/profile.d/set-rvs-env.sh + + .. tab-item:: User + + .. tab-set:: + + .. tab-item:: Ubuntu + :sync: ubuntu + + .. code-block:: bash + + tee --append ~/.bashrc << EOF + export EXTRAS_PATH=$EXTRAS_INSTALL_PATH + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + source ~/.bashrc + + .. tab-item:: RHEL + :sync: rhel + + .. code-block:: bash + + tee --append ~/.bashrc << EOF + export EXTRAS_PATH=/opt/rocm/extras-7 + export ROCM_PATH=$ROCM_INSTALL_PATH + export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH + export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH + EOF + + source ~/.bashrc 5. Verify your installation. .. code-block:: bash - rvs -g \ No newline at end of file + rvs -g + +Tarball uninstallation +========================= + +1. Remove the installation directory. + + .. important:: + The following command assumes you're working with the + ``EXTRAS_INSTALL_PATH`` directory set to ``/opt/rocm/extras-7``. If you + chose a different directory name when installing RVS, adjust the command + accordingly. + + .. code-block:: bash + + sudo rm -rf /opt/rocm/extras-7 + +2. Remove the RVS environment configuration. + + .. tab-set:: + + .. tab-item:: System-wide + + If you opted for a system-wide setup during the installation process, + remove the RVS environment variables. + + .. code-block:: bash + + sudo rm -f /etc/profile.d/set-rvs-env.sh + + .. tab-item:: User + + If you opted for a user-specific setup during the installation + process, remove the RVS environment configuration block from your + shell configuration file (``~/.bashrc`` or ``~/.profile``). \ No newline at end of file From eed74857b6cdb896d867ae9b8c61ec781b363498 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 4 Aug 2026 18:33:10 -0400 Subject: [PATCH 267/275] setup-ssh runs before REMOTE_WORK_DIR is exported. Fixing step order to match the SSH nightly workflow. Signed-off-by: Urvashi Tiwari --- .github/workflows/rvs-nightly-docker-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index b6afd3750..06662f52f 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -147,6 +147,8 @@ jobs: ./rvs_nightly_test.sh validate-config - name: Setup SSH to target node + env: + REMOTE_WORK_DIR: ${{ steps.prepare.outputs.remote_work_dir }} run: ./rvs_nightly_test.sh setup-ssh - name: Export paths for remaining steps @@ -207,6 +209,8 @@ jobs: uses: actions/checkout@v4 - name: Setup SSH to target node + env: + REMOTE_WORK_DIR: ${{ needs.install-rvs-in-docker.outputs.remote_work_dir }} run: | chmod +x rvs_nightly_test.sh rvs_nightly_docker.sh ./rvs_nightly_test.sh setup-ssh From 92d25fc954cc2ac1b50cf2452ce3632067e49b25 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 4 Aug 2026 15:04:54 -0500 Subject: [PATCH 268/275] Enable sustained-mode for MI450X. --- rvs/conf/MI450X/babel.conf | 2 ++ rvs/conf/MI450X/levels/rvs_level_2.conf | 1 + rvs/conf/MI450X/levels/rvs_level_3.conf | 1 + rvs/conf/MI450X/levels/rvs_level_4.conf | 1 + rvs/conf/MI450X/levels/rvs_level_5.conf | 1 + 5 files changed, 6 insertions(+) diff --git a/rvs/conf/MI450X/babel.conf b/rvs/conf/MI450X/babel.conf index ef2716a80..d79331230 100644 --- a/rvs/conf/MI450X/babel.conf +++ b/rvs/conf/MI450X/babel.conf @@ -57,4 +57,6 @@ actions: tb_size: 1024 # Thread block size data_init: gpu_norm_dist # Data initialization nontemporal: write # Non-Temporal + sustained: true # sustained bandwidth mode + diff --git a/rvs/conf/MI450X/levels/rvs_level_2.conf b/rvs/conf/MI450X/levels/rvs_level_2.conf index 90122985a..c02ad7c1d 100644 --- a/rvs/conf/MI450X/levels/rvs_level_2.conf +++ b/rvs/conf/MI450X/levels/rvs_level_2.conf @@ -56,6 +56,7 @@ actions: tb_size: 1024 data_init: gpu_norm_dist nontemporal: write + sustained: true # sustained bandwidth mode - name: xgmi_interface device: all diff --git a/rvs/conf/MI450X/levels/rvs_level_3.conf b/rvs/conf/MI450X/levels/rvs_level_3.conf index c60e43b96..be94c7473 100644 --- a/rvs/conf/MI450X/levels/rvs_level_3.conf +++ b/rvs/conf/MI450X/levels/rvs_level_3.conf @@ -44,6 +44,7 @@ actions: tb_size: 1024 data_init: gpu_norm_dist nontemporal: write + sustained: true # sustained bandwidth mode - name: pcie_d2h_bandwidth device: all diff --git a/rvs/conf/MI450X/levels/rvs_level_4.conf b/rvs/conf/MI450X/levels/rvs_level_4.conf index 938e37e80..cf1e5aacd 100644 --- a/rvs/conf/MI450X/levels/rvs_level_4.conf +++ b/rvs/conf/MI450X/levels/rvs_level_4.conf @@ -46,6 +46,7 @@ actions: tb_size: 1024 data_init: gpu_norm_dist nontemporal: write + sustained: true # sustained bandwidth mode - name: pcie_d2h_bandwidth device: all diff --git a/rvs/conf/MI450X/levels/rvs_level_5.conf b/rvs/conf/MI450X/levels/rvs_level_5.conf index d2de75dcf..5af9fe332 100644 --- a/rvs/conf/MI450X/levels/rvs_level_5.conf +++ b/rvs/conf/MI450X/levels/rvs_level_5.conf @@ -46,6 +46,7 @@ actions: tb_size: 1024 data_init: gpu_norm_dist nontemporal: write + sustained: true # sustained bandwidth mode - name: pcie_d2h_bandwidth device: all From cf0eff2d47c7bfc49553e2ae922d0f6d0f24bf44 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 4 Aug 2026 17:56:43 -0500 Subject: [PATCH 269/275] Updated change log for RVS v1.6. --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d7a30483..d51de3a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,17 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Added -- Test-level configurations for MI350P-450W and MI350P-600W . +- Test-level configurations for MI350P-450W and MI350P-600W. +- Support for new platform: MI450X. +- Support for Babel sustained bandwidth mode. +- Support for test duration selection using the `-t` option. +- Added iterations-based GST ramp-up support. + +### Changed + +- Updated and improved user-guide. +- Updated Babel JSON schema. +- Updated TransferBench to v1.69.00. ## RVS 1.5.0 From 80568cbf11243963e78929c101784d9e8436c1d2 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 5 Aug 2026 14:48:17 -0700 Subject: [PATCH 270/275] update version to 1.7.0 --- CHANGELOG.md | 15 +++++++++++++-- CMakeLists.txt | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d51de3a82..687800528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https://github.com/ROCm/ROCmValidationSuite). +## RVS 1.7.0 + +### Added + + + +### Changed + ## RVS 1.6.0 ### Added @@ -31,7 +39,7 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Changed - Updated Babel output to report throughput instead of execution time. - + ## RVS 1.4.0 ### Added @@ -51,7 +59,6 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// - Babel subtest configurability - ## RVS 1.3.0 for ROCm 7.1.1 ### Added @@ -71,15 +78,18 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ## RVS 1.2.0 for ROCm 7.0.2 ### Added + - Support for Amazon Linux. ### Changed + - Update gst conf. files for MI350X and MI355X. - Change GEMM execution method during ramp-up. ## RVS 1.2.0 for ROCm 7.0.1 ### Added + - Support for new platform: RX9060 ## RVS 1.2.0 for ROCm 7.0.0 @@ -180,3 +190,4 @@ Full documentation for RVS is available at [ROCmValidationSuite.Readme](https:// ### Optimized - In GST and IET modules, use of callback mechanism instead of polling for HIP stream reduced the CPU utilization %. + diff --git a/CMakeLists.txt b/CMakeLists.txt index ec8105949..01cff70b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ set( COMP_TYPE "applications" ) set( BUILD_ENABLE_LINTIAN_OVERRIDES ON CACHE BOOL "Enable/Disable Lintian Overrides" ) set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) project ("rocm-validation-suite" - VERSION 1.6.0) + VERSION 1.7.0) # Default libdir to "lib", this skips GNUInstallDirs from trying to take a guess if it's unset: set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") From 07687569a12b30c62e1d49503c14b810e94b1c9b Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 7 Aug 2026 13:59:34 -0400 Subject: [PATCH 271/275] Added python3 to the apt install list (so amd-smi / rocm-smi Python wrappers can run). Signed-off-by: Urvashi Tiwari --- .github/docker/rvs-nightly-rocm/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/docker/rvs-nightly-rocm/Dockerfile b/.github/docker/rvs-nightly-rocm/Dockerfile index cfb287b56..9b6e036f2 100644 --- a/.github/docker/rvs-nightly-rocm/Dockerfile +++ b/.github/docker/rvs-nightly-rocm/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins tar \ pciutils \ kmod \ + python3 \ && rm -rf /var/lib/apt/lists/* RUN test -n "${ROCM_VERSION}" && test -n "${ROCM_SDK_BASE_URL}" @@ -26,7 +27,8 @@ RUN mkdir -p /opt/rocm/install \ "${ROCM_SDK_BASE_URL%/}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" \ && tar -xzf /tmp/rocm-sdk.tar.gz -C /opt/rocm/install --strip-components=1 \ && rm -f /tmp/rocm-sdk.tar.gz \ - && test -x /opt/rocm/install/bin/rocminfo + && test -x /opt/rocm/install/bin/rocminfo \ + && /opt/rocm/install/bin/amd-smi version COPY env-rocm.sh /etc/profile.d/rocm-env.sh From a4691c066f50f6e4535628d5cf8f921a609b0fd6 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Fri, 7 Aug 2026 14:22:28 -0400 Subject: [PATCH 272/275] removing hard coding of ROCm path Signed-off-by: Urvashi Tiwari --- .github/docker/rvs-nightly-rocm/Dockerfile | 15 ++++++++------- .../docker/rvs-nightly-rocm/build-rocm-image.sh | 3 +++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/docker/rvs-nightly-rocm/Dockerfile b/.github/docker/rvs-nightly-rocm/Dockerfile index 9b6e036f2..42787d817 100644 --- a/.github/docker/rvs-nightly-rocm/Dockerfile +++ b/.github/docker/rvs-nightly-rocm/Dockerfile @@ -10,6 +10,7 @@ FROM ubuntu:24.04 ARG ROCM_VERSION ARG GPU_FAMILY=gfx110X-all ARG ROCM_SDK_BASE_URL +ARG ROCM_INSTALL_PATH=/opt/rocm/install RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ca-certificates \ @@ -22,20 +23,20 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins RUN test -n "${ROCM_VERSION}" && test -n "${ROCM_SDK_BASE_URL}" -RUN mkdir -p /opt/rocm/install \ +RUN mkdir -p "${ROCM_INSTALL_PATH}" \ && wget -q -O /tmp/rocm-sdk.tar.gz \ "${ROCM_SDK_BASE_URL%/}/therock-dist-linux-${GPU_FAMILY}-${ROCM_VERSION}.tar.gz" \ - && tar -xzf /tmp/rocm-sdk.tar.gz -C /opt/rocm/install --strip-components=1 \ + && tar -xzf /tmp/rocm-sdk.tar.gz -C "${ROCM_INSTALL_PATH}" --strip-components=1 \ && rm -f /tmp/rocm-sdk.tar.gz \ - && test -x /opt/rocm/install/bin/rocminfo \ - && /opt/rocm/install/bin/amd-smi version + && test -x "${ROCM_INSTALL_PATH}/bin/rocminfo" \ + && "${ROCM_INSTALL_PATH}/bin/amd-smi" version COPY env-rocm.sh /etc/profile.d/rocm-env.sh -ENV ROCM_PATH=/opt/rocm/install -ENV TARGET_ROCM_PATH=/opt/rocm/install +ENV ROCM_PATH=${ROCM_INSTALL_PATH} +ENV TARGET_ROCM_PATH=${ROCM_INSTALL_PATH} ENV ROCM_VERSION=${ROCM_VERSION} ENV GPU_FAMILY=${GPU_FAMILY} -ENV LD_LIBRARY_PATH=/opt/rocm/install/lib/rocm_sysdeps/lib:/opt/rocm/install/lib/llvm/lib:/opt/rocm/install/lib +ENV LD_LIBRARY_PATH=${ROCM_INSTALL_PATH}/lib/rocm_sysdeps/lib:${ROCM_INSTALL_PATH}/lib/llvm/lib:${ROCM_INSTALL_PATH}/lib WORKDIR /workspace diff --git a/.github/docker/rvs-nightly-rocm/build-rocm-image.sh b/.github/docker/rvs-nightly-rocm/build-rocm-image.sh index 755f1fa54..7a6e4cced 100755 --- a/.github/docker/rvs-nightly-rocm/build-rocm-image.sh +++ b/.github/docker/rvs-nightly-rocm/build-rocm-image.sh @@ -141,11 +141,14 @@ echo " ROCm version : ${ROCM_VERSION}" echo " GPU family : ${GPU_FAMILY}" echo " SDK base URL : ${ROCM_SDK_BASE_URL}" +ROCM_INSTALL_PATH="${ROCM_INSTALL_PATH:-/opt/rocm/install}" + docker build \ -f "${SCRIPT_DIR}/Dockerfile" \ --build-arg "ROCM_VERSION=${ROCM_VERSION}" \ --build-arg "GPU_FAMILY=${GPU_FAMILY}" \ --build-arg "ROCM_SDK_BASE_URL=${ROCM_SDK_BASE_URL}" \ + --build-arg "ROCM_INSTALL_PATH=${ROCM_INSTALL_PATH}" \ -t "${IMAGE_TAG}" \ "${SCRIPT_DIR}" From 341e941d355c4abd0d5d9b644002eece88eb5bde Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Mon, 10 Aug 2026 18:24:42 -0500 Subject: [PATCH 273/275] Add power tolerance in level tests. --- rvs/conf/MI300X-HF/iet_stress.conf | 2 +- rvs/conf/MI300X-HF/levels/rvs_level_4.conf | 3 ++- rvs/conf/MI300X-HF/levels/rvs_level_5.conf | 3 ++- rvs/conf/MI300X/iet_stress.conf | 2 +- rvs/conf/MI300X/levels/rvs_level_4.conf | 3 ++- rvs/conf/MI300X/levels/rvs_level_5.conf | 3 ++- rvs/conf/MI325X/iet_stress.conf | 2 +- rvs/conf/MI325X/levels/rvs_level_4.conf | 3 ++- rvs/conf/MI325X/levels/rvs_level_5.conf | 3 ++- 9 files changed, 15 insertions(+), 9 deletions(-) diff --git a/rvs/conf/MI300X-HF/iet_stress.conf b/rvs/conf/MI300X-HF/iet_stress.conf index 146ff148d..5cc9ed6e4 100644 --- a/rvs/conf/MI300X-HF/iet_stress.conf +++ b/rvs/conf/MI300X-HF/iet_stress.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_4.conf b/rvs/conf/MI300X-HF/levels/rvs_level_4.conf index 667ee7456..70a28ac4b 100644 --- a/rvs/conf/MI300X-HF/levels/rvs_level_4.conf +++ b/rvs/conf/MI300X-HF/levels/rvs_level_4.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 850 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI300X-HF/levels/rvs_level_5.conf b/rvs/conf/MI300X-HF/levels/rvs_level_5.conf index aae299acc..2e0ceaeef 100644 --- a/rvs/conf/MI300X-HF/levels/rvs_level_5.conf +++ b/rvs/conf/MI300X-HF/levels/rvs_level_5.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 850 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI300X/iet_stress.conf b/rvs/conf/MI300X/iet_stress.conf index 5157cd07e..8545e3080 100644 --- a/rvs/conf/MI300X/iet_stress.conf +++ b/rvs/conf/MI300X/iet_stress.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/rvs/conf/MI300X/levels/rvs_level_4.conf b/rvs/conf/MI300X/levels/rvs_level_4.conf index 454e99c52..70494f31e 100644 --- a/rvs/conf/MI300X/levels/rvs_level_4.conf +++ b/rvs/conf/MI300X/levels/rvs_level_4.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 750 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI300X/levels/rvs_level_5.conf b/rvs/conf/MI300X/levels/rvs_level_5.conf index 289270c2f..ec6fae0e0 100644 --- a/rvs/conf/MI300X/levels/rvs_level_5.conf +++ b/rvs/conf/MI300X/levels/rvs_level_5.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 750 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI325X/iet_stress.conf b/rvs/conf/MI325X/iet_stress.conf index 613bc1a39..bef3adf7e 100644 --- a/rvs/conf/MI325X/iet_stress.conf +++ b/rvs/conf/MI325X/iet_stress.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2024-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/rvs/conf/MI325X/levels/rvs_level_4.conf b/rvs/conf/MI325X/levels/rvs_level_4.conf index 17ba3f41d..4e71ebccc 100644 --- a/rvs/conf/MI325X/levels/rvs_level_4.conf +++ b/rvs/conf/MI325X/levels/rvs_level_4.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 1000 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 diff --git a/rvs/conf/MI325X/levels/rvs_level_5.conf b/rvs/conf/MI325X/levels/rvs_level_5.conf index a801f7483..7883c94cc 100644 --- a/rvs/conf/MI325X/levels/rvs_level_5.conf +++ b/rvs/conf/MI325X/levels/rvs_level_5.conf @@ -1,6 +1,6 @@ # ################################################################################ # # -# # Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# # Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. # # # # MIT LICENSE: # # Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -217,6 +217,7 @@ actions: sample_interval: 5000 log_interval: 5000 target_power: 1000 + tolerance: 0.01 matrix_size: 28000 ops_type: dgemm lda: 28000 From 67794a038a0b8cc06b6adea9a0696ef9d608e4b6 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Tue, 11 Aug 2026 17:18:07 -0400 Subject: [PATCH 274/275] Remove the build-time amd-smi version check from the Dockerfile. GPU-dependent checks belong in verify-rocm at runtime, when the container has /dev/kfd and /dev/dri. Signed-off-by: Urvashi Tiwari --- .github/docker/rvs-nightly-rocm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker/rvs-nightly-rocm/Dockerfile b/.github/docker/rvs-nightly-rocm/Dockerfile index 42787d817..af19ad4e5 100644 --- a/.github/docker/rvs-nightly-rocm/Dockerfile +++ b/.github/docker/rvs-nightly-rocm/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir -p "${ROCM_INSTALL_PATH}" \ && tar -xzf /tmp/rocm-sdk.tar.gz -C "${ROCM_INSTALL_PATH}" --strip-components=1 \ && rm -f /tmp/rocm-sdk.tar.gz \ && test -x "${ROCM_INSTALL_PATH}/bin/rocminfo" \ - && "${ROCM_INSTALL_PATH}/bin/amd-smi" version + && test -x "${ROCM_INSTALL_PATH}/bin/amd-smi" COPY env-rocm.sh /etc/profile.d/rocm-env.sh From 535f927b730248c423d08d5e3edbab58dce8cd37 Mon Sep 17 00:00:00 2001 From: Urvashi Tiwari Date: Wed, 12 Aug 2026 15:12:33 -0400 Subject: [PATCH 275/275] Removed building docker from host runner as pulling the docker to target node is taking very long Signed-off-by: Urvashi Tiwari --- .../workflows/rvs-nightly-docker-tests.yml | 59 ++- rvs_nightly_docker.sh | 346 ++++++++++++++++-- 2 files changed, 369 insertions(+), 36 deletions(-) diff --git a/.github/workflows/rvs-nightly-docker-tests.yml b/.github/workflows/rvs-nightly-docker-tests.yml index 06662f52f..6214c559e 100644 --- a/.github/workflows/rvs-nightly-docker-tests.yml +++ b/.github/workflows/rvs-nightly-docker-tests.yml @@ -1,17 +1,25 @@ name: RVS Nightly Tests (Docker) -# Build ROCm docker image on the self-hosted runner, transfer to GPU target via -# scp + docker load, then install RVS and run level 4 inside docker on the target. +# Deliver a ROCm-matched docker image to the GPU target, install RVS, run level 4 in docker. # ROCm SDK version is derived from the tar tarball name (-rMMmm.yyyymmdd-Linux.tar.gz). # -# Flow: build host docker build → docker save | scp → target docker load → target docker run -# RVS tarball is wget'd inside the container on the target (no scp of RVS tar). +# Default image delivery: build-on-target (docker build on the GPU node; no cross-host image transfer). +# Set workflow input build_on_target=false to fall back to scp/registry delivery from the runner. +# +# Image delivery (RVS_DOCKER_TRANSFER_MODE / workflow input docker_transfer_mode): +# auto (default) — build-on-target when build_on_target is true (default), else registry when +# RVS_DOCKER_REGISTRY is set, else scp (docker save | pigz/gzip | scp | docker load) +# scp — always save/scp/load (skip when target already has matching ROCM_VERSION) +# registry — docker push on build host, docker pull on target (requires RVS_DOCKER_REGISTRY) +# build-on-target — docker build on the GPU node (no cross-host image transfer) +# +# RVS tarball: downloaded on the orchestrator runner and scp'd to the target (not wget in container). # # Prerequisites: -# - Build host (self-hosted runner): docker build user in docker group -# - Target GPU node: docker, /dev/kfd, /dev/dri, SSH user in docker group -# - Secrets: RVS_TARGET_NODE, RVS_TARGET_SSH_KEY (optional RVS_TARGET_USER) -# - Secret: RVS_TARBALL_INDEX_URL +# - Build host (self-hosted runner): curl/scp/ssh; HTTPS egress to tarball index (docker optional) +# - Target GPU node: docker, HTTPS to rocm.nightlies.amd.com, /dev/kfd, /dev/dri, SSH user in docker group +# - Secrets: RVS_TARGET_NODE, RVS_TARGET_SSH_KEY (optional RVS_TARGET_USER, RVS_TARBALL_INDEX_URL) +# - Optional: vars.RVS_DOCKER_REGISTRY + secrets RVS_DOCKER_REGISTRY_USER/PASSWORD for registry mode # # See README_NIGHTLY_TESTS.md for SSH / tarball index configuration. @@ -39,10 +47,19 @@ on: required: false default: '' build_docker_image: - description: 'Build rvs-nightly-rocm image on the build host from RVS tarball ROCm version before transfer' + description: 'Build rvs-nightly-rocm on the build host before scp/registry delivery (only when build_on_target is false)' required: false type: boolean default: false + build_on_target: + description: 'Build the ROCm docker image on the GPU target (default; skips cross-host image transfer)' + required: false + type: boolean + default: true + docker_transfer_mode: + description: 'Image delivery — auto, scp, registry, or build-on-target (default auto)' + required: false + default: 'auto' remote_work_dir: description: 'Work dir on target (default: /tmp/rvs-nightly-docker-)' required: false @@ -59,6 +76,12 @@ env: TARBALL_INDEX_URL: ${{ secrets.RVS_TARBALL_INDEX_URL }} RVS_NIGHTLY_DOCKER_IMAGE: ${{ inputs.docker_image || vars.RVS_NIGHTLY_DOCKER_IMAGE || 'rvs-nightly-rocm:latest' }} RVS_DOCKER_ON_TARGET: 'true' + RVS_DOCKER_TRANSFER_MODE: ${{ inputs.docker_transfer_mode || vars.RVS_DOCKER_TRANSFER_MODE || 'auto' }} + RVS_DOCKER_BUILD_ON_TARGET: ${{ (inputs.build_on_target != false) && (vars.RVS_DOCKER_BUILD_ON_TARGET != 'false') && 'true' || 'false' }} + RVS_DOCKER_REGISTRY: ${{ vars.RVS_DOCKER_REGISTRY || '' }} + RVS_DOCKER_REGISTRY_USER: ${{ secrets.RVS_DOCKER_REGISTRY_USER }} + RVS_DOCKER_REGISTRY_PASSWORD: ${{ secrets.RVS_DOCKER_REGISTRY_PASSWORD }} + RVS_DOCKER_SKIP_IF_PRESENT: 'true' TARGET_ROCM_PATH: /opt/rocm/install TARGET_NODE: ${{ inputs.target_node || secrets.RVS_TARGET_NODE }} TARGET_USER: ${{ inputs.target_user || secrets.RVS_TARGET_USER }} @@ -66,7 +89,7 @@ env: jobs: install-rvs-in-docker: - name: Build image on runner and install RVS in docker on target + name: Ensure ROCm image on target and install RVS in docker runs-on: ${{ vars.RVS_NIGHTLY_DOCKER_RUNNER_LABEL || vars.RVS_TEST_RUNNER_LABEL || 'self-hosted' }} timeout-minutes: 180 outputs: @@ -152,6 +175,8 @@ jobs: run: ./rvs_nightly_test.sh setup-ssh - name: Export paths for remaining steps + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} run: | { echo "REMOTE_WORK_DIR=${{ steps.prepare.outputs.remote_work_dir }}" @@ -159,9 +184,12 @@ jobs: echo "INSTALL_DIR=${{ steps.prepare.outputs.install_dir }}" echo "RVS_BIN=${{ steps.prepare.outputs.rvs_bin }}" } >> "$GITHUB_ENV" + if [[ "$TARBALL_NAME" =~ -r([0-9]{2})([0-9]{2})\.([0-9]{8})-Linux\.tar\.gz$ ]]; then + echo "RVS_DOCKER_ROCM_VERSION=$((10#${BASH_REMATCH[1]})).$((10#${BASH_REMATCH[2]})).0a${BASH_REMATCH[3]}" >> "$GITHUB_ENV" + fi - name: Build ROCm docker image on build host - if: inputs.build_docker_image + if: inputs.build_docker_image && inputs.build_on_target == false env: TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} run: | @@ -169,12 +197,17 @@ jobs: ./.github/docker/rvs-nightly-rocm/build-rocm-image.sh --from-tarball "$TARBALL_NAME" - name: Verify ROCm docker image on build host + if: inputs.build_docker_image && inputs.build_on_target == false run: | chmod +x rvs_nightly_docker.sh ./rvs_nightly_docker.sh pull-image - - name: Transfer docker image to target (save, scp, load) - run: ./rvs_nightly_docker.sh transfer-image-to-target + - name: Ensure ROCm docker image on GPU target + env: + TARBALL_NAME: ${{ steps.resolve.outputs.tarball_name }} + run: | + chmod +x rvs_nightly_docker.sh + ./rvs_nightly_docker.sh ensure-image-on-target - name: Verify ROCm in docker on target run: ./rvs_nightly_docker.sh verify-rocm diff --git a/rvs_nightly_docker.sh b/rvs_nightly_docker.sh index 700448a54..a3aa83f83 100755 --- a/rvs_nightly_docker.sh +++ b/rvs_nightly_docker.sh @@ -2,9 +2,18 @@ ################################################################################ # RVS nightly tests inside a ROCm-matched docker container. # -# Default (RVS_DOCKER_ON_TARGET=true): build host saves the image, -# scp + docker load on the GPU target, then docker run on the target via SSH. +# Default (RVS_DOCKER_ON_TARGET=true): build the ROCm image on the GPU target +# (RVS_DOCKER_BUILD_ON_TARGET=true) or deliver via scp/registry, then docker run via SSH. # Set RVS_DOCKER_ON_TARGET=false to run docker locally on the build host instead. +# +# Image delivery (RVS_DOCKER_TRANSFER_MODE): +# auto build-on-target if RVS_DOCKER_BUILD_ON_TARGET=true, else registry +# when RVS_DOCKER_REGISTRY is set, else scp (default path) +# scp docker save | (pigz|gzip) | scp | docker load +# registry docker push on build host, docker pull on target +# build-on-target docker build on the GPU node (no cross-host image transfer) +# +# Set RVS_DOCKER_SKIP_IF_PRESENT=false to force re-transfer/re-build. ################################################################################ set -euo pipefail @@ -12,22 +21,34 @@ set -euo pipefail DOCKER_IMAGE="${RVS_NIGHTLY_DOCKER_IMAGE:-rvs-nightly-rocm:latest}" DOCKER_IMAGE_ARCHIVE="${RVS_DOCKER_IMAGE_ARCHIVE:-rvs-nightly-rocm-image.tar.gz}" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DOCKER_BUILD_DIR="${REPO_ROOT}/.github/docker/rvs-nightly-rocm" usage() { cat <<'EOF' Usage: rvs_nightly_docker.sh -Image transfer (build host → target via scp + docker load): - transfer-image-to-target docker save | gzip, scp, docker load on target - verify-image-on-target Confirm image exists on target after load +Image delivery (build host → target): + ensure-image-on-target Skip, registry pull, scp load, or build on target (preferred) + transfer-image-to-target Alias for ensure-image-on-target + build-image-on-target Build rvs-nightly-rocm on the GPU target via SSH + verify-image-on-target Confirm image exists on target In-container steps (on target when RVS_DOCKER_ON_TARGET=true): - pull-image Verify image on build host (local) before transfer + pull-image Verify image on build host (local) before scp/registry push verify-rocm rocminfo + amd-smi inside container install-rvs Extract RVS tarball under /opt/rocm/extras- run-level4 rvs -r 4 inside container capture-versions Write rvs_version and target_rocm_version to GITHUB_OUTPUT run-pipeline verify-rocm → install-rvs → run-level4 + +Environment: + RVS_DOCKER_TRANSFER_MODE auto | scp | registry | build-on-target (default: auto) + RVS_DOCKER_BUILD_ON_TARGET true (default) prefers build-on-target in auto mode + RVS_DOCKER_REGISTRY e.g. ghcr.io/org/rvs-nightly-rocm (enables registry mode) + RVS_DOCKER_REGISTRY_USER optional registry login user + RVS_DOCKER_REGISTRY_PASSWORD optional registry login password + RVS_DOCKER_ROCM_VERSION expected ROCm SDK version (for skip-if-present matching) + RVS_DOCKER_SKIP_IF_PRESENT true (default) skips transfer when target already has image EOF } @@ -70,6 +91,151 @@ require_ssh_config() { fi } +phase_start() { + PHASE_LABEL="$1" + PHASE_START_TS=$(date +%s) + echo "::group::${PHASE_LABEL}" + echo "[$(date -u +%FT%TZ)] START ${PHASE_LABEL}" +} + +phase_end() { + local elapsed=$(( $(date +%s) - PHASE_START_TS )) + echo "[$(date -u +%FT%TZ)] END ${PHASE_LABEL} (${elapsed}s)" + echo "::notice::${PHASE_LABEL} completed in ${elapsed}s" + echo "::endgroup::" +} + +compress_pipe() { + if command -v pigz >/dev/null 2>&1; then + echo "::notice::Compressing with pigz" + pigz -1 + else + echo "::notice::Compressing with gzip (install pigz for faster compression)" + gzip -1 + fi +} + +decompress_cmd() { + if command -v pigz >/dev/null 2>&1; then + pigz -dc + else + gzip -dc + fi +} + +rocm_version_from_tarball() { + local base="${1##*/}" + if [[ "$base" =~ -r([0-9]{2})([0-9]{2})\.([0-9]{8})-Linux\.tar\.gz$ ]]; then + printf '%d.%d.0a%s\n' "$((10#${BASH_REMATCH[1]}))" "$((10#${BASH_REMATCH[2]}))" "${BASH_REMATCH[3]}" + fi +} + +expected_rocm_version() { + if [ -n "${RVS_DOCKER_ROCM_VERSION:-}" ]; then + printf '%s\n' "$RVS_DOCKER_ROCM_VERSION" + return 0 + fi + if [ -n "${TARBALL_NAME:-}" ]; then + rocm_version_from_tarball "$TARBALL_NAME" + return 0 + fi + return 1 +} + +image_rocm_version_on_target() { + require_ssh_config + ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ + "docker image inspect '${DOCKER_IMAGE}' --format '{{range .Config.Env}}{{println .}}{{end}}' 2>/dev/null" \ + | sed -n 's/^ROCM_VERSION=//p' | head -1 +} + +resolve_transfer_mode() { + case "${RVS_DOCKER_TRANSFER_MODE:-auto}" in + scp|registry|build-on-target) + printf '%s\n' "${RVS_DOCKER_TRANSFER_MODE}" + ;; + auto) + case "${RVS_DOCKER_BUILD_ON_TARGET:-true}" in + 0|false|False|no|NO) + if [ -n "${RVS_DOCKER_REGISTRY:-}" ]; then + printf '%s\n' registry + else + printf '%s\n' scp + fi + ;; + *) + printf '%s\n' build-on-target + ;; + esac + ;; + *) + echo "::error::Invalid RVS_DOCKER_TRANSFER_MODE: ${RVS_DOCKER_TRANSFER_MODE}" >&2 + exit 1 + ;; + esac +} + +registry_image_ref() { + local version="${1:-}" + local base="${RVS_DOCKER_REGISTRY%/}" + if [ -n "$version" ]; then + printf '%s:%s\n' "$base" "$version" + else + printf '%s\n' "$base" + fi +} + +docker_registry_login() { + local where="$1" + if [ -z "${RVS_DOCKER_REGISTRY_USER:-}" ] || [ -z "${RVS_DOCKER_REGISTRY_PASSWORD:-}" ]; then + echo "::notice::No registry credentials set — assuming public pull/push for ${where}" + return 0 + fi + local registry_host="${RVS_DOCKER_REGISTRY%%/*}" + case "$where" in + local) + echo "${RVS_DOCKER_REGISTRY_PASSWORD}" | docker login -u "${RVS_DOCKER_REGISTRY_USER}" \ + --password-stdin "$registry_host" + ;; + target) + ssh -q -F "$SSH_CONFIG_FILE" rvs-target bash -s <&2 + exit 1 + ;; + esac +} + +skip_if_present_enabled() { + case "${RVS_DOCKER_SKIP_IF_PRESENT:-true}" in + 0|false|False|no|NO) return 1 ;; + esac + return 0 +} + +image_ready_on_target() { + require_ssh_config + check_docker_on_target + if ! ssh -q -F "$SSH_CONFIG_FILE" rvs-target "docker image inspect '${DOCKER_IMAGE}' >/dev/null 2>&1"; then + return 1 + fi + local expected actual + expected="$(expected_rocm_version 2>/dev/null || true)" + if [ -z "$expected" ]; then + return 0 + fi + actual="$(image_rocm_version_on_target || true)" + if [ "$actual" = "$expected" ]; then + echo "::notice::Target already has ${DOCKER_IMAGE} (ROCM_VERSION=${expected}) — skipping delivery" + return 0 + fi + echo "Target image ROCM_VERSION=${actual:-unknown}; need ${expected} — delivery required" + return 1 +} + target_rvs_install_dir() { require_env REMOTE_WORK_DIR require_env ROCM_MAJOR @@ -111,6 +277,9 @@ docker_run_local() { mkdir -p "$host_install" install_mount=(-v "${host_install}:${INSTALL_DIR}") fi + if [ -n "${TARBALL_NAME:-}" ] && [ -f "${REPO_ROOT}/pkg/${TARBALL_NAME}" ]; then + install_mount+=(-v "${REPO_ROOT}/pkg/${TARBALL_NAME}:/pkg/${TARBALL_NAME}:ro") + fi # shellcheck disable=SC2046 docker run --rm \ $(docker_gpu_opts) \ @@ -128,18 +297,23 @@ target_docker_run() { require_env REMOTE_WORK_DIR check_docker_on_target local inner_cmd="$1" - local gpu_opts install_vol escaped + local gpu_opts install_vol pkg_vol escaped gpu_opts=$(docker_gpu_opts) install_vol="" + pkg_vol="" if [ -n "${INSTALL_DIR:-}" ] && [ -n "${ROCM_MAJOR:-}" ]; then install_vol="-v ${REMOTE_WORK_DIR}/extras-${ROCM_MAJOR}:${INSTALL_DIR}" fi + if [ -n "${TARBALL_NAME:-}" ]; then + pkg_vol="-v ${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}:/pkg/${TARBALL_NAME}:ro" + fi escaped=$(printf '%q' "$inner_cmd") ssh -q -F "$SSH_CONFIG_FILE" rvs-target bash -s <&2 echo " ./.github/docker/rvs-nightly-rocm/setup-on-runner.sh --from-tarball " >&2 - echo "Or re-run the workflow with build_docker_image=true." >&2 + echo "Or re-run the workflow with build_docker_image=true (or build-on-target mode)." >&2 exit 1 } -cmd_transfer_image_to_target() { +cmd_build_image_on_target() { + require_ssh_config + require_env REMOTE_WORK_DIR + require_env TARBALL_NAME + check_docker_on_target + + local remote_build_dir="${REMOTE_WORK_DIR}/docker-build" + phase_start "Sync docker build context to target" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '${remote_build_dir}'" + scp -q -F "$SSH_CONFIG_FILE" -r "${DOCKER_BUILD_DIR}/." \ + "rvs-target:${remote_build_dir}/" + phase_end "Sync docker build context to target" + + phase_start "docker build on GPU target" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target bash -s < "${archive}" + + phase_start "docker save + compress (${DOCKER_IMAGE})" + docker save "${DOCKER_IMAGE}" | compress_pipe > "${archive}" ls -lh "${archive}" + phase_end "docker save + compress (${DOCKER_IMAGE})" + + phase_start "scp image archive to target" ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '${REMOTE_WORK_DIR}/docker'" - echo "Copying image archive to target:${REMOTE_WORK_DIR}/docker/ ..." scp -q -F "$SSH_CONFIG_FILE" "${archive}" \ "rvs-target:${REMOTE_WORK_DIR}/docker/${DOCKER_IMAGE_ARCHIVE}" - echo "Loading image on target ..." + phase_end "scp image archive to target" + + phase_start "docker load on target" + local decompress + decompress="$(decompress_cmd)" ssh -q -F "$SSH_CONFIG_FILE" rvs-target \ - "gzip -dc '${REMOTE_WORK_DIR}/docker/${DOCKER_IMAGE_ARCHIVE}' | docker load" + "${decompress} '${REMOTE_WORK_DIR}/docker/${DOCKER_IMAGE_ARCHIVE}' | docker load" + phase_end "docker load on target" cmd_verify_image_on_target } +cmd_download_rvs_tarball() { + require_env TARBALL_URL + require_env TARBALL_NAME + require_ssh_config + require_env REMOTE_WORK_DIR + + local local_pkg="${REPO_ROOT}/pkg/${TARBALL_NAME}" + mkdir -p "${REPO_ROOT}/pkg" + + phase_start "Download RVS tarball on orchestrator" + echo " ${TARBALL_URL}" + curl -fL --max-time 600 -o "${local_pkg}" "${TARBALL_URL}" + file "${local_pkg}" || true + ls -lh "${local_pkg}" + phase_end "Download RVS tarball on orchestrator" + + phase_start "scp RVS tarball to target" + ssh -q -F "$SSH_CONFIG_FILE" rvs-target "mkdir -p '${REMOTE_WORK_DIR}/pkg'" + scp -q -F "$SSH_CONFIG_FILE" "${local_pkg}" \ + "rvs-target:${REMOTE_WORK_DIR}/pkg/${TARBALL_NAME}" + phase_end "scp RVS tarball to target" +} + +cmd_ensure_image_on_target() { + require_ssh_config + require_env REMOTE_WORK_DIR + + local mode + mode="$(resolve_transfer_mode)" + echo "Image delivery mode: ${mode}" + + if skip_if_present_enabled && image_ready_on_target; then + return 0 + fi + + case "$mode" in + build-on-target) + if [ -z "${TARBALL_NAME:-}" ]; then + echo "::error::build-on-target requires TARBALL_NAME" >&2 + exit 1 + fi + cmd_build_image_on_target + ;; + registry) + cmd_transfer_via_registry + ;; + scp) + cmd_transfer_via_scp + ;; + esac +} + cmd_verify_image_on_target() { require_ssh_config check_docker_on_target @@ -196,7 +482,7 @@ cmd_verify_image_on_target() { echo "::notice::Image ${DOCKER_IMAGE} present on target node." return 0 fi - echo "::error::Image ${DOCKER_IMAGE} not found on target after transfer." >&2 + echo "::error::Image ${DOCKER_IMAGE} not found on target after delivery." >&2 exit 1 } @@ -218,20 +504,31 @@ cmd_install_rvs() { require_env RVS_BIN require_env REMOTE_WORK_DIR - local url_escaped - url_escaped=$(printf '%q' "$TARBALL_URL") + if use_target_docker; then + cmd_download_rvs_tarball + else + local local_pkg="${REPO_ROOT}/pkg/${TARBALL_NAME}" + mkdir -p "${REPO_ROOT}/pkg" + if [ ! -f "${local_pkg}" ]; then + phase_start "Download RVS tarball locally" + curl -fL --max-time 600 -o "${local_pkg}" "${TARBALL_URL}" + phase_end "Download RVS tarball locally" + fi + fi docker_run " source /etc/profile.d/rocm-env.sh set -euo pipefail - PKG=/tmp/${TARBALL_NAME} + PKG=/pkg/${TARBALL_NAME} INSTALL_DIR=${INSTALL_DIR} RVS_BIN=${RVS_BIN} - echo \"Downloading RVS tarball inside container...\" - wget -q -O \"\${PKG}\" ${url_escaped} + if [ ! -f \"\${PKG}\" ]; then + echo \"::error::RVS tarball not mounted at \${PKG} — run download-rvs-tarball first\" >&2 + exit 1 + fi + echo \"Installing RVS from pre-staged tarball \${PKG}...\" mkdir -p \"\${INSTALL_DIR}\" tar -xzf \"\${PKG}\" -C \"\${INSTALL_DIR}\" - rm -f \"\${PKG}\" export LD_LIBRARY_PATH=\"\${INSTALL_DIR}/lib:\${LD_LIBRARY_PATH}\" if [ ! -x \"\${RVS_BIN}\" ]; then echo \"::error::rvs binary missing at \${RVS_BIN}\" >&2 @@ -330,8 +627,11 @@ main() { [ $# -ge 1 ] || { usage; exit 1; } case "$1" in pull-image) cmd_pull_image ;; - transfer-image-to-target) cmd_transfer_image_to_target ;; + ensure-image-on-target) cmd_ensure_image_on_target ;; + transfer-image-to-target) cmd_ensure_image_on_target ;; + build-image-on-target) cmd_build_image_on_target ;; verify-image-on-target) cmd_verify_image_on_target ;; + download-rvs-tarball) cmd_download_rvs_tarball ;; verify-rocm) cmd_verify_rocm ;; install-rvs) cmd_install_rvs ;; run-level4) cmd_run_level4 ;;