From b614df299018e18e01265bfa69e4c77545981bac Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Fri, 22 Nov 2024 09:49:47 -0500 Subject: [PATCH] Fix check for peer access. Yes, there was a bug. Yes, PaRSEC says devices cannot access themselves. Signed-off-by: Joseph Schuchart --- ttg/ttg/parsec/ttg.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ttg/ttg/parsec/ttg.h b/ttg/ttg/parsec/ttg.h index 47ab79068..fd1f188f0 100644 --- a/ttg/ttg/parsec/ttg.h +++ b/ttg/ttg/parsec/ttg.h @@ -1088,12 +1088,15 @@ namespace ttg_parsec { bool all_peer_access = true; /* check whether all GPUs can access all peer GPUs */ for (int i = 0; (i < parsec_nb_devices) && all_peer_access; ++i) { - parsec_device_module_t *device = parsec_mca_device_get(i); - if (PARSEC_DEV_IS_GPU(device->type)) { - parsec_device_gpu_module_t *gpu_device = (parsec_device_gpu_module_t*)device; + parsec_device_module_t *idevice = parsec_mca_device_get(i); + if (PARSEC_DEV_IS_GPU(idevice->type)) { + parsec_device_gpu_module_t *gpu_device = (parsec_device_gpu_module_t*)idevice; for (int j = 0; (j < parsec_nb_devices) && all_peer_access; ++j) { - if (PARSEC_DEV_IS_GPU(device->type)) { - all_peer_access = all_peer_access && (gpu_device->peer_access_mask & (1<type)) { + all_peer_access &= (gpu_device->peer_access_mask & (1<