/external/pytorch/torch/_dynamo/backends/ |
D | registry.py | 28 compiler_fn: Optional[CompilerFn] = None, 43 if compiler_fn is None: 46 assert callable(compiler_fn) 47 name = name or compiler_fn.__name__ 49 if compiler_fn not in _BACKENDS: 51 _COMPILER_FNS[name] = compiler_fn 52 compiler_fn._tags = tuple(tags) 53 return compiler_fn 62 def lookup_backend(compiler_fn): argument 64 if isinstance(compiler_fn, str): [all …]
|
D | onnxrt.py | 21 register_backend(name="onnxrt", compiler_fn=torch_compile_backend) 38 register_backend(name="onnxrt", compiler_fn=information_displaying_backend)
|
D | debugging.py | 106 register_backend(name="aot_eager", compiler_fn=aot_eager) 112 name="aot_eager_default_partitioner", compiler_fn=aot_eager_default_partitioner 142 name="aot_eager_decomp_partition", compiler_fn=aot_eager_decomp_partition 150 register_backend(name="aot_ts", compiler_fn=aot_ts)
|
D | torchxla.py | 47 register_backend(name="openxla", compiler_fn=openxla)
|
D | cudagraphs.py | 217 register_backend(name="cudagraphs", compiler_fn=CudagraphsBackend())
|
/external/pytorch/torch/_dynamo/repro/ |
D | after_dynamo.py | 50 def _accuracy_fails(gm, example_inputs, compiler_fn): argument 54 compiler_fn, 73 compiler_fn = functools.partial(self._torchdynamo_orig_callable, **kwargs) 92 compiled_gm = compiler_fn(copy.deepcopy(gm), example_inputs) 93 if _accuracy_fails(gm, example_inputs, compiler_fn): 107 compiled_gm = compiler_fn(copy.deepcopy(gm), example_inputs) 129 compiled_gm = compiler_fn(gm, example_inputs) 278 compiler_fn = lookup_backend(compiler_name) 288 compiled_gm = compiler_fn(gm, example_inputs) 302 compiler_fn=compiler_fn, [all …]
|
D | after_aot.py | 72 compiler_fn = functools.partial(unconfigured_compiler_fn, **kwargs) 85 inner_compiled_fn = compiler_fn(gm, example_inputs)
|
/external/pytorch/test/dynamo/ |
D | test_backward_higher_order_ops.py | 97 def compiler_fn(gm): function 120 with compiled_autograd.enable(compiler_fn): 154 def compiler_fn(gm): function 185 with compiled_autograd.enable(compiler_fn): 228 def compiler_fn(gm): function 247 with compiled_autograd.enable(compiler_fn):
|
D | test_backends.py | 52 def compiler_fn(graph, example_inputs): function 63 opt_fn = torch._dynamo.optimize_assert(compiler_fn)(fn) 80 def compiler_fn(graph, example_inputs): function 95 opt_fn = torch._dynamo.optimize_assert(compiler_fn)(fn)
|
D | test_verify_correctness.py | 68 def compiler_fn(graph, example_inputs): function 79 opt_fn = torch._dynamo.optimize_assert(compiler_fn)(fn)
|
D | test_hooks.py | 17 def compiler_fn(gm): function 350 with compiled_autograd.enable(compiler_fn): 388 with compiled_autograd.enable(compiler_fn): 422 with compiled_autograd.enable(compiler_fn): 466 with compiled_autograd.enable(compiler_fn): 513 with compiled_autograd.enable(compiler_fn): 543 with compiled_autograd.enable(compiler_fn): 662 with compiled_autograd.enable(compiler_fn): 762 with compiled_autograd.enable(compiler_fn):
|
/external/pytorch/torch/_dynamo/ |
D | convert_frame.py | 416 compiler_fn: CompilerFn, 423 self._torchdynamo_orig_callable = compiler_fn 546 compiler_fn: CompilerFn, 552 return ConvertFrameAssert(compiler_fn, one_graph, export, export_constraints) 582 compiler_fn: CompilerFn, 622 compiler_fn, 1043 def __init__(self, compiler_fn: CompilerFn, hooks: Hooks) -> None: 1044 self._torchdynamo_orig_callable = compiler_fn 1045 self._inner_convert = convert_frame_assert(compiler_fn, one_graph=False) 1135 def convert_frame(compiler_fn: CompilerFn, hooks: Hooks) -> ConvertFrame: [all …]
|
D | compiled_autograd.py | 62 def __init__(self, compiler_fn) -> None: argument 63 self.compiler_fn = compiler_fn 344 return runtime_wrapper, self.compiler_fn(graph) 498 def enable(compiler_fn): argument 500 functools.partial(AutogradCompilerInstance, compiler_fn)
|
D | eval_frame.py | 562 compiler_fn = rebuild_ctx() 563 ctx = torch._dynamo.compiled_autograd.enable(compiler_fn) 668 def get_compiler_fn(compiler_fn): argument 671 if hasattr(compiler_fn, "compiler_name"): 672 compiler_str = compiler_fn.compiler_name 673 elif isinstance(compiler_fn, str): 674 compiler_str = compiler_fn 677 compiler_fn = lookup_backend(compiler_fn) 678 return wrap_backend_debug(compiler_fn, compiler_str)
|
D | output_graph.py | 245 compiler_fn: Optional[CompilerFn], 344 self.compiler_fn: Optional[CompilerFn] = compiler_fn 1419 assert self.compiler_fn is not None 1438 self.compiler_fn.__name__ 1439 if hasattr(self.compiler_fn, "__name__") 1443 compiler_fn = self.compiler_fn 1445 compiler_fn = WrapperBackend(compiler_fn) 1446 compiled_fn = compiler_fn(gm, self.example_inputs()) 1451 raise BackendCompilerFailed(self.compiler_fn, e).with_traceback( 1465 raise BackendCompilerFailed(self.compiler_fn, e) from e
|
D | debug_utils.py | 440 compiler_fn, argument 447 compiled_gm = compiler_fn(
|
D | testing.py | 157 compiler_fn=None,
|
D | symbolic_convert.py | 2656 compiler_fn, argument 2672 compiler_fn, 2742 compiler_fn = inspect.getattr_static( 2743 self.output.compiler_fn, "compiler_fn", self.output.compiler_fn 2752 if ci is not None and ci.key() in forbidden_keys and compiler_fn is not eager:
|
D | utils.py | 2662 def compiler_fn(gm): function 2670 with torch._dynamo.compiled_autograd.enable(compiler_fn) as ctx:
|
/external/pytorch/test/inductor/ |
D | test_compiled_autograd.py | 54 compiler_fn = make_compiler_fn() variable 84 self, fn, count=1, compiler_fn=compiler_fn, compile_fn=False argument 96 with compiled_autograd.enable(compiler_fn): 198 with compiled_autograd.enable(compiler_fn): 486 compiler = torch._dynamo.compiled_autograd.AutogradCompilerInstance(compiler_fn) 914 with compiled_autograd.enable(compiler_fn): 1029 fn, count=2, compiler_fn=make_compiler_fn(fullgraph=False) 1097 with compiled_autograd.enable(compiler_fn): 1243 fn, count=[2, 6], compiler_fn=make_compiler_fn(fullgraph=False) 1269 fn, count=2, compiler_fn=make_compiler_fn(fullgraph=False) [all …]
|
/external/pytorch/test/distributed/_composable/ |
D | test_replicate_with_compiler.py | 60 def compiler_fn(no_inductor=False): function 178 else compiled_autograd.enable(compiler_fn(no_inductor)) 286 with compiled_autograd.enable(compiler_fn()): 414 with compiled_autograd.enable(compiler_fn()):
|
/external/pytorch/functorch/notebooks/ |
D | aot_autograd_optimizations.ipynb | 119 "# The compiler_fn is called after the forward and backward graphs are extracted.\n", 120 "# Here, we just print the code in the compiler_fn. Return of this function is a callable.\n", 121 "def compiler_fn(fx_module: torch.fx.GraphModule, _):\n", 125 "# Pass on the compiler_fn to the aot_function API\n", 126 "aot_print_fn = aot_function(fn, fw_compiler=compiler_fn, bw_compiler=compiler_fn)\n", 311 …"aot_fn = aot_function(fn, fw_compiler=compiler_fn, bw_compiler=compiler_fn, partition_fn=min_cut_…
|
/external/pytorch/torch/ |
D | __init__.py | 2262 self.compiler_fn = lookup_backend(backend) 2273 and self.compiler_fn == other.compiler_fn 2279 return self.compiler_fn(model_, inputs_, **self.kwargs) 2282 if hasattr(self.compiler_fn, "reset"): 2283 self.compiler_fn.reset()
|
/external/pytorch/test/distributed/_composable/fsdp/ |
D | test_fully_shard_compile.py | 327 def compiler_fn(compiled_autograd_backend): function 344 compiler_fn(compiled_autograd_backend)
|
/external/pytorch/torch/_functorch/ |
D | aot_autograd.py | 757 compiler_fn = choose_dispatcher(needs_autograd, aot_config) 759 compiled_fn, fw_metadata = compiler_fn(
|