Skip to content

Commit bb2cdc6

Browse files
committed
musa: enable MUSA graphs
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent 8733e0c commit bb2cdc6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ggml/src/ggml-cuda/vendors/musa.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define CUBLAS_OP_N MUBLAS_OP_N
1414
#define CUBLAS_OP_T MUBLAS_OP_T
1515
#define CUBLAS_STATUS_SUCCESS MUBLAS_STATUS_SUCCESS
16-
#define CUBLAS_TF32_TENSOR_OP_MATH MUBLAS_MATH_MODE_DEFAULT
16+
#define CUBLAS_TF32_TENSOR_OP_MATH MUBLAS_DEFAULT_MATH
1717
#define CUDA_R_16F MUSA_R_16F
1818
#define CUDA_R_16BF MUSA_R_16BF
1919
#define CUDA_R_32F MUSA_R_32F
@@ -29,7 +29,7 @@
2929
#define cublasSgemm mublasSgemm
3030
#define cublasStatus_t mublasStatus_t
3131
#define cublasOperation_t mublasOperation_t
32-
#define cublasGetStatusString mublasStatus_to_string
32+
#define cublasGetStatusString mublasGetStatusString
3333
#define cudaDataType_t musaDataType_t
3434
#define cudaDeviceCanAccessPeer musaDeviceCanAccessPeer
3535
#define cudaDeviceDisablePeerAccess musaDeviceDisablePeerAccess

ggml/src/ggml-musa/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ if (MUSAToolkit_FOUND)
6767
add_compile_definitions(GGML_USE_MUSA)
6868
add_compile_definitions(GGML_CUDA_PEER_MAX_BATCH_SIZE=${GGML_CUDA_PEER_MAX_BATCH_SIZE})
6969

70+
if (GGML_CUDA_GRAPHS)
71+
add_compile_definitions(GGML_CUDA_USE_GRAPHS)
72+
endif()
73+
7074
if (GGML_CUDA_FORCE_MMQ)
7175
add_compile_definitions(GGML_CUDA_FORCE_MMQ)
7276
endif()

0 commit comments

Comments
 (0)