Skip to content

[rocBLAS] scalar vector API option#7507

Draft
TorreZuk wants to merge 3 commits into
developfrom
users/torrezuk/rocm-24002-scalar-mode
Draft

[rocBLAS] scalar vector API option#7507
TorreZuk wants to merge 3 commits into
developfrom
users/torrezuk/rocm-24002-scalar-mode

Conversation

@TorreZuk
Copy link
Copy Markdown
Contributor

@TorreZuk TorreZuk commented May 15, 2026

This pull request adds new API for strided alpha and beta parameters in batched and strided batched GEMV, along with new tests and supporting infrastructure to validate this feature. The changes touch on argument handling, test YAMLs, utility functions, and the GEMV test implementations to enable and verify per-batch striding for these scalar parameters.

Support for strided alpha/beta in GEMV tests:

  • Added a new alpha_beta_stride field to the Arguments struct, YAML config, and test infrastructure to enable per-batch striding for alpha and beta parameters.
  • Updated GEMV batched and strided batched test implementations to allocate, initialize, and use strided vectors for alpha and beta, and to pass the correct strides to reference and device computations.
  • Modified the GEMV test name construction to include stride information when applicable, improving test identification and coverage.

Test infrastructure and utility improvements:

  • Added new test and YAML files (set_get_alpha_beta_stride_gtest.cpp and .yaml) to verify the correct setting and getting of batch alpha/beta strides, and integrated them into the test suite and auxiliary test YAMLs.
  • Extended the rocblas_local_handle utility to set/reset batch alpha/beta strides based on the new argument.
  • Added a utility function rocblas_init_vector_alternating_zero to initialize vectors with alternating zero and a given value, used for alpha/beta initialization in the tests.

Documentation:

  • Documented the new batch alpha/beta stride helper functions in the reference documentation.

Test coverage:

  • Added new YAML test cases for GEMV with strided alpha/beta, expanding test coverage for this feature.

These changes collectively enable and validate the use of per-batch striding for alpha and beta scalars in GEMV batched operations, improving the flexibility and correctness of the test suite.

ROCM-24002

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 15, 2026

Codecov Report

❌ Patch coverage is 73.68421% with 30 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
projects/rocblas/library/src/rocblas_auxiliary.cpp 57.14% 16 Missing and 8 partials ⚠️
projects/rocblas/library/src/include/handle.hpp 50.00% 6 Missing ⚠️

❌ Your project status has failed because the head coverage (69.24%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7507      +/-   ##
===========================================
- Coverage    66.24%   66.24%   -0.00%     
===========================================
  Files         1605     1605              
  Lines       267473   267553      +80     
  Branches     37300    37310      +10     
===========================================
+ Hits        177183   177227      +44     
- Misses       75455    75478      +23     
- Partials     14835    14848      +13     
Flag Coverage Δ *Carryforward flag
hipBLAS 90.65% <ø> (ø) Carriedforward from 1d681ad
hipBLASLt 40.24% <ø> (ø) Carriedforward from 1d681ad
hipCUB 82.21% <ø> (ø) Carriedforward from 1d681ad
hipDNN 85.48% <ø> (ø) Carriedforward from 1d681ad
hipFFT 50.47% <ø> (ø) Carriedforward from 1d681ad
hipSOLVER 69.24% <ø> (ø) Carriedforward from 1d681ad
hipSPARSE 85.37% <ø> (ø) Carriedforward from 1d681ad
rocBLAS 48.12% <73.68%> (+0.01%) ⬆️
rocFFT 48.80% <ø> (ø) Carriedforward from 1d681ad
rocRAND 57.02% <ø> (ø) Carriedforward from 1d681ad
rocSPARSE 72.47% <ø> (ø) Carriedforward from 1d681ad

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...las/library/src/blas2/rocblas_gemv_batched_imp.hpp 31.31% <100.00%> (+0.32%) ⬆️
...ary/src/blas2/rocblas_gemv_strided_batched_imp.hpp 32.53% <100.00%> (+0.27%) ⬆️
projects/rocblas/library/src/include/handle.hpp 44.01% <50.00%> (+1.07%) ⬆️
projects/rocblas/library/src/rocblas_auxiliary.cpp 64.08% <57.14%> (-0.74%) ⬇️

... and 5 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.

@TorreZuk
Copy link
Copy Markdown
Contributor Author

The _stride form instead of inc with rocblas_stride as types may be the way to go to keep it future proof and consistent with current internal APIs

@TorreZuk TorreZuk added ci:extended noTensile Run PR without Tensile and removed TestLevel1Only Tests only Level 1 functions in this PR labels May 29, 2026
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.

2 participants