Skip to content

Commit 170f696

Browse files
authored
Revert "Replace raise by warning to unblock unrecognized torchao version" (#3395)
Revert "Replace raise by warning to unblock unrecognized torchao version (#3338)" This reverts commit 2ff1eb2.
1 parent f266b07 commit 170f696

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

torchao/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
logger = logging.getLogger(__name__)
2727

2828

29-
def is_fbcode():
30-
return not hasattr(torch.version, "git_version")
31-
32-
3329
def _parse_version(version_string):
3430
"""
3531
Parse version string representing pre-release with -1
@@ -52,7 +48,7 @@ def _parse_version(version_string):
5248
force_skip_loading_so_files = (
5349
os.getenv("TORCHAO_FORCE_SKIP_LOADING_SO_FILES", "0") == "1"
5450
)
55-
if force_skip_loading_so_files or is_fbcode():
51+
if force_skip_loading_so_files:
5652
# user override
5753
# users can set env var TORCHAO_FORCE_SKIP_LOADING_SO_FILES=1 to skip loading .so files
5854
# this way, if they are using an incompatbile torch version, they can still use the API by setting the env var

0 commit comments

Comments
 (0)