mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
PyTorch ignores the global re_compile limit now
This commit is contained in:
@@ -397,11 +397,14 @@ if use_torch_compile:
|
||||
torch._dynamo.config.recompile_limit = max(8192, getattr(torch._dynamo.config, "recompile_limit", 0))
|
||||
torch._dynamo.config.cache_size_limit = max(8192, getattr(torch._dynamo.config, "cache_size_limit", 0))
|
||||
torch._dynamo.config.accumulated_recompile_limit = max(8192, getattr(torch._dynamo.config, "accumulated_recompile_limit", 0))
|
||||
torch._dynamo.config.accumulated_cache_size_limit = max(8192, getattr(torch._dynamo.config, "accumulated_cache_size_limit", 0))
|
||||
def compile_func(fn, **kwargs):
|
||||
if kwargs.get("fullgraph", None) is None:
|
||||
kwargs["fullgraph"] = True
|
||||
if kwargs.get("dynamic", None) is None:
|
||||
kwargs["dynamic"] = False
|
||||
if kwargs.get("recompile_limit", None) is None:
|
||||
kwargs["recompile_limit"] = 8192
|
||||
if os.environ.get("SDNQ_COMPILE_KWARGS", None) is not None:
|
||||
for key, value in json.loads(os.environ.get("SDNQ_COMPILE_KWARGS")).items():
|
||||
kwargs[key] = value
|
||||
|
||||
Reference in New Issue
Block a user