Skip to content

[hipSOLVER][rocSOLVER] Pin build-time dependency fetches to immutable commits - #8794

Merged
qjojo merged 5 commits into
developfrom
users/jonquist/solvers-pin-fetchcontent-deps
Sep 1, 2026
Merged

qjojo merged 5 commits into
developfrom
users/jonquist/solvers-pin-fetchcontent-deps

Conversation

@qjojo

@qjojo qjojo commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

A security scan flagged that we should be pinning our external dependencies with hashes rather than relying on mutable URL or tags. This patch updates the solver libraries to reference specific commits and use more stable functionality for retrieving external dependencies.

… commits

Replace mutable branch/tag refs in FetchContent and ExternalProject
declarations with pinned 40-char commit SHAs so configure-time fetches
cannot be altered upstream:

- rocm-cmake (both libs): was develop/master branch, now therock-7.13 commit
- lapack: was the lapack-3.7.1 branch, now the v3.7.1 commit
- googletest: was the release-1.11.0 tag, now its commit

Also convert rocSOLVER's rocm-cmake fallback from a hand-built archive
URL download to git FetchContent, matching rocBLAS/rocSPARSE, so git
verifies the commit by SHA. Each pin carries a "pinned-dep" comment to
make future bumps easy to find.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

@tfalders tfalders 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.

Looks good! One minor comment.

Align the rocm-cmake fallback pin with the rest of the ROCm libraries
(rocBLAS/rocSPARSE/hipBLAS/rocALUTION all track rocm-6.4.0) instead of a
one-off therock tag, and reword the comment to reflect that this fetch is
a rarely-hit fallback rather than something bumped every release.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Jun 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8794      +/-   ##
===========================================
+ Coverage    68.91%   68.93%   +0.02%     
===========================================
  Files         2762     2776      +14     
  Lines       454696   457227    +2531     
  Branches     67057    67402     +345     
===========================================
+ Hits        313322   315178    +1856     
- Misses      118497   118998     +501     
- Partials     22877    23051     +174     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 38.12% <ø> (ø) Carriedforward from 008860c
TensileLite-Unit 75.90% <ø> (ø) Carriedforward from 008860c
hipBLAS 90.62% <ø> (ø) Carriedforward from 008860c
hipBLASLt 34.89% <ø> (ø) Carriedforward from 008860c
hipCUB 83.47% <ø> (ø) Carriedforward from 008860c
hipDNN 86.54% <ø> (ø) Carriedforward from 008860c
hipFFT 47.27% <ø> (ø) Carriedforward from 008860c
hipRAND 76.12% <ø> (ø) Carriedforward from 008860c
hipSOLVER 68.92% <ø> (-0.26%) ⬇️
hipSPARSE 86.27% <ø> (ø) Carriedforward from 008860c
rocBLAS 48.23% <ø> (ø) Carriedforward from 008860c
rocFFT 48.26% <ø> (ø) Carriedforward from 008860c
rocRAND 57.02% <ø> (ø) Carriedforward from 008860c
rocSOLVER 76.83% <ø> (-0.09%) ⬇️
rocSPARSE 72.57% <ø> (ø) Carriedforward from 008860c
rocThrust 91.60% <ø> (ø) Carriedforward from 008860c

*This pull request uses carry forward flags. Click here to find out more.
see 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add a reminder in bump_hipsolver_version.sh and bump_rocsolver_version.sh
that build-time dependency fetches are pinned outside the script, with a
grep "pinned-dep" pointer so a release-cycle bump can update them by hand.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

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 PR addresses a security scan finding by pinning build-time dependency fetches to immutable Git commits (instead of mutable branches/tags), improving reproducibility and reducing supply-chain risk in the HIP/ROC solver projects.

Changes:

  • Switched rocm-cmake fallback acquisition to a pinned commit and FetchContent-based retrieval (rocSOLVER + hipSOLVER).
  • Pinned googletest and LAPACK external dependency fetches in hipSOLVER to specific commits.
  • Added notes to version-bump scripts clarifying that pinned dependency updates are handled elsewhere.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
projects/rocsolver/cmake/get-rocm-cmake.cmake Replaces mutable rocm-cmake fallback download with FetchContent + pinned commit.
projects/rocsolver/bump_rocsolver_version.sh Adds guidance note about where pinned dependency commits are maintained.
projects/hipsolver/deps/external-lapack.cmake Pins LAPACK fetch to an immutable commit (v3.7.1).
projects/hipsolver/deps/external-gtest.cmake Pins googletest fetch to an immutable commit (release-1.11.0).
projects/hipsolver/cmake/get-rocm-cmake.cmake Pins rocm-cmake fallback fetch to an immutable commit (replacing develop).
projects/hipsolver/bump_hipsolver_version.sh Adds guidance note about where pinned dependency commits are maintained.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been inactive for 25 days and will be marked as stale.

If you would like to keep this PR open, please:

  • Add new commits
  • Add a comment explaining why it should remain open

This PR will be automatically closed in 5 days if no further activity occurs.

@github-actions github-actions Bot added the Stale PR has no activity for 25+ days label Aug 31, 2026
Reword the pinned-dep note in both get-rocm-cmake.cmake files: the commit
comes from the rocm-6.4.0 tag and is chosen for reproducible builds, rather
than implying the hash is a shared in-monorepo pin.

Co-Authored-By: Claude <noreply@anthropic.com>
@qjojo

qjojo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed against develop and pushed. Two remaining Copilot notes addressed:

  • Misleading pin comment: reworded in both get-rocm-cmake.cmake files to say the commit is a known-good one from the rocm-6.4.0 tag chosen for reproducible builds, rather than implying an in-monorepo consensus pin.
  • CMake 3.14/3.18 fallback vs rocsolver's cmake_minimum_required(3.13): leaving as-is. This FetchContent_MakeAvailable + SOURCE_SUBDIR "DISABLE ADDING TO BUILD" fallback matches rocBLAS's get-rocm-cmake.cmake verbatim, so it's the accepted pattern across the sibling libs. Bumping rocsolver's minimum CMake is out of scope for a dependency-pinning PR; if 3.13 support is genuinely dropped that should be its own change.

@github-actions github-actions Bot removed the Stale PR has no activity for 25+ days label Sep 1, 2026
@qjojo
qjojo merged commit 0d14994 into develop Sep 1, 2026
50 of 53 checks passed
@qjojo
qjojo deleted the users/jonquist/solvers-pin-fetchcontent-deps branch September 1, 2026 18:03
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants