Skip to content

IVF-Flat: fix irrelevant assert in the fused kernel mode#1941

Merged
rapids-bot[bot] merged 4 commits intorelease/26.04from
fix-ivf-flat-irrelevant-assert
Mar 24, 2026
Merged

IVF-Flat: fix irrelevant assert in the fused kernel mode#1941
rapids-bot[bot] merged 4 commits intorelease/26.04from
fix-ivf-flat-irrelevant-assert

Conversation

@achirkin
Copy link
Copy Markdown
Contributor

Variable max_samples inside the interleaved_scan_kernel is only used in the non-fused codepath and tells how many distances to compute. It's not set in the fused-kernel mode, yet checked by an assert, causing assertion failures incorrectly.

This PR fixes the problem by guarding the assert using a constexpr condition on the fused/unfused mode.
This PR is open to fix incorrectly closed and already reviewed PR #1890

achirkin added 3 commits March 6, 2026 08:48
Variable `max_samples` inside the `interleaved_scan_kernel` is only used in the non-fused codepath and tells how many distances to compute. It's not set in the fused-kernel mode, yet checked by an `assert`, causing assertion failures incorrectly.
This PR fixes the problem by guarding the assert using a constexpr condition on the fused/unfused mode.
@achirkin achirkin self-assigned this Mar 24, 2026
@achirkin achirkin requested a review from a team as a code owner March 24, 2026 10:43
@achirkin achirkin added bug Something isn't working non-breaking Introduces a non-breaking change labels Mar 24, 2026
Copy link
Copy Markdown
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@achirkin
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 48e9950 into release/26.04 Mar 24, 2026
151 of 153 checks passed
jrbourbeau pushed a commit to jrbourbeau/cuvs that referenced this pull request Mar 25, 2026
Variable `max_samples` inside the `interleaved_scan_kernel` is only used in the non-fused codepath and tells how many distances to compute. It's not set in the fused-kernel mode, yet checked by an `assert`, causing assertion failures incorrectly.

This PR fixes the problem by guarding the assert using a constexpr condition on the fused/unfused mode.
This PR is open to fix incorrectly closed and already reviewed PR rapidsai#1890

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)

URL: rapidsai#1941
jrbourbeau pushed a commit to jrbourbeau/cuvs that referenced this pull request Mar 25, 2026
Variable `max_samples` inside the `interleaved_scan_kernel` is only used in the non-fused codepath and tells how many distances to compute. It's not set in the fused-kernel mode, yet checked by an `assert`, causing assertion failures incorrectly.

This PR fixes the problem by guarding the assert using a constexpr condition on the fused/unfused mode.
This PR is open to fix incorrectly closed and already reviewed PR rapidsai#1890

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)

URL: rapidsai#1941
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants