Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] fixed paddle custom ops windows build error #2103

Merged
merged 9 commits into from
Jul 13, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ namespace paddle_custom_ops {
#define CHECK_INPUT_BATCHSIZE(x) \
PD_CHECK(x.shape()[0] == 1, #x " batch size must be 1.")

#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
__host__ __device__ static inline int DIVUP(const int m, const int n)
{ return ((m) / (n) + ((m) % (n) > 0)); }

static const int THREADS_PER_BLOCK_NMS = sizeof(int64_t) * 8;

Expand Down
6 changes: 4 additions & 2 deletions fastdeploy/runtime/backends/paddle/ops/iou3d_nms_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ All Rights Reserved 2019-2020.
namespace fastdeploy {
namespace paddle_custom_ops {

#define THREADS_PER_BLOCK 16
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
__host__ __device__ static inline int DIVUP(const int m, const int n)
{ return ((m) / (n) + ((m) % (n) > 0)); }

static const int THREADS_PER_BLOCK = 16;
static const int THREADS_PER_BLOCK_NMS = sizeof(int64_t) * 8;
#if defined(_WIN32)
#if defined(EPS)
Expand Down