Page MenuHomePhabricator

[flang] Implement MATMUL in the runtime

Authored by klausler on May 17 2021, 2:08 PM.



Define an API for the transformational intrinsic function MATMUL,
implement it, and add some basic unit tests. The large number of
possible argument type combinations are covered by a set of
generalized templates that are instantiated for each valid
pair of possible argument types.

Places where BLAS-2/3 routines could be called for acceleration
are marked with TODOs. Handling for other special cases (e.g.,
known-shape 3x3 matrices and vectors) are deferred.

Some minor tweaks were made to the recent related implementation
of DOT_PRODUCT to reflect lessons learned.

Diff Detail

Event Timeline

klausler created this revision.May 17 2021, 2:08 PM
klausler requested review of this revision.May 17 2021, 2:08 PM
This revision is now accepted and ready to land.May 17 2021, 11:51 PM
This revision was landed with ongoing or failed builds.May 18 2021, 11:00 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 11:00 AM