Skip to content

Commit 1001967

Browse files
committed
musa: workaround for Guilty Lockup in cleaning src0
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent 958367b commit 1001967

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: ggml/src/ggml-cuda.cu

+5
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,12 @@ static void ggml_cuda_op_mul_mat(
14841484
const size_t nbytes_data = ggml_nbytes(src0);
14851485
const size_t nbytes_padding = ggml_row_size(src0->type, MATRIX_ROW_PADDING - ne00 % MATRIX_ROW_PADDING);
14861486
dev[id].src0_dd = dev[id].src0_dd_alloc.alloc(ctx.pool(id), nbytes_data + nbytes_padding);
1487+
// TODO: remove this for MUSA once the Guilty Lockup issue is resolved
1488+
#ifndef GGML_USE_MUSA
14871489
CUDA_CHECK(cudaMemsetAsync(dev[id].src0_dd, 0, nbytes_data + nbytes_padding, stream));
1490+
#else // GGML_USE_MUSA
1491+
CUDA_CHECK(cudaMemsetAsync(dev[id].src0_dd + nbytes_data , 0, nbytes_padding, stream));
1492+
#endif // !GGML_USE_MUSA
14881493
}
14891494

14901495
// If src0 is on a temporary compute buffer (partial offloading) there may be some padding that needs to be cleared:

0 commit comments

Comments
 (0)