mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: This is a follow up to #78015. This PR * introduces namespace logic for generating `NativeFunctions.h`. * adds helper function to extract namespace from string * relaxes the constraint on the levels we support for custom kernel namespace to 2 Test Plan: Yaml entry: ``` - func: unsqueeze.out(Tensor(a) self, int dim, *, Tensor(a!) out) -> Tensor(a!) variants: function device_check: NoCheck dispatch: CPU: custom_1::custom_2::unsqueeze ``` Generated `NativeFunctions.h`: ``` namespace custom_1 { namespace custom_2 { namespace native { TORCH_API at::Tensor & unsqueeze(const at::Tensor & self, int64_t dim, at::Tensor & out); } // namespace native } // namespace custom_2 } // namespace custom_1 ``` Differential Revision: D37198111 Pull Request resolved: https://github.com/pytorch/pytorch/pull/79733 Approved by: https://github.com/bdhirsh |
||
|---|---|---|
| .. | ||
| gen_operators_yaml_test.py | ||
| gen_oplist_test.py | ||
| test_cmake.py | ||
| test_codegen.py | ||
| test_codegen_model.py | ||
| test_gen_backend_stubs.py | ||
| test_import_test_stats.py | ||
| test_selective_build.py | ||
| test_stats.py | ||
| test_test_history.py | ||
| test_test_selections.py | ||
| test_upload_test_stats.py | ||
| test_utils.py | ||