Skip to content

Commit

Permalink
Allow multi-gpu testing on systems without direct peer access
Browse files Browse the repository at this point in the history
* Allow multi-gpu testing on systems without direct peer access

* remove CheckAccess function
  • Loading branch information
af-ayala authored Apr 4, 2024
1 parent c371037 commit 30044d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
15 changes: 0 additions & 15 deletions library/src/include/tree_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 0 additions & 4 deletions library/src/tree_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 30044d1

Please sign in to comment.