We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e110227 commit 67bc0bcCopy full SHA for 67bc0bc
torchao/__init__.py
@@ -6,6 +6,7 @@
6
import warnings
7
8
import torch
9
+from torchao.utils import is_fbcode
10
11
warnings.filterwarnings(
12
"ignore", message="Failed to initialize NumPy: No module named 'numpy'"
@@ -48,7 +49,7 @@ def _parse_version(version_string):
48
49
force_skip_loading_so_files = (
50
os.getenv("TORCHAO_FORCE_SKIP_LOADING_SO_FILES", "0") == "1"
51
)
-if force_skip_loading_so_files:
52
+if force_skip_loading_so_files or is_fbcode():
53
# user override
54
# users can set env var TORCHAO_FORCE_SKIP_LOADING_SO_FILES=1 to skip loading .so files
55
# this way, if they are using an incompatbile torch version, they can still use the API by setting the env var
0 commit comments