Update docs and add tests to validate externalization workflow with graph mode - #65
Update docs and add tests to validate externalization workflow with graph mode #65pkmandke wants to merge 17 commits into
Conversation
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
| self, | ||
| traced_model: torch.export.ExportedProgram, | ||
| input_data: torch.Tensor, | ||
| externalized_model: Any = None, |
There was a problem hiding this comment.
Any reason to have the type here as "Any" instead of being more specific?
Later in this file itself, "torch.nn.Module | None" has been used
| @@ -0,0 +1,251 @@ | |||
| # Quantizing Models with Core AI Composite Ops in Graph Mode | |||
There was a problem hiding this comment.
I have a few comments on this doc, mainly: we can do a better job of giving more context, as to when somebody has to worry about this flow. And then I think we can also shorten it quite a bit. For instance, there are basically 2 additional calls that need to be made by the user, the way it is described currently it seems a bit more complicated than it actually is :)
So we can omit the diagram, the coreai dialect code snippet etc. Instead focus on explaining at a high level for the user: what the API is, what does it do to the model, what does it return etc.
I have taken a stab at updating this doc, based on the above points. PTAL here and then you can update it by incorporating suggestions from there.
Key Changes:
For details of the externalization API please refer to #53