You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how there's no explicit API memcpy, as we should just be able to use a CPU-based memcpy because this memory is readable on the CPU. This appears to not be true, as removing our memcpy optimization and always using an explicit zeCommandListAppendMemoryCopy with host memory does return the correct result.
@kballeda@pengtu Can you explain what the issue is here? Shouldn't it be possible to read zeMemAllocHost-allocated using a simple CPU-based memcpy after having synchronized the command queue we issued a kernel on?
Also note that on PVC we encounter a command list submission failure first, but let's debug the memcpy problem first.
Note how there's no explicit API memcpy, as we should just be able to use a CPU-based memcpy because this memory is readable on the CPU. This appears to not be true, as removing our memcpy optimization and always using an explicit zeCommandListAppendMemoryCopy with host memory does return the correct result.
@kballeda@pengtu Can you explain what the issue is here? Shouldn't it be possible to read zeMemAllocHost-allocated using a simple CPU-based memcpy after having synchronized the command queue we issued a kernel on?
Also note that on PVC we encounter a command list submission failure first, but let's debug the memcpy problem first.
@maleadt File a ticket on intel compute runtime on this. We will internally follow up on this.
The broadcast reproducer from the original report works on current main (host USM is now made resident, and drivers have moved on).
The memset(pointer(a)) case was our bug, not the driver's: ZePtr kernel arguments were converted to Ptr, which lowers to an addrspace(0) pointer. SPIR-V treats that as private memory, so the store never reached the buffer, for device and shared buffers too. That also explains the C reproducer, which used the same SPIR-V. Fixed in #711 by passing them as LLVMPtr{T,AS.CrossWorkgroup}.
Activity
[-]HostBuffer broadcast is broken[/-][+]HostBuffer use in kernels is broken[/+][-]HostBuffer use in kernels is broken[/-][+]Copying HostBuffer is broken[/+]maleadt commentedon Aug 13, 2024
This apparently extends to all uses of host buffers:
The API trace looks correct though:
Note how there's no explicit API memcpy, as we should just be able to use a CPU-based
memcpybecause this memory is readable on the CPU. This appears to not be true, as removing ourmemcpyoptimization and always using an explicitzeCommandListAppendMemoryCopywith host memory does return the correct result.C reproducer:
This reads
kernel.spv, attached here: kernel.zip@kballeda @pengtu Can you explain what the issue is here? Shouldn't it be possible to read
zeMemAllocHost-allocated using a simple CPU-basedmemcpyafter having synchronized the command queue we issued a kernel on?Also note that on PVC we encounter a command list submission failure first, but let's debug the
memcpyproblem first.kballeda commentedon Aug 28, 2024
@maleadt File a ticket on intel compute runtime on this. We will internally follow up on this.
maleadt commentedon Oct 19, 2026
The broadcast reproducer from the original report works on current main (host USM is now made resident, and drivers have moved on).
The
memset(pointer(a))case was our bug, not the driver's:ZePtrkernel arguments were converted toPtr, which lowers to an addrspace(0) pointer. SPIR-V treats that as private memory, so the store never reached the buffer, for device and shared buffers too. That also explains the C reproducer, which used the same SPIR-V. Fixed in #711 by passing them asLLVMPtr{T,AS.CrossWorkgroup}.