Open eyonland opened 1 month ago
During the discussion about the structure we considered:
A) Group bindings
vs B) Group everything related to a given operation
A) Related operations split into own files
vs B) Related operations in the same file
Question in terms of pipeline setup.
We've currently got tests invoked in run_tt_eager.py
and I'm assuming we'll keep the test invocations in there but update the test file paths (as they are migrated) and finish the migration process by simply renaming run_tt_eager.py
As I am porting my first op, I realize that I take issue with the <op>_program_factory.hpp
naming convention. We don't write a factory here. A factory has a very specific meaning, which is an object that creates other objects. Here we create a file that defines programs themselves. So it should be renamed to <op>_programs.hpp
to reflect what is actually inside.
Goal
Streamline further development of our OP library.
Background
Operations are split between tt_eager and ttnn. Many ops in ttnn call their tt_eager implementation. Some ops like unary and binary duplicate lots of code leading to 2 different pathways in C++ / Python. This not only confuses new contributors, but increases time required to make changes. For example, as we add support for
queue_id
andoutput_tensor
- we have to add them to ops in both libs.We want to merge the two, moving code from tt_eager to ttnn, consolidating OPs in one place.
Guiding principles
Milestones
Example instead of 1000 words
See how files are consolidated in ttnn, instead of being split between tt_eager and ttnn. This is the core of the change this effort drives.
From š«
to š
All files related to an Operation are in its own folder. Binary op gets its own folder and owner.
Host and Device "programs" are split. Host program can become a "gold" for comparison in tests.
Scope (tbd)
might want to prioritize migration of these:
bcast
to ttnn with output_tensor and queue_idpermute
to ttnn with output_tensor and queue_idrecip
to ttnn with output_tensor and queue_idunpad
to ttnn with output_tensor and queue_idttnn/ttnn/api.rst