-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
[Benchmark] add benchmark for custom activation op #23908
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
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
|
@ProExpertProg Hi, I add some benchmarks for custom op. Could you please take a look? |
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.
Code Review
This pull request introduces a new benchmark script for custom activation operations. The script is well-structured, but I've found a couple of issues that should be addressed. There's a minor logic error in a conditional block that could lead to unexpected behavior, and some unreachable code due to a misunderstanding of the argparse library's error handling. Addressing these points will improve the script's correctness and maintainability.
ProExpertProg
left a comment
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.
Could you also add the ability to compare to the torch.compiled forward_native numbers?
Sorry, I'm not sure what that means. I compiled the |
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
|
@mgoin Hi, could you please review this when you get a chance? |
ProExpertProg
left a comment
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.
Instead of manually specifying the dimensions, I would just always do a sweep of popular sizes (and you can let users override via a comma-separated CLI flag).
|
I would set up the sweep similar to https://github.com/vllm-project/vllm/blob/main/benchmarks/kernels/bench_per_token_quant_fp8.py |
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
ProExpertProg
left a comment
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.
Another nit!
Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: Jiangyun Zhu <riverclouds.zhu@qq.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Purpose
Add benchmark for custom activation op.
#19817
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.