mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-28 15:18:26 +01:00
musa: workaround for Guilty Lockup in cleaning src0 (#10042)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
This commit is contained in:
parent
8125e6cbfc
commit
524afeec9d
@ -1484,7 +1484,12 @@ static void ggml_cuda_op_mul_mat(
|
|||||||
const size_t nbytes_data = ggml_nbytes(src0);
|
const size_t nbytes_data = ggml_nbytes(src0);
|
||||||
const size_t nbytes_padding = ggml_row_size(src0->type, MATRIX_ROW_PADDING - ne00 % MATRIX_ROW_PADDING);
|
const size_t nbytes_padding = ggml_row_size(src0->type, MATRIX_ROW_PADDING - ne00 % MATRIX_ROW_PADDING);
|
||||||
dev[id].src0_dd = dev[id].src0_dd_alloc.alloc(ctx.pool(id), nbytes_data + nbytes_padding);
|
dev[id].src0_dd = dev[id].src0_dd_alloc.alloc(ctx.pool(id), nbytes_data + nbytes_padding);
|
||||||
|
// TODO: remove this for MUSA once the Guilty Lockup issue is resolved
|
||||||
|
#ifndef GGML_USE_MUSA
|
||||||
CUDA_CHECK(cudaMemsetAsync(dev[id].src0_dd, 0, nbytes_data + nbytes_padding, stream));
|
CUDA_CHECK(cudaMemsetAsync(dev[id].src0_dd, 0, nbytes_data + nbytes_padding, stream));
|
||||||
|
#else // GGML_USE_MUSA
|
||||||
|
CUDA_CHECK(cudaMemsetAsync(dev[id].src0_dd + nbytes_data, 0, nbytes_padding, stream));
|
||||||
|
#endif // !GGML_USE_MUSA
|
||||||
}
|
}
|
||||||
|
|
||||||
// If src0 is on a temporary compute buffer (partial offloading) there may be some padding that needs to be cleared:
|
// If src0 is on a temporary compute buffer (partial offloading) there may be some padding that needs to be cleared:
|
||||||
|
Loading…
Reference in New Issue
Block a user