From 30044d13229d59e7881770b5d3347277ae436ba6 Mon Sep 17 00:00:00 2001 From: Alan Ayala Date: Thu, 4 Apr 2024 08:51:38 -0400 Subject: [PATCH] Allow multi-gpu testing on systems without direct peer access * Allow multi-gpu testing on systems without direct peer access * remove CheckAccess function --- library/src/include/tree_node.h | 15 --------------- library/src/tree_node.cpp | 4 ---- 2 files changed, 19 deletions(-) diff --git a/library/src/include/tree_node.h b/library/src/include/tree_node.h index 4df5666a..7a22417b 100644 --- a/library/src/include/tree_node.h +++ b/library/src/include/tree_node.h @@ -830,21 +830,6 @@ struct MultiPlanItem return 0; } - // Utility function to check HIP memcpy accessibility between two - // devices. Throws std::runtime_error if access is not possible. - static void CheckAccess(rocfft_deviceid_t src, rocfft_deviceid_t dest) - { - // allow same device, since we'll do normal memcpy instead of - // peer memcpy in that case - if(src == dest) - return; - int canAccessPeer = 0; - if(hipDeviceCanAccessPeer(&canAccessPeer, src, dest) != hipSuccess) - throw std::runtime_error("hipDeviceCanAccessPeer failed"); - if(!canAccessPeer) - throw std::runtime_error("Unable to perform peer-to-peer GPU-direct copies"); - } - // print a description of this item to the plan log virtual void Print(rocfft_ostream& os, const int indent) const = 0; diff --git a/library/src/tree_node.cpp b/library/src/tree_node.cpp index 8dc0bebf..67884d29 100644 --- a/library/src/tree_node.cpp +++ b/library/src/tree_node.cpp @@ -434,8 +434,6 @@ void CommScatter::ExecuteAsync(const rocfft_plan plan, for(const auto& op : ops) { - CheckAccess(srcDeviceID, op.destDeviceID); - auto memSize = op.numElems * element_size(precision, arrayType); auto srcWithOffset @@ -505,8 +503,6 @@ void CommGather::ExecuteAsync(const rocfft_plan plan, auto& stream = streams[i]; auto& event = events[i]; - CheckAccess(op.srcDeviceID, destDeviceID); - rocfft_scoped_device dev(op.srcDeviceID); stream.alloc(); event.alloc();