diff --git a/.ci/scripts/unittest-buck2.sh b/.ci/scripts/unittest-buck2.sh index efbf386ffa0..5750f6f9f27 100755 --- a/.ci/scripts/unittest-buck2.sh +++ b/.ci/scripts/unittest-buck2.sh @@ -15,7 +15,7 @@ buck2 query "//backends/apple/... + //backends/example/... + \ //kernels/optimized/... + //kernels/portable/... + //kernels/quantized/... + \ //kernels/test/... + //runtime/... + //schema/... + //test/... + //util/..." -UNBUILDABLE_OPTIMIZED_OPS_REGEX="gelu|fft_r2c|log_softmax" +UNBUILDABLE_OPTIMIZED_OPS_REGEX="_elu|gelu|fft|log_softmax" BUILDABLE_OPTIMIZED_OPS=$(buck2 query //kernels/optimized/cpu/... | grep -E -v $UNBUILDABLE_OPTIMIZED_OPS_REGEX) # TODO: build prim_ops_test_cpp again once supported_features works in @@ -24,6 +24,8 @@ BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep - # TODO: expand the covered scope of Buck targets. # //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH. # //runtime/test/... requires Python torch, which we don't have in our OSS buck setup. -buck2 test $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \ - $BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \ - //runtime/executor: //runtime/kernel/... //runtime/platform/... +for op in "build" "test"; do + buck2 $op $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \ + $BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \ + //runtime/executor: //runtime/kernel/... //runtime/platform/... +done diff --git a/kernels/portable/cpu/targets.bzl b/kernels/portable/cpu/targets.bzl index 69db422b184..ea3e072a212 100644 --- a/kernels/portable/cpu/targets.bzl +++ b/kernels/portable/cpu/targets.bzl @@ -78,9 +78,11 @@ def define_common_targets(): "@EXECUTORCH_CLIENTS", ], deps = [ - "//executorch/runtime/core/exec_aten:lib", "//executorch/runtime/core/exec_aten/util:scalar_type_util", ], + exported_deps = [ + "//executorch/runtime/core/exec_aten:lib", + ], ) # Used for dtype selective build. Collect source and header files.