Skip to content

Commit

Permalink
fix(torch): add include sometimes needed
Browse files Browse the repository at this point in the history
  • Loading branch information
fantes authored and beniz committed Sep 15, 2021
1 parent 67e5bc0 commit 74487dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ if (USE_TORCH)
${PYTORCH_PATCHES_PATH}/pytorch_15_compile.patch
${PYTORCH_PATCHES_PATH}/pytorch_19_new_logger.patch
${PYTORCH_PATCHES_PATH}/pytorch_19_use_new_logger.patch
${PYTORCH_PATCHES_PATH}/pytorch_19_thrust_include.patch
)

message(STATUS "Configuring libtorch")
Expand Down
12 changes: 12 additions & 0 deletions patches/pytorch/pytorch_19_thrust_include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/caffe2/utils/math_gpu.cu b/caffe2/utils/math_gpu.cu
index 3de3ace02e..0b407ab545 100644
--- a/caffe2/utils/math_gpu.cu
+++ b/caffe2/utils/math_gpu.cu
@@ -10,6 +10,7 @@
#include <cub/block/block_reduce.cuh>
#include <cub/cub.cuh>

+#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/functional.h>

0 comments on commit 74487dc

Please sign in to comment.