#include #include #include #include #include #include #include #include "interpolate_gpu.h" #include #include 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) { const float *unknown = unknown_tensor.data(); const float *known = known_tensor.data(); float *dist2 = dist2_tensor.data(); int *idx = idx_tensor.data(); cudaStream_t stream = at::cuda::getCurrentCUDAStream().stream(); three_nn_kernel_launcher_fast(b, n, m, unknown, known, dist2, idx, stream); } void three_interpolate_wrapper_fast(int b, int c, int m, int n, at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor out_tensor) { const float *points = points_tensor.data(); const float *weight = weight_tensor.data(); float *out = out_tensor.data(); const int *idx = idx_tensor.data(); cudaStream_t stream = at::cuda::getCurrentCUDAStream().stream(); three_interpolate_kernel_launcher_fast(b, c, m, n, points, idx, weight, out, stream); } void three_interpolate_grad_wrapper_fast(int b, int c, int n, int m, at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor grad_points_tensor) { const float *grad_out = grad_out_tensor.data(); const float *weight = weight_tensor.data(); float *grad_points = grad_points_tensor.data(); const int *idx = idx_tensor.data(); cudaStream_t stream = at::cuda::getCurrentCUDAStream().stream(); three_interpolate_grad_kernel_launcher_fast(b, c, n, m, grad_out, idx, weight, grad_points, stream); }