pytorch/cmake
Peter Bell 4829dcea09 Codegen: Generate seperate headers per operator (#68247)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68247

This splits `Functions.h`, `Operators.h`, `NativeFunctions.h` and
`NativeMetaFunctions.h` into seperate headers per operator base name.
With `at::sum` as an example, we can include:
```cpp
<ATen/core/sum.h>         // Like Functions.h
<ATen/core/sum_ops.h>     // Like Operators.h
<ATen/core/sum_native.h>  // Like NativeFunctions.h
<ATen/core/sum_meta.h>    // Like NativeMetaFunctions.h
```

The umbrella headers are still being generated, but all they do is
include from the `ATen/ops' folder.

Further, `TensorBody.h` now only includes the operators that have
method variants. Which means files that only include `Tensor.h` don't
need to be rebuilt when you modify function-only operators. Currently
there are about 680 operators that don't have method variants, so this
is potentially a significant win for incremental builds.

Test Plan: Imported from OSS

Reviewed By: mrshenli

Differential Revision: D32596272

Pulled By: albanD

fbshipit-source-id: 447671b2b6adc1364f66ed9717c896dae25fa272
2021-12-14 06:40:08 -08:00
..
External Disable ccache for nccl builds (#62208) 2021-07-27 08:07:26 -07:00
Modules Upgrade oneDNN to v2.3.3 and package oneDNN Graph API together (#63748) 2021-12-09 13:42:40 -08:00
Modules_CUDA_fix
public [ROCm] Refactor how to specify AMD gpu targets using PYTORCH_ROCM_ARCH (#61706) 2021-12-13 15:41:40 -08:00
Allowlist.cmake
BuildVariables.cmake
Caffe2Config.cmake.in
Caffe2ConfigVersion.cmake.in
cmake_uninstall.cmake.in
Codegen.cmake Codegen: Generate seperate headers per operator (#68247) 2021-12-14 06:40:08 -08:00
DebugHelper.cmake
Dependencies.cmake Back out "[pytorch][PR] Add ability for a mobile::Module to save as flatbuffer" (#69796) 2021-12-10 21:29:53 -08:00
GoogleTestPatch.cmake Update CMake and use native CUDA language support (#62445) 2021-10-11 09:05:48 -07:00
IncludeSource.cpp.in CMake: Include instead of copying cpu kernel files (#67656) 2021-11-30 19:13:53 -08:00
iOS.cmake
Metal.cmake
MiscCheck.cmake Disable RDYNAMIC check with MSVC (#62949) 2021-08-18 11:51:23 -07:00
ProtoBuf.cmake Update protobuf to 3.13.1 (#62571) 2021-08-19 23:43:55 -07:00
ProtoBufPatch.cmake Update protobuf to 3.13.1 (#62571) 2021-08-19 23:43:55 -07:00
Summary.cmake Modify "gemm" code to enable access to "sbgemm_" routine in OpenBLAS (#58831) 2021-11-03 08:53:27 -07:00
TorchConfig.cmake.in [deploy] docs (#69251) 2021-12-01 21:55:18 -08:00
TorchConfigVersion.cmake.in
VulkanCodegen.cmake [vulkan] Add image format qualifier to glsl files (#69330) 2021-12-07 16:23:09 -08:00
VulkanDependencies.cmake