SWDEV-514841 - Remove invalid stream tests which leads to segfault

Change-Id: I230c4ccc0d2f591cbf2cd0e019f910094f4f3f26
This commit is contained in:
Pengda Xie
2025-02-12 17:32:50 -08:00
committed by Ioannis Assiouras
parent c4135a6090
commit b46d6abdcb
21 changed files with 61 additions and 136 deletions
+1 -11
View File
@@ -210,16 +210,6 @@ TEST_CASE("Unit_hipDrvMemcpy3DAsync_Negative_Parameters") {
hipErrorInvalidValue);
}
#endif
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-235
SECTION("Invalid stream") {
StreamGuard stream_guard(Streams::created);
HIP_CHECK(hipStreamDestroy(stream_guard.stream()));
HIP_CHECK_ERROR(DrvMemcpy3DWrapper<async>(dst_ptr, dst_pos, src_ptr, src_pos, extent, kind,
stream_guard.stream()),
hipErrorContextIsDestroyed);
}
#endif
};
SECTION("Host to Device") {
@@ -261,4 +251,4 @@ TEST_CASE("Unit_hipDrvMemcpy3DAsync_Negative_Parameters") {
NegativeTests(dst_alloc.pitched_ptr(), make_hipPos(0, 0, 0), src_alloc.pitched_ptr(),
make_hipPos(0, 0, 0), extent, hipMemcpyDeviceToDevice);
}
}
}
+2 -1
View File
@@ -155,7 +155,7 @@ 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));
@@ -163,4 +163,5 @@ TEST_CASE("Unit_hipMemPrefetchAsync_Negative_Parameters") {
HIP_CHECK_ERROR(hipMemPrefetchAsync(alloc.ptr(), kPageSize, device, stream),
hipErrorContextIsDestroyed);
}
#endif
}
-9
View File
@@ -149,15 +149,6 @@ TEST_CASE("Unit_hipMemcpy2DAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
#endif
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-235
SECTION("Invalid stream") {
StreamGuard stream_guard(Streams::created);
HIP_CHECK(hipStreamDestroy(stream_guard.stream()));
HIP_CHECK_ERROR(
hipMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream_guard.stream()),
hipErrorContextIsDestroyed);
}
#endif
};
@@ -230,12 +230,6 @@ TEST_CASE("Unit_hipMemcpy2DFromArrayAsync_Negative_Parameters") {
height, static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpy2DFromArrayAsync(host_alloc.ptr(), 2 * width * sizeof(int),
array_alloc.ptr(), 0, 0, width * sizeof(int),
height, hipMemcpyDeviceToHost, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
SECTION("Array to device") {
@@ -284,12 +278,6 @@ TEST_CASE("Unit_hipMemcpy2DFromArrayAsync_Negative_Parameters") {
height, static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpy2DFromArrayAsync(device_alloc.ptr(), device_alloc.pitch(),
array_alloc.ptr(), 0, 0, width * sizeof(int),
height, hipMemcpyDeviceToDevice, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
}
@@ -225,12 +225,6 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpy2DToArrayAsync(array_alloc.ptr(), 0, 0, host_alloc.ptr(),
2 * width * sizeof(int), width * sizeof(int), height,
hipMemcpyHostToDevice, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
SECTION("Device to Array") {
@@ -279,12 +273,6 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpy2DToArrayAsync(array_alloc.ptr(), 0, 0, device_alloc.ptr(),
device_alloc.pitch(), width * sizeof(int), height,
hipMemcpyDeviceToDevice, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
}
-10
View File
@@ -205,16 +205,6 @@ TEST_CASE("Unit_hipMemcpy3DAsync_Negative_Parameters") {
hipErrorInvalidMemcpyDirection);
}
#endif
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-235
SECTION("Invalid stream") {
StreamGuard stream_guard(Streams::created);
HIP_CHECK(hipStreamDestroy(stream_guard.stream()));
HIP_CHECK_ERROR(Memcpy3DWrapper<async>(dst_ptr, dst_pos, src_ptr, src_pos, extent, kind,
stream_guard.stream()),
hipErrorContextIsDestroyed);
}
#endif
};
SECTION("Host to Device") {
+8 -3
View File
@@ -97,12 +97,13 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-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,11 +119,13 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") {
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") {
@@ -137,12 +140,13 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-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") {
@@ -158,11 +162,12 @@ TEST_CASE("Unit_hipMemcpyAsync_Negative_Parameters") {
static_cast<hipMemcpyKind>(-1), nullptr),
hipErrorInvalidMemcpyDirection);
}
#if HT_AMD
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpyAsync(dst_alloc.ptr(), src_alloc.ptr(), kPageSize,
hipMemcpyDeviceToDevice, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
}
@@ -70,13 +70,14 @@ TEST_CASE("Unit_hipMemcpyDtoHAsync_Negative_Parameters") {
return hipMemcpyDtoHAsync(dst, reinterpret_cast<hipDeviceptr_t>(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<hipDeviceptr_t>(device_alloc.ptr()),
kPageSize, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
TEST_CASE("Unit_hipMemcpyHtoDAsync_Positive_Basic") {
@@ -115,12 +116,13 @@ TEST_CASE("Unit_hipMemcpyHtoDAsync_Negative_Parameters") {
return hipMemcpyHtoDAsync(reinterpret_cast<hipDeviceptr_t>(dst), src, count, nullptr);
},
device_alloc.ptr(), host_alloc.ptr(), kPageSize);
#if HT_AMD
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpyHtoDAsync(reinterpret_cast<hipDeviceptr_t>(device_alloc.ptr()),
host_alloc.ptr(), kPageSize, InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
TEST_CASE("Unit_hipMemcpyDtoDAsync_Positive_Basic") {
@@ -165,13 +167,14 @@ TEST_CASE("Unit_hipMemcpyDtoDAsync_Negative_Parameters") {
reinterpret_cast<hipDeviceptr_t>(src), count, nullptr);
},
dst_alloc.ptr(), src_alloc.ptr(), kPageSize);
#if HT_AMD
SECTION("Invalid stream") {
HIP_CHECK_ERROR(hipMemcpyDtoDAsync(reinterpret_cast<hipDeviceptr_t>(dst_alloc.ptr()),
reinterpret_cast<hipDeviceptr_t>(src_alloc.ptr()), kPageSize,
InvalidStream()),
hipErrorContextIsDestroyed);
}
#endif
}
/**
+1 -10
View File
@@ -182,15 +182,6 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative_Parameters") {
dst, dpitch, src, spitch, width, height, kind),
hipErrorInvalidValue);
}
#endif
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-235
SECTION("Invalid stream") {
StreamGuard stream_guard(Streams::created);
HIP_CHECK(hipStreamDestroy(stream_guard.stream()));
HIP_CHECK_ERROR(MemcpyParam2DAdapter<async>()(dst, dpitch, src, spitch, width, height, kind,
stream_guard.stream()),
hipErrorContextIsDestroyed);
}
#endif
};
@@ -221,4 +212,4 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative_Parameters") {
NegativeTests(dst_alloc.ptr(), dst_alloc.pitch(), src_alloc.ptr(), src_alloc.pitch(),
dst_alloc.width(), dst_alloc.height(), hipMemcpyDeviceToDevice);
}
}
}