From 0a59450f0ebbe12d9a8db3de937814932517633b Mon Sep 17 00:00:00 2001 From: Jeff Daily Date: Fri, 28 Mar 2025 08:16:54 -0700 Subject: [PATCH] remove IntWrapper (#1964) Summary: I could not access https://github.com/NVlabs/cub/issues/172 to understand whether IntWrapper was still necessary but the comment is from 5 years ago and causes problems for the ROCm build. Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1964 Reviewed By: MichaelRamamonjisoa Differential Revision: D71937895 Pulled By: bottler fbshipit-source-id: 5e0351e1bd8599b670436cd3464796eca33156f6 --- pytorch3d/csrc/pulsar/include/camera.h | 5 ----- pytorch3d/csrc/pulsar/include/math.h | 5 ----- pytorch3d/csrc/pulsar/include/renderer.backward.device.h | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/pytorch3d/csrc/pulsar/include/camera.h b/pytorch3d/csrc/pulsar/include/camera.h index 7264c811..e67d5fd0 100644 --- a/pytorch3d/csrc/pulsar/include/camera.h +++ b/pytorch3d/csrc/pulsar/include/camera.h @@ -70,11 +70,6 @@ struct CamGradInfo { float3 pixel_dir_y; }; -// TODO: remove once https://github.com/NVlabs/cub/issues/172 is resolved. -struct IntWrapper { - int val; -}; - } // namespace pulsar #endif diff --git a/pytorch3d/csrc/pulsar/include/math.h b/pytorch3d/csrc/pulsar/include/math.h index 1ea6b567..b01f595e 100644 --- a/pytorch3d/csrc/pulsar/include/math.h +++ b/pytorch3d/csrc/pulsar/include/math.h @@ -149,11 +149,6 @@ IHD CamGradInfo operator*(const CamGradInfo& a, const float& b) { return res; } -IHD IntWrapper operator+(const IntWrapper& a, const IntWrapper& b) { - IntWrapper res; - res.val = a.val + b.val; - return res; -} } // namespace pulsar #endif diff --git a/pytorch3d/csrc/pulsar/include/renderer.backward.device.h b/pytorch3d/csrc/pulsar/include/renderer.backward.device.h index dcd9dd50..2b510d0f 100644 --- a/pytorch3d/csrc/pulsar/include/renderer.backward.device.h +++ b/pytorch3d/csrc/pulsar/include/renderer.backward.device.h @@ -155,8 +155,8 @@ void backward( stream); CHECKLAUNCH(); SUM_WS( - (IntWrapper*)(self->ids_sorted_d), - (IntWrapper*)(self->n_grad_contributions_d), + self->ids_sorted_d, + self->n_grad_contributions_d, static_cast(num_balls), self->workspace_d, self->workspace_size,