CUDA IPC vs NVSHMEM for shared memory between applications

There is a CUDA sample code that demonstrates how. There are also various questions on forums that cover the topics. You can find those with a bit of searching. Here is one. Here is another.