Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INV] Add a test with a model using FFT #1603

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xadupre
Copy link
Member

@xadupre xadupre commented Jun 12, 2024

The model is decomposed using fft_r2c, fft_c2r. The first function outputs complex. Then for some operators, pytorch and onnx disagree on the result type (complex for pytorch and float for onnx).

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.93%. Comparing base (57e26f1) to head (a999470).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1603      +/-   ##
==========================================
- Coverage   75.96%   75.93%   -0.04%     
==========================================
  Files         228      228              
  Lines       24271    24271              
  Branches     4212     4212              
==========================================
- Hits        18438    18430       -8     
- Misses       5038     5045       +7     
- Partials      795      796       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinchuby
Copy link
Collaborator

The disagreement is expected because ONNX does not produce any complex types. We need to reinterpret the floating-point outputs from ONNX when we expect complex outputs.

When the complex values are intermediate values, the exporter is able to match the dtypes and interpret the ONNX values correctly. When they are outputs of a model, the user needs to reinterpret the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants