__init__.py 696 B

12345678910111213141516171819202122232425262728
  1. """Quantization ops for b12x.
  2. - ``mxfp8``: BF16/FP16 rows -> dense-GEMM MXFP8 layout (one-shot CuTe kernel).
  3. - ``nvfp4``: BF16 -> packed NVFP4 + e4m3 MMA-layout scales (TMA tile kernel;
  4. revived by the CUTLASS DSL 4.6 migration).
  5. """
  6. from __future__ import annotations
  7. import importlib
  8. from typing import Any
  9. _OP_MODULES = ("mxfp8", "nvfp4")
  10. def __getattr__(name: str) -> Any:
  11. if name in _OP_MODULES:
  12. module = importlib.import_module(f".{name}", __name__)
  13. globals()[name] = module
  14. return module
  15. raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
  16. def __dir__() -> list[str]:
  17. return sorted(_OP_MODULES)
  18. __all__ = list(_OP_MODULES)