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

feat: support torch>=1.11 #1041

Merged
merged 2 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_batch/src/ball_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ All Rights Reserved 2018.

#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "ball_query_gpu.h"

extern THCState *state;

#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_batch/src/group_points.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ All Rights Reserved 2018.
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <vector>
#include <THC/THC.h>
#include "group_points_gpu.h"

extern THCState *state;


int group_points_grad_wrapper_fast(int b, int c, int n, int npoints, int nsample,
at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor grad_points_tensor) {
Expand Down
4 changes: 1 addition & 3 deletions pcdet/ops/pointnet2/pointnet2_batch/src/interpolate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ All Rights Reserved 2018.

#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "interpolate_gpu.h"

extern THCState *state;


void three_nn_wrapper_fast(int b, int n, int m, at::Tensor unknown_tensor,
at::Tensor known_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor) {
Expand All @@ -43,6 +40,7 @@ void three_interpolate_wrapper_fast(int b, int c, int m, int n,
three_interpolate_kernel_launcher_fast(b, c, m, n, points, idx, weight, out);
}


void three_interpolate_grad_wrapper_fast(int b, int c, int n, int m,
at::Tensor grad_out_tensor,
at::Tensor idx_tensor,
Expand Down
4 changes: 0 additions & 4 deletions pcdet/ops/pointnet2/pointnet2_batch/src/sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ All Rights Reserved 2018.
#include <torch/serialize/tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <vector>
#include <THC/THC.h>

#include "sampling_gpu.h"

extern THCState *state;


int gather_points_wrapper_fast(int b, int c, int n, int npoints,
at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor){
Expand Down
4 changes: 1 addition & 3 deletions pcdet/ops/pointnet2/pointnet2_stack/src/ball_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ All Rights Reserved 2019-2020.

#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "ball_query_gpu.h"

extern THCState *state;

#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand All @@ -28,6 +25,7 @@ extern THCState *state;
} while (0)
#define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)


int ball_query_wrapper_stack(int B, int M, float radius, int nsample,
at::Tensor new_xyz_tensor, at::Tensor new_xyz_batch_cnt_tensor,
at::Tensor xyz_tensor, at::Tensor xyz_batch_cnt_tensor, at::Tensor idx_tensor) {
Expand Down
2 changes: 0 additions & 2 deletions pcdet/ops/pointnet2/pointnet2_stack/src/group_points.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ All Rights Reserved 2019-2020.
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <vector>
#include <THC/THC.h>
#include "group_points_gpu.h"

extern THCState *state;
#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ All Rights Reserved 2019-2020.

#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "interpolate_gpu.h"

extern THCState *state;

#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_stack/src/sampling.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#include <torch/serialize/tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <vector>
#include <THC/THC.h>

#include "sampling_gpu.h"

extern THCState *state;
#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_stack/src/vector_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ All Rights Reserved 2020.

#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "vector_pool_gpu.h"

extern THCState *state;

#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down
3 changes: 0 additions & 3 deletions pcdet/ops/pointnet2/pointnet2_stack/src/voxel_query.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "voxel_query_gpu.h"

extern THCState *state;

#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \
Expand Down