Skip to content

Commit 6de1a01

Browse files
manuelcandalesvmpuri
authored andcommitted
update torchao pin: optimized shaders (#1428)
1 parent 902542d commit 6de1a01

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

install/.pins/torchao-pin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7d7c14e898eca3fe66138d2a9445755a9270b800
1+
2e032c6b0de960dee554dcb08126ace718b14c6d

torchchat/utils/quantize.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ def quantized_model(self) -> nn.Module:
832832
libs = glob.glob(f"{torchao_build_path}/cmake-out/lib/libtorchao_ops_aten.*")
833833
libs = list(filter(lambda l: (l.endswith("so") or l.endswith("dylib")), libs))
834834
torch.ops.load_library(libs[0])
835+
print("Loaded torchao cpu ops.")
835836
except Exception as e:
836837
print(
837838
"Unabled to load torchao cpu ops library. Slow fallback kernels will be used."
@@ -841,6 +842,7 @@ def quantized_model(self) -> nn.Module:
841842
libname = "libtorchao_ops_mps_aten.dylib"
842843
libpath = f"{torchao_build_path}/cmake-out/lib/{libname}"
843844
torch.ops.load_library(libpath)
845+
print("Loaded torchao mps ops.")
844846
except Exception as e:
845847
print("Unabled to load torchao mps ops library.")
846848

0 commit comments

Comments
 (0)