Skip to content

Commit 1bcfc50

Browse files
[UR][L0] Simplified to two cases.
Signed-off-by: Zhang, Winston <[email protected]>
1 parent b25cf93 commit 1bcfc50

File tree

1 file changed

+1
-17
lines changed
  • unified-runtime/source/adapters/level_zero

1 file changed

+1
-17
lines changed

unified-runtime/source/adapters/level_zero/image.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -560,25 +560,9 @@ ur_result_t urBindlessImagesImageCopyExp(
560560
(ZeCommandList, pDst, &ZeDstRegion, DstRowPitch, DstSlicePitch,
561561
pSrc, &ZeSrcRegion, SrcRowPitch, SrcSlicePitch, ZeEvent,
562562
WaitList.Length, WaitList.ZeEventList));
563-
} else if (pSrcImageDesc->rowPitch == 0 && pDstImageDesc->rowPitch == 0) {
564-
// Copy from Non-USM memory to Non-USM memory
565-
ze_image_region_t DstRegion;
566-
UR_CALL(getImageRegionHelper(ZeImageDesc, &pCopyRegion->dstOffset,
567-
&pCopyRegion->copyExtent, DstRegion));
568-
ze_image_region_t SrcRegion;
569-
UR_CALL(getImageRegionHelper(ZeImageDesc, &pCopyRegion->srcOffset,
570-
&pCopyRegion->copyExtent, SrcRegion));
571-
auto *UrImageDst = static_cast<_ur_image *>(pDst);
572-
auto *UrImageSrc = static_cast<const _ur_image *>(pSrc);
573-
ZE2UR_CALL(zeCommandListAppendImageCopyRegion,
574-
(ZeCommandList, UrImageDst->ZeImage, UrImageSrc->ZeImage,
575-
&DstRegion, &SrcRegion, ZeEvent, WaitList.Length,
576-
WaitList.ZeEventList));
577-
578563
} else {
564+
// Copy from Non-USM memory to Non-USM memory
579565
// Copy from Non-USM/pitched USM memory to pitched USM/Non-USM memory
580-
// Note: This might be the same procedure as pitched USM to
581-
// pitched USM. Need further testing.
582566
ze_image_region_t DstRegion;
583567
UR_CALL(getImageRegionHelper(ZeImageDesc, &pCopyRegion->dstOffset,
584568
&pCopyRegion->copyExtent, DstRegion));

0 commit comments

Comments
 (0)