@@ -2075,7 +2075,7 @@ static void ggml_backend_cann_synchronize(ggml_backend_t backend) {
20752075 ACL_CHECK (aclrtSynchronizeStream (cann_ctx->stream ()));
20762076}
20772077
2078- #ifdef CANN_GRAPH
2078+ #ifdef USE_ACL_GRAPH
20792079/* *
20802080 * @brief Populate the internal CANN graph node properties from the ggml computation graph.
20812081 *
@@ -2171,7 +2171,7 @@ static bool is_cann_graph_update_required(ggml_backend_cann_context * cann_ctx,
21712171 }
21722172 return false ;
21732173}
2174- #endif // CANN_GRAPH
2174+ #endif // USE_ACL_GRAPH
21752175
21762176/* *
21772177 * @brief Evaluate the computation graph and optionally capture or execute it using CANN graph API.
@@ -2188,15 +2188,15 @@ static bool is_cann_graph_update_required(ggml_backend_cann_context * cann_ctx,
21882188 */
21892189static void evaluate_and_capture_cann_graph (ggml_backend_cann_context * cann_ctx, ggml_cgraph * cgraph,
21902190 bool & use_cann_graph, bool & cann_graph_update_required) {
2191- #ifdef CANN_GRAPH
2191+ #ifdef USE_ACL_GRAPH
21922192 if (use_cann_graph && cann_graph_update_required) {
21932193 if (cann_ctx->cann_graph ->graph != nullptr ) {
21942194 ACL_CHECK (aclmdlRIDestroy (cann_ctx->cann_graph ->graph ));
21952195 cann_ctx->cann_graph ->graph = nullptr ;
21962196 }
21972197 ACL_CHECK (aclmdlRICaptureBegin (cann_ctx->stream (), ACL_MODEL_RI_CAPTURE_MODE_GLOBAL));
21982198 }
2199- #endif // CANN_GRAPH
2199+ #endif // USE_ACL_GRAPH
22002200
22012201 // Only perform the graph execution if CANN graphs are not enabled, or we are capturing the graph.
22022202 // With the use of CANN graphs, the execution will be performed by the graph launch.
@@ -2216,7 +2216,7 @@ static void evaluate_and_capture_cann_graph(ggml_backend_cann_context * cann_ctx
22162216 }
22172217 }
22182218
2219- #ifdef CANN_GRAPH
2219+ #ifdef USE_ACL_GRAPH
22202220 if (use_cann_graph && cann_graph_update_required) { // End CANN graph capture
22212221 ACL_CHECK (aclmdlRICaptureEnd (cann_ctx->stream (), &cann_ctx->cann_graph ->graph ));
22222222 }
@@ -2225,7 +2225,7 @@ static void evaluate_and_capture_cann_graph(ggml_backend_cann_context * cann_ctx
22252225 // Execute graph
22262226 ACL_CHECK (aclmdlRIExecuteAsync (cann_ctx->cann_graph ->graph , cann_ctx->stream ()));
22272227 }
2228- #endif
2228+ #endif // USE_ACL_GRAPH
22292229}
22302230
22312231
@@ -2247,7 +2247,7 @@ static enum ggml_status ggml_backend_cann_graph_compute(
22472247 (ggml_backend_cann_context*)backend->context ;
22482248 ggml_cann_set_device (cann_ctx->device );
22492249 release_nz_workspace ();
2250- #ifdef CANN_GRAPH
2250+ #ifdef USE_ACL_GRAPH
22512251 bool use_cann_graph = true ;
22522252 bool cann_graph_update_required = false ;
22532253
@@ -2268,7 +2268,7 @@ static enum ggml_status ggml_backend_cann_graph_compute(
22682268#else
22692269 bool use_cann_graph = false ;
22702270 bool cann_graph_update_required = false ;
2271- #endif // CANN_GRAPH
2271+ #endif // USE_ACL_GRAPH
22722272
22732273 evaluate_and_capture_cann_graph (
22742274 cann_ctx,
0 commit comments