Skip to content

Fix CI by changing SVC intercept selection kernel dispatch - #8077

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
dantegd:fix-svm-260508
May 11, 2026
Merged

Fix CI by changing SVC intercept selection kernel dispatch#8077
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
dantegd:fix-svm-260508

Conversation

@dantegd

@dantegd dantegd commented May 8, 2026

Copy link
Copy Markdown
Contributor

Closes #8064

This fixes float SVC failures in SG_SVC_TEST by avoiding device kernel function pointer dispatch when selecting upper/lower sets for intercept calculation.

This avoids relying on device kernel function pointer dispatch for upper/lower set selection. In the failing configuration in recent builds, the indirect launch produced no selected rows despite valid inputs, while direct kernel launches produced the expected selections. In other words, that launch produced all-false flags even when valid upper/lower samples existed, causing DeviceSelect::Flagged to return zero selected rows and SVC training to fail while computing the decision function constant. Launching the correct kernel directly preserves the same selection logic without relying on the failing function pointer dispatch.

@dantegd
dantegd requested a review from a team as a code owner May 8, 2026 22:25
@dantegd
dantegd requested review from aamijar and jcrist May 8, 2026 22:25
@dantegd dantegd added bug Something isn't working non-breaking Non-breaking change labels May 8, 2026
@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR refactors internal implementation of the Results SVM solver helper. The SelectReduce function removes function-pointer indirection by accepting a boolean min parameter and conditionally launching the appropriate flag-setting kernel internally. The CalcB call site is updated to pass a boolean instead of function pointers.

Changes

SelectReduce Refactoring

Layer / File(s) Summary
Helper Implementation
cpp/src/svm/results.cuh
SelectReduce refactored to remove flag_op function-pointer parameter; now conditionally launches set_upper or set_lower kernel based on min boolean before CUB flagged selection and reduction.
Caller Update
cpp/src/svm/results.cuh
CalcB switches to calling SelectReduce with a boolean argument instead of passing function pointers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

bug, non-breaking, CUDA/C++

Suggested reviewers

  • jcrist
  • aamijar
  • csadorf
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing SVC intercept selection by modifying kernel dispatch strategy from indirect function pointers to direct launches.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the technical issue (device kernel function pointer dispatch failures) and the specific fix (direct kernel launches instead of indirect dispatch).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/src/svm/results.cuh`:
- Around line 390-396: SelectReduce may launch kernels with
raft::ceildiv(n_train, TPB) which is invalid when n_train == 0; add a guard at
the top of SelectReduce to check n_train (or equivalent train count) and return
or skip the kernel launches if it's zero, so neither set_upper nor set_lower is
invoked with a zero-sized grid. Ensure the check references the same variables
used in the launch (n_train, TPB, stream, flag.data(), alpha, y, C) and only
compute/launch the kernel when ceildiv(n_train, TPB) > 0; keep the existing min
branch logic but wrapped by this precondition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fcaf1ad6-292e-47c2-9fec-bdcb9d7b66f6

📥 Commits

Reviewing files that changed from the base of the PR and between de7b5a3 and c8f1b4b.

📒 Files selected for processing (1)
  • cpp/src/svm/results.cuh

Comment thread cpp/src/svm/results.cuh
@jinsolp

jinsolp commented May 8, 2026

Copy link
Copy Markdown
Contributor

Closes #8064

@csadorf

csadorf commented May 11, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 2c208aa into NVIDIA:main May 11, 2026
279 of 285 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CUDA/C++ non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] SG_SVC_TEST failed

6 participants