From 2f2a920388eecb0f601492561a8737a205618905 Mon Sep 17 00:00:00 2001 From: Github Executorch Date: Mon, 13 Apr 2026 13:23:48 -0700 Subject: [PATCH] Forward fix xnnpack runtime check --- backends/xnnpack/runtime/XNNCompiler.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/backends/xnnpack/runtime/XNNCompiler.cpp b/backends/xnnpack/runtime/XNNCompiler.cpp index ba7a2b93020..8869c3157a7 100644 --- a/backends/xnnpack/runtime/XNNCompiler.cpp +++ b/backends/xnnpack/runtime/XNNCompiler.cpp @@ -1859,18 +1859,9 @@ ET_NODISCARD Error XNNCompiler::compileModel( xnn_status_to_string(status)); // create xnnpack subgraph - uint32_t num_externs = flatbuffer_graph->num_externs(); - uint32_t num_values = flatbuffer_graph->xvalues()->size(); - ET_CHECK_OR_RETURN_ERROR( - num_externs <= num_values, - InvalidProgram, - "num_externs (%u) exceeds total number of values (%u)", - num_externs, - num_values); - xnn_subgraph_t subgraph_ptr = nullptr; status = xnn_create_subgraph( - /*external_value_ids=*/num_externs, + /*external_value_ids=*/flatbuffer_graph->num_externs(), /*flags=*/0, &subgraph_ptr); ET_CHECK_OR_RETURN_ERROR(