Skip to content
Snippets Groups Projects
Commit 7307e40b authored by Cao Yuhang's avatar Cao Yuhang
Browse files

solve deformable_col2im: invalid argument by increasing channel

parent edb03937
No related branches found
No related tags found
No related merge requests found
......@@ -73,10 +73,11 @@ using namespace at;
i += blockDim.x * gridDim.x)
const int CUDA_NUM_THREADS = 1024;
const int kMaxGridNum = 65535;
inline int GET_BLOCKS(const int N)
{
return (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS;
return std::min(kMaxGridNum, (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS);
}
template <typename scalar_t>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment