diff --git a/ggml-cuda.cu b/ggml-cuda.cu index bdbcca0ca..e4d496498 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -7117,6 +7117,9 @@ static void ggml_cuda_op_mul_mat( CUDA_CHECK(ggml_cuda_set_device(g_main_device)); for (int64_t id = 0; id < g_device_count; ++id) { + if (g_tensor_split[id] >= (id + 1 < g_device_count ? g_tensor_split[id + 1] : 1.0f)) { + continue; + } for (int64_t is = 0; is < is_max; ++is) { CUDA_CHECK(cudaStreamWaitEvent(g_cudaStreams[g_main_device][0], src0_extra->events[id][is], 0)); }