Page MenuHomePhabricator

[mlir][tosa] Add quantized lowering for matmul and fully_connected
ClosedPublic

Authored by rsuderman on Jun 28 2021, 2:55 PM.

Details

Summary

Added the named op variants for quantized matmul and quantized batch matmul
with the necessary lowerings/tests from tosa's matmul/fully connected ops.
Current version does not use the contraction op interface as its verifiers
are not compatible with scalar operations.

Diff Detail

Event Timeline

rsuderman created this revision.Jun 28 2021, 2:55 PM
rsuderman requested review of this revision.Jun 28 2021, 2:55 PM

Updated core_named_ops.py to generate YAML instead of hand writing ....

Undo unintended depthwise change (will update core op gen code in a separate commit).

asaadaldien added inline comments.Jul 1 2021, 9:59 AM
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
53

you need to specify the iteration domain e.g domain(D.m, D.n, D.k)

86

ditto, iteration domain ?

rsuderman updated this revision to Diff 356072.Jul 1 2021, 6:39 PM

Added missing domain and rebased on head.

rsuderman marked 2 inline comments as done.Jul 1 2021, 6:39 PM
stellaraccident accepted this revision.Jul 20 2021, 12:10 PM
stellaraccident added a subscriber: stellaraccident.

Nice - thanks.

mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
33

Suggest rephrasing: "This quantized variant" (and typo on "varient"). Here and in the batch matmul description.

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

Updated to typo

This revision was landed with ongoing or failed builds.Jul 20 2021, 1:00 PM
This revision was automatically updated to reflect the committed changes.