jfjoch_process: spread per-image GPU work across all visible GPUs

The offline worker threads built MXAnalysisWithoutFPGA without selecting a CUDA
device, so all per-image preprocessing/spot-finding/azimuthal integration ran on
GPU 0 (only the indexer pool was distributed). Add pin_gpu() to CUDAWrapper - a
process-wide round-robin counter (counter++ % get_gpu_count(), no thread id, no-op
without a GPU, honours CUDA_VISIBLE_DEVICES) - and call it once per worker before
building the analysis resources so their CUDA streams/engines land on distinct
devices.

Also add NUMA_GPU_REVIEW.md: a working note mapping ImageBuffer/NUMAHWPolicy/GPU
dispatch with goals and a staged plan (multi-broker GPU isolation via
CUDA_VISIBLE_DEVICES, dropping libnuma, reassessing NUMA pinning for the FPGA path).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 15:29:52 +02:00
co-authored by Claude Opus 4.8
parent 1056acc3a6
commit 02fa15c2b9
5 changed files with 136 additions and 0 deletions
+2
View File
@@ -11,6 +11,8 @@ int32_t get_gpu_count() {
void set_gpu(int32_t dev_id) {}
void pin_gpu() {}
int get_gpu_numa_node(int dev_id) {
return -1;
}