Skip to content

Commit

Permalink
[Bug Fix] fixed paddle custom ops windows build error (#2103)
Browse files Browse the repository at this point in the history
* [cmake] upgrade windows paddle inference -> 2.5.0

* [cmake] upgrade windows paddle inference -> 2.5.0

* fix paddle custom ops bug on windows

* [Backend] refactor paddle custom ops

* [Bug Fix] fixed paddle custom ops windows build error
  • Loading branch information
DefTruth authored Jul 13, 2023
1 parent 99c2b65 commit d5ad3d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit d5ad3d9

Please sign in to comment.