From b55875512f8b6aca5c008531e30a6a866cf69f58 Mon Sep 17 00:00:00 2001 From: ZouJiu1 <1069679911@qq.com> Date: Sun, 19 Apr 2026 11:33:51 +0000 Subject: [PATCH] fixed bev_pool cuda .cu wrong cur_geom_feats address --- .../BEVFusion/bevfusion/ops/bev_pool/src/bev_pool_cuda.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/bevfusion/ops/bev_pool/src/bev_pool_cuda.cu b/projects/BEVFusion/bevfusion/ops/bev_pool/src/bev_pool_cuda.cu index ea4e407813..ef8273e0aa 100755 --- a/projects/BEVFusion/bevfusion/ops/bev_pool/src/bev_pool_cuda.cu +++ b/projects/BEVFusion/bevfusion/ops/bev_pool/src/bev_pool_cuda.cu @@ -29,7 +29,7 @@ __global__ void bev_pool_kernel(int b, int d, int h, int w, int n, int c, int n_ if (index >= n_intervals) return; int interval_start = interval_starts[index]; int interval_length = interval_lengths[index]; - const int* cur_geom_feats = geom_feats + interval_start * 4; + const int* cur_geom_feats = geom_feats + (interval_start + interval_length - 1) * 4; const float* cur_x = x + interval_start * c + cur_c; float* cur_out = out + cur_geom_feats[3] * d * h * w * c + cur_geom_feats[2] * h * w * c + cur_geom_feats[0] * w * c + @@ -71,7 +71,7 @@ __global__ void bev_pool_grad_kernel(int b, int d, int h, int w, int n, int c, i int interval_start = interval_starts[index]; int interval_length = interval_lengths[index]; - const int* cur_geom_feats = geom_feats + interval_start * 4; + const int* cur_geom_feats = geom_feats + (interval_start + interval_length - 1) * 4; float* cur_x_grad = x_grad + interval_start * c + cur_c; const float* cur_out_grad = out_grad + cur_geom_feats[3] * d * h * w * c +