This is an archive of the discontinued LLVM Phabricator instance.

[Matrix] Fix shape for factored transpose
ClosedPublic

Authored by anemet on Jul 23 2021, 4:02 PM.

Details

Summary

The shape of the input is C x R.

Diff Detail

Event Timeline

anemet created this revision.Jul 23 2021, 4:02 PM
anemet requested review of this revision.Jul 23 2021, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2021, 4:02 PM
fhahn accepted this revision.Jul 26 2021, 12:59 PM

LGTM, thanks!

It’s a bit unfortunate that we need to maintain the shapes and also explicitly pass the dimensions to the builder. Could we make this more robust (as follow up) by passing a struct with (vale *, rows, columns) to to builders and those structure are obtained from the shape map directly?

This revision is now accepted and ready to land.Jul 26 2021, 12:59 PM

LGTM, thanks!

Thanks for the reviews.

It’s a bit unfortunate that we need to maintain the shapes and also explicitly pass the dimensions to the builder. Could we make this more robust (as follow up) by passing a struct with (vale *, rows, columns) to to builders and those structure are obtained from the shape map directly?

Yeah we can explore this. It will somewhat change the interface for something like matmul but it’s a possibility.

Ultimately the best would be if we didn’t have to write the unit tests for a matrix -> matrix transformation in terms of matrix -> vector (i.e. including lowering) but as a matrix -> matrix transformation (i.e. we would split these optimizations into their own pass).

This revision was landed with ongoing or failed builds.Jul 27 2021, 11:37 AM
This revision was automatically updated to reflect the committed changes.