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.
2 parents a2e5433 + 5291291 commit 27dde5eCopy full SHA for 27dde5e
extension/llm/custom_ops/custom_ops.py
@@ -17,16 +17,13 @@
17
18
from torch.library import impl
19
20
-# TODO rename this file to custom_ops_meta_registration.py
21
try:
22
op = torch.ops.llama.sdpa_with_kv_cache.default
23
assert op is not None
24
op2 = torch.ops.llama.fast_hadamard_transform.default
25
assert op2 is not None
26
except:
27
- path = Path(__file__).parent.resolve()
28
- logging.info(f"Looking for libcustom_ops_aot_lib.so in {path}")
29
- libs = list(path.glob("libcustom_ops_aot_lib.*"))
+ libs = list(Path(__file__).parent.resolve().glob("libcustom_ops_aot_lib.*"))
30
assert len(libs) == 1, f"Expected 1 library but got {len(libs)}"
31
logging.info(f"Loading custom ops library: {libs[0]}")
32
torch.ops.load_library(libs[0])
0 commit comments