Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion torchao/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import warnings

import torch
from torchao.utils import is_fbcode

warnings.filterwarnings(
"ignore", message="Failed to initialize NumPy: No module named 'numpy'"
Expand Down Expand Up @@ -48,7 +49,7 @@ def _parse_version(version_string):
force_skip_loading_so_files = (
os.getenv("TORCHAO_FORCE_SKIP_LOADING_SO_FILES", "0") == "1"
)
if force_skip_loading_so_files:
if force_skip_loading_so_files or is_fbcode():
# user override
# users can set env var TORCHAO_FORCE_SKIP_LOADING_SO_FILES=1 to skip loading .so files
# this way, if they are using an incompatbile torch version, they can still use the API by setting the env var
Expand Down
Loading