Skip to content

Commit 699ea6d

Browse files
committed
cuda : fix disabling device with --tensor-split 1,0
1 parent f28af0d commit 699ea6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ggml-cuda.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7117,6 +7117,9 @@ static void ggml_cuda_op_mul_mat(
71177117

71187118
CUDA_CHECK(ggml_cuda_set_device(g_main_device));
71197119
for (int64_t id = 0; id < g_device_count; ++id) {
7120+
if (g_tensor_split[id] >= (id + 1 < g_device_count ? g_tensor_split[id + 1] : 1.0f)) {
7121+
continue;
7122+
}
71207123
for (int64_t is = 0; is < is_max; ++is) {
71217124
CUDA_CHECK(cudaStreamWaitEvent(g_cudaStreams[g_main_device][0], src0_extra->events[id][is], 0));
71227125
}

0 commit comments

Comments
 (0)