Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
330e196
[SYCL][E2E] Drop CUDA requirement from bindless image tests
AlexeySachkov Aug 18, 2025
cee3455
XFAIL some known failures
AlexeySachkov Aug 20, 2025
d8ba8d2
Set correct flags for image-to-usm and usm-to-image copies
AlexeySachkov Aug 20, 2025
9f5c1a7
Fixed crashes, but results are incorrect
AlexeySachkov Aug 21, 2025
2a43585
This fixes more crashes (for 1D copies), but results are still incorrect
AlexeySachkov Aug 21, 2025
aefb645
Fix incorrect usage of L0 API leading to memory corruptions
AlexeySachkov Aug 25, 2025
6b33f17
More fixes. copy_subregion_2D should pass now
AlexeySachkov Aug 27, 2025
c980982
Use the right units for offsets and region sizes
AlexeySachkov Aug 27, 2025
72a94d4
Fix CUDA & HIP (untested locally)
AlexeySachkov Aug 27, 2025
20a0e26
Fix 1D copies
AlexeySachkov Aug 27, 2025
1b4fe4e
Fix CUDA adapter build
AlexeySachkov Aug 28, 2025
3b2f80e
Fix unused argument in UR L0 adapter
AlexeySachkov Aug 28, 2025
3f88450
Working towards an alternative approach
AlexeySachkov Aug 29, 2025
393355c
Nope, it doesn't work either
AlexeySachkov Aug 29, 2025
e7e9272
Add new argument to the urBindlessImagesImageCopyExp
AlexeySachkov Sep 1, 2025
dccab12
Extend UR API for bindless image copies to pass knowledge about input…
AlexeySachkov Sep 1, 2025
ed523bc
Revert now unused additional argument
AlexeySachkov Sep 1, 2025
52cb9a1
Fix UR code checks
AlexeySachkov Sep 1, 2025
967b377
Drop old debugging code
AlexeySachkov Sep 1, 2025
4cec7ce
Reduce the diff with sycl branch, fix build
AlexeySachkov Sep 1, 2025
23521b0
Drop incorrectly added XFAIL
AlexeySachkov Sep 1, 2025
5db2961
This should (hopefully) fix HIP issues
AlexeySachkov Sep 2, 2025
c816ebb
Improve tests logging on failure - I cannot reproduce those failures …
AlexeySachkov Sep 2, 2025
0899f4e
Apply clang-format
AlexeySachkov Sep 2, 2025
410d22a
This should fix failures we see with V1 L0 adapter
AlexeySachkov Sep 3, 2025
54e24ec
This should fix device_to_device_copy.cpp test
AlexeySachkov Sep 3, 2025
2c5141c
[SYCL][E2E] XFAIL bindless image tests which that fail on HIP
AlexeySachkov Sep 3, 2025
c999738
Merge remote-tracking branch 'origin/sycl' into private/asachkov/drop…
AlexeySachkov Sep 3, 2025
11cc302
Merge remote-tracking branch 'origin/sycl' into private/asachkov/drop…
AlexeySachkov Sep 3, 2025
f2ca512
XFAIL the test on Arc for now
AlexeySachkov Sep 8, 2025
105f918
Merge remote-tracking branch 'origin/sycl' into private/asachkov/drop…
AlexeySachkov Sep 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions sycl/source/detail/cg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ class CGCopyImage : public CG {
ur_image_format_t MSrcImageFormat;
ur_image_format_t MDstImageFormat;
ur_exp_image_copy_flags_t MImageCopyFlags;
ur_exp_image_copy_input_types_t MImageInputTypes;
ur_rect_offset_t MSrcOffset;
ur_rect_offset_t MDstOffset;
ur_rect_region_t MCopyExtent;
Expand All @@ -607,14 +608,15 @@ class CGCopyImage : public CG {
ur_image_desc_t DstImageDesc, ur_image_format_t SrcImageFormat,
ur_image_format_t DstImageFormat,
ur_exp_image_copy_flags_t ImageCopyFlags,
ur_exp_image_copy_input_types_t ImageInputTypes,
ur_rect_offset_t SrcOffset, ur_rect_offset_t DstOffset,
ur_rect_region_t CopyExtent, CG::StorageInitHelper CGData,
detail::code_location loc = {})
: CG(CGType::CopyImage, std::move(CGData), std::move(loc)), MSrc(Src),
MDst(Dst), MSrcImageDesc(SrcImageDesc), MDstImageDesc(DstImageDesc),
MSrcImageFormat(SrcImageFormat), MDstImageFormat(DstImageFormat),
MImageCopyFlags(ImageCopyFlags), MSrcOffset(SrcOffset),
MDstOffset(DstOffset), MCopyExtent(CopyExtent) {}
MImageCopyFlags(ImageCopyFlags), MImageInputTypes(ImageInputTypes),
MSrcOffset(SrcOffset), MDstOffset(DstOffset), MCopyExtent(CopyExtent) {}

void *getSrc() const { return MSrc; }
void *getDst() const { return MDst; }
Expand All @@ -623,6 +625,9 @@ class CGCopyImage : public CG {
ur_image_format_t getSrcFormat() const { return MSrcImageFormat; }
ur_image_format_t getDstFormat() const { return MDstImageFormat; }
ur_exp_image_copy_flags_t getCopyFlags() const { return MImageCopyFlags; }
ur_exp_image_copy_input_types_t getCopyInputTypes() const {
return MImageInputTypes;
}
ur_rect_offset_t getSrcOffset() const { return MSrcOffset; }
ur_rect_offset_t getDstOffset() const { return MDstOffset; }
ur_rect_region_t getCopyExtent() const { return MCopyExtent; }
Expand Down
1 change: 1 addition & 0 deletions sycl/source/detail/handler_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class handler_impl {
ur_image_format_t MSrcImageFormat = {};
ur_image_format_t MDstImageFormat = {};
ur_exp_image_copy_flags_t MImageCopyFlags = {};
ur_exp_image_copy_input_types_t MImageCopyInputTypes = {};

ur_rect_offset_t MSrcOffset = {};
ur_rect_offset_t MDestOffset = {};
Expand Down
10 changes: 6 additions & 4 deletions sycl/source/detail/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,8 +1570,10 @@ void MemoryManager::copy_image_bindless(
queue_impl &Queue, const void *Src, void *Dst,
const ur_image_desc_t &SrcDesc, const ur_image_desc_t &DstDesc,
const ur_image_format_t &SrcFormat, const ur_image_format_t &DstFormat,
const ur_exp_image_copy_flags_t Flags, ur_rect_offset_t SrcOffset,
ur_rect_offset_t DstOffset, ur_rect_region_t CopyExtent,
const ur_exp_image_copy_flags_t Flags,
const ur_exp_image_copy_input_types_t InputTypes,
ur_rect_offset_t SrcOffset, ur_rect_offset_t DstOffset,
ur_rect_region_t CopyExtent,
const std::vector<ur_event_handle_t> &DepEvents,
ur_event_handle_t *OutEvent) {
assert((Flags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE ||
Expand All @@ -1594,8 +1596,8 @@ void MemoryManager::copy_image_bindless(

Adapter.call<UrApiKind::urBindlessImagesImageCopyExp>(
Queue.getHandleRef(), Src, Dst, &SrcDesc, &DstDesc, &SrcFormat,
&DstFormat, &CopyRegion, Flags, DepEvents.size(), DepEvents.data(),
OutEvent);
&DstFormat, &CopyRegion, Flags, InputTypes, DepEvents.size(),
DepEvents.data(), OutEvent);
}

} // namespace detail
Expand Down
6 changes: 4 additions & 2 deletions sycl/source/detail/memory_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,10 @@ class MemoryManager {
queue_impl &Queue, const void *Src, void *Dst,
const ur_image_desc_t &SrcDesc, const ur_image_desc_t &DstDesc,
const ur_image_format_t &SrcFormat, const ur_image_format_t &DstFormat,
const ur_exp_image_copy_flags_t Flags, ur_rect_offset_t SrcOffset,
ur_rect_offset_t DstOffset, ur_rect_region_t CopyExtent,
const ur_exp_image_copy_flags_t Flags,
const ur_exp_image_copy_input_types_t InputTypes,
ur_rect_offset_t SrcOffset, ur_rect_offset_t DstOffset,
ur_rect_region_t CopyExtent,
const std::vector<ur_event_handle_t> &DepEvents,
ur_event_handle_t *OutEvent);
};
Expand Down
5 changes: 3 additions & 2 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3677,8 +3677,9 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
MemoryManager::copy_image_bindless, *MQueue, Copy->getSrc(),
Copy->getDst(), Copy->getSrcDesc(), Copy->getDstDesc(),
Copy->getSrcFormat(), Copy->getDstFormat(), Copy->getCopyFlags(),
Copy->getSrcOffset(), Copy->getDstOffset(), Copy->getCopyExtent(),
std::move(RawEvents), Event);
Copy->getCopyInputTypes(), Copy->getSrcOffset(),
Copy->getDstOffset(), Copy->getCopyExtent(), std::move(RawEvents),
Event);
Result != UR_RESULT_SUCCESS)
return Result;

