tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
303 stars 24 forks source link

Move Matmul ops to ttnn #9492

Open ayerofieiev-tt opened 2 weeks ago

ayerofieiev-tt commented 2 weeks ago

Consolidate matmuls in ttnn

Plan

We propose to breakdown the work into smaller pieces:

Replacing usage in C++

Each usage of matmul should be replaced with a ttnn analog. For example tt::operations::primary::matmul --> ttnn::matmul. Missing operations should be added to ttnn.

Replacing usage in Python

For every unary op, look for next entries in Tests/Sweeps, Demos, Models, Examples:

Background

We got a lot of duplication.

We register unary ops in C++ in both tt_lib and ttnn:

We bind these ops in both:

We have tt_eager sweep tests, but they are not run on CI.

Duplication should go away. TTNN C++ and binding should remain and everything should get switched.

Testing

For the best coverage, I recommend to run these workflows. If some of them fails, check if it is the same fail as on main:

ayerofieiev-tt commented 2 weeks ago

Discussed, @bbradelTT starts tomorrow