dotnet / dotnet/machinelearning-samples
Should get better memory locality by arranging loops from most significant to least
- Lingua principale
- PowerShell
- Stelle
- 4.7k
- Fork
- 2.7k
- Merge medio
- 2g 22h
- PR unite (30g)
- 1
Descrizione
https://github.com/dotnet/machinelearning-samples/blob/fb06c72c512b3d007cabc0c01b3136701cb127d2/samples/csharp/end-to-end-apps/ObjectDetection-Onnx/OnnxObjectDetection/OnnxOutputParser.cs#L140
In ParseOutput(), by simply iterating by box, they y, then x, rather than x, then y, then box, memory accesses within the tensor should be more localized, which should work with caching better.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Apri OnnxObjectDetection/OnnxObjectDetection/OnnxOutputParser.cs in ParseOutput(), soprattutto il ciclo intorno alla riga 140, e verifica come viene indicizzato il tensore. Riordina l’iterazione come descritto in modo da percorrere prima box, poi y e infine x, e conferma che gli accessi risultanti seguano l’ordine previsto, locale rispetto alla memoria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- machine-learning, performance
- Tipo di issue
- Refactoring
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 48/100