migrate backends/aoti/slim/factory/test (fbcode-only GPU tests) - #21426
migrate backends/aoti/slim/factory/test (fbcode-only GPU tests)#21426bigfootjon wants to merge 3 commits into
Conversation
Summary:
Chunk 10 of fbcode/executorch TARGETS->BUCK migration. 18 directories
under examples/ where TARGETS defines targets like `python_library(name=X)`
and the sister BUCK defines the same targets via the fbcode_target wrapper:
`fbcode_target(_kind = python_library, name = X)`. Both forms produce the
same logical target in fbcode; the wrapper just adds OSS-migration metadata.
Confirmed every name= in TARGETS is also in BUCK. Deleting TARGETS lets
fbcode fall through to BUCK (via name_v2 = TARGETS,BUCK) with no change in
target inventory.
Directories migrated:
- examples/models
- examples/models/{codegen,deeplab_v3,edsr,emformer_rnnt,glm,granite,
inception_v3,mobilebert,mobilenet_v2,smollm2,smollm3,smolvlm,
torchvision_vit,toy_model,wav2letter}
- examples/portable/scripts
- examples/xnnpack/quantization
Differential Revision: D109082050
Summary: Chunk 11 of fbcode/executorch TARGETS->BUCK migration. 5 directories that had only a TARGETS file with substantive fbcode-only content but were skipped from earlier chunks for various reasons (`fbcode_target(`, `fbcode_macros`, fbcode-only kwargs, etc.). Same chunk-6 pattern: created `targets.bzl` with `define_common_targets(is_fbcode = False)` whose body opens with `if not is_fbcode: return`, replaced TARGETS with a thin BUCK calling `define_common_targets(is_fbcode = is_fbcode())`. Directories migrated: - backends/aoti/tests - backends/cuda/runtime - backends/cuda/tests - extension/pybindings/fb - extension/pytree/test Differential Revision: D109082053
Summary: Add is_fbcode param to define_common_targets and early-return outside fbcode. The cxx_test rules use fbcode-only kwargs (keep_gpu_sections, re_test_utils.remote_execution) and were never evaluated in xplat (TARGETS-only pre-migration). Replaced TARGETS with thin BUCK calling define_common_targets(is_fbcode = is_fbcode()). Differential Revision: D109082041
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21426
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit e27319d with merge base c7b6f52 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@bigfootjon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109082041. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
Migrates several Buck build packages from legacy TARGETS files to BUCK wrappers that delegate target definitions to targets.bzl, gating fbcode-only test targets behind is_fbcode() to avoid xplat evaluation. Also removes stale model deps from the examples/models aggregate target.
Changes:
- Replace multiple
TARGETSpackages with thinBUCKfiles that calldefine_common_targets(is_fbcode = is_fbcode()). - Add/adjust
targets.bzlfiles to early-return outside fbcode for fbcode-only test definitions. - Remove
whisper/yolo26deps fromexamples/models/BUCK(no corresponding Buck targets in this repo).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| extension/pytree/test/targets.bzl | New shared target definition function gated by is_fbcode. |
| extension/pytree/test/TARGETS | Removed legacy TARGETS definitions. |
| extension/pytree/test/BUCK | New wrapper calling define_common_targets(...). |
| examples/models/BUCK | Drop deps on non-existent Buck targets (whisper, yolo26). |
| backends/cuda/tests/targets.bzl | New gated CUDA test target definitions (remote GPU test included). |
| backends/cuda/tests/TARGETS | Removed legacy TARGETS definitions. |
| backends/cuda/tests/BUCK | New wrapper calling define_common_targets(...). |
| backends/cuda/runtime/targets.bzl | New gated CUDA runtime + unit test targets moved from TARGETS. |
| backends/cuda/runtime/TARGETS | Removed legacy TARGETS definitions. |
| backends/cuda/runtime/BUCK | New wrapper calling define_common_targets(...). |
| backends/aoti/tests/targets.bzl | New gated AOTI test targets moved from TARGETS. |
| backends/aoti/tests/TARGETS | Removed legacy TARGETS definitions. |
| backends/aoti/tests/BUCK | New wrapper calling define_common_targets(...). |
| backends/aoti/slim/factory/test/targets.bzl | Update define_common_targets to accept is_fbcode + early-return outside fbcode. |
| backends/aoti/slim/factory/test/TARGETS | Removed legacy TARGETS wrapper. |
| backends/aoti/slim/factory/test/BUCK | New wrapper calling define_common_targets(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | ||
| load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") | ||
| load("@fbcode_macros//build_defs:python_unittest_remote_gpu.bzl", "python_unittest_remote_gpu") | ||
| load("@fbcode_macros//build_defs/lib:re_test_utils.bzl", "re_test_utils") |
| deps = [ | ||
| ":cuda_platform", | ||
| ":runtime_shims", | ||
| ":cuda_allocator", | ||
| ":cuda_platform", | ||
| "//executorch/backends/aoti:aoti_common_slim", |
| "//executorch/runtime/core/exec_aten/testing_util:tensor_util", | ||
| "//executorch/runtime/core/exec_aten:lib", | ||
| "//executorch/extension/tensor:tensor", | ||
| ], |
ndmitchell
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary:
Add is_fbcode param to define_common_targets and early-return outside
fbcode. The cxx_test rules use fbcode-only kwargs (keep_gpu_sections,
re_test_utils.remote_execution) and were never evaluated in xplat
(TARGETS-only pre-migration). Replaced TARGETS with thin BUCK calling
define_common_targets(is_fbcode = is_fbcode()).
Differential Revision: D109082041