Fix CI by changing SVC intercept selection kernel dispatch - #8077
Conversation
📝 WalkthroughWalkthroughThe PR refactors internal implementation of the ChangesSelectReduce Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
cpp/src/svm/results.cuh
|
Closes #8064 |
|
/merge |
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.