diff --git a/torchvision/csrc/cuda/cuda_helpers.h b/torchvision/csrc/cuda/cuda_helpers.h index dac87f19e8c..a82e1c86f87 100644 --- a/torchvision/csrc/cuda/cuda_helpers.h +++ b/torchvision/csrc/cuda/cuda_helpers.h @@ -5,6 +5,6 @@ i += (blockDim.x * gridDim.x)) template -constexpr inline integer ceil_div(integer n, integer m) { +constexpr __host__ __device__ inline integer ceil_div(integer n, integer m) { return (n + m - 1) / m; }