diff --git a/pytorch3d/csrc/compositing/alpha_composite.h b/pytorch3d/csrc/compositing/alpha_composite.h index ea8ace14..7ec7115c 100644 --- a/pytorch3d/csrc/compositing/alpha_composite.h +++ b/pytorch3d/csrc/compositing/alpha_composite.h @@ -63,10 +63,10 @@ torch::Tensor alphaCompositeForward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); + return alphaCompositeCudaForward(features, alphas, points_idx); #else AT_ERROR("Not compiled with GPU support"); #endif - return alphaCompositeCudaForward(features, alphas, points_idx); } else { CHECK_CONTIGUOUS(features); CHECK_CONTIGUOUS(alphas); @@ -92,12 +92,12 @@ std::tuple alphaCompositeBackward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); -#else - AT_ERROR("Not compiled with GPU support"); -#endif return alphaCompositeCudaBackward( grad_outputs, features, alphas, points_idx); +#else + AT_ERROR("Not compiled with GPU support"); +#endif } else { CHECK_CONTIGUOUS(grad_outputs); CHECK_CONTIGUOUS(features); diff --git a/pytorch3d/csrc/compositing/norm_weighted_sum.h b/pytorch3d/csrc/compositing/norm_weighted_sum.h index 964b268b..339b56fa 100644 --- a/pytorch3d/csrc/compositing/norm_weighted_sum.h +++ b/pytorch3d/csrc/compositing/norm_weighted_sum.h @@ -61,11 +61,11 @@ torch::Tensor weightedSumNormForward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); + + return weightedSumNormCudaForward(features, alphas, points_idx); #else AT_ERROR("Not compiled with GPU support"); #endif - - return weightedSumNormCudaForward(features, alphas, points_idx); } else { CHECK_CONTIGUOUS(features); CHECK_CONTIGUOUS(alphas); @@ -91,12 +91,12 @@ std::tuple weightedSumNormBackward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); -#else - AT_ERROR("Not compiled with GPU support"); -#endif return weightedSumNormCudaBackward( grad_outputs, features, alphas, points_idx); +#else + AT_ERROR("Not compiled with GPU support"); +#endif } else { CHECK_CONTIGUOUS(grad_outputs); CHECK_CONTIGUOUS(features); diff --git a/pytorch3d/csrc/compositing/weighted_sum.h b/pytorch3d/csrc/compositing/weighted_sum.h index fb978297..9c96e38c 100644 --- a/pytorch3d/csrc/compositing/weighted_sum.h +++ b/pytorch3d/csrc/compositing/weighted_sum.h @@ -61,11 +61,10 @@ torch::Tensor weightedSumForward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); + return weightedSumCudaForward(features, alphas, points_idx); #else AT_ERROR("Not compiled with GPU support"); #endif - - return weightedSumCudaForward(features, alphas, points_idx); } else { CHECK_CONTIGUOUS(features); CHECK_CONTIGUOUS(alphas); @@ -91,11 +90,11 @@ std::tuple weightedSumBackward( CHECK_CONTIGUOUS_CUDA(features); CHECK_CONTIGUOUS_CUDA(alphas); CHECK_CONTIGUOUS_CUDA(points_idx); + + return weightedSumCudaBackward(grad_outputs, features, alphas, points_idx); #else AT_ERROR("Not compiled with GPU support"); #endif - - return weightedSumCudaBackward(grad_outputs, features, alphas, points_idx); } else { CHECK_CONTIGUOUS(grad_outputs); CHECK_CONTIGUOUS(features);