SWDEV-486969 - Reuse existing tests to verify behavior of capturing sync Memcpy APis
Change-Id: I7e94743d6957ffaadae9cff297e3f0d93f9ff806
[ROCm/hip-tests commit: 6c5468f802]
이 커밋은 다음에 포함됨:
1 부모
cfc21116a6
커밋
08e2b6a15d
14 파일이 변경됨
+291
-67
검색과 일치하는 파일 없음
@@ -132,9 +132,9 @@ TEST_CASE("Unit_hipMemcpy2DFromArray_Positive_ZeroWidthHeight") {
|
||||
width, height);
|
||||
}
|
||||
SECTION("Width is 0") {
|
||||
Memcpy2DFromArrayZeroWidthHeight<false>(
|
||||
std::bind(hipMemcpy2DFromArray, _1, _2, _3, 0, 0, 0, height, hipMemcpyDeviceToHost),
|
||||
width, height);
|
||||
Memcpy2DFromArrayZeroWidthHeight<false>(std::bind(hipMemcpy2DFromArray, _1, _2, _3,
|
||||
0, 0, 0, height, hipMemcpyDeviceToHost),
|
||||
width, height);
|
||||
}
|
||||
}
|
||||
SECTION("Array to device") {
|
||||
@@ -260,3 +260,25 @@ TEST_CASE("Unit_hipMemcpy2DFromArray_Negative_Parameters") {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipMemcpy2DFromArray_Capture") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
const auto width = 16;
|
||||
const auto height = 16;
|
||||
const auto size = width * height * sizeof(int);
|
||||
|
||||
ArrayAllocGuard<int> A_d(make_hipExtent(width, height, 0), hipArrayDefault);
|
||||
LinearAllocGuard<int> A_h(LinearAllocs::hipHostMalloc, size);
|
||||
LinearAllocGuard<int> B_h(LinearAllocs::hipHostMalloc, size);
|
||||
|
||||
HIP_CHECK(hipMemcpy2DToArray(A_d.ptr(), 0, 0, A_h.ptr(), width * sizeof(int),
|
||||
width * sizeof(int), height, hipMemcpyHostToDevice));
|
||||
|
||||
hipError_t memcpy_err = hipSuccess;
|
||||
BEGIN_CAPTURE_SYNC(memcpy_err, false);
|
||||
HIP_CHECK_ERROR(hipMemcpy2DFromArray(B_h.host_ptr(), width * sizeof(int), A_d.ptr(), 0, 0,
|
||||
width * sizeof(int), height, hipMemcpyDeviceToHost),
|
||||
memcpy_err);
|
||||
END_CAPTURE_SYNC(memcpy_err);
|
||||
}
|
||||
새 이슈에서 참조
사용자 차단