Skip to content

[AIMIGRAPHX-1186] TheRock packaging: amdrocm-migraphx package name (RFC0009) - #5086

Merged
kahmed10 merged 8 commits into
developfrom
kqian1/meta-package-fix
Jul 30, 2026
Merged

[AIMIGRAPHX-1186] TheRock packaging: amdrocm-migraphx package name (RFC0009)#5086
kahmed10 merged 8 commits into
developfrom
kqian1/meta-package-fix

Conversation

@kentqian

@kentqian kentqian commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Scope update: this PR has been narrowed to the package rename only. The
per-arch dependency work (struck through below) overlaps with #4952, which
keeps and extends the per-arch dependency block in CMakeLists.txt. It has
been moved out to the kqian1/therock-drop-per-arch-deps branch and will be
raised separately once we've settled who owns per-arch dependency generation.
Current diff: 3 lines in CMakeLists.txt.

Summary

  • Rename the package to amdrocm-migraphx per RFC0009 (Package name now matches the .deb/.rpm filename and the amdrocm-* ecosystem).
  • Drop the weak Recommends/Suggests used for per-GPU ROCm libs. → moved out, see Bump CI to TheRock 7.14 #4952

Technical Details

The .deb/.rpm filename is already amdrocm-migraphx (set at packaging
time in UFB), but rocm_create_package() still emits migraphx as the package
name, so apt/dnf report a different name than the file advertises. This
plumbs _MGX_PKG_NAME into rocm_create_package(NAME ...) so the two agree.

This mismatch is what required the 7.14 release RPM's NAME tag to be rewritten
by hand, and it is the inconsistency DevOps is currently tracking.

One fat compile with multi-archs; UFB re-runs cpack once per GPU arch → amdrocm-migraphx-gfxNNN, each hard-depending on that arch's amdrocm-dnn/blas-gfxNNN + amdrocm-runtime.

Compatibility / scope

  • All changes inside the TheRock packaging path; default packaging and migraphx's own CI unaffected.
  • migraphx's own device code stays a single fat ELF (one compile); only naming/deps change. Only the package name changes; no build or dependency behaviour is touched.

Arch-specific dependencies (moved out of CMake)

Descoped from this PR — tracked on kqian1/therock-drop-per-arch-deps, and
overlapping with #4952. Kept here for reference.

  • Per-GPU device-library dependencies are no longer declared in CMake. In the TheRock repo, MIOpen/rocBLAS ship only as per-arch packages (amdrocm-dnn-gfxNNN / amdrocm-blas-gfxNNN) with no arch-neutral variant, so CMake now declares only the arch-neutral amdrocm-runtime dependency.
  • The per-arch device deps are injected externally at packaging time (one fat build, repackaged per arch). To produce a package with device dependencies, they must be added externally per target arch (amdrocm-dnn-<arch>, amdrocm-blas-<arch>).
  • Encoding per-arch dependency selection inside CMake would be cumbersome and redundant, and no longer fits the original single-package ROCm layout — hence it is intentionally kept out of the migraphx build.

Relationship to #4952

#4952 (Bump CI to TheRock 7.14) touches the same file but does not change the
package name
(NAME MIGraphX is unchanged there), so it does not address this
inconsistency and neither PR blocks the other. After narrowing, a test merge
between the two produces a single mechanical conflict in CMakeLists.txt,
resolved by taking #4952's side and keeping one line:

    set(_MGX_PKG_NAME "amdrocm-migraphx")
    # MIGRAPHX_THEROCK_ROCM_VERSION and MIGRAPHX_THEROCK_GPU_ARCH are declared and
    # auto-populated by detect_package_backend() (cmake/DetectPackageBackend.cmake).

@kentqian kentqian self-assigned this Jul 22, 2026
@kentqian
kentqian requested a review from causten as a code owner July 22, 2026 18:53
Copilot AI review requested due to automatic review settings July 22, 2026 18:53
@kentqian kentqian added the dependencies Pull requests that update a dependency file label Jul 22, 2026
@kentqian kentqian changed the title [AIMIGRAPHX-1186] meta package fix [AIMIGRAPHX-1186] TheRock: deb/rpm per-arch meta packages for external ROCm deps (drop weak Recommends/Suggests) Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the TheRock packaging path in CMakeLists.txt (MIGRAPHX_PACKAGE_BACKEND=therock) to shift per-GPU dependency selection to per-arch meta packages with hard dependencies, and aligns the TheRock package naming with the amdrocm-* ecosystem (RFC0009). The default (non-TheRock) ROCm packaging path is intended to remain functionally unchanged.

