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

Aperta
#20,970 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Python
Stelle
13.9k
Fork
4.1k
Merge medio
4g 22h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/tvm

Tutte le issue di apache/tvm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.