daphne-project / daphne-project/daphne

Transposition-aware vectorization of MatMulOp

Open
#447 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.