From dd6d3a6cd355861ef9967df3df75067331c23781 Mon Sep 17 00:00:00 2001 From: "Xie, Pengda" Date: Thu, 8 May 2025 16:25:23 -0700 Subject: [PATCH] SWDEV-514841 - Remove invalid stream tests on AMD platform [ROCm/hip-tests commit: 0c1a7bf15509a029c44aa43bc054b976d93a55d5] --- .../config/config_nvidia_linux.json | 7 +--- .../config/config_nvidia_windows.json | 7 +--- .../catch/unit/device/hipGetSetDeviceFlags.cc | 4 +- .../hipLaunchCooperativeKernel.cc | 11 +---- .../catch/unit/graph/hipGraphLaunch_old.cc | 40 ------------------- .../catch/unit/graph/hipLaunchHostFunc.cc | 12 +----- .../catch/unit/graph/hipStreamBeginCapture.cc | 8 ---- .../catch/unit/graph/hipStreamEndCapture.cc | 9 ----- .../unit/graph/hipStreamEndCapture_old.cc | 11 ----- .../catch/unit/memory/hipMallocAsync.cc | 6 --- .../unit/memory/hipMallocFromPoolAsync.cc | 6 --- .../catch/unit/memory/hipMemPrefetchAsync.cc | 9 ----- .../catch/unit/memory/hipMemcpyAsync.cc | 33 --------------- .../unit/memory/hipMemcpyAsync_derivatives.cc | 28 ------------- .../unit/memory/hipStreamAttachMemAsync.cc | 8 +--- .../module/hip_module_launch_kernel_common.hh | 12 ------ .../catch/unit/stream/hipStreamDestroy.cc | 7 ---- .../catch/unit/stream/hipStreamQuery.cc | 26 ------------ .../catch/unit/stream/hipStreamQuery_spt.cc | 11 ----- .../catch/unit/stream/hipStreamSynchronize.cc | 15 +------ .../unit/stream/hipStreamSynchronize_spt.cc | 4 -- .../catch/unit/stream/hipStreamWaitEvent.cc | 15 ------- 22 files changed, 9 insertions(+), 280 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json index e448bbcae7..fc8a35dd1e 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json @@ -230,15 +230,10 @@ "=== Disabling tests which no longer behave the same on nvidia platform ===", "Unit_hipGraphInstantiateWithParams_Negative", "Unit_hipGraphAddChildGraphNode_OrgGraphAsChildGraph", - "Unit_hipStreamBeginCapture_Negative_Parameters", - "Unit_hipStreamDestroy_Negative_DoubleDestroy", "Unit_hipDeviceSynchronize_Positive_Nullstream", "Unit_hipDeviceSynchronize_Functional", - "Unit_hipGetSetDeviceFlags_InvalidFlag", "Unit_hipDeviceReset_Positive_Basic", "Unit_hipDeviceReset_Positive_Threaded", - "Unit_hipModuleLaunchKernel_Negative_Parameters", - "Unit_hipModuleGetTexRef_Positive_Basic", - "Unit_hipLaunchCooperativeKernel_Negative_Parameters" + "Unit_hipModuleGetTexRef_Positive_Basic" ] } diff --git a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json index cb448cb022..8c18107be8 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json @@ -62,15 +62,10 @@ "=== Disabling tests which no longer behave the same on nvidia platform ===", "Unit_hipGraphInstantiateWithParams_Negative", "Unit_hipGraphAddChildGraphNode_OrgGraphAsChildGraph", - "Unit_hipStreamBeginCapture_Negative_Parameters", - "Unit_hipStreamDestroy_Negative_DoubleDestroy", "Unit_hipDeviceSynchronize_Positive_Nullstream", "Unit_hipDeviceSynchronize_Functional", - "Unit_hipGetSetDeviceFlags_InvalidFlag", "Unit_hipDeviceReset_Positive_Basic", "Unit_hipDeviceReset_Positive_Threaded", - "Unit_hipModuleLaunchKernel_Negative_Parameters", - "Unit_hipModuleGetTexRef_Positive_Basic", - "Unit_hipLaunchCooperativeKernel_Negative_Parameters" + "Unit_hipModuleGetTexRef_Positive_Basic" ] } diff --git a/projects/hip-tests/catch/unit/device/hipGetSetDeviceFlags.cc b/projects/hip-tests/catch/unit/device/hipGetSetDeviceFlags.cc index 68f20ea3e5..b35cc88c87 100644 --- a/projects/hip-tests/catch/unit/device/hipGetSetDeviceFlags.cc +++ b/projects/hip-tests/catch/unit/device/hipGetSetDeviceFlags.cc @@ -241,8 +241,8 @@ TEST_CASE("Unit_hipGetSetDeviceFlags_InvalidFlag") { 0b101, // schedule flags should not overlap 0b110, // schedule flags should not overlap 0b111, // schedule flags should not overlap - 0b100000, // out of bounds + //0b100000, // out of bounds is no longer invalid 0xFFFF); CAPTURE(invalidFlag); HIP_CHECK_ERROR(hipSetDeviceFlags(invalidFlag), hipErrorInvalidValue); -} \ No newline at end of file +} diff --git a/projects/hip-tests/catch/unit/executionControl/hipLaunchCooperativeKernel.cc b/projects/hip-tests/catch/unit/executionControl/hipLaunchCooperativeKernel.cc index 5beeed4621..0684137866 100644 --- a/projects/hip-tests/catch/unit/executionControl/hipLaunchCooperativeKernel.cc +++ b/projects/hip-tests/catch/unit/executionControl/hipLaunchCooperativeKernel.cc @@ -176,13 +176,4 @@ TEST_CASE("Unit_hipLaunchCooperativeKernel_Negative_Parameters") { dim3{1, 1, 1}, nullptr, max, nullptr), hipErrorCooperativeLaunchTooLarge); } - - SECTION("Invalid stream") { - hipStream_t stream = nullptr; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - HIP_CHECK_ERROR(hipLaunchCooperativeKernel(reinterpret_cast(kernel), dim3{1, 1, 1}, - dim3{1, 1, 1}, nullptr, 0, stream), - hipErrorContextIsDestroyed); - } -} \ No newline at end of file +} diff --git a/projects/hip-tests/catch/unit/graph/hipGraphLaunch_old.cc b/projects/hip-tests/catch/unit/graph/hipGraphLaunch_old.cc index 4e380ff43d..febe523e5e 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphLaunch_old.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphLaunch_old.cc @@ -95,46 +95,6 @@ TEST_CASE("Unit_hipGraphLaunch_Negative") { HIP_CHECK(hipGraphDestroy(graph)); HIP_CHECK(hipStreamDestroy(stream)); } -/* In this case in CUDA setup this api call leads to undefined behavior - So enabling this test only for AMD and checking with hipSuccess */ -#if HT_AMD - SECTION("Destroy stream and try to launch respective executable graph") { - constexpr size_t Nbytes = 1024; - hipGraph_t graph; - hipGraphExec_t graphExec; - hipStream_t stream; - hipGraphNode_t memsetNode; - - char *devData; - HIP_CHECK(hipMalloc(&devData, Nbytes)); - - HIP_CHECK(hipGraphCreate(&graph, 0)); - HIP_CHECK(hipStreamCreate(&stream)); - - hipMemsetParams memsetParams{}; - memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(devData); - memsetParams.value = 0; - memsetParams.pitch = 0; - memsetParams.elementSize = sizeof(char); - memsetParams.width = Nbytes; - memsetParams.height = 1; - HIP_CHECK(hipGraphAddMemsetNode(&memsetNode, graph, nullptr, 0, - &memsetParams)); - HIP_CHECK(hipGraphInstantiate(&graphExec, graph, nullptr, nullptr, 0)); - HIP_CHECK(hipGraphLaunch(graphExec, stream)); - HIP_CHECK(hipStreamSynchronize(stream)); - - HIP_CHECK(hipStreamDestroy(stream)); - // Launch again after destroy stream - ret = hipGraphLaunch(graphExec, stream); - REQUIRE(hipSuccess != ret); - - HIP_CHECK(hipFree(devData)); - HIP_CHECK(hipGraphExecDestroy(graphExec)); - HIP_CHECK(hipGraphDestroy(graph)); - } -#endif SECTION("Destroy graph and try to launch respective executable graph") { constexpr size_t Nbytes = 1024; hipGraph_t graph; diff --git a/projects/hip-tests/catch/unit/graph/hipLaunchHostFunc.cc b/projects/hip-tests/catch/unit/graph/hipLaunchHostFunc.cc index 1046d4dffc..fe4053a950 100644 --- a/projects/hip-tests/catch/unit/graph/hipLaunchHostFunc.cc +++ b/projects/hip-tests/catch/unit/graph/hipLaunchHostFunc.cc @@ -29,7 +29,9 @@ THE SOFTWARE. * enqueues a host function call in a stream */ +#if HT_NVIDIA static void hostNodeCallbackDummy(void* data) { REQUIRE(data == nullptr); } +#endif static void hostNodeCallback(void* data) { float** userData = static_cast(data); @@ -67,16 +69,6 @@ TEST_CASE("Unit_hipLaunchHostFunc_Negative_Parameters") { SECTION("Pass functions as nullptr") { HIP_CHECK_ERROR(hipLaunchHostFunc(stream, nullptr, nullptr), hipErrorInvalidValue); } -#if HT_AMD - SECTION("Pass uninitialized stream") { - hipHostFn_t fn = hostNodeCallbackDummy; - constexpr auto InvalidStream = [] { - StreamGuard sg(Streams::created); - return sg.stream(); - }; - HIP_CHECK_ERROR(hipLaunchHostFunc(InvalidStream(), fn, nullptr), hipErrorContextIsDestroyed); - } -#endif } /** diff --git a/projects/hip-tests/catch/unit/graph/hipStreamBeginCapture.cc b/projects/hip-tests/catch/unit/graph/hipStreamBeginCapture.cc index bb781f7739..d2ae8cd837 100644 --- a/projects/hip-tests/catch/unit/graph/hipStreamBeginCapture.cc +++ b/projects/hip-tests/catch/unit/graph/hipStreamBeginCapture.cc @@ -199,14 +199,6 @@ TEST_CASE("Unit_hipStreamBeginCapture_Negative_Parameters") { SECTION("Creating hipStream with invalid mode") { HIP_CHECK_ERROR(hipStreamBeginCapture(stream, hipStreamCaptureMode(-1)), hipErrorInvalidValue); } - SECTION("Stream capture on uninitialized stream returns error code.") { - constexpr auto InvalidStream = [] { - StreamGuard sg(Streams::created); - return sg.stream(); - }; - HIP_CHECK_ERROR(hipStreamBeginCapture(InvalidStream(), hipStreamCaptureModeGlobal), - hipErrorContextIsDestroyed); - } } /** diff --git a/projects/hip-tests/catch/unit/graph/hipStreamEndCapture.cc b/projects/hip-tests/catch/unit/graph/hipStreamEndCapture.cc index 0b6e6b2275..f8a74b8fb3 100644 --- a/projects/hip-tests/catch/unit/graph/hipStreamEndCapture.cc +++ b/projects/hip-tests/catch/unit/graph/hipStreamEndCapture.cc @@ -62,15 +62,6 @@ TEST_CASE("Unit_hipStreamEndCapture_Negative_Parameters") { SECTION("End capture on stream where capture has not yet started") { HIP_CHECK_ERROR(hipStreamEndCapture(stream, &graph), hipErrorIllegalState); } -#if HT_AMD - SECTION("Destroy stream and try to end capture") { - hipStream_t destroyed_stream; - HIP_CHECK(hipStreamCreate(&destroyed_stream)); - HIP_CHECK(hipStreamBeginCapture(destroyed_stream, hipStreamCaptureModeGlobal)); - HIP_CHECK(hipStreamDestroy(destroyed_stream)); - HIP_CHECK_ERROR(hipStreamEndCapture(destroyed_stream, &graph), hipErrorContextIsDestroyed); - } -#endif } /** diff --git a/projects/hip-tests/catch/unit/graph/hipStreamEndCapture_old.cc b/projects/hip-tests/catch/unit/graph/hipStreamEndCapture_old.cc index b50f675129..9908a30ba9 100644 --- a/projects/hip-tests/catch/unit/graph/hipStreamEndCapture_old.cc +++ b/projects/hip-tests/catch/unit/graph/hipStreamEndCapture_old.cc @@ -80,17 +80,6 @@ TEST_CASE("Unit_hipStreamEndCapture_Negative") { REQUIRE(hipErrorIllegalState == ret); HIP_CHECK(hipStreamDestroy(stream)); } -#if HT_AMD - SECTION("Destroy stream and try to end capture") { - hipStream_t stream; - hipGraph_t graph; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamBeginCapture(stream, hipStreamCaptureModeGlobal)); - HIP_CHECK(hipStreamDestroy(stream)); - ret = hipStreamEndCapture(stream, &graph); - REQUIRE(hipErrorContextIsDestroyed == ret); - } -#endif SECTION("Destroy graph and try to end capture in between") { hipStream_t stream{nullptr}; hipGraph_t graph{nullptr}; diff --git a/projects/hip-tests/catch/unit/memory/hipMallocAsync.cc b/projects/hip-tests/catch/unit/memory/hipMallocAsync.cc index 39990b83d5..3a5baf4f17 100644 --- a/projects/hip-tests/catch/unit/memory/hipMallocAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMallocAsync.cc @@ -123,12 +123,6 @@ TEST_CASE("Unit_hipMallocAsync_Negative_Parameters") { HIP_CHECK_ERROR(hipMallocAsync(nullptr, alloc_size, stream.stream()), hipErrorInvalidValue); } - SECTION("invalid stream handle") { - HIP_CHECK_ERROR( - hipMallocAsync(reinterpret_cast(&p), alloc_size, reinterpret_cast(-1)), - hipErrorInvalidHandle); - } - SECTION("Size is max size_t") { HIP_CHECK_ERROR(hipMallocAsync(reinterpret_cast(&p), max_size, stream.stream()), hipErrorOutOfMemory); diff --git a/projects/hip-tests/catch/unit/memory/hipMallocFromPoolAsync.cc b/projects/hip-tests/catch/unit/memory/hipMallocFromPoolAsync.cc index d12c7391da..6993dfa87a 100644 --- a/projects/hip-tests/catch/unit/memory/hipMallocFromPoolAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMallocFromPoolAsync.cc @@ -134,12 +134,6 @@ TEST_CASE("Unit_hipMallocFromPoolAsync_Negative_Parameters") { hipErrorInvalidValue); } - SECTION("Invalid stream handle") { - HIP_CHECK_ERROR(hipMallocFromPoolAsync(static_cast(&p), alloc_size, mempool.mempool(), - reinterpret_cast(-1)), - hipErrorInvalidHandle); - } - SECTION("Size is max size_t") { HIP_CHECK_ERROR(hipMallocFromPoolAsync(static_cast(&p), max_size, mempool.mempool(), stream.stream()), diff --git a/projects/hip-tests/catch/unit/memory/hipMemPrefetchAsync.cc b/projects/hip-tests/catch/unit/memory/hipMemPrefetchAsync.cc index 1ad81e9a01..ceaa856979 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemPrefetchAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemPrefetchAsync.cc @@ -155,13 +155,4 @@ TEST_CASE("Unit_hipMemPrefetchAsync_Negative_Parameters") { HIP_CHECK_ERROR(hipMemPrefetchAsync(alloc.ptr(), kPageSize, hipInvalidDeviceId), hipErrorInvalidDevice); } -#if HT_AMD - SECTION("Invalid stream") { - hipStream_t stream; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - HIP_CHECK_ERROR(hipMemPrefetchAsync(alloc.ptr(), kPageSize, device, stream), - hipErrorContextIsDestroyed); - } -#endif } diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyAsync.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyAsync.cc index e57a4b890c..e467c605a2 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyAsync.cc @@ -80,10 +80,6 @@ TEST_CASE("Unit_hipMemcpyAsync_Positive_Synchronization_Behavior") { TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") { using namespace std::placeholders; - constexpr auto InvalidStream = [] { - StreamGuard sg(Streams::created); - return sg.stream(); - }; SECTION("Host to device") { LinearAllocGuard device_alloc(LinearAllocs::hipMalloc, kPageSize); @@ -97,13 +93,6 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") { static_cast(-1), nullptr), hipErrorInvalidMemcpyDirection); } -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyAsync(device_alloc.ptr(), host_alloc.ptr(), kPageSize, - hipMemcpyHostToDevice, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } SECTION("Device to host") { @@ -118,14 +107,6 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") { static_cast(-1), nullptr), hipErrorInvalidMemcpyDirection); } - -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyAsync(host_alloc.ptr(), device_alloc.ptr(), kPageSize, - hipMemcpyDeviceToHost, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } SECTION("Host to host") { @@ -140,13 +121,6 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") { static_cast(-1), nullptr), hipErrorInvalidMemcpyDirection); } -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyAsync(dst_alloc.ptr(), src_alloc.ptr(), kPageSize, - hipMemcpyHostToHost, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } SECTION("Device to device") { @@ -162,12 +136,5 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") { static_cast(-1), nullptr), hipErrorInvalidMemcpyDirection); } -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyAsync(dst_alloc.ptr(), src_alloc.ptr(), kPageSize, - hipMemcpyDeviceToDevice, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } } diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyAsync_derivatives.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyAsync_derivatives.cc index 26045b03e6..2361e3692c 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyAsync_derivatives.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyAsync_derivatives.cc @@ -25,11 +25,6 @@ THE SOFTWARE. #include #include -static hipStream_t InvalidStream() { - StreamGuard sg(Streams::created); - return sg.stream(); -} - TEST_CASE("Unit_hipMemcpyDtoHAsync_Positive_Basic") { const auto stream_type = GENERATE(Streams::nullstream, Streams::perThread, Streams::created); const StreamGuard stream_guard(stream_type); @@ -70,14 +65,6 @@ TEST_CASE("Unit_hipMemcpyDtoHAsync_Negative_Parameters") { return hipMemcpyDtoHAsync(dst, reinterpret_cast(src), count, nullptr); }, host_alloc.ptr(), device_alloc.ptr(), kPageSize); -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR( - hipMemcpyDtoHAsync(host_alloc.ptr(), reinterpret_cast(device_alloc.ptr()), - kPageSize, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } TEST_CASE("Unit_hipMemcpyHtoDAsync_Positive_Basic") { @@ -116,13 +103,6 @@ TEST_CASE("Unit_hipMemcpyHtoDAsync_Negative_Parameters") { return hipMemcpyHtoDAsync(reinterpret_cast(dst), src, count, nullptr); }, device_alloc.ptr(), host_alloc.ptr(), kPageSize); -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyHtoDAsync(reinterpret_cast(device_alloc.ptr()), - host_alloc.ptr(), kPageSize, InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } TEST_CASE("Unit_hipMemcpyDtoDAsync_Positive_Basic") { @@ -167,14 +147,6 @@ TEST_CASE("Unit_hipMemcpyDtoDAsync_Negative_Parameters") { reinterpret_cast(src), count, nullptr); }, dst_alloc.ptr(), src_alloc.ptr(), kPageSize); -#if HT_AMD - SECTION("Invalid stream") { - HIP_CHECK_ERROR(hipMemcpyDtoDAsync(reinterpret_cast(dst_alloc.ptr()), - reinterpret_cast(src_alloc.ptr()), kPageSize, - InvalidStream()), - hipErrorContextIsDestroyed); - } -#endif } /** diff --git a/projects/hip-tests/catch/unit/memory/hipStreamAttachMemAsync.cc b/projects/hip-tests/catch/unit/memory/hipStreamAttachMemAsync.cc index 05a73e5cc7..df9c5895b7 100644 --- a/projects/hip-tests/catch/unit/memory/hipStreamAttachMemAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipStreamAttachMemAsync.cc @@ -181,12 +181,6 @@ TEST_CASE("Unit_hipStreamAttachMemAsync_Negative_Parameters") { LinearAllocGuard managed(LinearAllocs::hipMallocManaged, kPageSize, hipMemAttachHost); - SECTION("invalid stream") { - HIP_CHECK(hipStreamDestroy(stream.stream())); - HIP_CHECK_ERROR(hipStreamAttachMemAsync(stream.stream(), managed.ptr()), - hipErrorContextIsDestroyed); - } - SECTION("dev_ptr == nullptr") { HIP_CHECK_ERROR(hipStreamAttachMemAsync(stream.stream(), nullptr), hipErrorInvalidValue); } @@ -221,4 +215,4 @@ TEST_CASE("Unit_hipStreamAttachMemAsync_Negative_Parameters") { hipErrorInvalidValue); } } -} \ No newline at end of file +} diff --git a/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh b/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh index 56de72fea7..cba8329cc5 100644 --- a/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh +++ b/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh @@ -212,18 +212,6 @@ template void ModuleLaunchKernelNegativeParamet hipErrorInvalidValue); } - SECTION("Invalid stream") { - hipStream_t stream = nullptr; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - hipError_t err = hipErrorInvalidValue; - #if HT_NVIDIA - err = hipErrorContextIsDestroyed; - #endif - HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, 0, 0, stream, nullptr, nullptr, nullptr, nullptr, 0u), - err); - } - SECTION("Passing kernel_args and extra simultaneously") { hipFunction_t f = GetKernel(mg.module(), "Kernel42"); LinearAllocGuard result_dev(LinearAllocs::hipMalloc, sizeof(int)); diff --git a/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc b/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc index 40b98be674..c57a841278 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc @@ -28,13 +28,6 @@ TEST_CASE("Unit_hipStreamDestroy_Default") { HIP_CHECK(hipStreamDestroy(stream)); } -TEST_CASE("Unit_hipStreamDestroy_Negative_DoubleDestroy") { - hipStream_t stream{}; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - HIP_CHECK_ERROR(hipStreamDestroy(stream), hipErrorContextIsDestroyed); -} - TEST_CASE("Unit_hipStreamDestroy_Negative_NullStream") { HIP_CHECK_ERROR(hipStreamDestroy(nullptr), hipErrorInvalidResourceHandle); } diff --git a/projects/hip-tests/catch/unit/stream/hipStreamQuery.cc b/projects/hip-tests/catch/unit/stream/hipStreamQuery.cc index 6a1f306c6c..f758ed8cb0 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamQuery.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamQuery.cc @@ -62,32 +62,6 @@ TEST_CASE("Unit_hipStreamQuery_WithFinishedWork") { } } -#if !HT_NVIDIA -/** - * @brief Check that submitting work to a destroyed stream sets its status as - * hipErrorContextIsDestroyed - * - * Test removed for Nvidia devices because it returns unexpected error - */ -TEST_CASE("Unit_hipStreamQuery_WithDestroyedStream") { - hipStream_t stream{nullptr}; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorContextIsDestroyed); -} - -/** - * @brief Check that submitting work to an uninitialized stream sets its status as - * hipErrorContextIsDestroyed - * - * Test removed for Nvidia devices because it returns unexpected error - */ -TEST_CASE("Unit_hipStreamQuery_WithUninitializedStream") { - hipStream_t stream{reinterpret_cast(0xFFFF)}; - HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorContextIsDestroyed); -} -#endif - #if HT_AMD /* Disabled because frequency based wait is timing out on nvidia platforms */ /** diff --git a/projects/hip-tests/catch/unit/stream/hipStreamQuery_spt.cc b/projects/hip-tests/catch/unit/stream/hipStreamQuery_spt.cc index 37b011b62f..f10f048a38 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamQuery_spt.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamQuery_spt.cc @@ -94,17 +94,6 @@ TEST_CASE("Unit_hipStreamQuery_spt_WithFinishedWork") { */ #if HT_AMD TEST_CASE("Unit_hipStreamQuery_spt_NegativeCases") { - SECTION("Query Destroyed Stream") { - hipStream_t stream{nullptr}; - HIP_CHECK(hipStreamCreate(&stream)); - HIP_CHECK(hipStreamDestroy(stream)); - HIP_CHECK_ERROR(hipStreamQuery_spt(stream), hipErrorContextIsDestroyed); - } - SECTION("Query Uninitialized Stream") { - hipStream_t streamUnInit{reinterpret_cast(0xFFFF)}; - HIP_CHECK_ERROR(hipStreamQuery_spt(streamUnInit), - hipErrorContextIsDestroyed); - } SECTION("Submit Work On Stream And Query Null Stream") { hipStream_t ValidStream; HIP_CHECK(hipStreamCreate(&ValidStream)); diff --git a/projects/hip-tests/catch/unit/stream/hipStreamSynchronize.cc b/projects/hip-tests/catch/unit/stream/hipStreamSynchronize.cc index d1faaa4f04..d578de0d4c 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamSynchronize.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamSynchronize.cc @@ -33,19 +33,6 @@ TEST_CASE("Unit_hipStreamSynchronize_EmptyStream") { HIP_CHECK(hipStreamDestroy(stream)); } -#if !HT_NVIDIA -/** - * @brief Check that synchronization of uninitialized stream sets its status to - * hipErrorContextIsDestroyed - * - * Test removed for Nvidia devices because it returns unexpected error - */ -TEST_CASE("Unit_hipStreamSynchronize_UninitializedStream") { - hipStream_t stream{reinterpret_cast(0xFFFF)}; - HIP_CHECK_ERROR(hipStreamSynchronize(stream), hipErrorContextIsDestroyed); -} -#endif - #if HT_AMD /* Disabled because frequency based wait is timing out on nvidia platforms */ /** @@ -166,4 +153,4 @@ TEST_CASE("Unit_hipStreamSynchronize_NullStreamAndStreamPerThread") { HIP_CHECK_ERROR(hipStreamQuery(hip::nullStream), hipSuccess); } #endif -} // namespace hipStreamSynchronizeTest \ No newline at end of file +} // namespace hipStreamSynchronizeTest diff --git a/projects/hip-tests/catch/unit/stream/hipStreamSynchronize_spt.cc b/projects/hip-tests/catch/unit/stream/hipStreamSynchronize_spt.cc index 8b97b4e0c4..e87824ff50 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamSynchronize_spt.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamSynchronize_spt.cc @@ -59,10 +59,6 @@ TEST_CASE("Unit_hipStreamSynchronize_spt_EmptyStream") { */ #if HT_AMD -TEST_CASE("Unit_hipStreamSynchronize_spt_UninitializedStream") { - hipStream_t stream{reinterpret_cast(0xFFFF)}; - HIP_CHECK_ERROR(hipStreamSynchronize_spt(stream), hipErrorContextIsDestroyed); -} /** * Test Description * ------------------------ diff --git a/projects/hip-tests/catch/unit/stream/hipStreamWaitEvent.cc b/projects/hip-tests/catch/unit/stream/hipStreamWaitEvent.cc index 32dbe9983b..779d444560 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamWaitEvent.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamWaitEvent.cc @@ -19,7 +19,6 @@ THE SOFTWARE. /* Testcase Scenarios : Unit_hipStreamWaitEvent_Negative - Test unsuccessful hipStreamWaitEvent when either event or flags are invalid -Unit_hipStreamWaitEvent_UninitializedStream_Negative - Test unsuccessful hipStreamWaitEvent when stream is uninitialized Unit_hipStreamWaitEvent_Default - Test simple waiting for an event with hipStreamWaitEvent api Unit_hipStreamWaitEvent_DifferentStreams - Test waiting for an event on a different stream with hipStreamWaitEvent api */ @@ -65,20 +64,6 @@ TEST_CASE("Unit_hipStreamWaitEvent_Negative") { } } - /* Test removed for Nvidia devices because it returns unexpected error */ -#if !HT_NVIDIA -TEST_CASE("Unit_hipStreamWaitEvent_UninitializedStream_Negative") { - hipStream_t stream{reinterpret_cast(0xFFFF)}; - hipEvent_t event{nullptr}; - - HIP_CHECK(hipEventCreate(&event)); - - HIP_CHECK_ERROR(hipStreamWaitEvent(stream, event, 0), hipErrorInvalidHandle); - - HIP_CHECK(hipEventDestroy(event)); -} -#endif - TEST_CASE("Unit_hipStreamWaitEvent_Default") { hipStream_t stream{nullptr}; hipEvent_t waitEvent{nullptr};