Skip to content

Kernels for scaling a vector by a diagonal matrix#300

Merged
shakedregev merged 4 commits intodevelopfrom
adham/vector-product-kernel
Jun 5, 2025
Merged

Kernels for scaling a vector by a diagonal matrix#300
shakedregev merged 4 commits intodevelopfrom
adham/vector-product-kernel

Conversation

@adhamsi
Copy link
Copy Markdown
Collaborator

@adhamsi adhamsi commented Jun 5, 2025

Description

Implements HIP and CUDA kernels to scale vectors by diagonal matrices (element-wise product).

Closes #280

Proposed changes

Implements the kernels and a test that scales the incrementing vector of length n by itself.

Checklist

  • All tests pass. Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.

Further comments

@adhamsi adhamsi requested a review from shakedregev June 5, 2025 15:12
@adhamsi adhamsi marked this pull request as ready for review June 5, 2025 17:11
Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

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

Looks good and tests pass. Adding just one small clarification and merging.

Comment thread tests/unit/matrix/MatrixHandlerTests.hpp Outdated
@shakedregev
Copy link
Copy Markdown
Collaborator

Clarification: this also implements CPU kernels.

@shakedregev shakedregev merged commit e39f2bc into develop Jun 5, 2025
4 checks passed
@shakedregev shakedregev deleted the adham/vector-product-kernel branch June 5, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write unit tests for Sparse (matrix) class methods

2 participants