Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Unified Shared Memory

buptZhang
Beginner
996 Views

Explicit data movement with USM , Whether one process can move data from host to device and another process move data from device to host?

 

0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
914 Views

Hi,


Thanks for posting in Intel communities.


By default, when using explicit data movement in SYCL, a single process will be used for both copying data from the host to the device and from the device to the host for an SYCL Queue.


If we want to use two different processes, then each process should have its own execution context and SYCL queue(s) associated with the device(s) it is using. Each process will explicitly copy data between the host and device(s) using the SYCL memory management functions and commands.


When multiple processes are involved, we need to ensure that they are properly synchronized to avoid race conditions and data inconsistencies.


Please refer to the below link for more details:

https://www.intel.com/content/www/us/en/docs/oneapi/optimization-guide-gpu/2023-1/unified-shared-memory-allocations.html


Also refer to the USM chapter in Data Parallel C++ Text Book by James Reinders: https://link.springer.com/chapter/10.1007/978-1-4842-5574-2_6


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
837 Views

Hi,

 

As you have mentioned (in another post) >>How to share the data in the device with two processes using SYCL queue(s) associated with the device(s) it is using

 

To share data between two processes using SYCL queues and devices, we can combine MPI with SYCL code. MPI can handle communication between the processes, while SYCL queues can facilitate communication between the host and the device.

Please refer to the below link for more details;

https://www.intel.com/content/www/us/en/developer/articles/technical/compile-and-run-mpi-programs-using-dpcpp-language.html

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
NoorjahanSk_Intel
Moderator
759 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
676 Views

Hi,


I have not heard back from you, so I will close this inquiry now. If you need further assistance, please post a new question.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply