Skip to content

Commit

Permalink
Update on "Add torch.nested namespace"
Browse files Browse the repository at this point in the history
First step towards #83775
- only `to_padded_tensor` is moved to the nested namespace for now
- following the schema used for `special`, `fft`, `linalg` and other namespaces, nested functions are registered in native_functions.yaml as `nested_{function_name}` and are bound to the desired Python name in
`torch/nested/__init__.py`, and the desired C++ name in `torch/csrc/api/include/torch/nested.h`.

~~**Question**: should we keep the documentation for `Tensor.to_padded_tensor` or can this deleted since it is shared by `torch.nested.to_padded_tensor`?~~

[generated nested docs](https://docs-preview.pytorch.org/84102/nested.html?highlight=nested#module-torch.nested)


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

[ghstack-poisoned]
  • Loading branch information
mikaylagawarecki committed Sep 8, 2022
2 parents b4413c4 + 0391de6 commit d5a2375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ def glob_libtorch_python_sources(gencode_pattern = ":generate-code[{}]"):
"torch/csrc/autograd/generated/python_functions_2.cpp",
"torch/csrc/autograd/generated/python_functions_3.cpp",
"torch/csrc/autograd/generated/python_functions_4.cpp",
"torch/csrc/autograd/generated/python_nested_functions.cpp",
"torch/csrc/autograd/generated/python_nested_functions.cpp",
"torch/csrc/autograd/generated/python_nn_functions.cpp",
"torch/csrc/autograd/generated/python_fft_functions.cpp",
"torch/csrc/autograd/generated/python_linalg_functions.cpp",
Expand Down

0 comments on commit d5a2375

Please sign in to comment.