pytorch/torch/_dynamo/backends/inductor.py
Jason Ansel 60e8c766b5 Refactor dynamo training backends (#93409)
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
2023-02-03 03:07:15 +00:00

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)