You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature][Relax][ONNX] Support MelWeightMatrix operator in Relax ONNX frontend #20970
Support the ONNX MelWeightMatrix operator in the Apache TVM Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py).
Motivation
MelWeightMatrix generates the triangular filterbank weight matrix used to transform linear-frequency discrete Fourier transform spectra into the perceptual Mel scale. It is a fundamental feature extraction stage in modern end-to-end speech and audio models (such as OpenAI Whisper, Conformer, and wav2vec 2.0).
Introduced in ONNX opset 17+, MelWeightMatrix is currently unsupported in the Relax ONNX frontend:
NotImplementedError: The following operators are not supported: ['MelWeightMatrix']
This operator was also highlighted in the ONNX operator coverage RFC tracking issue #20124 under Signal Processing operators.
Operator Specification (ONNX Opset 17+)
Inputs:
num_mel_bins: Scalar integer specifying the number of Mel frequency bands.
dft_length: Scalar integer representing the length of the DFT window.
sample_rate: Scalar integer representing the sampling rate in Hertz.
lower_edge_hertz: Scalar float specifying the lower boundary of the filterbank in Hz.
upper_edge_hertz: Scalar float specifying the upper boundary of the filterbank in Hz.
Attributes:
output_datatype: int (default TensorProto.FLOAT) - output numeric precision.
Outputs:
output: 2D tensor of shape (dft_length // 2 + 1, num_mel_bins) containing the Mel filterbank matrix.
Expected Behavior
The Relax ONNX frontend should implement MelWeightMatrix by evaluating the triangular Mel filterbank matrix (either statically when inputs are constant initializers, or dynamically via Relax tensor operations).
Activity