From 04907d8f2dfcf9c024c83c2083cc8cb9ef36ebe0 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 11 Oct 2022 10:27:42 +0530 Subject: [PATCH] SWDEV-1 - Add missing checks in hipMemcpyPeer.cc --- catch/unit/memory/hipMemcpyPeer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catch/unit/memory/hipMemcpyPeer.cc b/catch/unit/memory/hipMemcpyPeer.cc index a8ebe9534f..48e881895d 100644 --- a/catch/unit/memory/hipMemcpyPeer.cc +++ b/catch/unit/memory/hipMemcpyPeer.cc @@ -35,7 +35,7 @@ TEST_CASE("Unit_hipMemcpyPeer_Negative") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { // Initialization of variables int *A_d{nullptr}, *B_d{nullptr}; @@ -102,7 +102,7 @@ TEST_CASE("Unit_hipMemcpyPeer_Basic") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { int *A_d{nullptr}, *B_d{nullptr}, *C_d{nullptr}; int *X_d{nullptr}, *Y_d{nullptr}, *Z_d{nullptr};