SWDEV-318349 - Enable test of graph launched by peer (#2997)

- Enable Unit_hipGraphInstantiateWithFlags_DependencyGraph for AMD.
- Add stream sync for null stream.
- Fix Unit_hipGraphInstantiateWithFlags_DependencyGraph.

change-Id: I5774563fdfed1afd29a43927f3630adbfb75c48a

[ROCm/hip-tests commit: 5db81793b2]
このコミットが含まれているのは:
ROCm CI Service Account
2022-10-19 16:52:06 +05:30
committed by GitHub
コミット 4ea956e684
+4 -13
ファイルの表示
@@ -157,6 +157,7 @@ void GraphInstantiateWithFlags_DependencyGraph(bool ctxt_change = false) {
// Instantiate and launch the cloned graph
HIP_CHECK(hipGraphInstantiateWithFlags(&graphExec, graph, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
HIP_CHECK(hipStreamSynchronize(0));
// Verify graph execution result
HipTest::checkVectorADD(A_h, B_h, C_h, N);
@@ -245,20 +246,9 @@ by creating dependency graph and instantiate, launching and verifying
the result
*/
TEST_CASE("Unit_hipGraphInstantiateWithFlags_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");
}
GraphInstantiateWithFlags_DependencyGraph();
}
/*
This testcase verifies hipGraphInstantiateWithFlags API
by creating dependency graph on GPU-0 and instantiate, launching and verifying
@@ -279,6 +269,7 @@ TEST_CASE("Unit_hipGraphInstantiateWithFlags_DependencyGraphDeviceCtxtChg") {
SUCCEED("skipped the testcase as no of devices is less than 2");
}
}
/*
This testcase verifies hipGraphInstantiateWithFlags API
by creating capture graph and instantiate, launching and verifying