Skip to content

Reduce redundant host work in the xFit LM solver - #92

Open
tpn wants to merge 1 commit into
codex/numba-xfit-main-20260930from
codex/numba-xfit-host-20260930
Open

tpn wants to merge 1 commit into
codex/numba-xfit-main-20260930from
codex/numba-xfit-host-20260930

Conversation

@tpn

@tpn tpn commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

The normal-equation path copied five arrays even when every row was valid,
and filtered trial-evaluation budgets after analytic Jacobians that consume no
residual evaluations. Skip those operations to reduce repeated host work in
xFit's shared solver. Preserve fallback filtering and finite-difference budget
checks, with a regression for exhausting the budget just before a trial in both
implicit and explicitly requested finite-difference modes.

Validation

  • make ci-lint — passed, including mypy, Ruff, pre-commit and lock validation.
  • make package-check — source distribution built; strict package checks passed.
  • pytest -q tests/xfit/test_solver.py tests/xfit/test_numba_mlir.py tests/xfit/test_numba_mlir_commands.py — 67 passed, no skips, with CUDA 13 and free-threaded Python.

With free-threaded Python 3.14 and Numba-CUDA-MLIR 0.5.4, one concurrent
warmup attempt failed in dependency type dispatch. Performance validation
covers successful warmed fits; the effect of this change on concurrent-startup
reliability remains undetermined.

Repository hygiene

  • No credentials, private paths, local datasets, notebook outputs, or generated run artifacts were added.
  • Large binary artifacts are excluded or intentionally tracked through an approved storage plan.
  • Security-sensitive information is not included.
  • User-visible behavior changes are documented.
  • New dependencies and their licenses are documented.

Filter normal-equation rows only when a fallback was needed.
Skip the second residual-budget filter for analytic derivatives;
keep it for finite differences, with a boundary regression test.

Signed-off-by: Trent Nelson <trentn@nvidia.com>
@tpn
tpn requested a review from melo-gonzo as a code owner October 1, 2026 08:38
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: NVIDIA/cuPhoton/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f74e01e7-4791-4d84-a01d-1486b9f0f2fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant