Tencent/TPAT

support for one hot plugin with dynamic axis other than batch_size dim

frankxyy opened this issue · 4 comments

I read the code of one hot plugin generation. It seems that it only support dynamic axis of batch size dimension. Can tpat support one hot plugin generation with dynamic axises other than batch_size dimension?

@frankxyy Currently we don't support dynamic batch_size on other dimensions. You may try to add Transpose before and after one_hot node in ONNX graph.

@wenqf11 Hi, why adding Transpose before and after one_hot node can avoid issues of dynamic dims? I suppose the transpose node cannot infer the exact tensort shape at runtime.

@frankxyy If your ONNX model has more than one dynamic dimensions, we cannot support currently. Otherwise, only one dynamic diemnsion, you can Transpose it to the first dimension. It may cost more time to run it with Transpose.

@wenqf11 Thank you. Got it.