Expand Down
132 changes: 82 additions & 50 deletions sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,16 @@ fill_image_desc(const ext::oneapi::experimental::image_descriptor &ImgDesc) {
return UrDesc;
}

static void
fill_copy_args(detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
const ext::oneapi::experimental::image_descriptor &DestImgDesc,
ur_exp_image_copy_flags_t ImageCopyFlags, size_t SrcPitch,
size_t DestPitch, sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0},
sycl::range<3> DestOffset = {0, 0, 0},
sycl::range<3> DestExtent = {0, 0, 0},
sycl::range<3> CopyExtent = {0, 0, 0}) {
static void fill_copy_args(
detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
const ext::oneapi::experimental::image_descriptor &DestImgDesc,
ur_exp_image_copy_flags_t ImageCopyFlags,
ur_exp_image_copy_input_types_t ImageCopyInputTypes, size_t SrcPitch,
size_t DestPitch, sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0}, sycl::range<3> DestOffset = {0, 0, 0},
sycl::range<3> DestExtent = {0, 0, 0},
sycl::range<3> CopyExtent = {0, 0, 0}) {
SrcImgDesc.verify();
DestImgDesc.verify();

Expand All @@ -262,18 +262,29 @@ fill_copy_args(detail::handler_impl *impl,
auto ZCopyExtentComponent = detail::fill_image_type(SrcImgDesc, UrSrcDesc);
detail::fill_image_type(DestImgDesc, UrDestDesc);

impl->MSrcOffset = {SrcOffset[0], SrcOffset[1], SrcOffset[2]};
impl->MDestOffset = {DestOffset[0], DestOffset[1], DestOffset[2]};
// ur_rect_offset_t and ur_rect_offset_t which represent image offsets and
// copy extents expect that X-axis offset and region width are specified in
// bytes rather then in elements.
auto SrcPixelSize =
SrcImgDesc.num_channels * detail::get_channel_size(SrcImgDesc);
auto DestPixelSize =
DestImgDesc.num_channels * detail::get_channel_size(DestImgDesc);

impl->MSrcOffset = {SrcOffset[0] * SrcPixelSize, SrcOffset[1], SrcOffset[2]};
impl->MDestOffset = {DestOffset[0] * DestPixelSize, DestOffset[1],
DestOffset[2]};
impl->MSrcImageDesc = UrSrcDesc;
impl->MDstImageDesc = UrDestDesc;
impl->MSrcImageFormat = UrSrcFormat;
impl->MDstImageFormat = UrDestFormat;
impl->MImageCopyFlags = ImageCopyFlags;
impl->MImageCopyInputTypes = ImageCopyInputTypes;

if (CopyExtent.size() != 0) {
impl->MCopyExtent = {CopyExtent[0], CopyExtent[1], CopyExtent[2]};
impl->MCopyExtent = {CopyExtent[0] * SrcPixelSize, CopyExtent[1],
CopyExtent[2]};
} else {
impl->MCopyExtent = {SrcImgDesc.width, SrcImgDesc.height,
impl->MCopyExtent = {SrcImgDesc.width * SrcPixelSize, SrcImgDesc.height,
ZCopyExtentComponent};
}

Expand All @@ -297,6 +308,7 @@ static void
fill_copy_args(detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &Desc,
ur_exp_image_copy_flags_t ImageCopyFlags,
ur_exp_image_copy_input_types_t ImageCopyInputTypes,
sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0},
sycl::range<3> DestOffset = {0, 0, 0},
Expand All @@ -306,29 +318,32 @@ fill_copy_args(detail::handler_impl *impl,
size_t SrcPitch = SrcExtent[0] * Desc.num_channels * get_channel_size(Desc);
size_t DestPitch = DestExtent[0] * Desc.num_channels * get_channel_size(Desc);

fill_copy_args(impl, Desc, Desc, ImageCopyFlags, SrcPitch, DestPitch,
SrcOffset, SrcExtent, DestOffset, DestExtent, CopyExtent);
fill_copy_args(impl, Desc, Desc, ImageCopyFlags, ImageCopyInputTypes,
SrcPitch, DestPitch, SrcOffset, SrcExtent, DestOffset,
DestExtent, CopyExtent);
}

static void
fill_copy_args(detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &Desc,
ur_exp_image_copy_flags_t ImageCopyFlags, size_t SrcPitch,
size_t DestPitch, sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0},
sycl::range<3> DestOffset = {0, 0, 0},
sycl::range<3> DestExtent = {0, 0, 0},
sycl::range<3> CopyExtent = {0, 0, 0}) {
static void fill_copy_args(
detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &Desc,
ur_exp_image_copy_flags_t ImageCopyFlags,
ur_exp_image_copy_input_types_t ImageCopyInputTypes, size_t SrcPitch,
size_t DestPitch, sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0}, sycl::range<3> DestOffset = {0, 0, 0},
sycl::range<3> DestExtent = {0, 0, 0},
sycl::range<3> CopyExtent = {0, 0, 0}) {

fill_copy_args(impl, Desc, Desc, ImageCopyFlags, SrcPitch, DestPitch,
SrcOffset, SrcExtent, DestOffset, DestExtent, CopyExtent);
fill_copy_args(impl, Desc, Desc, ImageCopyFlags, ImageCopyInputTypes,
SrcPitch, DestPitch, SrcOffset, SrcExtent, DestOffset,
DestExtent, CopyExtent);
}

static void
fill_copy_args(detail::handler_impl *impl,
const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
const ext::oneapi::experimental::image_descriptor &DestImgDesc,
ur_exp_image_copy_flags_t ImageCopyFlags,
ur_exp_image_copy_input_types_t ImageCopyInputTypes,
sycl::range<3> SrcOffset = {0, 0, 0},
sycl::range<3> SrcExtent = {0, 0, 0},
sycl::range<3> DestOffset = {0, 0, 0},
Expand All @@ -340,9 +355,9 @@ fill_copy_args(detail::handler_impl *impl,
size_t DestPitch =
DestExtent[0] * DestImgDesc.num_channels * get_channel_size(DestImgDesc);

fill_copy_args(impl, SrcImgDesc, DestImgDesc, ImageCopyFlags, SrcPitch,
DestPitch, SrcOffset, SrcExtent, DestOffset, DestExtent,
CopyExtent);
fill_copy_args(impl, SrcImgDesc, DestImgDesc, ImageCopyFlags,
ImageCopyInputTypes, SrcPitch, DestPitch, SrcOffset, SrcExtent,
DestOffset, DestExtent, CopyExtent);
}

} // namespace detail
Expand Down Expand Up @@ -895,8 +910,8 @@ event handler::finalize() {
CommandGroup.reset(new detail::CGCopyImage(
MSrcPtr, MDstPtr, impl->MSrcImageDesc, impl->MDstImageDesc,
impl->MSrcImageFormat, impl->MDstImageFormat, impl->MImageCopyFlags,
impl->MSrcOffset, impl->MDestOffset, impl->MCopyExtent,
std::move(impl->CGData), MCodeLoc));
impl->MImageCopyInputTypes, impl->MSrcOffset, impl->MDestOffset,
impl->MCopyExtent, std::move(impl->CGData), MCodeLoc));
break;
case detail::CGType::SemaphoreWait:
CommandGroup.reset(
Expand Down Expand Up @@ -1612,7 +1627,8 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE);
UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1630,7 +1646,8 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE, SrcOffset,
UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE, SrcOffset,
SrcExtent, DestOffset, {0, 0, 0}, CopyExtent);

