Skip to content

Commit 490ed7c

Browse files
remove buck2 from kernel registration (#4220) (#4250)
Summary: Pull Request resolved: #4220 For alpha+, we need to remove all buck2 commands and buck2 dependencies from static doc and github readmes. This diff gets rid of the buck2 from runtime overview. Reviewed By: kirklandsign Differential Revision: D59646282 fbshipit-source-id: f39082ccb77cc528184737c33e302e2bec88d64a (cherry picked from commit 6051ce7) Co-authored-by: Songhao Jia <[email protected]>
1 parent e40ebcf commit 490ed7c

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

docs/source/kernel-library-custom-aten-kernel.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ ExecuTorch does not support all of the argument types that core PyTorch supports
218218

219219
### Build Tool Macros
220220

221-
We provide build time macros to help users to build their kernel registration library. The macro takes the yaml file describing the kernel library as well as model operator metadata, and packages the generated C++ bindings into a C++ library. The macro is available on both CMake and Buck2.
221+
We provide build time macros to help users to build their kernel registration library. The macro takes the yaml file describing the kernel library as well as model operator metadata, and packages the generated C++ bindings into a C++ library. The macro is available on CMake.
222222

223223

224224
#### CMake
@@ -263,46 +263,6 @@ And out fallback:
263263

264264
The merged yaml will have the entry in functions.yaml.
265265

266-
#### Buck2
267-
268-
`executorch_generated_lib` is the macro that takes the yaml files and depends on the selective build macro `et_operator_library`. For an example:
269-
```python
270-
# Yaml file for kernel library
271-
export_file(
272-
name = "functions.yaml"
273-
)
274-
275-
# Kernel library
276-
cxx_library(
277-
name = "add_kernel",
278-
srcs = ["add.cpp"],
279-
)
280-
281-
# Selective build artifact, it allows all operators to be registered
282-
et_operator_library(
283-
name = "all_ops",
284-
include_all_ops = True, # Select all ops in functions.yaml
285-
)
286-
287-
# Prepare a generated_lib
288-
executorch_generated_lib(
289-
name = "generated_lib",
290-
functions_yaml_target = ":functions.yaml",
291-
deps = [
292-
":all_ops",
293-
":add_kernel",
294-
],
295-
)
296-
297-
# Link generated_lib to ExecuTorch binary
298-
cxx_binary(
299-
name = "executorch_bin",
300-
deps = [
301-
":generated_lib",
302-
],
303-
)
304-
305-
```
306266

307267
### Custom Ops API Best Practices
308268

0 commit comments

Comments
 (0)