Skip to content

Commit f8c6b80

Browse files
eigen-kfacebook-github-bot
authored andcommitted
Set pyre-strict for passes unit tests. (pytorch#11740)
Summary: Pull Request resolved: pytorch#11740 This diff fixes this test failure https://www.internalfb.com/intern/test/844425134145806 ...and also ensures same problem won't pop up for other unit tests. Reviewed By: zonglinpeng Differential Revision: D76767018
1 parent d984a2c commit f8c6b80

9 files changed

+448
-321
lines changed

backends/cadence/aot/TARGETS

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ load(
1212
"CXX",
1313
)
1414
load("@fbsource//xplat/executorch/codegen:codegen.bzl", "executorch_generated_lib")
15+
load("@fbcode_macros//build_defs:cpp_python_extension.bzl", "cpp_python_extension")
1516

1617
oncall("odai_jarvis")
1718

@@ -275,7 +276,6 @@ python_library(
275276
"//executorch/exir/passes:spec_prop_pass",
276277
],
277278
)
278-
279279
python_library(
280280
name = "decompose_ops",
281281
srcs = [
@@ -293,6 +293,14 @@ python_library(
293293
],
294294
)
295295

296+
python_library(
297+
name = "typing_stubs",
298+
srcs = [
299+
"typing_stubs.py",
300+
],
301+
typing = True,
302+
)
303+
296304

297305
python_unittest(
298306
name = "test_graph_builder",
@@ -321,6 +329,7 @@ python_unittest(
321329
deps = [
322330
"fbsource//third-party/pypi/parameterized:parameterized",
323331
":compiler",
332+
":typing_stubs",
324333
":replace_ops",
325334
"//caffe2:torch",
326335
"//executorch/backends/cadence/aot:compiler",
@@ -344,6 +353,7 @@ python_unittest(
344353
":compiler",
345354
":decompose_ops",
346355
"//caffe2:torch",
356+
":typing_stubs",
347357
"//executorch/backends/cadence/aot:compiler",
348358
"//executorch/backends/cadence/aot:graph_builder",
349359
"//executorch/backends/cadence/aot:pass_utils",
@@ -363,6 +373,7 @@ python_unittest(
363373
deps = [
364374
"fbsource//third-party/pypi/parameterized:parameterized",
365375
":compiler",
376+
":typing_stubs",
366377
"//caffe2:torch",
367378
"//executorch/backends/cadence/aot:compiler",
368379
"//executorch/backends/cadence/aot:fuse_ops",
@@ -384,6 +395,7 @@ python_unittest(
384395
deps = [
385396
"fbsource//third-party/pypi/parameterized:parameterized",
386397
"fbsource//third-party/pypi/pyre-extensions:pyre-extensions",
398+
":typing_stubs",
387399
":compiler",
388400
"//caffe2:torch",
389401
"//executorch/backends/cadence/aot:compiler",
@@ -404,6 +416,7 @@ python_unittest(
404416
supports_static_listing = False,
405417
typing = True,
406418
deps = [
419+
":typing_stubs",
407420
"fbsource//third-party/pypi/parameterized:parameterized",
408421
"//caffe2:torch",
409422
"//executorch/backends/cadence/aot:compiler",
@@ -477,6 +490,7 @@ python_unittest(
477490
deps = [
478491
":compiler",
479492
":memory_planning",
493+
":typing_stubs",
480494
":ops_registrations",
481495
":pass_utils",
482496
"//caffe2:torch",

0 commit comments

Comments
 (0)