From 1618700c5a042ecedb3fe3a93d7c90d3b4bd3001 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 7 Nov 2024 14:26:31 -0800 Subject: [PATCH] Workaround buggy P2P ROCm copy on windows (#7466) This enables the workaround code only for windows which should help windows users with muliple AMD GPUs --- llama/make/Makefile.rocm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llama/make/Makefile.rocm b/llama/make/Makefile.rocm index 136ce015..4ab176b4 100644 --- a/llama/make/Makefile.rocm +++ b/llama/make/Makefile.rocm @@ -92,6 +92,12 @@ GPU_COMPILER_CUFLAGS = \ -Wno-unused-result \ -I. +# Workaround buggy P2P copy on some windows multi-GPU setups +# This workaround breaks linux systems with small system RAM, so only enable on windows +ifeq ($(OS),windows) + GPU_COMPILER_CUFLAGS += -DGGML_CUDA_NO_PEER_COPY=1 +endif + include make/gpu.make # Adjust the rules from gpu.make to handle the ROCm dependencies properly