Add mising p2p checks in graph instantiate tests (#2525)

Change-Id: I37ed539ccb9fc487872807170dc62eddc598f1f6
Este commit está contenido en:
Maneesh Gupta
2022-03-10 15:01:43 +05:30
cometido por GitHub
padre 4872e70674
commit b73f77a75a
+26 -2
Ver fichero
@@ -248,7 +248,19 @@ by creating dependency graph and instantiate, launching and verifying
the result
*/
TEST_CASE("Unit_hipGraphInstantiateWithFlags_DependencyGraph") {
GraphInstantiateWithFlags_DependencyGraph();
int numDevices = 0;
int canAccessPeer = 0;
HIP_CHECK(hipGetDeviceCount(&numDevices));
if (numDevices > 1) {
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
if (canAccessPeer) {
GraphInstantiateWithFlags_DependencyGraph();
} else {
SUCCEED("Machine does not seem to have P2P");
}
} else {
SUCCEED("skipped the testcase as no of devices is less than 2");
}
}
/*
This testcase verifies hipGraphInstantiateWithFlags API
@@ -278,7 +290,19 @@ by creating capture graph and instantiate, launching and verifying
the result
*/
TEST_CASE("Unit_hipGraphInstantiateWithFlags_StreamCapture") {
GraphInstantiateWithFlags_StreamCapture();
int numDevices = 0;
int canAccessPeer = 0;
HIP_CHECK(hipGetDeviceCount(&numDevices));
if (numDevices > 1) {
HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1));
if (canAccessPeer) {
GraphInstantiateWithFlags_StreamCapture();
} else {
SUCCEED("Machine does not seem to have P2P");
}
} else {
SUCCEED("skipped the testcase as no of devices is less than 2");
}
}
/*