SWDEV-555798 - Added sync after graphLaunch for Unit_hipGetProcAddress_GraphAPIs tests (#1052)

This commit is contained in:
Ioannis Assiouras
2025-09-19 15:10:33 +01:00
committed by GitHub
parent 913743d433
commit 9def133275
@@ -233,9 +233,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_AddMemcpy1DKernelNodes") {
hipGraphExec_t graphExec;
HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateHostArray(hostMem, N, 101) == true);
@@ -536,9 +534,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_SetGetParamsMemsetMemcpy") {
hipGraphExec_t graphExec;
HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateArrayT<char>(hostMemDst1, N, 100) == true);
REQUIRE(validateArrayT<char>(hostMemDst2, N, 120) == true);
@@ -761,9 +757,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_KernelNodeSetGetAttribute") {
hipGraphExec_t graphExec;
HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
HIP_CHECK(hipGraphExecDestroy(graphExec));
HIP_CHECK(hipGraphDestroy(graph));
@@ -1063,9 +1057,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_Memcpy1DSetParams") {
hipGraphExec_t graphExec;
HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateDeviceArray(devMem_1, N, 10) == true);
REQUIRE(validateDeviceArray(devMem_2, N, 20) == true);
@@ -1103,9 +1095,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_Memcpy1DSetParams") {
Nbytes, hipMemcpyHostToDevice));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateDeviceArray(devMem_1, N, 10) == true);
REQUIRE(validateDeviceArray(devMem_2, N, 20) == true);
@@ -1257,9 +1247,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_MemAllocAndFree") {
HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateHostArray(hostMem, N, 20) == true);
@@ -1384,9 +1372,7 @@ TEST_CASE("Unit_hipGetProcAddress_GraphAPIs_ExecMemsetMemcpySetParams") {
HIP_CHECK(dyn_hipGraphExecMemcpyNodeSetParams_ptr(graphExec, memcpyNode, &newMemcpyParms));
HIP_CHECK(hipGraphLaunch(graphExec, 0));
#ifdef _WIN32
HIP_CHECK(hipStreamSynchronize(0));
#endif
REQUIRE(validateArrayT<char>(hostMemDst1, N, 100) == true);
REQUIRE(validateArrayT<char>(hostMemDst2, N, 120) == true);