nncf
nncf copied to clipboard
[Torch FX] Add Special FX Metatype in Torch Operator Metatypes
Changes
- Create a new registry for FX metatypes
- Create new metatype
FXEmbeddingMetatypefor torch FX embedding metatype
Reason for changes
The current torch embedding metatype, which maps to torch.nn.functional.embedding has weight node on port 1, but when using torch.nn.Embedding with torch fx, since it has weight on port 0, the metatype should be defined accordingly.
Apparently covered by https://github.com/openvinotoolkit/nncf/pull/2891
Apparently covered by #2891
It needs some additional work as @alexsu52 mentioned, mapping the node metatype to the function names.
@anzr299, please change the description of the PR and reopen it then. Please reflect it in #2938