SWDEV-486969 - Reuse existing tests to verify behavior of capturing sync Memcpy APis
Change-Id: I7e94743d6957ffaadae9cff297e3f0d93f9ff806
Tá an tiomantas seo le fáil i:
@@ -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);
|
||||
}
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir