__init__.py 499 B

12345678910111213141516171819
  1. # We are exposing all subpackages to the end-user.
  2. # Because of possible inter-dependency, we want to avoid
  3. # the cyclic imports, thus implementing lazy version
  4. # as per https://peps.python.org/pep-0562/
  5. import importlib
  6. __all__ = [
  7. "intrinsic",
  8. "qat",
  9. "quantizable",
  10. "quantized",
  11. "sparse",
  12. ]
  13. def __getattr__(name):
  14. if name in __all__:
  15. return importlib.import_module("." + name, __name__)
  16. raise AttributeError(f"module {__name__!r} has no attribute {name!r}")