only patch runtime_env for torch >= 2.10 (#38763)

Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
This commit is contained in:
Rohan Potdar
2026-04-07 04:29:23 -05:00
committed by GitHub
parent 8060bb0333
commit dd9342e6bc

View File

@@ -500,7 +500,7 @@ if is_torch_equal("2.9.0"):
# This mirrors the fix in https://github.com/pytorch/pytorch/pull/177558
# and can be removed once torch >=2.12 is the minimum supported version.
if not is_torch_equal_or_newer("2.12.0"):
if is_torch_equal_or_newer("2.10.0") and not is_torch_equal_or_newer("2.12.0"):
import builtins as _builtins
import pickle