Skip to content

Conversation

@eqy
Copy link
Collaborator

@eqy eqy commented Sep 30, 2024

Similar to #110251 we're seeing cases where vectorization can benefit casts to fp16/bf16

cc @ptrblck @msaroufim @mcarilli @leslie-fang-intel @jgong5

@eqy eqy added module: cuda Related to torch.cuda, and CUDA support in general open source module: bfloat16 module: half Related to float16 half-precision floats module: amp (automated mixed precision) autocast topic: not user facing topic category labels Sep 30, 2024
@eqy eqy requested a review from syed-ahmed as a code owner September 30, 2024 21:56
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 30, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 8b45b71 with merge base 3f9f604 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@drisspg drisspg added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 1, 2024
@drisspg
Copy link
Contributor

drisspg commented Oct 1, 2024

mind adding a quick perf sweep?

@drisspg drisspg self-requested a review October 1, 2024 17:18
@eqy
Copy link
Collaborator Author

eqy commented Oct 28, 2024

@drisspg sorry for the delay, here's a quick run on half on power-limited H100 PCI-E

basically mostly for larger sizes:
before

512 6.796240340918303e-06
2048 5.685428623110056e-06
8192 5.973570514470339e-06
32768 5.551059730350971e-06
131072 5.707070231437683e-06
524288 6.505390629172325e-06
2097152 9.025379549711942e-06
8388608 3.8858160842210054e-05
33554432 0.00014148149872198702
134217728 0.0005525871901772917
536870912 0.00222478736191988
2147483648 0.009108047320041805

after

512 7.028880063444376e-06
2048 6.492158863693476e-06
8192 6.225050892680883e-06
32768 6.103010382503271e-06
131072 5.990599747747183e-06
524288 6.801350973546505e-06
2097152 6.0079293325543405e-06
8388608 3.216813085600734e-05
33554432 0.00011356725823134183
134217728 0.0004374598595313728
536870912 0.0017357393098063768
2147483648 0.006942723749671131

@eqy
Copy link
Collaborator Author

eqy commented Oct 29, 2024

@pytorchmergebot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased ampcopy onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout ampcopy && git pull --rebase)

@eqy
Copy link
Collaborator Author

eqy commented Oct 29, 2024

@pytorchmergebot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 29, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

rahulsingh-intel pushed a commit to rahulsingh-intel/pytorch that referenced this pull request Nov 5, 2024
jithunnair-amd pushed a commit to ROCm/pytorch that referenced this pull request Mar 17, 2025
Similar to pytorch#110251 we're seeing cases where vectorization can benefit
casts to fp16/bf16

Pull Request resolved: pytorch#137053
Approved by: https://github.com/drisspg

Co-authored-by: eqy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: amp (automated mixed precision) autocast module: bfloat16 module: cuda Related to torch.cuda, and CUDA support in general module: half Related to float16 half-precision floats open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants