torch.fx.experimental.optimization.gen_mkl_autotuner
-
torch.fx.experimental.optimization.gen_mkl_autotuner(example_inputs, iters=10, warmup=1)[источник] -
Создаёт эвристический алгоритм, который можно передать в
optimize_for_inference, чтобы определить, следует ли запускать подграф в MKL, запустив его с example_inputs.- Пример использования:
-
heuristic = gen_mkl_autotuner(example_inputs, iters=10) fast_model = optimization.optimize_for_inference(model, heuristic)
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.fx.experimental.optimization.gen_mkl_autotuner.html