Skip to content

Commit acd2f69

Browse files
Fix a bug in NonZeroCUDA not using the correct memory addresses (#7340)
--------- Co-authored-by: Sameer Sheorey <[email protected]>
1 parent f609976 commit acd2f69

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
- Exposed `get_plotly_fig` and modified `draw_plotly` to return the `Figure` it creates. (PR #7258)
6464
- Fix build with librealsense v2.44.0 and upcoming VS 2022 17.13 (PR #7074)
6565
- Fix `deprecated-declarations` warnings when compiling code with C++20 standard (PR #7303)
66+
- Fix advanced indexing bug with sliced boolean masks on CUDA devices (PR #7340)
6667
- Fix logic for adding -allow-unsupported-compiler to nvcc (PR #7337)
6768
- Fix linker error "library limit of 65535 objects exceeded" with Ninja generator on MSVC (PR #7335)
6869

cpp/open3d/core/kernel/NonZeroCUDA.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Tensor NonZeroCUDA(const Tensor& src) {
6969
// Get flattened non-zero indices.
7070
thrust::device_vector<int64_t> non_zero_indices(num_elements);
7171
DISPATCH_DTYPE_TO_TEMPLATE_WITH_BOOL(src.GetDtype(), [&]() {
72-
thrust::device_ptr<const scalar_t> src_ptr(static_cast<const scalar_t*>(
73-
src_contiguous.GetBlob()->GetDataPtr()));
72+
thrust::device_ptr<const scalar_t> src_ptr(
73+
static_cast<const scalar_t*>(src_contiguous.GetDataPtr()));
7474

7575
auto it = thrust::copy_if(index_first, index_last, src_ptr,
7676
non_zero_indices.begin(),

0 commit comments

Comments
 (0)