From 6cd870e3b52c47bcc4fb94323021f9d5ba473607 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Wed, 30 Jul 2025 16:14:10 -0500 Subject: [PATCH 1/3] CI - Disable RVS to build rocprofiler from staging Signed-off-by: Galantsev, Dmitrii --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f457d16d68..bf15e82b34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,12 +67,9 @@ jobs: apt install -y \ rocm-core \ amd-smi-lib \ - rocblas \ - rocblas-dev \ rocm-developer-tools \ rocm-device-libs \ rocm-smi-lib \ - rocm-validation-suite \ rocprofiler-dev \ rocprofiler-plugins \ rocprofiler-register \ From 0a19a7ffc1b589ee9ce56e53a34654656b381920 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Tue, 29 Jul 2025 20:23:16 -0500 Subject: [PATCH 2/3] Profiler - Add metrics location Signed-off-by: Galantsev, Dmitrii --- .../rdc_modules/rdc_rocp/RdcTelemetryLib.cc | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/rdc_libs/rdc_modules/rdc_rocp/RdcTelemetryLib.cc b/rdc_libs/rdc_modules/rdc_rocp/RdcTelemetryLib.cc index 664637d894..d61436d59f 100644 --- a/rdc_libs/rdc_modules/rdc_rocp/RdcTelemetryLib.cc +++ b/rdc_libs/rdc_modules/rdc_rocp/RdcTelemetryLib.cc @@ -20,11 +20,13 @@ 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 @@ -64,6 +66,22 @@ rdc_status_t rdc_module_init(uint64_t /*flags*/) { // before the tests are. Utilize an env var instead. return RDC_ST_DISABLED_MODULE; } + + Dl_info dl_info = {}; + RDC_LOG(RDC_DEBUG, "Checking if rocprofiler is available"); + if (dladdr(reinterpret_cast(rdc_module_init), &dl_info) != 0) { + const std::filesystem::path rdc_path(dl_info.dli_fname); + const auto profiler_metrics_path = + rdc_path.parent_path().parent_path().parent_path() / "share/rocprofiler-sdk"; + const auto rocprofiler_exists = std::filesystem::exists(profiler_metrics_path); + if (!rocprofiler_exists) { + RDC_LOG(RDC_ERROR, "rocprofiler metrics are not available at " << profiler_metrics_path); + return RDC_ST_FAIL_LOAD_MODULE; + } + RDC_LOG(RDC_DEBUG, "rocprofiler metrics are available at " << profiler_metrics_path); + setenv("ROCPROFILER_METRICS_PATH", profiler_metrics_path.c_str(), 0); + } + rocp_p = std::make_unique(); return RDC_ST_OK; } @@ -98,7 +116,7 @@ rdc_status_t rdc_telemetry_fields_value_get(rdc_gpu_field_t* fields, const uint3 // Bulk fetch fields std::vector bulk_results; - struct timeval tv {}; + struct timeval tv{}; gettimeofday(&tv, nullptr); const uint64_t curTime = static_cast(tv.tv_sec) * 1000 + tv.tv_usec / 1000; From 31dfc0fccedbd50a93dad3ff514e74ed252ec239 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Wed, 30 Jul 2025 17:03:03 -0500 Subject: [PATCH 3/3] CI - Use LSTT machine to enable labeling Signed-off-by: Galantsev, Dmitrii --- .github/workflows/label_cherrypicks.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/label_cherrypicks.yml b/.github/workflows/label_cherrypicks.yml index f685c979b3..2e2f030af2 100644 --- a/.github/workflows/label_cherrypicks.yml +++ b/.github/workflows/label_cherrypicks.yml @@ -7,7 +7,7 @@ on: jobs: add-label: - runs-on: ubuntu-latest + runs-on: lstt container: image: node:16-alpine permissions: @@ -18,18 +18,13 @@ jobs: with: script: | const pr = context.payload.pull_request; - const headBranch = pr.head.ref; const baseBranch = pr.base.ref; - // Check if head branch contains cherry-pick pattern or base branch starts with release/ - const isCherryPick = /cherry.*pick/i.test(headBranch); const isReleaseTarget = baseBranch.startsWith('release/'); - if (isCherryPick || isReleaseTarget) { - // Label to apply + if (isReleaseTarget) { const labelToAdd = 'cherry-pick'; - // Try to add the label try { await github.rest.issues.addLabels({ owner: context.repo.owner, @@ -37,11 +32,11 @@ jobs: issue_number: pr.number, labels: [labelToAdd] }); - console.log(`Added label "${labelToAdd}" to PR #${pr.number}`); + console.log("Added label ${labelToAdd} to PR #${pr.number}"); } catch (error) { - console.error(`Error adding label: ${error.message}`); + console.error("Error adding label: ${error.message}"); } } else { - console.log('PR does not match criteria for automatic labeling'); + console.log("PR does not match criteria for automatic labeling"); }