@@ -704,8 +704,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyKernelWithGA(v
704704 void *srcPtr,
705705 NEO::GraphicsAllocation *srcPtrAlloc,
706706 uint64_t srcOffset,
707- uint32_t size,
708- uint32_t elementSize,
707+ uint64_t size,
708+ uint64_t elementSize,
709709 Builtin builtin,
710710 ze_event_handle_t hSignalEvent) {
711711
@@ -727,12 +727,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyKernelWithGA(v
727727 builtinFunction->setArgBufferWithAlloc (0u , *reinterpret_cast <uintptr_t *>(dstPtr), dstPtrAlloc);
728728 builtinFunction->setArgBufferWithAlloc (1u , *reinterpret_cast <uintptr_t *>(srcPtr), srcPtrAlloc);
729729
730- uint32_t elems = size / elementSize;
730+ uint64_t elems = size / elementSize;
731731 builtinFunction->setArgumentValue (2 , sizeof (elems), &elems);
732732 builtinFunction->setArgumentValue (3 , sizeof (dstOffset), &dstOffset);
733733 builtinFunction->setArgumentValue (4 , sizeof (srcOffset), &srcOffset);
734734
735- uint32_t groups = ( size + ((groupSizeX * elementSize) - 1 )) / (groupSizeX * elementSize);
735+ uint32_t groups = static_cast < uint32_t >(( size + ((static_cast < uint64_t >( groupSizeX) * elementSize) - 1 )) / (static_cast < uint64_t >( groupSizeX) * elementSize) );
736736 ze_group_count_t dispatchFuncArgs{groups, 1u , 1u };
737737
738738 return CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelSplit (builtinFunction->toHandle (), &dispatchFuncArgs, hSignalEvent);
@@ -744,7 +744,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlit(uintptr_t
744744 uint64_t dstOffset, uintptr_t srcPtr,
745745 NEO::GraphicsAllocation *srcPtrAlloc,
746746 uint64_t srcOffset,
747- uint32_t size) {
747+ uint64_t size) {
748748 dstOffset += ptrDiff<uintptr_t >(dstPtr, dstPtrAlloc->getGpuAddress ());
749749 srcOffset += ptrDiff<uintptr_t >(srcPtr, srcPtrAlloc->getGpuAddress ());
750750
@@ -925,12 +925,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
925925 ret = isCopyOnly () ? appendMemoryCopyBlit (dstAllocationStruct.alignedAllocationPtr ,
926926 dstAllocationStruct.alloc , dstAllocationStruct.offset ,
927927 srcAllocationStruct.alignedAllocationPtr ,
928- srcAllocationStruct.alloc , srcAllocationStruct.offset , static_cast < uint32_t >( leftSize) )
928+ srcAllocationStruct.alloc , srcAllocationStruct.offset , leftSize)
929929 : appendMemoryCopyKernelWithGA (reinterpret_cast <void *>(&dstAllocationStruct.alignedAllocationPtr ),
930930 dstAllocationStruct.alloc , dstAllocationStruct.offset ,
931931 reinterpret_cast <void *>(&srcAllocationStruct.alignedAllocationPtr ),
932932 srcAllocationStruct.alloc , srcAllocationStruct.offset ,
933- static_cast < uint32_t >( leftSize), 1 ,
933+ leftSize, 1UL ,
934934 Builtin::CopyBufferToBufferSide,
935935 hSignalEvent);
936936 }
@@ -939,13 +939,13 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
939939 ret = isCopyOnly () ? appendMemoryCopyBlit (dstAllocationStruct.alignedAllocationPtr ,
940940 dstAllocationStruct.alloc , leftSize + dstAllocationStruct.offset ,
941941 srcAllocationStruct.alignedAllocationPtr ,
942- srcAllocationStruct.alloc , leftSize + srcAllocationStruct.offset , static_cast < uint32_t >( middleSizeBytes) )
942+ srcAllocationStruct.alloc , leftSize + srcAllocationStruct.offset , middleSizeBytes)
943943 : appendMemoryCopyKernelWithGA (reinterpret_cast <void *>(&dstAllocationStruct.alignedAllocationPtr ),
944944 dstAllocationStruct.alloc , leftSize + dstAllocationStruct.offset ,
945945 reinterpret_cast <void *>(&srcAllocationStruct.alignedAllocationPtr ),
946946 srcAllocationStruct.alloc , leftSize + srcAllocationStruct.offset ,
947- static_cast < uint32_t >( middleSizeBytes) ,
948- static_cast < uint32_t >( middleElSize) ,
947+ middleSizeBytes,
948+ middleElSize,
949949 Builtin::CopyBufferToBufferMiddle,
950950 hSignalEvent);
951951 }
@@ -954,12 +954,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
954954 ret = isCopyOnly () ? appendMemoryCopyBlit (dstAllocationStruct.alignedAllocationPtr ,
955955 dstAllocationStruct.alloc , leftSize + middleSizeBytes + dstAllocationStruct.offset ,
956956 srcAllocationStruct.alignedAllocationPtr ,
957- srcAllocationStruct.alloc , leftSize + middleSizeBytes + srcAllocationStruct.offset , static_cast < uint32_t >( rightSize) )
957+ srcAllocationStruct.alloc , leftSize + middleSizeBytes + srcAllocationStruct.offset , rightSize)
958958 : appendMemoryCopyKernelWithGA (reinterpret_cast <void *>(&dstAllocationStruct.alignedAllocationPtr ),
959959 dstAllocationStruct.alloc , leftSize + middleSizeBytes + dstAllocationStruct.offset ,
960960 reinterpret_cast <void *>(&srcAllocationStruct.alignedAllocationPtr ),
961961 srcAllocationStruct.alloc , leftSize + middleSizeBytes + srcAllocationStruct.offset ,
962- static_cast < uint32_t >( rightSize), 1u ,
962+ rightSize, 1UL ,
963963 Builtin::CopyBufferToBufferSide,
964964 hSignalEvent);
965965 }
0 commit comments