From e667030e126c405befb121f933c999c9a2c27931 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Sat, 24 Jan 2026 17:54:55 -0800 Subject: [PATCH 1/2] Fixes --- tensorflow/lite/micro/compression/BUILD | 24 +++++++++++++++++++ .../lite/micro/examples/mnist_lstm/BUILD | 4 ++++ tensorflow/lite/micro/examples/recipes/BUILD | 4 ++++ .../lite/micro/python/tflite_size/tests/BUILD | 4 ++++ tensorflow/lite/micro/test_helpers.cc | 4 ++-- tensorflow/lite/micro/tools/BUILD | 4 ++++ 6 files changed, 42 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/micro/compression/BUILD b/tensorflow/lite/micro/compression/BUILD index dc0f882e029..a3b009abdee 100644 --- a/tensorflow/lite/micro/compression/BUILD +++ b/tensorflow/lite/micro/compression/BUILD @@ -105,6 +105,10 @@ py_test( size = "small", srcs = ["metadata_test.py"], main = "metadata_test.py", + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ "metadata_py", "@flatbuffers//:runtime_py", @@ -150,6 +154,10 @@ py_test( "nomsan", # Sanitizer symbols don't work with Python extension libs "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":compress", ":metadata_py", @@ -176,6 +184,10 @@ py_test( name = "model_facade_test", size = "small", srcs = ["model_facade_test.py"], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":model_facade", ":test_models", @@ -195,6 +207,10 @@ py_test( name = "spec_test", size = "small", srcs = ["spec_test.py"], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":spec", requirement("tensorflow"), @@ -213,6 +229,10 @@ py_test( name = "spec_builder_test", size = "small", srcs = ["spec_builder_test.py"], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":spec", ":spec_builder", @@ -234,6 +254,10 @@ py_test( name = "test_models_test", size = "small", srcs = ["test_models_test.py"], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":test_models", "//tensorflow/lite/python:schema_py", diff --git a/tensorflow/lite/micro/examples/mnist_lstm/BUILD b/tensorflow/lite/micro/examples/mnist_lstm/BUILD index 2c844132b83..ec846f91f8c 100644 --- a/tensorflow/lite/micro/examples/mnist_lstm/BUILD +++ b/tensorflow/lite/micro/examples/mnist_lstm/BUILD @@ -39,6 +39,10 @@ py_test( "nomsan", # Python doesn't like these symbols "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":evaluate", ":train", diff --git a/tensorflow/lite/micro/examples/recipes/BUILD b/tensorflow/lite/micro/examples/recipes/BUILD index 1feef436df5..b3e880fb77b 100644 --- a/tensorflow/lite/micro/examples/recipes/BUILD +++ b/tensorflow/lite/micro/examples/recipes/BUILD @@ -33,6 +33,10 @@ py_test( "nomsan", # Python doesn't like these symbols "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":resource_variables_lib", "//python/tflite_micro:runtime", diff --git a/tensorflow/lite/micro/python/tflite_size/tests/BUILD b/tensorflow/lite/micro/python/tflite_size/tests/BUILD index 970d29e519c..d34f8ea54e4 100644 --- a/tensorflow/lite/micro/python/tflite_size/tests/BUILD +++ b/tensorflow/lite/micro/python/tflite_size/tests/BUILD @@ -24,6 +24,10 @@ py_test( "nomsan", # Python doesn't like these symbols from flatbuffer_size_wrapper_pybind.so "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ requirement("tensorflow"), "//tensorflow/lite/micro/python/tflite_size/src:flatbuffer_size", diff --git a/tensorflow/lite/micro/test_helpers.cc b/tensorflow/lite/micro/test_helpers.cc index 3b55c50d564..08b12f0aad2 100644 --- a/tensorflow/lite/micro/test_helpers.cc +++ b/tensorflow/lite/micro/test_helpers.cc @@ -451,11 +451,11 @@ const Model* BuildModelWithUnusedOperatorOutputs() { TensorType_INT8, 0, builder->CreateString("test_unused_output_tensor"), 0, false)}; constexpr size_t inputs_size = 0; - const int32_t inputs[inputs_size] = {}; + const int32_t inputs[] = {0}; constexpr size_t outputs_size = 1; const int32_t outputs[outputs_size] = {0}; constexpr size_t operator_inputs_size = 0; - const int32_t operator_inputs[operator_inputs_size] = {}; + const int32_t operator_inputs[] = {0}; constexpr size_t operator_outputs_size = 2; const int32_t operator_outputs[operator_outputs_size] = {0, 1}; constexpr size_t operators_size = 1; diff --git a/tensorflow/lite/micro/tools/BUILD b/tensorflow/lite/micro/tools/BUILD index bcae7163bd1..364261b1e90 100644 --- a/tensorflow/lite/micro/tools/BUILD +++ b/tensorflow/lite/micro/tools/BUILD @@ -69,6 +69,10 @@ py_test( "nomsan", # Python doesn't like these symbols "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":requantize_flatbuffer", requirement("numpy"), From ab3cdd0fff377243ff6d5bf90a45cca7b11fca41 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Sat, 24 Jan 2026 17:57:28 -0800 Subject: [PATCH 2/2] Exclude --- python/tflite_micro/BUILD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/tflite_micro/BUILD b/python/tflite_micro/BUILD index 638522c8355..5932c5c75d6 100644 --- a/python/tflite_micro/BUILD +++ b/python/tflite_micro/BUILD @@ -91,6 +91,10 @@ py_test( "nomsan", # Python doesn't like these symbols in _runtime.so "noubsan", ], + target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [ ":runtime", requirement("numpy"), @@ -110,6 +114,7 @@ py_test( ], # Only compatible when compression is NOT enabled target_compatible_with = select({ + "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], "//:with_compression_enabled": ["@platforms//:incompatible"], "//conditions:default": [], }),