Skip to content

ci(gfx11): bundle librocprofiler-sdk for roofline; add roofline input#44

Merged
roberteg16 merged 2 commits into
gfx11from
rogarcia.roofline-bundle-libs
Jul 13, 2026
Merged

ci(gfx11): bundle librocprofiler-sdk for roofline; add roofline input#44
roberteg16 merged 2 commits into
gfx11from
rogarcia.roofline-bundle-libs

Conversation

@roberteg16

@roberteg16 roberteg16 commented Jul 13, 2026

Copy link
Copy Markdown

Summary

The per-op roofline profiler dlopens librocprofiler-sdk.so.1 at runtime (ggml/src/ggml-cuda/ggml-cuda-roofline.cpp), but the release only bundled librocprofiler-register.so. Without the -sdk lib on the path the profiler silently no-ops and writes no artifact — which is why the downstream ttft_ms roofline KPIs never populated.

This PR makes the gfx11 release self-contained for profiling:

  • Bundle librocprofiler-sdk.so* plus its one bundle-missing transitive dep librocm_sysdeps_dw.so.1 (elfutils libdw, a hard DT_NEEDED of the sdk lib). Its own deps (elf/z/zstd/liblzma/bz2) are already bundled. The existing $ORIGIN RPATH step lets the runtime dlopen resolve both locally with no LD_LIBRARY_PATH.
  • New roofline workflow_dispatch input (default true, preserving the prior always-on behavior) gating both -DGGML_HIP_ROOFLINE and the extra lib packing, so lean builds can opt out.

Why

This replaces a runtime workaround on the consumer side (rocm-scripts installed rocm-sdk-core into a venv and appended it to LD_LIBRARY_PATH just to obtain the -sdk lib). A companion rocm-scripts PR removes that workaround once a release built from this change is published.

@roberteg16

Copy link
Copy Markdown
Author

@roberteg16 roberteg16 requested a review from mgehre-amd July 13, 2026 09:17
@roberteg16 roberteg16 marked this pull request as ready for review July 13, 2026 09:17

@mgehre-amd mgehre-amd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

roberteg16 and others added 2 commits July 13, 2026 13:41
The per-op roofline profiler dlopens librocprofiler-sdk.so.1 at runtime
(ggml-cuda-roofline.cpp), but the release only bundled librocprofiler-register.so,
so the profiler silently no-op'd and wrote no artifact. Pack librocprofiler-sdk.so*
plus its one bundle-missing dep librocm_sysdeps_dw.so.1 (libdw, a hard DT_NEEDED of
the sdk lib); the existing $ORIGIN RPATH step lets the dlopen resolve both locally
with no LD_LIBRARY_PATH.

Add a `roofline` workflow_dispatch input (default true, preserving the prior
always-on behavior) gating both -DGGML_HIP_ROOFLINE and the extra lib packing, so
lean builds can opt out.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
The comment pointed at utils/gather_required_libs.py to regenerate the ROCm lib
copy list, but that script does not exist in the repo; the list is maintained by
hand. Remove the dead reference.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@roberteg16 roberteg16 force-pushed the rogarcia.roofline-bundle-libs branch from caeace5 to e9236fd Compare July 13, 2026 20:41
@roberteg16 roberteg16 merged commit dbf933f into gfx11 Jul 13, 2026
5 checks passed
@roberteg16 roberteg16 deleted the rogarcia.roofline-bundle-libs branch July 13, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants