SWDEV-1 - Add missing checks in hipMemcpyPeer.cc
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user