hexagon nnlib : output tensor prep fail -9

186 Views Asked by At

With Hexagon DSP SDK 3.4.3, I'm following the Tensorflow/Hexagon-NN example at examples/hexagon_nn/tutorials/007-tensorflow-to-hexagon-nn and using the Hexagon NN lib at libs/hexagon_nn/2.6.

I've converted my own TensorFlow net into iv3.c and built graph_app_q (with V=hexagon_ReleaseG_toolv83_v66).

I'm seeing a surprising runtime failure:

output tensor prep fail -9:  HIGH:0x5E:107:log.c
recalc strategy for v66 failed:  HIGH:0x5E:107:log.c
execute() failed on node id=1004a err=-1:  HIGH:0x5E:107:log.c
fail in execute_new():  HIGH:0x5E:107:log.c

The referenced node id corresponds to this line in the generated iv3.c:

APPEND_NODE("net_0/Relu_3/eightbit",0x1004a,OP_QuantizedRelu_8,NN_PAD_NA,inputs_for_1004a,3,outputs_for_1004a,3);

I'm not sure what error code "-9" means. How can I go about diagnosing this? Are there any docs on the error codes?

1

There are 1 best solutions below

0
On

https://source.codeaurora.org/quic/hexagon_nn/nnlib/tree/hexagon/ops/src/op_supernode_new.c?id=79e35e9b4463b8fd0f1f67acbfab1470c8e21278#n4355

shows the error message you saw after a call to tensor_out_prepare_padded_d32.

That func's implementation is in https://source.codeaurora.org/quic/hexagon_nn/nnlib/tree/hexagon/include/nn_graph_types.h?id=79e35e9b4463b8fd0f1f67acbfab1470c8e21278#n501 where I see this code:

if (dst->max_size < size) return -9;

The error indicates that your graph exceeds the maximum allowed size.