Hi,
I tried to convert an ONNX model with TopK operation.
According to the SNPE docs, the TopK operation seems to be supported at opset version 1, 10, 11
So, I'm using opset version 11
But snpe-onnx-to-dlc failed to convert the onnx model. Error messages are following:
Encountered Error: 'ERROR_METHOD_NOT_FOUND_FOR_OP_TYPE: Method add_op_to_backend not found for op_type topk'Stack Trace:Traceback (most recent call last):File "./snpe-onnx-to-dlc", line 53, in <module>backend.save(optimized_graph)File "/util/snpe-1.61.0/lib/python/qti/aisw/converters/backend/ir_to_dlc.py", line 151, in saveDlcTranslations.apply_method_to_all_ops(BackendTranslationBase.ADD_OP_TO_BACKEND, graph, self)File "/util/snpe-1.61.0/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 75, in apply_method_to_all_ops(method_name, node.op.type))KeyError: 'ERROR_METHOD_NOT_FOUND_FOR_OP_TYPE: Method add_op_to_backend not found for op_type topk'
I need to be using TopK for reduce bbox, before NMS..
Are there any workaround? Or SNPE cannot handle TopK operation yet?
I have same problem.
The guide page shows "topk" is supported but not working with the same error log. (https://developer.qualcomm.com/sites/default/files/docs/snpe/supported_o...)
I don't understand why it does not work on onnx version 11.
its not working for me as well on onnx version 11.
Yes, topK is not supported. The converter do not register the topK, so, you meet this error.
Normally, topk is at the bottom at the network. A workaround is implement topK in CPU side by youself. In Hexagon V2, topK use a simple logic with scaler cpu. The performance is not good still.
some time we have to change the DLC before conversion Normally, topk is at the bottom at the network. A workaround is implement topK in CPU side by youself. I face the same issue in fishing equipment and web developers in Dubai forum projects In Hexagon V2, topK use a simple logic with scaler cpu. The performance is not good still.
Dear official developer,
Any update?
It's weird that Topk is listed as an available onnix function but no implementation in
snpe-1.66.0.3729/lib/python/qti/aisw/converters/backend/ir_to_dlc.py