pytorch/docs/cpp/source/notes
Joel Schlosser e60f18c2ad Generate header with version #defines for LibTorch (#50073)
Summary:
Uses cmake's `configure_file()` macro to generate a new `torch/csrc/api/include/torch/version.h` header with `TORCH_VERSION_{MAJOR,MINOR,PATCH}` \#defines from an input file `torch/csrc/api/include/torch/version.h.in`.

For Bazel builds, this is accomplished with `header_template_rule()`.

For Buck builds, this is accomplished with `fb_native.genrule()`.

Fixes https://github.com/pytorch/pytorch/issues/44365

<img width="1229" alt="Screen Shot 2021-01-05 at 3 19 24 PM" src="https://user-images.githubusercontent.com/75754324/103809279-3fd80380-5027-11eb-9039-fd23922cebd5.png">

Pull Request resolved: https://github.com/pytorch/pytorch/pull/50073

Reviewed By: glaringlee

Differential Revision: D25855877

Pulled By: jbschlosser

fbshipit-source-id: 6bb792718c97e2c2dbaa74b7b7b831a4f6938e49
2021-02-03 22:18:53 -08:00
..
faq.rst Note on Tensor Creation 2018-11-05 16:10:58 -08:00
tensor_basics.rst Abstract atomic add calls (#31992) 2020-01-10 09:48:42 -08:00
tensor_creation.rst Improve C++ API autograd and indexing docs (#35777) 2020-04-02 09:33:11 -07:00
tensor_cuda_stream.rst Fix syntax issue in c++ cuda api note (#48434) 2020-11-25 14:31:14 -08:00
tensor_indexing.rst Improve C++ API autograd and indexing docs (#35777) 2020-04-02 09:33:11 -07:00
versioning.rst Generate header with version #defines for LibTorch (#50073) 2021-02-03 22:18:53 -08:00