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 1c0ea5b commit 11333baCopy full SHA for 11333ba
torchao/__init__.py
@@ -29,9 +29,12 @@
29
from pathlib import Path
30
31
so_files = list(Path(__file__).parent.glob("_C*.so"))
32
- assert len(so_files) == 1, f"Expected one _C*.so file, found {len(so_files)}"
33
- torch.ops.load_library(so_files[0])
34
- from . import ops
+ if len(so_files) > 0:
+ assert (
+ len(so_files) == 1
35
+ ), f"Expected one _C*.so file, found {len(so_files)}"
36
+ torch.ops.load_library(so_files[0])
37
+ from . import ops
38
39
# The following library contains CPU kernels from torchao/experimental
40
# They are built automatically by ao/setup.py if on an ARM machine.
0 commit comments