setType(detail::CGType::CopyImage);
Expand All @@ -1647,7 +1664,8 @@ void handler::ext_oneapi_copy(
MDstPtr = Dest;

detail::fill_copy_args(get_impl(), SrcImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST);
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1666,7 +1684,8 @@ void handler::ext_oneapi_copy(
MDstPtr = Dest;

detail::fill_copy_args(get_impl(), SrcImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST, SrcOffset,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, SrcOffset,
{0, 0, 0}, DestOffset, DestExtent, CopyExtent);

setType(detail::CGType::CopyImage);
Expand Down Expand Up @@ -1695,11 +1714,13 @@ void handler::ext_oneapi_copy(
Desc.width * Desc.num_channels * detail::get_channel_size(Desc);

if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) {
detail::fill_copy_args(get_impl(), Desc, ImageCopyFlags, HostRowPitch,
DeviceRowPitch);
detail::fill_copy_args(get_impl(), Desc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
HostRowPitch, DeviceRowPitch);
} else if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) {
detail::fill_copy_args(get_impl(), Desc, ImageCopyFlags, DeviceRowPitch,
HostRowPitch);
detail::fill_copy_args(get_impl(), Desc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
DeviceRowPitch, HostRowPitch);
} else {
throw sycl::exception(make_error_code(errc::invalid),
"Copy Error: This copy function only performs host "
Expand Down Expand Up @@ -1736,10 +1757,12 @@ void handler::ext_oneapi_copy(
// Fill the host extent based on the type of copy.
if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) {
detail::fill_copy_args(get_impl(), DeviceImgDesc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
HostRowPitch, DeviceRowPitch, SrcOffset, HostExtent,
DestOffset, {0, 0, 0}, CopyExtent);
} else if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) {
detail::fill_copy_args(get_impl(), DeviceImgDesc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
DeviceRowPitch, HostRowPitch, SrcOffset, {0, 0, 0},
DestOffset, HostExtent, CopyExtent);
} else {
Expand All @@ -1764,7 +1787,8 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE);
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_IMAGE);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1784,8 +1808,10 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, SrcOffset,
{0, 0, 0}, DestOffset, {0, 0, 0}, CopyExtent);
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_IMAGE,
SrcOffset, {0, 0, 0}, DestOffset, {0, 0, 0},
CopyExtent);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1803,7 +1829,8 @@ void handler::ext_oneapi_copy(
MDstPtr = Dest;

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, 0,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, 0,
DestRowPitch);

