You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use grad context for hashing the generated stablehlo program (#1604)
**Context:** After PR #1562, a single function could have multiple JAXPR
representations based on whether it was under a grad context or not.
This made the previous hash based on the function id create possible
conflicts. To address this, we hashed on the jaxpr string
representation. (We cannot hash on the jax object itself since they are
unique).
The JAXPR string representation can be very long and hashing over long
strings can take a long time.
**Description of the Change:** Instead of hashing the string
representation, add a simple key to denote whether it is inside a grad
context or not.
**Benefits:** Reduced compilation time.
**Possible Drawbacks:** The cache key is getting more complicated. Maybe
the drawbacks outweight the benefits now?
**Related GitHub Issues:**
[sc-88454]
0 commit comments