pytorch/torchgen
Joel Schlosser b928e08f3d Initial vmap + NT support with unbind fallback (#106786)
PoC demonstrating vmap + NT based on the [design doc](https://docs.google.com/document/d/1dVVk6TOqz93PLTIneU2T3xaxCs9qZ0MaJyCvOAp_bC0). This PR:
* Allows `BatchedTensorImpl`s to contain NTs
* Introduces a `BatchedNestedTensor` dispatch key for NT-specific batching rules
* Provides a batching rule fallback that unbinds the NTs -> performs computation on constituent -> rebinds results into NT

Restrictions:
* Only supports one level of vmap
* Only supports vmapping over dim=0 for NTs
    * For operations with mixed NT / dense inputs, support is also limited to dim=0 for the dense inputs
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106786
Approved by: https://github.com/zou3519
2023-09-07 13:53:20 +00:00
..
api [BE] use DeviceIndex instead of int64_t for related device interfaces (#103068) 2023-08-25 20:16:14 +00:00
decompositions
dest Remove ExclusivelyOwned from register_dispatch_key (#106791) 2023-08-11 21:04:33 +00:00
executorch [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
operator_versions [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
selective_build [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
shape_functions
static_runtime
__init__.py
BUCK.oss
BUILD.bazel
build.bzl
code_template.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
context.py [Specialized Kernel] Propagate Specialized Kernel Support through ComputeCodegenUnboxedKernels (#103113) 2023-06-14 10:18:16 +00:00
gen.py [BE]: Enable ruff rules PIE807 and PIE810 (#106218) 2023-07-28 22:35:56 +00:00
gen_backend_stubs.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
gen_executorch.py [executorch] Let custom ops registration code only import ATen headers (#107064) 2023-08-13 00:34:34 +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 [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
gen_vmap_plumbing.py
local.py
model.py Initial vmap + NT support with unbind fallback (#106786) 2023-09-07 13:53:20 +00:00
native_function_generation.py [export] Refactor constrain_as_value and constrain_as_size (#106591) 2023-08-15 05:41:43 +00:00
utils.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
yaml_utils.py [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00