mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
This splits training.py into many files and moves them from `dynamo.optimizations.training` to `dynamo.backends.*`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/93409 Approved by: https://github.com/ezyang
10 lines
267 B
Python
10 lines
267 B
Python
from torch._dynamo import register_backend
|
|
|
|
|
|
@register_backend
|
|
def inductor(*args, **kwargs):
|
|
# do import here to avoid loading inductor into memory when it is not used
|
|
from torch._inductor.compile_fx import compile_fx
|
|
|
|
return compile_fx(*args, **kwargs)
|