torch-mlir
torch-mlir copied to clipboard
[WIP] onnx.MelWeightMatrix TorchOnnxToTorch Lowering and lots of dumps
Just uploading what I have till now Gist of pytorch impl that I'm following to implement the OnnxToTorch lowering
Additional Details - (also pasted as comment in gist) Op Description in Onnx Documentation Example Used the same example in this file. the Expected output is shown in the example
Reference Onnx Impl - This is the base for the above code.
Till now I'm at a point where we have cast the frequency_bins will continue from there tomorrow.
For folks who can help add a portion of the lowering, following can be good chunks to pick up
- create masks and init tensors for computation SRC
- L2C + upslope computation - SRC
- H2C + downslope computation - SRC
- Merge L2C and H2C outputs - SRC
The shapes and dtypes are visible for the most part since there are quite a few reshapes involved. You can assume (and document) what ever is needed from upper blocks and can be taken care of when merging.
Anyone else, even people just looking, please feel free to post any comments you might have on the code / logic or anything really :)