onnxruntime
64139087 - Skip hash computation for EPContext models (#25106)

Commit
323 days ago
Skip hash computation for EPContext models (#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.
Author
Parents
Loading