chunit-quic commented on PR #16531:
URL: https://github.com/apache/tvm/pull/16531#issuecomment-1972876975
Hi @yongwww
Thanks for your prompt reply! Here is our thoghts for your reference. :D
>Not sure if the SLM works
Pardon that we didn't investivated SLM before. We can let some teamates to
read on it later.
> I am wondering if it is possible to use/update the existing FX translator
Please allow me to describe more detial about this PR, and what problems we
may encounter if we want to intergrate it into FX translator.
- Purpose
This PR aims to support pytorch2.0 new format ExportedProgram, which will be
executed by executorch.
Like tflite relay frontend, which convert tflite model to relay, where
tflite model is supposed to executed by tflite-interpreter.
- Problems to intergrate with FX translator
1. Params is stored in different place in fx.GraphModule and
ExportedProgram.
fx.GraphModule: ` model.named_parameters() `
ExportedProgram: `exported_program.graph_signature.inputs_to_parameters` or
`exported_program.graph_signature.inputs_to_buffers`
2. Some function has different API, and it will cause ambiguous. e.g.,
convolution
fx.GraphModule: `conv2d`, whose inputs are `(input, weight, bias, stride,
padding, dilation, group)`
ExportedProgram: `aten.convolution`, whose inputs are `(input, weight, bias,
stride, padding, dilation, transposed, output_padding, group)`
3. The source to retrieve node attribute is different
fx.GraphModule: `node.kwargs`
ExportedProgram: `node.kwargs` is empty, we need to get it from `node.args`
Thank you for reading this long reply. It will be really nice to have your
advice!
Best,
Joey
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]