@@ -1851,21 +1851,10 @@ void handler::ext_oneapi_copy(
18511851 MSrcPtr = const_cast <void *>(Src);
18521852 MDstPtr = Dest;
18531853
1854- ur_exp_image_copy_flags_t ImageCopyFlags = detail::getUrImageCopyFlags (
1855- get_pointer_type (Src,
1856- createSyclObjFromImpl<context>(impl->get_context ())),
1857- get_pointer_type (Dest,
1858- createSyclObjFromImpl<context>(impl->get_context ())));
1859-
1860- if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE ||
1861- ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST) {
1862- detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1863- SrcRowPitch, DestRowPitch);
1864- } else {
1865- throw sycl::exception (make_error_code (errc::invalid),
1866- " Copy Error: This copy function only performs device "
1867- " to device or host to host copies!" );
1868- }
1854+ ur_exp_image_copy_flags_t ImageCopyFlags =
1855+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST;
1856+ detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1857+ SrcRowPitch, DestRowPitch);
18691858
18701859 setType (detail::CGType::CopyImage);
18711860}
@@ -1880,22 +1869,11 @@ void handler::ext_oneapi_copy(
18801869 MSrcPtr = const_cast <void *>(Src);
18811870 MDstPtr = Dest;
18821871
1883- ur_exp_image_copy_flags_t ImageCopyFlags = detail::getUrImageCopyFlags (
1884- get_pointer_type (Src,
1885- createSyclObjFromImpl<context>(impl->get_context ())),
1886- get_pointer_type (Dest,
1887- createSyclObjFromImpl<context>(impl->get_context ())));
1888-
1889- if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE ||
1890- ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST) {
1891- detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1892- SrcRowPitch, DestRowPitch, SrcOffset, {0 , 0 , 0 },
1893- DestOffset, {0 , 0 , 0 }, CopyExtent);
1894- } else {
1895- throw sycl::exception (make_error_code (errc::invalid),
1896- " Copy Error: This copy function only performs device "
1897- " to device or host to host copies!" );
1898- }
1872+ ur_exp_image_copy_flags_t ImageCopyFlags =
1873+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST;
1874+ detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1875+ SrcRowPitch, DestRowPitch, SrcOffset, {0 , 0 , 0 },
1876+ DestOffset, {0 , 0 , 0 }, CopyExtent);
18991877
19001878 setType (detail::CGType::CopyImage);
19011879}
0 commit comments