From 4ea956e684ed4e0278c633ee1dbae8eba1429fdc Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:52:06 +0530 Subject: [PATCH] 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: 5db81793b2e3b4d3eb914e40f6ead8ca828c5933] --- .../unit/graph/hipGraphInstantiateWithFlags.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/projects/hip-tests/catch/unit/graph/hipGraphInstantiateWithFlags.cc b/projects/hip-tests/catch/unit/graph/hipGraphInstantiateWithFlags.cc index 107bffd296..14302b84f9 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphInstantiateWithFlags.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphInstantiateWithFlags.cc @@ -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