tenstorrent / tt-mlir

Tenstorrent MLIR compiler
https://tenstorrent.github.io/tt-mlir/
Apache License 2.0
52 stars 7 forks source link

[SystemDesc] List supported tile sizes and data formats #433

Open nsmithtt opened 4 weeks ago

nsmithtt commented 4 weeks ago

Future HW adds new formats and additional tile size support. We should make these driven by system desc. These new attributes should be part of ChipDesc

kmabeeTT commented 3 weeks ago

I loked at tt-metalium and ttnn docs and do not see any APIs that would return these today, so this would require request to them to add? Do we know where on their side we would want it (metal host_api.hpp)?

nsmithtt commented 3 weeks ago

Let's file an issue on tt-metal and see what they think. If you open up an issue can you link it back here?

Depending on how it's prioritized / or if we can go ahead and add the API for them. We could hard code in the runtime's createSystemDesc function.

kmabeeTT commented 3 weeks ago

Added to existing metal issue as suggested by Paul, for them to export various params to use. In the meantime, now that I went through similar effort for #264, I think this is a good first ramp up task I'll ask Defne to try (add to schema, systemdesc with hardcoded values, later to be filled in by new metal API call when ready).

@nsmithtt do we currently have a hardcoded list of supported data types somewhere we can reference, and tile sizes? I assume tile size is 32x32? Edit: I guess for now we can just add all those in DataType enum.

nsmithtt commented 3 weeks ago

Added to existing metal issue as suggested by Paul, for them to export various params to use. In the meantime, now that I went through similar effort for #264, I think this is a good first ramp up task I'll ask Defne to try (add to schema, systemdesc with hardcoded values, later to be filled in by new metal API call when ready).

Awesome thanks!

@nsmithtt do we currently have a hardcoded list of supported data types somewhere we can reference, and tile sizes? I assume tile size is 32x32? Edit: I guess for now we can just add all those in DataType enum.

So currently the list is all of the ones from DataType defined in types.fbs. But future HW will add new types and I want to have the groundwork in place now for the compiler to reference anything HW specific from system desc.

So technically we could support (although I'm not sure how much of this matrix is tested in metal):

We can add all of them for now, but compiler will continue only using 32x32 for the time being.