@@ -342,7 +342,6 @@ graph_encoding_to_backend_lib_name(graph_encoding encoding)
342342
343343static bool
344344detect_and_load_backend (graph_encoding backend_hint ,
345- struct backends_api_functions * backends ,
346345 graph_encoding * loaded_backend )
347346{
348347 if (backend_hint > autodetect )
@@ -365,7 +364,7 @@ detect_and_load_backend(graph_encoding backend_hint,
365364 if (!backend_lib_name )
366365 return false;
367366
368- return prepare_backend (backend_lib_name , backends + backend_hint );
367+ return prepare_backend (backend_lib_name , lookup + backend_hint );
369368}
370369
371370/* WASI-NN implementation */
@@ -410,7 +409,7 @@ wasi_nn_load(wasm_exec_env_t exec_env, graph_builder_array_wasm *builder,
410409 }
411410
412411 graph_encoding loaded_backend = autodetect ;
413- if (!detect_and_load_backend (encoding , lookup , & loaded_backend )) {
412+ if (!detect_and_load_backend (encoding , & loaded_backend )) {
414413 res = invalid_encoding ;
415414 NN_ERR_PRINTF ("load backend failed" );
416415 goto fail ;
@@ -468,7 +467,7 @@ wasi_nn_load_by_name(wasm_exec_env_t exec_env, char *name, uint32_t name_len,
468467 NN_DBG_PRINTF ("[WASI NN] LOAD_BY_NAME %s..." , name );
469468
470469 graph_encoding loaded_backend = autodetect ;
471- if (!detect_and_load_backend (autodetect , lookup , & loaded_backend )) {
470+ if (!detect_and_load_backend (autodetect , & loaded_backend )) {
472471 NN_ERR_PRINTF ("load backend failed" );
473472 return invalid_encoding ;
474473 }
@@ -527,7 +526,7 @@ wasi_nn_load_by_name_with_config(wasm_exec_env_t exec_env, char *name,
527526 NN_DBG_PRINTF ("[WASI NN] LOAD_BY_NAME_WITH_CONFIG %s %s..." , name , config );
528527
529528 graph_encoding loaded_backend = autodetect ;
530- if (!detect_and_load_backend (autodetect , lookup , & loaded_backend )) {
529+ if (!detect_and_load_backend (autodetect , & loaded_backend )) {
531530 NN_ERR_PRINTF ("load backend failed" );
532531 return invalid_encoding ;
533532 }
0 commit comments