[inductor] custom_graph_pass.get_hash_for_files: don't hash paths (#165020)

Summary: We have an internal user where caching broke because the paths that are unzipped are probably different per host. We can't think of a use case where a path change matters when the file content has not changed, so removing this part

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165020
Approved by: https://github.com/oulgen
This commit is contained in:
Sam Larsen
2025-10-09 07:42:50 -07:00
committed by PyTorch MergeBot
parent 228973df7f
commit fac85fcfb5

View File

@ -100,7 +100,6 @@ def get_hash_for_files(paths: tuple[str], extra: str = "") -> bytes:
hasher.update(extra.encode("utf-8"))
for path in paths:
with open(path, "rb") as f:
hasher.update(path.encode("utf-8"))
hasher.update(f.read())
return hasher.digest()