Skip to content

Conversation

@jonb377
Copy link
Collaborator

@jonb377 jonb377 commented Jun 3, 2024

See also #7169

When using the persistent compilation cache, modifications to the HLO metadata will not impact the graph hash, and the persistent cache will load executables compiled with potentially outdated metadata.

This change:

  • Modifies the graph hash when XLA_HLO_DEBUG or XLA_IR_DEBUG is set
  • Prints a warning when initializing the persistent cache with XLA_HLO_DEBUG or XLA_IR_DEBUG set.
@jonb377 jonb377 requested a review from JackCaoG June 3, 2024 22:51
// the compilation result.
static std::vector<std::string> flag_vars = {"XLA_FLAGS", "LIBTPU_INIT_ARGS"};
static std::vector<std::string> raw_vars = {"TPU_MEGACORE"};
static std::vector<std::string> raw_vars = {"TPU_MEGACORE", "XLA_HLO_DEBUG"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we also include XLA_IR_DEBUG? This flag will add additional meta data to the HLO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah I see, I didn't think XLA_IR_DEBUG would touch the HLO, I'll include both env vars here.

@jonb377 jonb377 changed the title Warn when using persistent cache with XLA_HLO_DEBUG Warn when using persistent cache with debug env vars Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants