Skip to content

Commit db400a6

Browse files
committed
Fix compilation errors with MUSA
1 parent fc7f195 commit db400a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,14 +2610,14 @@ static bool is_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx,
26102610

26112611
static void update_cuda_graph_executable(ggml_backend_cuda_context * cuda_ctx) {
26122612

2613-
#if CUDART_VERSION >= 12000
2614-
cudaGraphExecUpdateResultInfo result_info;
2615-
cudaError_t stat = cudaGraphExecUpdate(cuda_ctx->cuda_graph->instance, cuda_ctx->cuda_graph->graph, &result_info);
2616-
#else
2613+
#if (CUDART_VERSION < 12000 || defined(__HIP_PLATFORM_AMD__))
26172614
cudaGraphNode_t errorNode;
26182615
cudaGraphExecUpdateResult result_info;
26192616
cudaError_t stat = cudaGraphExecUpdate(cuda_ctx->cuda_graph->instance, cuda_ctx->cuda_graph->graph, &errorNode, &result_info);
2620-
#endif // CUDART_VERSION >= 12000
2617+
#else
2618+
cudaGraphExecUpdateResultInfo result_info;
2619+
cudaError_t stat = cudaGraphExecUpdate(cuda_ctx->cuda_graph->instance, cuda_ctx->cuda_graph->graph, &result_info);
2620+
#endif // (CUDART_VERSION < 12000 || defined(__HIP_PLATFORM_AMD__))
26212621

26222622
if (stat == cudaErrorGraphExecUpdateFailure) {
26232623
#ifndef NDEBUG

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
#define cudaGraphExecDestroy musaGraphExecDestroy
120120
#define cudaGraphExec_t musaGraphExec_t
121121
#define cudaGraphExecUpdate musaGraphExecUpdate
122-
#define cudaGraphExecUpdateResult musaGraphExecUpdateResult
122+
#define cudaGraphExecUpdateResultInfo musaGraphExecUpdateResult
123123
#define cudaGraphGetNodes musaGraphGetNodes
124124
#define cudaGraphInstantiate musaGraphInstantiate
125125
#define cudaGraphKernelNodeGetParams musaGraphKernelNodeGetParams

0 commit comments

Comments
 (0)