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
Skip hash computation for EPContext models (microsoft#25106)
### Description
Add early exit in ComputeModelGraphHash when EPContext nodes are
present, returning "0" to indicate pre-compiled model state.
Conditionally skip ComputeModelWeightHash when graph hash is "0" to
avoid unnecessary computation for pre-compiled models.
This optimization reduces overhead for models containing EPContext
nodes, which represent execution provider pre-compiled subgraphs.
### Motivation and Context
Currently, the hash generated by ComputeModelGraphHash function when the
graph contains EPContext nodes does not correctly represent the graph
because we do not hash the contents of the context pointed to by the
EPContext node. Thus, it makes more sense to skip hashing for cases
involving EPContext nodes.
0 commit comments