SWDEV-479807 - Skip if peer access is not supported.

Change-Id: I2a40976e7e1a4c86c41ea86e87359c7d4b85c6d8
This commit is contained in:
Jaydeep Patel
2024-08-20 10:52:08 +00:00
committed by Rakesh Roy
parent d1d8b1e08e
commit 2f067487d2
18 changed files with 41 additions and 10 deletions
@@ -51,7 +51,8 @@ static void RunBenchmark(LinearAllocs dst_allocation_type, LinearAllocs src_allo
} else {
int src_device = std::get<0>(GetDeviceIds(enable_peer_access));
int dst_device = std::get<1>(GetDeviceIds(enable_peer_access));
if (src_device == -1 && dst_device == -1) { return; }
LinearAllocGuard<int> src_allocation(LinearAllocs::hipMalloc, size);
HIP_CHECK(hipSetDevice(dst_device));
LinearAllocGuard<int> dst_allocation(LinearAllocs::hipMalloc, size);