SWDEV-486969 - Reuse existing tests to verify behavior of capturing sync Memcpy APis

Change-Id: I7e94743d6957ffaadae9cff297e3f0d93f9ff806
Tá an tiomantas seo le fáil i:
Vladana Stojiljkovic
2024-09-27 12:53:31 +02:00
tuismitheoir 59ace1e080
tiomantas 6c5468f802
D'athraigh 14 comhad le 291 breiseanna agus 67 scriosta
+18
Féach ar an gComhad
@@ -151,3 +151,21 @@ TEST_CASE("Unit_hipMemcpy2D_Negative_Parameters") {
dst_alloc.width(), dst_alloc.height(), hipMemcpyDeviceToDevice);
}
}
TEST_CASE("Unit_hipMemcpy2D_Capture") {
CHECK_IMAGE_SUPPORT
constexpr size_t width = 16;
constexpr size_t height = 16;
LinearAllocGuard2D<int> device_alloc(width, height);
LinearAllocGuard<int> host_alloc(LinearAllocs::hipHostMalloc, device_alloc.pitch() * width);
hipError_t memcpy_err = hipSuccess;
BEGIN_CAPTURE_SYNC(memcpy_err, false);
HIP_CHECK_ERROR(
hipMemcpy2D(device_alloc.ptr(), device_alloc.pitch(), host_alloc.ptr(), device_alloc.pitch(),
device_alloc.width(), device_alloc.height(), hipMemcpyHostToDevice),
memcpy_err);
END_CAPTURE_SYNC(memcpy_err);
}