setType(detail::CGType::CopyImage);
Expand All @@ -1824,7 +1851,8 @@ void handler::ext_oneapi_copy(
MDstPtr = Dest;

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, 0,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, 0,
DestRowPitch, SrcOffset, {0, 0, 0}, DestOffset,
{0, 0, 0}, CopyExtent);

Expand All @@ -1844,8 +1872,9 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, SrcRowPitch,
0);
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE,
SrcRowPitch, 0);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1865,9 +1894,10 @@ void handler::ext_oneapi_copy(
MDstPtr = reinterpret_cast<void *>(Dest.raw_handle);

detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc,
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, SrcRowPitch,
0, SrcOffset, {0, 0, 0}, DestOffset, {0, 0, 0},
CopyExtent);
UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE,
SrcRowPitch, 0, SrcOffset, {0, 0, 0}, DestOffset,
{0, 0, 0}, CopyExtent);

setType(detail::CGType::CopyImage);
}
Expand All @@ -1894,6 +1924,7 @@ void handler::ext_oneapi_copy(
if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE ||
ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST) {
detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
SrcRowPitch, DestRowPitch);
} else {
throw sycl::exception(make_error_code(errc::invalid),
Expand Down Expand Up @@ -1923,6 +1954,7 @@ void handler::ext_oneapi_copy(
if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE ||
ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST) {
detail::fill_copy_args(get_impl(), SrcImgDesc, DestImgDesc, ImageCopyFlags,
UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
SrcRowPitch, DestRowPitch, SrcOffset, {0, 0, 0},
DestOffset, {0, 0, 0}, CopyExtent);
} else {
Expand Down
Loading
Loading