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

Add ShapeLog mode to utilities #25

Merged
merged 3 commits into from
Mar 13, 2024
Merged

Add ShapeLog mode to utilities #25

merged 3 commits into from
Mar 13, 2024

Conversation

drisspg
Copy link
Owner

@drisspg drisspg commented Mar 13, 2024

Summary

Can be used to get the shapes, and counts of inputs to aten ops

Sample usage:

aten = torch.ops.aten
sdpa_ops = [aten._scaled_dot_product_flash_attention.default, aten._scaled_dot_product_efficient_attention.default]
mm_ops = [aten.mm.default, aten.bmm.default, aten.addmm.default]
conv_ops = [aten.conv1d.default, aten.conv2d.default, aten.conv3d.default]
with ShapeLog("torchbench_logs_mm_ops.pkl", specific_ops=mm_ops):
    main()

logs = open_logs(temp_path)

@drisspg drisspg merged commit c24053f into main Mar 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant