daphne-project / daphne-project/daphne
Transposition-aware vectorization of MatMulOp
- Dominant language
- C++
- Stars
- 81
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
We recently made `MatMulOp` transposition-aware (meaning that its arguments can be interpreted as transposed, instead of performing stand-alone transpositions beforehands). In that context, we did adapt parts of the `VectorizableOpInterface` implemenation for `MatMulOp`, but not how the inputs are split and outputs are combined in vectorized processing.
Currently, we use a naive implementation that always splits the *left*-hand-side argument into *row*-segments and combines the resulting *row*-segments.
If the left-hand-side input is transposed, we would need to split it into *column*-segments, and still combine *row*-segments on the output. Using the current splitting, the vectorized execution simply crashes. Note that we do not support splitting by column-segments yet.
Contributor guide
Research direction
Start at MatMulOp's VectorizableOpInterface implementation and the vectorized input-splitting/output-combination path. Trace how a transposed left-hand-side input is handled and compare it with the existing row-segment behavior. Done means transposed MatMulOp vectorization no longer crashes and combines the output row-segments correctly, without introducing unsupported column-segment splitting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100