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:

1cudaMemcpyAsync(host_dst, host_src, size, cudaMemcpyHostToHost);

results in the following migrated SYCL* code:

1/*
2DPCT1124:0: cudaMemcpyAsync is migrated to asynchronous memcpy API. While the
3origin API might be synchronous, it depends on the type of operand memory, so
4you may need to call wait() on event return by memcpy API to ensure
5synchronization behavior.
6*/
7dpct::get_in_order_queue().memcpy(host_dst, host_src, size);

which needs to be rewritten to:

1dpct::get_in_order_queue().memcpy(host_dst, host_src, size).wait();