pytorch/torchgen/api
Antonio Kim 02c4d877b4 Codegen Non-Native IR Nodes (#76535)
Add codegen infrastructure to generate IR nodes for non-native ops.

The proposed change is to add a `non_native` key to the `{backend}_native_functions.yaml` file that contains schema definitions similar to what is found in `native_functions.yaml`. e.g.
```
non_native:
    ...
    - func: expand(Tensor input, int[] size, bool is_scalar_expand) -> Tensor
    ...
```
these definitions are parsed into a `LazyIrSchema` that can be used for generating IR nodes using `GenLazyIR`.

Fixes #74628

CC: @wconstab @desertfire @henrytwo

Pull Request resolved: https://github.com/pytorch/pytorch/pull/76535
Approved by: https://github.com/wconstab
2022-05-24 19:29:23 +00:00
..
__init__.py
autograd.py [test] attempt to functionalize ops with mutable positional-only args 2022-05-19 18:50:34 +00:00
cpp.py [test] attempt to functionalize ops with mutable positional-only args 2022-05-19 18:50:34 +00:00
dispatcher.py
functionalization.py
lazy.py Codegen Non-Native IR Nodes (#76535) 2022-05-24 19:29:23 +00:00
meta.py
native.py
python.py
structured.py Add support to Tensor[]? for structured kernel codegen. 2022-05-06 14:24:18 +00:00
translate.py [test] attempt to functionalize ops with mutable positional-only args 2022-05-19 18:50:34 +00:00
types.py Add support to Tensor[]? for structured kernel codegen. 2022-05-06 14:24:18 +00:00
ufunc.py
unboxing.py Revert "functionalization: add support for zero_()" 2022-04-26 19:27:27 +00:00