cuda.core: VirtualMemoryResource.deallocate() unmaps without ordering on the stream
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend-api-design, performance
Direzione di ricerca
Iniziare da VirtualMemoryResource.deallocate() e confrontare la gestione della convalida dello stream e di cuMemUnmap con _SynchronousMemoryResource e LegacyPinnedMemoryResource. Confermare la documentazione sull’ordinamento degli stream di Buffer.close(), quindi verificare che la deallocazione sincronizzi lo stream prima dell’unmapping e che il comportamento di crescita nel slow path rimanga corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
VirtualMemoryResource.deallocate() validates its stream argument and then calls cuMemUnmap at once. The VMM unmap does not synchronize, so work still in flight on the buffer accesses an unmapped range.
Buffer.close() documents stream-ordered deallocation, and the two synchronous resources (_SynchronousMemoryResource, LegacyPinnedMemoryResource) call stream.sync() before they free. VirtualMemoryResource is the only synchronous resource that skips this.
Suggested fix
Sync the stream before cuMemUnmap, as the siblings do. After #2880 the slow-path grow closes the old buffer through deallocate(), so a grow will sync once; that is the correct cost for a synchronous resource.
Refs: found while analyzing #2882.
- Lingua principale
- Cython
- Stelle
- 3.4k
- Fork
- 329
- Merge medio
- 1g 21h
- PR unite (30g)
- 113
Guida per i contributori
Apri 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 NVIDIA/cuda-python
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
NVIDIA/cuda-python#2717 ·
-
triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
NVIDIA/cuda-python#2712 ·
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NVIDIA/cuda-python#2646 · 1 reazione ·
-
cuda.core triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
NVIDIA/cuda-python#2435 · 1 commento ·
-
CI/CD
NVIDIA/cuda-python#2926 · 1 assegnatario ·
Tutte le issue di NVIDIA/cuda-python
Issue simili
-
area/sessions comp/agent P2 tool/skills type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#117788 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
code-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/gh-aw-firewall#8816 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getgrav/grav-plugin-api#45 ·