Skip to content
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

binary add become slower than 2.6 #1423

Open
jianyizh opened this issue Mar 3, 2025 · 0 comments
Open

binary add become slower than 2.6 #1423

jianyizh opened this issue Mar 3, 2025 · 0 comments
Assignees
Milestone

Comments

@jianyizh
Copy link
Contributor

jianyizh commented Mar 3, 2025

Run this with unitrace -d --conditional-collection python test_add.py
Current pytorch main gets 2342624ns on average, pytorch 2.6 gets 951728ns on max 1550.

I noticed that Register File Size Per Thread increased from 128 to 256

import torch
import os
 
input_tensor_16 = torch.randn(16,12,512,512, dtype=torch.bfloat16, device="xpu")
input_tensor_32 = torch.randn(16,1,1,512, device="xpu")
 
for _ in range(10):
    _ = input_tensor_16 + input_tensor_32
 
torch.xpu.synchronize()
os.environ['PTI_ENABLE_COLLECTION']="1"
for _ in range(10):
    _ = input_tensor_16 + input_tensor_32
torch.xpu.synchronize()
@xytintel xytintel added this to the PT2.8 milestone Mar 3, 2025
@riverliuintel riverliuintel modified the milestones: PT2.8, PT2.7 Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants