nncf icon indicating copy to clipboard operation
nncf copied to clipboard

[Torch FX] Add Special FX Metatype in Torch Operator Metatypes

Open anzr299 opened this issue 1 year ago • 3 comments

Changes

  1. Create a new registry for FX metatypes
  2. Create new metatype FXEmbeddingMetatype for 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.

anzr299 avatar Sep 19 '24 11:09 anzr299

Apparently covered by https://github.com/openvinotoolkit/nncf/pull/2891

daniil-lyakhov avatar Sep 30 '24 11:09 daniil-lyakhov

Apparently covered by #2891

It needs some additional work as @alexsu52 mentioned, mapping the node metatype to the function names.

anzr299 avatar Sep 30 '24 11:09 anzr299

@anzr299, please change the description of the PR and reopen it then. Please reflect it in #2938

daniil-lyakhov avatar Sep 30 '24 11:09 daniil-lyakhov