From 238d01ec9044d66c021baefd26f765b265ef35a7 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 23 Mar 2022 17:42:55 -0700 Subject: [PATCH] Allow torch/csrc/deploy/interpreter/Optional.hpp to be allowed into the wheel distribution (#74643) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/74643 Previously `torch/csrc/deploy/interpreter/Optional.hpp` wasn't getting included in the wheel distribution created by `USE_DEPLOY=1 python setup.py bdist_wheel`, this pr fixes that Test Plan: Imported from OSS Reviewed By: d4l3k Differential Revision: D35094459 Pulled By: PaliC fbshipit-source-id: 50aea946cc5bb72720b993075bd57ccf8377db30 (cherry picked from commit 6ad5d96594f40af3d49d2137c2b3799a2d493b36) --- caffe2/CMakeLists.txt | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt index 2610ec3963afb..fb32b8d87c341 100644 --- a/caffe2/CMakeLists.txt +++ b/caffe2/CMakeLists.txt @@ -1143,7 +1143,7 @@ endif() install(DIRECTORY "${TORCH_SRC_DIR}/csrc" DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}/torch - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") install(DIRECTORY "${TORCH_SRC_DIR}/csrc/distributed/c10d" DESTINATION ${TORCH_INSTALL_INCLUDE_DIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") diff --git a/setup.py b/setup.py index 21e983edfd1e0..410edfefa7e72 100644 --- a/setup.py +++ b/setup.py @@ -1019,7 +1019,8 @@ def print_box(msg): 'include/torch/csrc/autograd/utils/*.h', 'include/torch/csrc/cuda/*.h', 'include/torch/csrc/deploy/*.h', - 'include/torch/csrc/deploy/interpreter/interpreter_impl.h', + 'include/torch/csrc/deploy/interpreter/*.h', + 'include/torch/csrc/deploy/interpreter/*.hpp', 'include/torch/csrc/distributed/c10d/exception.h', 'include/torch/csrc/jit/*.h', 'include/torch/csrc/jit/backends/*.h',