forked from pytorch/ao
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Graceful handling of cpp extensions (pytorch#296)
* Graceful handling of cpp extensions * update * push * yolo * revert some changes' * Update __init__.py * Update README.md ---------
- Loading branch information
Showing
6 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
from .nf4tensor import NF4Tensor, to_nf4 | ||
from .uint4 import UInt4Tensor | ||
from .aqt import AffineQuantizedTensor, to_aq | ||
from .float6_e3m2 import to_float6_e3m2, from_float6_e3m2 | ||
|
||
__all__ = [ | ||
"NF4Tensor", | ||
"to_nf4", | ||
"UInt4Tensor" | ||
"AffineQuantizedTensor", | ||
"to_aq", | ||
"to_float6_e3m2", | ||
"from_float6_e3m2", | ||
] | ||
|
||
# CPP extensions | ||
try: | ||
from .float6_e3m2 import to_float6_e3m2, from_float6_e3m2 | ||
__all__.extend(["to_float6_e3m2", "from_float6_e3m2"]) | ||
except RuntimeError: | ||
pass |