fix: Scope source fingerprints to Git trees and declare additional source inputs #10268
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10268"
general
weight: 0.35
erman-gurses
Description
Splits the source-scope part out of #9907, as requested in review. A subproject's source fingerprint now uses the Git tree of its own directory instead of the HEAD commit of its whole checkout, so unrelated commits in rocm-systems, rocm-libraries or TheRock no longer invalidate it. Because of that, sources a subproject reads outside its directory must now be declared, so this PR adds
ADDITIONAL_SOURCE_INPUTSand declares them for the real subprojects. CMake argument fingerprinting from #9907 will be a separate PR.ISSUE ID: #9525
Changes
git rev-parse HEAD:./, and the dirty check is limited to the same directory. A.smrevmarker still takes priority.ADDITIONAL_SOURCE_INPUTSargument. Each input is hashed with its path. An input named twice is counted once. A missing or invalid input makes the fingerprint invalid and printsFingerprint invalid: ....WIN32.shared/ctest(the rocm-systems and rocm-libraries test helpers) is declared only by the subprojects that include it: throughTHEROCK_ROCM_SYSTEMS_TEST_INPUTS/THEROCK_ROCM_LIBRARIES_TEST_INPUTSwhen tests are built, or directly by the four that include it in every build (rpp, rocprofiler-compute, hipdnn_integration_tests, hipDNN_samples).docs/development/build_system.mdexplains when and how to declareADDITIONAL_SOURCE_INPUTSand lists the current declarations.therock_subproject.cmake.Testing
Unit tests run in the existing Unit Tests workflow (Linux and Windows). This PR adds 21 tests:
| File | New tests |
| --- | --- |
|
cmake/tests/therock_source_identity_test.py| 8 ||
cmake/tests/therock_subproject_source_deps_test.py| 12 ||
build_tools/tests/cmake_consumer_graph_test.py| 1 |The three files (38 tests) run in <fill in> s on Linux and <fill in> s on Windows. Removing any of these makes a test fail: the tree identity, the directory-scoped dirty check, the input path hash, invalidating on a bad input, or the duplicate removal.
Checked by hand on a full tree (not part of this PR): for each relationship below, a file was committed inside the declared input, the tree was reconfigured, and the consuming artifact's fingerprints changed while
sysdepsdid not.rocm-systems/projects/hipcompiler/spirv-llvm-translatorrocm-systems/shared/sha256(Linux)rocm-systems/shared/ctest(Linux)rocm-systems/shared/amdgpu-windows-interop(Windows)Linux: 4 passed, 1 skipped in 36 s. Windows: 3 passed, 1 skipped in 147 s. Removing a declaration made its check fail. Also on Linux: no
Fingerprint invalidmessages with tests on or off, and a rocjpeg-only change moves 38 fingerprints (152 on main).Rollout
CI computes fingerprints with this code, but nothing reuses artifacts based on them yet. Before turning reuse on, we compare fingerprint changes per artifact against the commits that caused them for a few weeks (for example, a
shared/sha256change should move amdsmi). Then we turn reuse on in stages: LLVM, then rocm-systems, then rocm-libraries.Limitations
build_system.md).KPACK_SPLIT_ARTIFACTSon, target-specific artifacts have no.fprintfiles. They are backed by the audit only.<details>
<summary>Current <code>ADDITIONAL_SOURCE_INPUTS</code> declarations</summary>
Directories are relative to the TheRock source directory. "Tests" means the directory is declared only when
THEROCK_BUILD_TESTINGis on.| Sub-project | Directories | When |
| --- | --- | --- |
| amd-llvm |
compiler/spirv-llvm-translator| Always || amd-llvm |
rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/inc| Not Windows || therock-aux-overlay |
compiler/amd-llvm/cmake/Modules| Not Windows || amdsmi |
rocm-systems/shared/cuid,rocm-systems/shared/sha256,rocm-systems/projects/rocr-runtime/libhsakmt/include| Always (amdsmi is not built on Windows) || ROCR-Runtime |
rocm-systems/shared/amdgpu-windows-interop| Windows || hrx |
rocm-systems/projects/aqlprofile/src/core/include| Always || hip-clr |
rocm-systems/projects/hip,rocm-systems/projects/hrr/include,rocm-systems/runtimes/api-headers/include| Always || hip-clr, ocl-clr |
rocm-systems/shared/amdgpu-windows-interop,rocm-systems/projects/rocr-runtime| Windows || hipInfo |
rocm-systems/projects/hip-tests/samples| Always || ocl-icd |
rocm-systems/projects/clr/opencl/khronos/headers| Always || ocl-clr |
rocm-systems/runtimes/api-headers/include| Always || hip-tests |
rocm-systems/projects/hip-tests| Always || rccl |
rocm-systems/projects/rccl-tests/src| Tests || rocjitsu |
rocm-systems/runtimes/api-headers| Always || rocprofiler-sdk |
rocm-systems/shared/sha256| Always || rocprofiler-compute |
rocm-systems/shared/ctest| Always || profiler-hub |
rocm-systems/projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd| Always || rocBLAS |
rocm-libraries/shared/tensile| Always || hipBLASLt |
rocm-libraries/shared/stinkytofu| Always || rocRAND, hipCCL_tests, rocPRIM_tests, hipCUB, rocThrust |
rocm-libraries/shared/primbench| Tests, and on Linux only when amdsmi is built || hipdnn_integration_tests, miopenprovider, hipblasltprovider, hipkernelprovider |
rocm-libraries/dnn-providers/cmake| Always || rpp, hipdnn_integration_tests, hipDNN_samples |
rocm-libraries/shared/ctest| Always |These sub-projects declare
shared/ctestthrough the test input variables, so only when tests are built:${THEROCK_ROCM_SYSTEMS_TEST_INPUTS}: rccl, rocshmem, rocrtst.${THEROCK_ROCM_LIBRARIES_TEST_INPUTS}: hipBLAS, hipBLASLt, hipblasltprovider, hipCCL_tests, hipCUB, hipDNN, hipFFT, hipkernelprovider, hipRAND, hipSOLVER, hipSPARSE, hipSPARSELt, hipTensor, MIOpen, miopenprovider, rocALUTION, rocBLAS, rocFFT, rocPRIM_tests, rocRAND, rocRoller, rocSOLVER, rocSPARSE, rocThrust, rocWMMA.</details>