Support CudaIpc connection within a single process (#593)

* Allow CudaIpc connection between GPUs in a single process
* Added an example of connection in a single process
* Minor interface updates

---------

Co-authored-by: Binyang Li <binyli@microsoft.com>
This commit is contained in:
Changho Hwang
2025-08-02 12:59:36 +08:00
committed by GitHub
parent c3b47c59fd
commit c580e4c503
13 changed files with 262 additions and 49 deletions

View File

@@ -0,0 +1,22 @@
CUDA_HOME ?= /usr/local/cuda
ROCM_HOME ?= /opt/rocm
# Check if nvcc exists, otherwise use hipcc
ifeq ($(shell which $(CUDA_HOME)/bin/nvcc 2>/dev/null),)
COMPILER := $(ROCM_HOME)/bin/hipcc
ARCH_FLAG := -D__HIP_PLATFORM_AMD__=1
else
COMPILER := $(CUDA_HOME)/bin/nvcc
ARCH_FLAG := -arch=native
endif
TARGET = gpu_ping_pong
SRC = gpu_ping_pong.cu
all: $(TARGET)
$(TARGET): $(SRC)
$(COMPILER) $(ARCH_FLAG) -o $@ $< -lmscclpp
clean:
rm -f $(TARGET)