Skip to content

Commit 3cdf0c4

Browse files
committed
Fix for linux CI worker and add test
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 287a5c9 commit 3cdf0c4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,6 @@ if(EXECUTORCH_BUILD_PYBIND)
558558
list(APPEND _dep_libs xnnpack_backend XNNPACK)
559559
endif()
560560

561-
if(EXECUTORCH_BUILD_CUSTOM)
562-
target_link_options_shared_lib(custom_ops)
563-
list(APPEND _dep_libs custom_ops)
564-
endif()
565-
566561
if(EXECUTORCH_BUILD_QUANTIZED)
567562
target_link_options_shared_lib(quantized_ops_lib)
568563
list(APPEND _dep_libs quantized_kernels quantized_ops_lib)
@@ -572,6 +567,13 @@ if(EXECUTORCH_BUILD_PYBIND)
572567
if(EXECUTORCH_BUILD_CUSTOM_OPS_AOT AND NOT APPLE)
573568
list(APPEND _dep_libs custom_ops_aot_lib)
574569
endif()
570+
# TODO(laryliu): Fix linux duplicate registation problem. In GH CI worker
571+
# libcustom_ops.a doesn't dedup with the one indirectly linked from
572+
# libcustom_ops_aot_lib.a
573+
if(EXECUTORCH_BUILD_CUSTOM AND APPLE)
574+
target_link_options_shared_lib(custom_ops)
575+
list(APPEND _dep_libs custom_ops)
576+
endif()
575577
# compile options for pybind
576578

577579
set(_pybind_compile_options -Wno-deprecated-declarations -fPIC -frtti

examples/models/llama2/custom_ops/test_sdpa_with_kv_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import torch
1010
import torch.nn.functional as F
1111

12+
from .sdpa_with_kv_cache import custom_ops_lib # noqa
1213

1314
class SDPATest(unittest.TestCase):
1415

0 commit comments

Comments
 (0)