-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Paddle-TRT]Support argsort by TopK #66811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
} | ||
|
||
auto* layer = TRT_ENGINE_ADD_LAYER( | ||
engine_, TopK, *input_tensor, operation, 0, 1 << axis); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k的默认值设置为1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
if (axis < 0) { | ||
axis += shape.size(); | ||
} | ||
if (shape[axis] > 3840) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
动态shape这里只能获取到-1,建议不进trt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
PR Category
Inference
PR Types
Others
Description
Pcard-71500
When the number of items to be sorted is less than or equal to 3840, use ITopKLayer to implement argsort.