Skip to content

Commit

Permalink
Remove tombstone messages proactively (#8703)
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/pytorch#147897

Pull Request resolved: #8703

Originally we created a bunch of empty `TARGETS` files to allow us to enable `BUCK` files in fbcode by hiding the existing BUCK file. These files were subsequently merged together using `non_fbcode_target` so these tombstones are no longer necessary.

This diff fixes all files that WOULD have had the useless tombstone merged into them. To create this diff, I just ran the merger script that Codemod Service is using and then deleted the "merged from" and tombstone lines with `sed`, `arc f` and reverted any lines that didn't make sense

Differential Revision: D69994481
  • Loading branch information
bigfootjon authored and facebook-github-bot committed Feb 27, 2025
1 parent afcec1d commit 9a33ba3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 22 deletions.
11 changes: 6 additions & 5 deletions examples/demo-apps/android/ExecuTorchDemo/app/src/main/BUCK
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//tools/build_defs:manifold.bzl", "manifold_get")
load("@fbsource//tools/build_defs/android:fb_android_binary.bzl", "fb_android_binary")
load("@fbsource//tools/build_defs/android:fb_android_library.bzl", "fb_android_library")
load("@fbsource//tools/build_defs/android:fb_android_resource.bzl", "fb_android_resource")

manifold_get(
non_fbcode_target(_kind = manifold_get,
name = "dl3_xnnpack_fp32",
out = "dl3_xnnpack_fp32.pte",
api_key = "executorch-key",
Expand All @@ -13,21 +14,21 @@ manifold_get(
timeout_msec = 120000,
)

fb_android_resource(
non_fbcode_target(_kind = fb_android_resource,
name = "app_res",
assets = "assets",
package = "com.example.executorchdemo",
res = "res",
)

fb_android_resource(
non_fbcode_target(_kind = fb_android_resource,
name = "model_res",
assets = {"dl3_xnnpack_fp32.pte": ":dl3_xnnpack_fp32"},
package = "com.example.executorchdemo",
res = "res",
)

fb_android_library(
non_fbcode_target(_kind = fb_android_library,
name = "app_lib",
srcs = [
"java/com/example/executorchdemo/ClassificationActivity.java",
Expand All @@ -43,7 +44,7 @@ fb_android_library(
],
)

fb_android_binary(
non_fbcode_target(_kind = fb_android_binary,
name = "ExecuTorchDemo",
keystore = "//fbandroid/keystores:debug",
manifest = "AndroidManifest.xml",
Expand Down

This file was deleted.

7 changes: 4 additions & 3 deletions examples/demo-apps/android/LlamaDemo/app/src/main/BUCK
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//tools/build_defs/android:fb_android_binary.bzl", "fb_android_binary")
load("@fbsource//tools/build_defs/android:fb_android_library.bzl", "fb_android_library")
load("@fbsource//tools/build_defs/android:fb_android_resource.bzl", "fb_android_resource")

oncall("executorch")

fb_android_resource(
non_fbcode_target(_kind = fb_android_resource,
name = "app_res",
package = "com.example.executorchllamademo",
res = "res",
)

fb_android_library(
non_fbcode_target(_kind = fb_android_library,
name = "app_lib",
srcs = [
"java/com/example/executorchllamademo/AppLog.java",
Expand Down Expand Up @@ -43,7 +44,7 @@ fb_android_library(
],
)

fb_android_binary(
non_fbcode_target(_kind = fb_android_binary,
name = "ExecuTorchLlamaDemo",
keystore = "//fbandroid/keystores:debug",
manifest = "AndroidManifest.xml",
Expand Down
1 change: 0 additions & 1 deletion examples/demo-apps/android/LlamaDemo/app/src/main/TARGETS

This file was deleted.

5 changes: 3 additions & 2 deletions extension/android/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//tools/build_defs/android:fb_android_library.bzl", "fb_android_library")

oncall("executorch")

fb_android_library(
non_fbcode_target(_kind = fb_android_library,
name = "executorch",
srcs = [
"src/main/java/org/pytorch/executorch/DType.java",
Expand All @@ -20,7 +21,7 @@ fb_android_library(
],
)

fb_android_library(
non_fbcode_target(_kind = fb_android_library,
name = "executorch_llama",
srcs = [
"src/main/java/org/pytorch/executorch/LlamaCallback.java",
Expand Down
1 change: 0 additions & 1 deletion extension/android/TARGETS

This file was deleted.

11 changes: 6 additions & 5 deletions extension/android/jni/BUCK
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//tools/build_defs/android:fb_android_cxx_library.bzl", "fb_android_cxx_library")
load("@fbsource//xplat/executorch/backends/xnnpack/third-party:third_party_libs.bzl", "third_party_dep")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/codegen:codegen.bzl", "executorch_generated_lib")

oncall("executorch")

executorch_generated_lib(
non_fbcode_target(_kind = executorch_generated_lib,
name = "generated_op_lib_optimized",
custom_ops_aten_kernel_deps = [
"//executorch/kernels/portable:operators_aten",
Expand All @@ -24,7 +25,7 @@ executorch_generated_lib(
],
)

fb_android_cxx_library(
non_fbcode_target(_kind = fb_android_cxx_library,
name = "executorch_jni",
srcs = ["jni_layer.cpp", "log.cpp"],
headers = ["jni_layer_constants.h"],
Expand All @@ -49,7 +50,7 @@ fb_android_cxx_library(
],
)

fb_android_cxx_library(
non_fbcode_target(_kind = fb_android_cxx_library,
name = "executorch_jni_full",
srcs = ["jni_layer.cpp", "log.cpp"],
headers = ["jni_layer_constants.h"],
Expand All @@ -74,7 +75,7 @@ fb_android_cxx_library(
],
)

fb_android_cxx_library(
non_fbcode_target(_kind = fb_android_cxx_library,
name = "executorch_llama_jni",
srcs = [
"jni_layer.cpp",
Expand Down Expand Up @@ -106,7 +107,7 @@ fb_android_cxx_library(
],
)

runtime.cxx_library(
non_fbcode_target(_kind = runtime.cxx_library,
name = "log_provider",
srcs = ["log.cpp"],
exported_headers = ["log.h"],
Expand Down
1 change: 0 additions & 1 deletion extension/android/jni/TARGETS

This file was deleted.

1 change: 0 additions & 1 deletion extension/android_test/TARGETS

This file was deleted.

1 change: 0 additions & 1 deletion extension/apple/ExecuTorch/TARGETS

This file was deleted.

1 change: 0 additions & 1 deletion extension/apple/TARGETS

This file was deleted.

0 comments on commit 9a33ba3

Please sign in to comment.