feat(operators): `spectral_out` on `SpectralDerivative2D`
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start with SpectralDerivative2D and the existing methods named in the issue, then inspect tests/test_tracing.py and its CASES. Check how each method handles spectral input and transforms before adding the output option. Done means the equivalence checks pass for every method and both input modes, and compiled HLO has the specified transform counts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of epic #148. The 2-D slice of #108 that the pipekit layer needs. No dependencies.
Problem
SpectralDerivative2D already takes Fourier coefficients (spectral=True), but it always returns a physical field. A pipeline that keeps fields in spectral space therefore pays an inverse → forward round trip at every node. The barotropic-vorticity prototype measured 40 transforms per RK4 step, against 20 when the output stays spectral. XLA merges identical transforms, but it does not cancel an inverse → forward pair.
Proposal
Add a keyword spectral_out: bool = False to the 2-D methods:
gradient,divergence,curl,laplacian,biharmonic,hyperviscosity,inverse_laplacian,velocity_from_streamfunction: return the coefficients and skip the inverse transform;jacobian,advection_scalar: return the dealiased coefficients of the product, which is 1 forward transform instead of 1 forward + 1 inverse.
The defaults are unchanged. apply_dealias keeps its current rule (output space = input space).
The N-D grid, the rfft layout and the exposed multipliers stay in #108.
Acceptance criteria
-
transform(op(u, spectral_out=False)) == op(u, spectral_out=True)(allclose), for every method and bothspectral=modes. - Transform counts in compiled HLO, spectral in and spectral out:
- 0 for the linear methods;
- 4 inverse + 1 forward for
jacobian.
- Added to the
tests/test_tracing.pyCASES.
Generated by Claude Code
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 0
- Merge medio
- 8h 13m
- PR unite (30g)
- 8
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jejjohnson/spectraldiffx
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jejjohnson/spectraldiffx#172 ·
-
[EPIC] spectraldiffx roadmapApertaepic
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
jejjohnson/spectraldiffx#167 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
jejjohnson/spectraldiffx#113 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jejjohnson/spectraldiffx#105 ·
-
dependencies
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
jejjohnson/spectraldiffx#181 ·
Tutte le issue di jejjohnson/spectraldiffx
Issue simili
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorForse già presa @jejjohnson l’ha presa oggi. Apertatype:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jejjohnson/integrix#144 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
finos/ai-governance-framework#459 ·
-
slurm: a case outcome nested too deep crashes status/collect instead of reading as no outcomeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
freelawproject/litigant-portal#1307 ·
I maintainer di solito rispondono entro 2 giorni
-
type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
h2oai/h2o-llmstudio#1163 ·
I maintainer di solito rispondono entro 1 giorno