This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J784S4: TopK on Large Tensor Failing on AM69A with TIDL

Part Number: PROCESSOR-SDK-J784S4
Other Parts Discussed in Thread: AM69A

Tool/software:

Hello,

I'm working on an ONNX model for the AM69A board, and I need to perform a TopK operation on a large tensor.

I'm using RTOS SDK10_01_00_04 with TIDL Tools Version 10_01_00_01.

  • Input tensor: float32[1,1,358400,1]
  • Attributes: k=300 and axis=2
  • The output should be 
    • values with shape float32[1,1,300,1]
    • indices with shape int64[1,1,300,1]

For the DSP implementation, I'm following the same approach used in TIDL_refTopK and TIDL_sliceRefProcess.

When I run the model on the board, it fails with the error bellow during inference which I think it's related to the size of the tensor:

PS: When I run a smaller model with an input tensor of shape float32[1,1,100,1] and set K = 30, everything functions as expected. The model executes without errors, and I successfully obtain both the correct TopK values and indices. This confirms that the logic is valid for smaller input sizes.

You can find the model here: 5305.topk_model.zip

Can you help me resolve my problem?

Any guidance, examples, or suggestions would be appreciated.

Best regards