pytorch/torchgen
Jack Khuu 18dacf7e79 [Specialized Kernel] Update yaml syntax to use kernel instead of dispatch (#104070)
Based on this [code search](https://fburl.com/code/gjcnw8ly) (*.yaml with `dispatch: CPU:`), update all files found to use

```
kernels:
    - arg_meta: None
      kernel_name:
```
instead of
```
dispatch:
    CPU:
```
---
## Code changes:

- `fbcode/executorch/codegen/tools/gen_oplist.py`
  - Strip ET specific fields prior to calling parse_native_yaml_struct
---
## Files edited that are not `*functions.yaml` or `custom_ops.yaml`

- fbcode/executorch/kernels/optimized/optimized.yaml
- fbcode/executorch/kernels/quantized/quantized.yaml
- fbcode/executorch/kernels/test/custom_kernel_example/my_functions.yaml

---
## Found Files that were not edited

**Dispatched to more than just CPU**
- fbcode/caffe2/aten/src/ATen/native/native_functions.yaml
- xplat/caffe2/aten/src/ATen/native/native_functions.yaml
- xros/third-party/caffe2/caffe2/aten/src/ATen/native/native_functions.yaml

**Grouped ops.yaml path**
- fbcode/on_device_ai/Assistant/Jarvis/min_runtime/operators/ops.yaml

---
**Design Doc:** https://docs.google.com/document/d/1gq4Wz2R6verKJ2EFseLyPdAF0wqomnCrVDDJpRkYsRw/edit?kh_source=GDOCS#heading=h.8raqyft9y50

Differential Revision: [D46952067](https://our.internmc.facebook.com/intern/diff/D46952067/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D46952067/)!
Pull Request resolved: https://github.com/pytorch/pytorch/pull/104070
Approved by: https://github.com/larryliu0820
2023-06-27 09:53:20 +00:00
..
api [Reland] Add sym_size/stride/numel/storage_offset to native_function.yaml (#103107) 2023-06-12 19:18:49 +00:00
decompositions
dest [BE] Use Literal from typing (#98846) 2023-04-12 05:49:37 +00:00
executorch [Specialized Kernel] Update yaml syntax to use kernel instead of dispatch (#104070) 2023-06-27 09:53:20 +00:00
operator_versions
selective_build [Reland][ET] Select used et_kernel_metadata only (#104005) 2023-06-23 14:38:45 +00:00
shape_functions
static_runtime sparse.mm backward: performance improvements (#94991) 2023-06-12 20:57:29 +00:00
__init__.py
BUCK.oss
BUILD.bazel
build.bzl update rules_python and let bazel install its own pip dependencies (#101405) 2023-05-23 06:20:33 +00:00
code_template.py
context.py [Specialized Kernel] Propagate Specialized Kernel Support through ComputeCodegenUnboxedKernels (#103113) 2023-06-14 10:18:16 +00:00
gen.py [Specialized Kernel] Translate Kernel Assignment Logic from function.yaml to native_functions.yaml (#102576) 2023-06-08 23:42:24 +00:00
gen_backend_stubs.py fix missing-prototypes warnings in torch_cpu (Part 6) (#101845) 2023-06-15 16:48:28 +00:00
gen_executorch.py [Reland][ET] Select used et_kernel_metadata only (#104005) 2023-06-23 14:38:45 +00:00
gen_functionalization_type.py REDO of dropout support for mem eff #102038 (#103704) 2023-06-26 23:05:03 +00:00
gen_lazy_tensor.py Excise yaml dependency in torchgen.model (#100203) 2023-04-28 13:45:39 +00:00
gen_vmap_plumbing.py
local.py
model.py [Reland] Add sym_size/stride/numel/storage_offset to native_function.yaml (#103107) 2023-06-12 19:18:49 +00:00
native_function_generation.py [RFC]: Create aten native op for constrain_range (#103346) 2023-06-16 14:55:40 +00:00
utils.py Excise yaml dependency in torchgen.model (#100203) 2023-04-28 13:45:39 +00:00
yaml_utils.py Excise yaml dependency in torchgen.model (#100203) 2023-04-28 13:45:39 +00:00