SWDEV-382074 - Check for peer access. (#169)

Change-Id: I8b931a92fc97c68556d74332984ddf17c53df7d4


[ROCm/hip-tests commit: 92f0da368f]
Этот коммит содержится в:
ROCm CI Service Account
2023-02-28 10:50:57 +05:30
коммит произвёл GitHub
родитель 6414929098
Коммит afd5fd4446
2 изменённых файлов: 11 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -141,7 +141,7 @@ void MemcpyDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream =
HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, src_device, dst_device));
if (!can_access_peer) {
INFO("Peer access cannot be enabled between devices " << src_device << " " << dst_device);
REQUIRE(can_access_peer);
return;
}
HIP_CHECK(hipDeviceEnablePeerAccess(dst_device, 0));
}
+10 -1
Просмотреть файл
@@ -161,8 +161,17 @@ TEST_CASE("Unit_hipGraphUpload_Functional_multidevice_test") {
SECTION("Pass a common stream for all device") {
hipStream_t stream;
HIP_CHECK(hipStreamCreate(&stream));
int currDevice = -1;
HIP_CHECK(hipGetDevice(&currDevice));
for (int i = 0; i < numDevices; i++) {
if (i != currDevice) {
int can_access_peer = 0;
HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, currDevice, i));
if (!can_access_peer) {
INFO("Peer access cannot be enabled between devices " << currDevice << " " << i);
continue;
}
}
HIP_CHECK(hipSetDevice(i));
hipGraphUploadFunctional_with_hipStreamBeginCapture(stream);
hipGraphUploadFunctional_with_stream(stream);