Changes:

  • Switch TheRock package naming from MIGraphX to amdrocm-migraphx and plumb the package name into rocm_create_package(NAME ...).
  • For per-arch mode, create per-arch meta package components (e.g., gfx90a) plus an all meta component, installing a small README into each component’s doc dir.
  • Retain the existing device-all dependency behavior when MIGRAPHX_THEROCK_GPU_ARCH is empty.

Comment thread CMakeLists.txt Outdated
Comment on lines +475 to +477
install(FILES ${_MGX_META_DOC}
DESTINATION share/doc/${_MGX_PKG_NAME}-${mgx_gpu_arch}
COMPONENT ${mgx_gpu_arch})
Comment thread CMakeLists.txt Outdated
Comment on lines +485 to +487
install(FILES ${_MGX_META_DOC}
DESTINATION share/doc/${_MGX_PKG_NAME}-all
COMPONENT all)
Comment thread CMakeLists.txt Outdated
Comment on lines +502 to +503
# Legacy ROCm packaging.
set(_MGX_PKG_NAME "MIGraphX")
@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jul 22, 2026

Copy link
Copy Markdown
Test Batch New Rate (2341f8) Old Rate (49f842) Diff Status
torchvision-resnet50 64 3,264.14 3,264.99 -0.03%
torchvision-resnet50_fp16 64 7,547.38 7,543.26 0.05%
torchvision-densenet121 32 2,483.30 2,481.97 0.05%
torchvision-densenet121_fp16 32 5,002.98 4,973.87 0.59%
torchvision-inceptionv3 32 2,056.93 2,056.79 0.01%
torchvision-inceptionv3_fp16 32 4,401.81 4,410.23 -0.19%
cadene-inceptionv4 16 821.03 818.54 0.30%
cadene-resnext64x4 16 782.82 783.25 -0.05%
slim-mobilenet 64 8,387.39 8,354.09 0.40%
slim-nasnetalarge 64 228.79 229.45 -0.29%
slim-resnet50v2 64 3,180.33 3,185.97 -0.18%
bert-mrpc-onnx 8 1,167.91 1,166.61 0.11%
bert-mrpc-tf 1 496.31 493.90 0.49%
pytorch-examples-wlang-gru 1 478.33 475.08 0.68%
pytorch-examples-wlang-lstm 1 380.62 379.26 0.36%
torchvision-resnet50_1 1 1,042.82 1,034.33 0.82%
cadene-dpn92_1 1 469.53 443.17 5.95% 🔆
cadene-resnext101_1 1 365.13 365.51 -0.10%
onnx-taau-downsample 1 843.08 849.29 -0.73%
dlrm-criteoterabyte 1 32.40 32.43 -0.11%
dlrm-criteoterabyte_fp16 1 51.81 52.12 -0.59%
agentmodel 1 9,031.22 9,423.56 -4.16%
unet_fp16 2 58.83 58.72 0.19%
resnet50v1_fp16 1 1,472.75 1,365.56 7.85% 🔆
resnet50v1_int8 1 1,909.48 1,661.41 14.93% 🔆
bert_base_cased_fp16 64 1,097.47 1,098.85 -0.13%
bert_large_uncased_fp16 32 345.51 345.36 0.04%
bert_large_fp16 1 207.83 205.27 1.24%
distilgpt2_fp16 16 2,088.67 2,095.46 -0.32%
yolov5s 1 558.17 559.47 -0.23%
tinyllama 1 45.82 45.76 0.12%
vicuna-fastchat 1 44.11 43.96 0.33%
whisper-tiny-encoder 1 411.54 412.60 -0.26%
whisper-tiny-decoder 1 405.31 410.66 -1.30%
llama2_7b 1 20.83 20.82 0.04%
qwen1.5-7b 1 23.58 23.50 0.36%
phi3-3.8b 1 26.79 26.68 0.41%
llama3-8b 1 21.75 21.73 0.11%
whisper-large-encoder 1 10.17 10.14 0.28%
whisper-large-decoder 1 105.59 107.31 -1.60%
mistral-7b 1 23.78 23.75 0.11%
FLUX.1-schnell 1 766.77 804.98 -4.75%

Check flagged results 🔆

@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jul 22, 2026

