File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 2323 op2 = torch .ops .llama .fast_hadamard_transform .default
2424 assert op2 is not None
2525except :
26- path = Path (__file__ ).parent .resolve ()
27- logging .info (f"Looking for libcustom_ops_aot_lib.so in { path } " )
28- libs = list (path .glob ("libcustom_ops_aot_lib.*" ))
26+ import glob
27+
28+ import executorch
29+
30+ executorch_package_path = executorch .__path__ [0 ]
31+ logging .info (f"Looking for libcustom_ops_aot_lib.so in { executorch_package_path } " )
32+ libs = list (
33+ glob .glob (
34+ f"{ executorch_package_path } /**/libquantized_ops_aot_lib.*" , recursive = True
35+ )
36+ )
2937 assert len (libs ) == 1 , f"Expected 1 library but got { len (libs )} "
3038 logging .info (f"Loading custom ops library: { libs [0 ]} " )
3139 torch .ops .load_library (libs [0 ])
You can’t perform that action at this time.
0 commit comments