Skip to content

Mixed precision dot product example#3191

Merged
copybara-service[bot] merged 1 commit into
google:masterfrom
bkmgit:patch-1
Jul 7, 2026
Merged

Mixed precision dot product example#3191
copybara-service[bot] merged 1 commit into
google:masterfrom
bkmgit:patch-1

Conversation

@bkmgit

@bkmgit bkmgit commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@bkmgit bkmgit force-pushed the patch-1 branch 2 times, most recently from a10acff to ae9553b Compare July 3, 2026 17:40

@jan-wassenberg jan-wassenberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding - a few minor suggestions :)

Comment thread hwy/examples/dot_product_mixed_precision.cc Outdated
Comment thread hwy/examples/dot_product_mixed_precision.cc Outdated
Comment thread hwy/examples/dot_product_mixed_precision.cc Outdated
Comment thread hwy/examples/README.md Outdated
@bkmgit

bkmgit commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

There is a function SafeCopyN in contrib, should this be used for copying values from a non-aligned array to an aligned array?

@jan-wassenberg

Copy link
Copy Markdown
Member

Thanks for updating :) For copying to aligned, I'd recommend just hwy::CopyBytes, no need to write a new function. But it's likely unnecessary: as long as pointers are aligned, LoadU will be as efficient as Load. Load just ensures the binary will crash if there is misalignment. So no need for a separate function, we can just remove the extra aligned path.

@bkmgit

bkmgit commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Removed the aligned path.

jan-wassenberg
jan-wassenberg previously approved these changes Jul 6, 2026

@jan-wassenberg jan-wassenberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@bkmgit

bkmgit commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Removed some unnecessary includes and updated the description in the README

@jan-wassenberg jan-wassenberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo on promtion but let's land as-is before the meeting :)

@copybara-service copybara-service Bot merged commit 2f3754a into google:master Jul 7, 2026
58 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants