mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
An out of tree backend can have its own configuration options that the user can enable to control inductor compilation. These config options need to be taken into account when calculating the key that is used to determine cache miss / hits. This PR allows out of tree backends to specify a custom config module that has the same type as `torch._inductor.config` that can be used to control codegen (in addition to the default config), and will be used when creating the cache key. Pull Request resolved: https://github.com/pytorch/pytorch/pull/158254 Approved by: https://github.com/eellison
16 lines
379 B
Python
16 lines
379 B
Python
# Owner(s): ["module: inductor"]
|
|
|
|
# This module is used in test_codecache.py to verify the correctness
|
|
# of FXGraphHashDetails when a custom inductor backend registers its own
|
|
# config object
|
|
|
|
import sys
|
|
|
|
from torch.utils._config_module import install_config_module
|
|
|
|
|
|
enable_optimisation: bool = False
|
|
|
|
# adds patch, save_config, etc
|
|
install_config_module(sys.modules[__name__])
|