From 722ad035184f21550b255590fd12bbaaecd39eeb Mon Sep 17 00:00:00 2001 From: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:00:57 +0530 Subject: [PATCH 1/2] [Fix] Replace hardcoded .cuda() with device-aware .to() in MinkUNet voxelization In Det3DDataPreprocessor.voxelize(), the minkunet branch converts numpy arrays back to tensors using torch.from_numpy(...).cuda(), which hardcodes the CUDA device. This causes failures when running on CPU-only environments or when the input data resides on a specific device (e.g., cuda:1). Replace .cuda() with .to(res.device) to correctly place tensors on the same device as the input point cloud. --- mmdet3d/models/data_preprocessors/data_preprocessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmdet3d/models/data_preprocessors/data_preprocessor.py b/mmdet3d/models/data_preprocessors/data_preprocessor.py index 05c8452a0c..afca17e3dd 100644 --- a/mmdet3d/models/data_preprocessors/data_preprocessor.py +++ b/mmdet3d/models/data_preprocessors/data_preprocessor.py @@ -434,12 +434,12 @@ def voxelize(self, points: List[Tensor], res_coors_numpy = res_coors.cpu().numpy() inds, point2voxel_map = self.sparse_quantize( res_coors_numpy, return_index=True, return_inverse=True) - point2voxel_map = torch.from_numpy(point2voxel_map).cuda() + point2voxel_map = torch.from_numpy(point2voxel_map).to(res.device) if self.training and self.max_voxels is not None: if len(inds) > self.max_voxels: inds = np.random.choice( inds, self.max_voxels, replace=False) - inds = torch.from_numpy(inds).cuda() + inds = torch.from_numpy(inds).to(res.device) if hasattr(data_sample.gt_pts_seg, 'pts_semantic_mask'): data_sample.gt_pts_seg.voxel_semantic_mask \ = data_sample.gt_pts_seg.pts_semantic_mask[inds] From 91a2fc67cc5d9168be9246eadb88b088304f4153 Mon Sep 17 00:00:00 2001 From: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com> Date: Fri, 5 Jun 2026 00:30:33 +0530 Subject: [PATCH 2/2] ci: retrigger pr_stage_test