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

Đang mở
#20,970 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend-api-design

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
13.9k
Fork
4.1k
Merge trung bình
4 ngày 22 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/tvm

Tất cả issue của apache/tvm

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.