Performance optimization
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- performance
Direzione di ricerca
This is an open proposal, not a concrete task: the author asks whether maintainers want performance changes such as running totals for leaf classes, deferred end-of-day condition checks, and compiled step functions. The payload names no files or tests in diffWOFOST. Start by reading the thread and the linked mGV issue, then wait for a maintainer decision. Done would mean a maintainer has agreed on scope and the work is split into smaller issues.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have performed some performance benchmarks, and found that diffWOFOST main performs similarly at large vector sizes (e.g., many crops simulated at once under different weather conditions) to the non-vectorized WOFOST C port.
However, for coupling WOFOST to the hydrological model we are developing, this performance is likely insufficient compared to mGV and MODFLOW 6. To avoid this bottleneck we would require either diffWOFOST to be more performant, or write our own WOFOST implementation in Julia. Of course we would prefer to tag along with the developments of diffWOFOST.
With an LLM I was able to get diffWOFOST performant enough (WOFOST-72 at least) that there was only a minor difference between diffWOFOST and an optimized Julia GPU port.
The main performance improvements stemmed from:
- Keeping leaf classes as running totals, instead of computing a cumulative sum every time step
- Defer condition checking to end-of-day, instead of mid-step so they can be computed with only a single host-device sync (Carbon-balance, partitioning, latitude and vernalisation checks currently queue a device-side flag)
- Stop traitlets comparing every assigned tensor (Every state assignment ran bool(old == new). On a multi-element tensor this launches a comparison kernel and then fails silently; on one-element tensors it forces a sync)
- Move sets of operations into a single function, and compile these functions (e.g. in root_dynamics move computation of calc_rates into a separate compilable function)
For the tests I did add a copy to/from the device to simulate exchanging variables every time step in a coupled model setup.
Would you be interested in (at some point) improving the performance of diffWOFOST with these strategies, or is this out of scope for the current work?
- Lingua principale
- Python
- Stelle
- 25
- Fork
- 7
- Merge medio
- 14g 3h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 WUR-AI/diffWOFOST
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
WUR-AI/diffWOFOST#132 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
WUR-AI/diffWOFOST#133 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
WUR-AI/diffWOFOST#129 ·
-
ideas
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WUR-AI/diffWOFOST#128 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
WUR-AI/diffWOFOST#127 ·
Tutte le issue di WUR-AI/diffWOFOST
Issue simili
-
Questions crashes on a real SQuAD2 no-answer predictionForse già presa @HuaTNA l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
GST is read as Gulf Standard Time (UTC+4) instead of Guam Standard Time (UTC+10)Forse già presa @yang00333 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DOI-USGS/dataretrieval-python#454 ·
I maintainer di solito rispondono entro 4 giorni
-
area:core-platform effort:S priority:P3 status:in-review type:test
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 80/100
randomparity/kdive#3246 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Requantification library converts m/z to mass with the hydrogen-atom mass instead of the proton massApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
nf-core/metaboigniter#130 ·
I maintainer di solito rispondono entro 1 giorno
-
netbox status: needs owner type: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
netbox-community/netbox#23412 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno