mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Right now we are susceptive to a race condition where if the torch.compiler.config is not implicitly import via dynamo/builder.py, we will throw an error when trying to set compiler configs. This fixes it by including config in `__all__`. Previous ``` >>> import torch >>> torch.compiler.config.dynamic_sources = "L['kwargs']['float_features']" Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'torch.compiler' has no attribute 'config' >>> torch.compiler.config.dynamic_sources = "L['kwargs']['float_features']" Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'torch.compiler' has no attribute 'config' ``` Now ``` >>> import torch >>> torch.compiler.config.dynamic_sources = "L['kwargs']['float_features']" ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/148978 Approved by: https://github.com/bdhirsh, https://github.com/laithsakka |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _cache.py | ||
| config.py | ||