Skip to content

Commit 27dde5e

Browse files
committed
Update on "[Executorch][BE] Rename sdpa_with_kv_cache.py to custom_ops.py"
Because now we have more than sdpa_with_kv_cache in it Differential Revision: [D66269486](https://our.internmc.facebook.com/intern/diff/D66269486/) [ghstack-poisoned]
2 parents a2e5433 + 5291291 commit 27dde5e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

extension/llm/custom_ops/custom_ops.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@
1717

1818
from torch.library import impl
1919

20-
# TODO rename this file to custom_ops_meta_registration.py
2120
try:
2221
op = torch.ops.llama.sdpa_with_kv_cache.default
2322
assert op is not None
2423
op2 = torch.ops.llama.fast_hadamard_transform.default
2524
assert op2 is not None
2625
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.*"))
26+
libs = list(Path(__file__).parent.resolve().glob("libcustom_ops_aot_lib.*"))
3027
assert len(libs) == 1, f"Expected 1 library but got {len(libs)}"
3128
logging.info(f"Loading custom ops library: {libs[0]}")
3229
torch.ops.load_library(libs[0])

0 commit comments

Comments
 (0)