Skip to content

Commit 3a72c4f

Browse files
lucylqGithub Executorch
andauthored
Revert xnnpack runtime check (#18847)
Internal failures on: #18799 `num_externs <= num_values` is not the right check. We should scan xvalues to find `num_externs` and use that, provided they are valid. Will put up separate PR for the change. Co-authored-by: Github Executorch <github_executorch@arm.com>
1 parent 651f2f2 commit 3a72c4f

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

backends/xnnpack/runtime/XNNCompiler.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,18 +1859,9 @@ ET_NODISCARD Error XNNCompiler::compileModel(
18591859
xnn_status_to_string(status));
18601860

18611861
// create xnnpack subgraph
1862-
uint32_t num_externs = flatbuffer_graph->num_externs();
1863-
uint32_t num_values = flatbuffer_graph->xvalues()->size();
1864-
ET_CHECK_OR_RETURN_ERROR(
1865-
num_externs <= num_values,
1866-
InvalidProgram,
1867-
"num_externs (%u) exceeds total number of values (%u)",
1868-
num_externs,
1869-
num_values);
1870-
18711862
xnn_subgraph_t subgraph_ptr = nullptr;
18721863
status = xnn_create_subgraph(
1873-
/*external_value_ids=*/num_externs,
1864+
/*external_value_ids=*/flatbuffer_graph->num_externs(),
18741865
/*flags=*/0,
18751866
&subgraph_ptr);
18761867
ET_CHECK_OR_RETURN_ERROR(

0 commit comments

Comments
 (0)