-
Notifications
You must be signed in to change notification settings - Fork 48
Performance optimization for geometric kernel #1562
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chunhuanMeng
approved these changes
Apr 14, 2025
Original: # shape: (8192, 8192) ; datatype: torch.bfloat16 ; P: 0.5 ; backward: False
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# aten::geometric_ 55.27% 974.043us 100.00% 1.762ms 88.113us 14.921ms 100.00% 14.921ms 746.064us 20
# at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 14.921ms 100.00% 14.921ms 746.064us 20
# urEnqueueKernelLaunch 44.73% 788.208us 44.73% 788.208us 39.410us 0.000us 0.00% 0.000us 0.000us 20
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Self CPU time total: 1.762ms
# Self XPU time total: 14.921ms
# shape: (8192, 8192) ; datatype: torch.float16 ; P: 0.5 ; backward: False
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# aten::geometric_ 64.93% 793.297us 100.00% 1.222ms 61.084us 14.586ms 100.00% 14.586ms 729.312us 20
# at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 14.586ms 100.00% 14.586ms 729.312us 20
# urEnqueueKernelLaunch 35.07% 428.392us 35.07% 428.392us 21.420us 0.000us 0.00% 0.000us 0.000us 20
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Self CPU time total: 1.222ms
# Self XPU time total: 14.586ms
# shape: (8192, 8192) ; datatype: torch.float32 ; P: 0.5 ; backward: False
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# aten::geometric_ 64.42% 815.162us 100.00% 1.265ms 63.270us 15.043ms 100.00% 15.043ms 752.160us 20
# at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 15.043ms 100.00% 15.043ms 752.160us 20
# urEnqueueKernelLaunch 35.58% 450.228us 35.58% 450.228us 22.511us 0.000us 0.00% 0.000us 0.000us 20
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
# Self CPU time total: 1.265ms
# Self XPU time total: 15.043ms Optimized: shape: (8192, 8192) ; datatype: torch.bfloat16 ; P: 0.5 ; backward: False
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
aten::geometric_ 57.44% 859.941us 100.00% 1.497ms 74.860us 9.351ms 100.00% 9.351ms 467.544us 20
at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 9.351ms 100.00% 9.351ms 467.544us 20
urEnqueueKernelLaunch 42.56% 637.265us 42.56% 637.265us 31.863us 0.000us 0.00% 0.000us 0.000us 20
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Self CPU time total: 1.497ms
Self XPU time total: 9.351ms
shape: (8192, 8192) ; datatype: torch.float16 ; P: 0.5 ; backward: False
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
aten::geometric_ 66.84% 761.641us 100.00% 1.139ms 56.972us 8.922ms 100.00% 8.922ms 446.104us 20
at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 8.922ms 100.00% 8.922ms 446.104us 20
urEnqueueKernelLaunch 33.16% 377.805us 33.16% 377.805us 18.890us 0.000us 0.00% 0.000us 0.000us 20
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Self CPU time total: 1.139ms
Self XPU time total: 8.922ms
shape: (8192, 8192) ; datatype: torch.float32 ; P: 0.5 ; backward: False
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Name Self CPU % Self CPU CPU total % CPU total CPU time avg Self XPU Self XPU % XPU total XPU time avg # of Calls
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
aten::geometric_ 66.84% 751.307us 100.00% 1.124ms 56.204us 9.132ms 100.00% 9.132ms 456.584us 20
at::native::xpu::DistributionElementwiseKernelFuncto... 0.00% 0.000us 0.00% 0.000us 0.000us 9.132ms 100.00% 9.132ms 456.584us 20
urEnqueueKernelLaunch 33.16% 372.776us 33.16% 372.776us 18.639us 0.000us 0.00% 0.000us 0.000us 20
------------------------------------------------------- ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
Self CPU time total: 1.124ms
Self XPU time total: 9.132ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reproduce case: