[Feature][Relax][ONNX] Support MelWeightMatrix operator in Relax ONNX frontend

未关闭
#20,970 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Start with python/tvm/relax/frontend/onnx/onnx_frontend.py and the ONNX operator coverage RFC issue #20124, then check how the frontend handles operators with scalar inputs and output datatype attributes. Implement support for ONNX MelWeightMatrix and verify that its output has shape (dft_length // 2 + 1, num_mel_bins) and contains the specified triangular Mel filterbank weights.

由索引模型根据 Issue 内容生成。

描述

Feature Description

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:
    1. num_mel_bins: Scalar integer specifying the number of Mel frequency bands.
    2. dft_length: Scalar integer representing the length of the DFT window.
    3. sample_rate: Scalar integer representing the sampling rate in Hertz.
    4. lower_edge_hertz: Scalar float specifying the lower boundary of the filterbank in Hz.
    5. 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:
    1. 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).

主要语言
Python
星标
13.9k
派生
4.1k
平均合并
4 天 22 小时
30 天内合并 PR
22

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/tvm 的其他 Issue

查看 apache/tvm 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。