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

Align resulting computation of GBs, TFLOPs in tutorials #4752

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

YarShev
Copy link
Contributor

@YarShev YarShev commented Sep 18, 2024

Closes #4751.

@@ -231,7 +231,7 @@ def benchmark(M, N, provider):
ms = triton.testing.do_bench(lambda: torch.softmax(x, axis=-1))
if provider == 'triton':
ms = triton.testing.do_bench(lambda: softmax(x))
gbps = lambda ms: 2 * x.nelement() * x.element_size() * 1e-9 / (ms * 1e-3)
gbps = lambda ms: 2 * x.numel() * x.element_size() * 1e-9 / (ms * 1e-3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numel is used across the codebase so I decided to replace .nelement() to .numel() to be consistent.

@antiagainst antiagainst merged commit 5083988 into triton-lang:main Sep 18, 2024
7 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.

Align resulting computation of GBs, TFLOPs in tutorials
3 participants