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

[Computation Hash] Introduce deterministic hash for user computations #8539

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

Conversation

rpsilva-aws
Copy link
Contributor

Fixes #8537

@rpsilva-aws rpsilva-aws marked this pull request as ready for review January 7, 2025 01:33
@rpsilva-aws
Copy link
Contributor Author

@tengyifei

@rpsilva-aws
Copy link
Contributor Author

rpsilva-aws commented Jan 7, 2025

Test results without the deterministic serialization (instead, relying on the former SerializeAsString()):

[ RUN      ] XlaUtilTest.TestDeterministicComputationSerialization
torch_xla/csrc/runtime/xla_util_test.cc:281: Failure
Expected equality of these values:
  hash1
    Which is: 43931100196028486903611743554166252076
  hash2
    Which is: 6626235922799979895316908395105923211
Hashes should match regardless of the frontend attribute ordering
[  FAILED  ] XlaUtilTest.TestDeterministicComputationSerialization (0 ms)
[----------] 5 tests from XlaUtilTest (1 ms total)

So hash1 and hash2 differ, through it is serializing the exact same HLO module proto.

@rpsilva-aws rpsilva-aws force-pushed the rpsilva_computation_hash branch from b249879 to 5e406d7 Compare January 7, 2025 02:10
@rpsilva-aws rpsilva-aws force-pushed the rpsilva_computation_hash branch from 5e406d7 to 4372f2e Compare January 7, 2025 06:52
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.

[Computation Hash] User Computation hash disregards protobuf requirements
1 participant