Skip to content

fix: Address review: generalize upcast to non-float32 + fix ruff F821 - #14510

Open
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/fourier-filter-fp16-clean
Open

fix: Address review: generalize upcast to non-float32 + fix ruff F821#14510
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/fourier-filter-fp16-clean

Conversation

@Ricardo-M-L

Copy link
Copy Markdown
Contributor

Clean rebase

- Apply @sayakpaul's suggestion: use `elif x.dtype != torch.float32:`
  so any non-float32 dtype (bf16, fp16, and future half-precision
  dtypes) is upcast to float32 before the FFT.
- Drop the `"torch.Tensor"` return annotation on the test helper
  that triggered ruff F821 in CI (torch is imported inside the
  method body, not at module scope).
@github-actions github-actions Bot added the size/L PR with diff > 200 LOC label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Ricardo-M-L, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PR with diff > 200 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant