Ax/Atb trim the caller's GpuIds in place, so blocksize-1 solvers run on one GPU after the first angle

Aperta Adatta ai principianti
#855 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Leggi Python/tigre/utilities/Ax.py intorno alle righe 111-112 e Atb.py intorno alle righe 79-80 per seguire come viene ridotta la lista di GPU. Controlla come i risolutori con blocksize-1 riutilizzano self.gpuids, poi esegui una chiamata con un angolo e più ID GPU e verifica se la lista del chiamante cambia. Il lavoro è completato quando entrambe le utility preservano la lista di GPU del chiamante e usano solo i dispositivi necessari per l’operazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

My agent came up with this analysis, but I've read and approved it.

Python/tigre/utilities/Ax.py:111-112 (master cac83e7) reduces the GPU list when there are fewer angles than GPUs, but it does so on the caller's own object: gpuids.devices = list(gpuids.devices[0:len(angles)]). Algorithms with blocksize 1 (SART, ASD_POCS, AwASD_POCS) project one angle at a time with their shared self.gpuids, so after the first angle that list is [0] for the rest of the reconstruction, both for the projections and for the TV step. With asd_pocs(..., gpuids=[0, 1]), a log of the regularizer calls shows minTV running on devices [0] in all 10 iterations. Atb.py:79-80 has the same pattern when geo.nVoxel[0] is smaller than the number of GPUs.

g = GpuIds()
g.devices = [0, 1]
Ax(img, geo, angles[:1], gpuids=g)
print(g.devices)  # [0]

Trimming a copy instead (for example gpuids = copy.deepcopy(gpuids) before the reduction, in both files) keeps the caller's list intact.

Lingua principale
MATLAB
Stelle
824
Fork
274
Merge medio
9h 17m
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CERN/TIGRE

Tutte le issue di CERN/TIGRE

Issue simili

Altre issue su MATLAB

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.