Skip to content

Commit 30044d1

Browse files
authored
Allow multi-gpu testing on systems without direct peer access
* Allow multi-gpu testing on systems without direct peer access * remove CheckAccess function
1 parent c371037 commit 30044d1

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

library/src/include/tree_node.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -830,21 +830,6 @@ struct MultiPlanItem
830830
return 0;
831831
}
832832

833-
// Utility function to check HIP memcpy accessibility between two
834-
// devices. Throws std::runtime_error if access is not possible.
835-
static void CheckAccess(rocfft_deviceid_t src, rocfft_deviceid_t dest)
836-
{
837-
// allow same device, since we'll do normal memcpy instead of
838-
// peer memcpy in that case
839-
if(src == dest)
840-
return;
841-
int canAccessPeer = 0;
842-
if(hipDeviceCanAccessPeer(&canAccessPeer, src, dest) != hipSuccess)
843-
throw std::runtime_error("hipDeviceCanAccessPeer failed");
844-
if(!canAccessPeer)
845-
throw std::runtime_error("Unable to perform peer-to-peer GPU-direct copies");
846-
}
847-
848833
// print a description of this item to the plan log
849834
virtual void Print(rocfft_ostream& os, const int indent) const = 0;
850835

library/src/tree_node.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,6 @@ void CommScatter::ExecuteAsync(const rocfft_plan plan,
434434

435435
for(const auto& op : ops)
436436
{
437-
CheckAccess(srcDeviceID, op.destDeviceID);
438-
439437
auto memSize = op.numElems * element_size(precision, arrayType);
440438

441439
auto srcWithOffset
@@ -505,8 +503,6 @@ void CommGather::ExecuteAsync(const rocfft_plan plan,
505503
auto& stream = streams[i];
506504
auto& event = events[i];
507505

508-
CheckAccess(op.srcDeviceID, destDeviceID);
509-
510506
rocfft_scoped_device dev(op.srcDeviceID);
511507
stream.alloc();
512508
event.alloc();

0 commit comments

Comments
 (0)