mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[inductor] Pre-populate cache for simplify_with_ranges return value (#146373)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146373 Approved by: https://github.com/yanboliang, https://github.com/shunting314 ghstack dependencies: #146252, #146254, #146255, #146257, #146282, #146297
This commit is contained in:
parent
c098385cb3
commit
eee5622b98
|
|
@ -99,6 +99,8 @@ class SizeVarAllocator:
|
|||
if result is None:
|
||||
result = self._simplify_with_ranges(expr, var_ranges)
|
||||
cache[key] = result
|
||||
if result != expr:
|
||||
cache[(result, *var_ranges.items())] = result
|
||||
return result
|
||||
|
||||
return simplify_with_ranges
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user