Skip to content

Commit 233ff47

Browse files
authored
[CI] Windows Fixes (#3344)
* Fixes * Exclude
1 parent f1f920e commit 233ff47

7 files changed

Lines changed: 47 additions & 2 deletions

File tree

python/tflite_micro/BUILD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ py_test(
9191
"nomsan", # Python doesn't like these symbols in _runtime.so
9292
"noubsan",
9393
],
94+
target_compatible_with = select({
95+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
96+
"//conditions:default": [],
97+
}),
9498
deps = [
9599
":runtime",
96100
requirement("numpy"),
@@ -110,6 +114,7 @@ py_test(
110114
],
111115
# Only compatible when compression is NOT enabled
112116
target_compatible_with = select({
117+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
113118
"//:with_compression_enabled": ["@platforms//:incompatible"],
114119
"//conditions:default": [],
115120
}),

tensorflow/lite/micro/compression/BUILD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ py_test(
105105
size = "small",
106106
srcs = ["metadata_test.py"],
107107
main = "metadata_test.py",
108+
target_compatible_with = select({
109+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
110+
"//conditions:default": [],
111+
}),
108112
deps = [
109113
"metadata_py",
110114
"@flatbuffers//:runtime_py",
@@ -150,6 +154,10 @@ py_test(
150154
"nomsan", # Sanitizer symbols don't work with Python extension libs
151155
"noubsan",
152156
],
157+
target_compatible_with = select({
158+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
159+
"//conditions:default": [],
160+
}),
153161
deps = [
154162
":compress",
155163
":metadata_py",
@@ -176,6 +184,10 @@ py_test(
176184
name = "model_facade_test",
177185
size = "small",
178186
srcs = ["model_facade_test.py"],
187+
target_compatible_with = select({
188+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
189+
"//conditions:default": [],
190+
}),
179191
deps = [
180192
":model_facade",
181193
":test_models",
@@ -195,6 +207,10 @@ py_test(
195207
name = "spec_test",
196208
size = "small",
197209
srcs = ["spec_test.py"],
210+
target_compatible_with = select({
211+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
212+
"//conditions:default": [],
213+
}),
198214
deps = [
199215
":spec",
200216
requirement("tensorflow"),
@@ -213,6 +229,10 @@ py_test(
213229
name = "spec_builder_test",
214230
size = "small",
215231
srcs = ["spec_builder_test.py"],
232+
target_compatible_with = select({
233+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
234+
"//conditions:default": [],
235+
}),
216236
deps = [
217237
":spec",
218238
":spec_builder",
@@ -234,6 +254,10 @@ py_test(
234254
name = "test_models_test",
235255
size = "small",
236256
srcs = ["test_models_test.py"],
257+
target_compatible_with = select({
258+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
259+
"//conditions:default": [],
260+
}),
237261
deps = [
238262
":test_models",
239263
"//tensorflow/lite/python:schema_py",

tensorflow/lite/micro/examples/mnist_lstm/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ py_test(
3939
"nomsan", # Python doesn't like these symbols
4040
"noubsan",
4141
],
42+
target_compatible_with = select({
43+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
44+
"//conditions:default": [],
45+
}),
4246
deps = [
4347
":evaluate",
4448
":train",

tensorflow/lite/micro/examples/recipes/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ py_test(
3333
"nomsan", # Python doesn't like these symbols
3434
"noubsan",
3535
],
36+
target_compatible_with = select({
37+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
38+
"//conditions:default": [],
39+
}),
3640
deps = [
3741
":resource_variables_lib",
3842
"//python/tflite_micro:runtime",

tensorflow/lite/micro/python/tflite_size/tests/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ py_test(
2424
"nomsan", # Python doesn't like these symbols from flatbuffer_size_wrapper_pybind.so
2525
"noubsan",
2626
],
27+
target_compatible_with = select({
28+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
29+
"//conditions:default": [],
30+
}),
2731
deps = [
2832
requirement("tensorflow"),
2933
"//tensorflow/lite/micro/python/tflite_size/src:flatbuffer_size",

tensorflow/lite/micro/test_helpers.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ const Model* BuildModelWithUnusedOperatorOutputs() {
451451
TensorType_INT8, 0,
452452
builder->CreateString("test_unused_output_tensor"), 0, false)};
453453
constexpr size_t inputs_size = 0;
454-
const int32_t inputs[inputs_size] = {};
454+
const int32_t inputs[] = {0};
455455
constexpr size_t outputs_size = 1;
456456
const int32_t outputs[outputs_size] = {0};
457457
constexpr size_t operator_inputs_size = 0;
458-
const int32_t operator_inputs[operator_inputs_size] = {};
458+
const int32_t operator_inputs[] = {0};
459459
constexpr size_t operator_outputs_size = 2;
460460
const int32_t operator_outputs[operator_outputs_size] = {0, 1};
461461
constexpr size_t operators_size = 1;

tensorflow/lite/micro/tools/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ py_test(
6969
"nomsan", # Python doesn't like these symbols
7070
"noubsan",
7171
],
72+
target_compatible_with = select({
73+
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
74+
"//conditions:default": [],
75+
}),
7276
deps = [
7377
":requantize_flatbuffer",
7478
requirement("numpy"),

0 commit comments

Comments
 (0)