Skip to content

ci: add code coverage for header-only ROCm libraries (rocPRIM/hipCUB/rocThrust) - #9287

Closed
jainprad wants to merge 87 commits into
developfrom
users/jainprad/codecoverage_lib_header_only
Closed

jainprad wants to merge 87 commits into
developfrom
users/jainprad/codecoverage_lib_header_only

Conversation

@jainprad

Copy link
Copy Markdown

Summary

Enables code-coverage CI for the header-only libraries — rocPRIM, hipCUB, rocThrust — split out from the shared-object coverage work (hipRAND/rocRAND/rocFFT/rocBLAS, tracked in #8656). Header-only libraries have no shared object to instrument, so coverage is collected from their instrumented test binaries.

Branched from the coverage infrastructure (following #9221's users/<user>/… → develop convention) and scoped to the header-only components.

Changes

  • .github/scripts/therock_configure_coverage.py: coverage matrix = rocPRIM / hipCUB / rocThrust (PRIM group), each with a per-project coverage_config path.
  • Per-project test_categories_coverage.yaml under each project's test/ dir (test-binary name prefixes); the combined root file is removed and export_coverage_metadata.py now reads the flat per-project file.
  • .github/workflows/therock-ci-coverage.yml: the report step passes the staged instrumented test binaries (coverage-objects/test/*) to llvm-cov as -object; coverage_config is threaded through the matrix.
  • projects/rocthrust/cmake/Dependencies.cmake: fall back to the bundled SQLite when the system package is unsuitable (TheRock coverage builds report SQLite version "unknown"), so the PRIM-group configure step does not hard-fail.
  • codecov.yml: add the rocPRIM flag.

Test plan

  • Coverage (rocPRIM / hipCUB / rocThrust) build → test → report jobs pass
  • Report artifacts generated with non-zero coverage per component
  • Coverage uploaded to Codecov under flags rocPRIM / hipCUB / rocThrust

Header-only test-binary coverage is a new flow; it needs a CI run to validate end-to-end.

Made with Cursor

Made with Cursor

reboss added 30 commits May 22, 2026 15:32
The current therock_configure_ci.py doesn't have a clean way to only
configure the project that has changed, and not other components that
the changed component has been grouped together with.  For code coverage
reports, it does not make sense to even test downstream components.
reboss pushed a commit that referenced this pull request Jul 27, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 27, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 27, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 27, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Jul 29, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 6, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 6, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 10, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 10, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 10, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 10, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 12, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 12, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 13, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 13, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
…ents only

Header-only coverage (rocPRIM/hipCUB/rocThrust) is split into its own PR
(users/jainprad/codecoverage_lib_header_only -> develop, #9287). Remove it here:
- the disabled header-only metadata dict in therock_configure_coverage.py
- the *_ENABLE_COVERAGE options + instrumentation blocks in the rocPRIM/hipCUB/
  rocThrust CMakeLists (pre-existing BUILD_CODE_COVERAGE/CODE_COVERAGE untouched)

This PR now covers only the shared-object components: hipRAND, rocRAND, rocFFT,
rocBLAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
reboss pushed a commit that referenced this pull request Aug 14, 2026
The prior cleanup deleted the pre-existing if(BUILD_CODE_COVERAGE) /
if(CODE_COVERAGE) instrumentation blocks instead of only reverting the
<PROJECT>_ENABLE_COVERAGE guard rename, so the PR still modified these files.
Restore all three to develop verbatim so this PR does not touch the header-only
projects at all (they live in #9287).

Co-authored-by: Cursor <cursoragent@cursor.com>
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