mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[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:
committed by
PyTorch MergeBot
parent
228973df7f
commit
fac85fcfb5
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user