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

[float8nocompile] Make Float8Linear fp8 conversion kernel used configurable and update benchmarking code to compare both kernels #1459

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danielvegamyhre
Copy link
Contributor

Update Float8Linear and benchmarking code to easily compare the atomic_max-based fp8 conversion kernel vs the reduction based approach.

Example output:

input_shape    kernel_algo                 high_precision_dtype      eager_time    compiled_time    float8nocompile
-------------  --------------------------  ----------------------  ------------  ---------------  -----------------
(16, 4096)     KernelAlgorithm.ATOMIC_MAX  torch.bfloat16               649.288          409.496            409.756
(256, 4096)    KernelAlgorithm.ATOMIC_MAX  torch.bfloat16               684.32           421.179            444.348
(4096, 4096)   KernelAlgorithm.ATOMIC_MAX  torch.bfloat16              1827.66          1066.81            1178.63
(65536, 4096)  KernelAlgorithm.ATOMIC_MAX  torch.bfloat16             22343.4          12675.7            14644.2
(16, 4096)     KernelAlgorithm.REDUCTION   torch.bfloat16               648.859          408.961            562.557
(256, 4096)    KernelAlgorithm.REDUCTION   torch.bfloat16               684.449          421.08             612.861
(4096, 4096)   KernelAlgorithm.REDUCTION   torch.bfloat16              1827.6           1068.37            1604.26
(65536, 4096)  KernelAlgorithm.REDUCTION   torch.bfloat16             22434            12669.1            20523

Copy link

pytorch-bot bot commented Dec 24, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1459

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 14d6a4f with merge base 567cb46 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 24, 2024
@danielvegamyhre danielvegamyhre added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants