Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ build --workspace_status_command=./tools/workspace_status.sh
# TODO(b/315853820): Needed for Bazel 7.0, until migrated to bzlmod
build --noenable_bzlmod

# Automatically enable the config matching the host OS
common --enable_platform_specific_config

# Use the following C++ standard
build --cxxopt=-std=c++17
build:linux --cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:windows --cxxopt=/std:c++17

# Common options for --config=ci
Expand Down
14 changes: 14 additions & 0 deletions python/tflite_micro/signal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ py_tflm_signal_library(
],
)

TARGET_COMPATIBLE_WITH = select({
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
})

py_test(
name = "delay_op_test",
size = "small",
Expand All @@ -71,6 +76,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":delay_op",
requirement("numpy"),
Expand Down Expand Up @@ -102,6 +108,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":energy_op",
requirement("numpy"),
Expand Down Expand Up @@ -133,6 +140,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":fft_ops",
requirement("numpy"),
Expand Down Expand Up @@ -170,6 +178,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":filter_bank_ops",
requirement("numpy"),
Expand Down Expand Up @@ -201,6 +210,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":framer_op",
requirement("numpy"),
Expand Down Expand Up @@ -229,6 +239,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":overlap_add_op",
requirement("absl_py"),
Expand Down Expand Up @@ -261,6 +272,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":pcan_op",
requirement("numpy"),
Expand Down Expand Up @@ -292,6 +304,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":stacker_op",
requirement("numpy"),
Expand Down Expand Up @@ -322,6 +335,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":window_op",
requirement("numpy"),
Expand Down
1 change: 1 addition & 0 deletions python/tflite_micro/signal/tflm_signal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def py_tflm_signal_library(
if srcs:
binary_path_end_pos = srcs[0].rfind("/")
binary_path = srcs[0][0:binary_path_end_pos]

binary_name = binary_path + "/_" + cc_op_kernels[0][1:] + ".so"
if cc_op_defs:
binary_name = "ops/_" + name + ".so"
Expand Down
7 changes: 7 additions & 0 deletions python/tflite_micro/signal/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ package(
licenses = ["notice"],
)

TARGET_COMPATIBLE_WITH = select({
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
})

py_test(
name = "freq_to_mel_test",
srcs = ["freq_to_mel_test.py"],
Expand All @@ -22,6 +27,7 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
)

py_library(
Expand Down Expand Up @@ -73,5 +79,6 @@ py_test(
"nomsan",
"noubsan",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
visibility = ["//visibility:public"],
)
17 changes: 17 additions & 0 deletions signal/micro/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,17 @@ cc_library(
],
)

TARGET_COMPATIBLE_WITH = select({
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
})

cc_test(
name = "fft_test",
srcs = [
"fft_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":fft_flexbuffers_generated_data",
":register_signal_ops",
Expand Down Expand Up @@ -104,6 +110,7 @@ cc_test(
srcs = [
"window_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":register_signal_ops",
":window_flexbuffers_generated_data",
Expand All @@ -130,6 +137,7 @@ cc_test(
srcs = [
"framer_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":framer_flexbuffers_generated_data",
":register_signal_ops",
Expand All @@ -156,6 +164,7 @@ cc_test(
srcs = [
"overlap_add_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":overlap_add_flexbuffers_generated_data",
":register_signal_ops",
Expand All @@ -182,6 +191,7 @@ cc_test(
srcs = [
"delay_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":delay_flexbuffers_generated_data",
"//tensorflow/lite/c:common",
Expand All @@ -207,6 +217,7 @@ cc_test(
srcs = [
"stacker_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":register_signal_ops",
":stacker_flexbuffers_generated_data",
Expand All @@ -233,6 +244,7 @@ cc_test(
srcs = [
"energy_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":energy_flexbuffers_generated_data",
":register_signal_ops",
Expand Down Expand Up @@ -279,6 +291,7 @@ cc_test(
srcs = [
"filter_bank_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":filter_bank_flexbuffers_generated_data",
"//tensorflow/lite/c:common",
Expand All @@ -294,6 +307,7 @@ cc_test(
srcs = [
"filter_bank_log_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":filter_bank_log_flexbuffers_generated_data",
"//tensorflow/lite/c:common",
Expand All @@ -309,6 +323,7 @@ cc_test(
srcs = [
"filter_bank_spectral_subtraction_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":filter_bank_spectral_subtraction_flexbuffers_generated_data",
"//tensorflow/lite/c:common",
Expand All @@ -324,6 +339,7 @@ cc_test(
srcs = [
"filter_bank_square_root_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
"//tensorflow/lite/c:common",
"//tensorflow/lite/micro:op_resolvers",
Expand All @@ -348,6 +364,7 @@ cc_test(
srcs = [
"pcan_test.cc",
],
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":pcan_flexbuffers_generated_data",
"//tensorflow/lite/c:common",
Expand Down
Loading