Visible to Intel only — GUID: GUID-D87D5CBD-2A5F-47A8-9B30-0C20FDD40F3C
Visible to Intel only — GUID: GUID-D87D5CBD-2A5F-47A8-9B30-0C20FDD40F3C
DPCT1124
Message
<API name> is migrated to asynchronous memcpy API. While the origin API might be synchronous, it depends on the type of operand memory, so you may need to call wait() on event return by memcpy API to ensure synchronization behavior.
Detailed Help
Some CUDA* asynchronous API might be synchronous with respect to host. For example, asynchronous memcpy API might be synchronous in the following 3 cases: data transfers between device memory and pageable host memory, data transfers between host memory, and data transfers involving pinned memory.
Suggestions to Fix
For example, this original CUDA code:
cudaMemcpyAsync(host_dst, host_src, size, cudaMemcpyHostToHost);
results in the following migrated SYCL* code:
/*
DPCT1124:0: cudaMemcpyAsync is migrated to asynchronous memcpy API. While the
origin API might be synchronous, it depends on the type of operand memory, so
you may need to call wait() on event return by memcpy API to ensure
synchronization behavior.
*/
dpct::get_in_order_queue().memcpy(host_dst, host_src, size);
which needs to be rewritten to:
dpct::get_in_order_queue().memcpy(host_dst, host_src, size).wait();