Skip to content

Commit

Permalink
Use cublasGemmEx instead of cublasSgemm in ggml
Browse files Browse the repository at this point in the history
Removes the latter symbol from our dependencies.
  • Loading branch information
mrdomino committed Dec 11, 2023
1 parent 4fb0813 commit 252a255
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions llama.cpp/ggml-cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -6762,11 +6762,13 @@ inline void ggml_cuda_op_mul_mat_cublas(

CUBLAS_CHECK(cublasSetStream(g_cublas_handles[id], stream));
CUBLAS_CHECK(
cublasSgemm(g_cublas_handles[id], CUBLAS_OP_T, CUBLAS_OP_N,
cublasGemmEx(g_cublas_handles[id], CUBLAS_OP_T, CUBLAS_OP_N,
row_diff, src1_ncols, ne10,
&alpha, src0_ddf_i, ne00,
src1_ddf_i, ne10,
&beta, dst_dd_i, ldc));
&alpha, src0_ddf_i, CUDA_R_32F, ne00,
src1_ddf_i, CUDA_R_32F, ne10,
&beta, dst_dd_i, CUDA_R_32F, ldc,
CUBLAS_COMPUTE_32F,
CUBLAS_GEMM_DEFAULT_TENSOR_OP));

if (src0_as != 0) {
ggml_cuda_pool_free(src0_ddq_as_f32, src0_as);
Expand Down

0 comments on commit 252a255

Please sign in to comment.