Copy link
Copy Markdown
Test Status Result
bert-mrpc-onnx PASSED: MIGraphX meets tolerance
bert-mrpc-tf PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-gru PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-lstm PASSED: MIGraphX meets tolerance
dlrm-criteoterabyte PASSED: MIGraphX meets tolerance
agentmodel PASSED: MIGraphX meets tolerance
unet PASSED: MIGraphX meets tolerance
resnet50v1 PASSED: MIGraphX meets tolerance
bert_base_cased_fp16 PASSED: MIGraphX meets tolerance
bert_large_uncased_fp16 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
bert_large PASSED: MIGraphX meets tolerance
yolov5s PASSED: MIGraphX meets tolerance
tinyllama PASSED: MIGraphX meets tolerance
vicuna-fastchat PASSED: MIGraphX meets tolerance
whisper-tiny-encoder PASSED: MIGraphX meets tolerance
whisper-tiny-decoder PASSED: MIGraphX meets tolerance
distilgpt2_fp16 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
llama2_7b PASSED: MIGraphX meets tolerance
qwen1.5-7b PASSED: MIGraphX meets tolerance
phi3-3.8b PASSED: MIGraphX meets tolerance
llama3-8b PASSED: MIGraphX meets tolerance
whisper-large-encoder PASSED: MIGraphX meets tolerance
whisper-large-decoder PASSED: MIGraphX meets tolerance
mistral-7b PASSED: MIGraphX meets tolerance
FLUX.1-schnell PASSED: MIGraphX meets tolerance

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5086   +/-   ##
========================================
  Coverage    93.26%   93.26%           
========================================
  Files          623      623           
  Lines        32969    32969           
========================================
  Hits         30747    30747           
  Misses        2222     2222           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

CMakeLists.txt:475

  • The else-branch comment was changed to "Legacy ROCm packaging", but this is still the default/traditional packaging backend. Calling it "legacy" is potentially misleading in configuration output and future maintenance.
    # Legacy ROCm packaging.
    set(_MGX_PKG_NAME "MIGraphX")

Comment thread CMakeLists.txt
Comment on lines 451 to 454
set(MIGRAPHX_THEROCK_GPU_ARCH "" CACHE STRING
"TheRock GPU arch(es) for per-GPU package dependencies. \
Semicolon-separated list (e.g. gfx90a;gfx942;gfx950) for per-GPU deps, \
or empty for device-all meta-package deps.")
Comment thread CMakeLists.txt Outdated
Comment on lines +457 to +461
# Self-contained per-arch packages (amdrocm-migraphx-gfxNNN) and their per-GPU
# amdrocm-* deps are produced by the UFB Dockerfile cpack loop: one fat build,
# repackaged once per arch. Here we set only the base name + arch-neutral
# runtime dep; the device-all deps below are the standalone default and are
# overridden per-arch (amdrocm-dnn/blas-gfxNNN) at cpack time.
@kentqian kentqian changed the title [AIMIGRAPHX-1186] TheRock: deb/rpm per-arch meta packages for external ROCm deps (drop weak Recommends/Suggests) [AIMIGRAPHX-1186] TheRock packaging: amdrocm-migraphx naming + drop weak deps (per-arch packaging in UFB) Jul 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread CMakeLists.txt Outdated
Comment on lines +453 to +457
# Only arch-neutral runtime deps are declared here (amdrocm-runtime), since
# that is the only component published as an arch-neutral package.
# The device libraries (MIOpen/rocBLAS) exist ONLY as per-arch packages
# (amdrocm-dnn-gfxNNN / amdrocm-blas-gfxNNN) with no arch-neutral variant,
# so they are intentionally omitted here. To produce a package with device
kentqian and others added 4 commits July 24, 2026 14:21
The TheRock package name and the .deb/.rpm filename disagree: the filename
is already amdrocm-migraphx (set in UFB) while rocm_create_package still
emits migraphx, so apt/dnf see a different name than the file advertises.
Fixing that only needs _MGX_PKG_NAME plumbed into rocm_create_package.

Dropping the per-arch dependency block is a separate design question that
overlaps with #4952, and it was holding up a rename that is otherwise
independent. That work moves to kqian1/therock-drop-per-arch-deps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kentqian kentqian changed the title [AIMIGRAPHX-1186] TheRock packaging: amdrocm-migraphx naming + drop weak deps (per-arch packaging in UFB) [AIMIGRAPHX-1186] TheRock packaging: amdrocm-migraphx package name (RFC0009) Jul 30, 2026
@kahmed10
kahmed10 merged commit 6638e1b into develop Jul 30, 2026
24 of 25 checks passed
@kahmed10
kahmed10 deleted the kqian1/meta-package-fix branch July 30, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants