mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
All quantization-related modules are being migrated to `torch.ao`. This migrates the `nn.intrinsic.modules`. Please, see the [tracker](https://github.com/pytorch/pytorch/issues/81667) for the timeline. Differential Revision: [D39419733](https://our.internmc.facebook.com/intern/diff/D39419733/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D39419733/)! Pull Request resolved: https://github.com/pytorch/pytorch/pull/84842 Approved by: https://github.com/jerryzh168
20 lines
499 B
Python
20 lines
499 B
Python
# We are exposing all subpackages to the end-user.
|
|
# Because of possible inter-dependency, we want to avoid
|
|
# the cyclic imports, thus implementing lazy version
|
|
# as per https://peps.python.org/pep-0562/
|
|
|
|
import importlib
|
|
|
|
__all__ = [
|
|
"intrinsic",
|
|
"qat",
|
|
"quantizable",
|
|
"quantized",
|
|
"sparse",
|
|
]
|
|
|
|
def __getattr__(name):
|
|
if name in __all__:
|
|
return importlib.import_module("." + name, __name__)
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|