Skip to content

Optimize HloProgram::Fingerprint#115465

Merged
copybara-service[bot] merged 1 commit intomasterfrom
exported_pr_896539765
Apr 9, 2026
Merged

Optimize HloProgram::Fingerprint#115465
copybara-service[bot] merged 1 commit intomasterfrom
exported_pr_896539765

Conversation

@copybara-service
Copy link
Copy Markdown

Optimize HloProgram::Fingerprint

  • Maintain a tiny buffer in HighwayHashStream to handle character-by-character writes more efficiently.
  • Always use the generic form printing for fingerprinting HloProgram: Using custom print functions requires running the op validator, which may be expensive. Since we don't care about pretty-printing operations while calculating a fingerprint, it makes sense to always use the generic form to save the validation cost.

@copybara-service copybara-service bot force-pushed the exported_pr_896539765 branch 4 times, most recently from 6a35a0b to 0e19263 Compare April 9, 2026 01:08
* Maintain a tiny buffer in `HighwayHashStream` to handle character-by-character writes more efficiently.
* Always use the generic form printing for fingerprinting `HloProgram`: Using custom print functions requires running the op validator, which may be expensive. Since we don't care about pretty-printing operations while calculating a fingerprint, it makes sense to always use the generic form to save the validation cost.

PiperOrigin-RevId: 896803835
@copybara-service copybara-service bot force-pushed the exported_pr_896539765 branch from 0e19263 to 7ae9294 Compare April 9, 2026 01:35
@copybara-service copybara-service bot merged commit 7ae9294 into master Apr 9, 2026
@copybara-service copybara-service bot deleted the exported_pr_896539765 branch April 9, 2026 01:35
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