Skip to content

[mini] extract per track step functions in mono kernels - #758

Merged
SeverinDiederichs merged 1 commit into
apt-sim:masterfrom
SeverinDiederichs:step_function_refactor
Dec 1, 2026
Merged

SeverinDiederichs merged 1 commit into
apt-sim:masterfrom
SeverinDiederichs:step_function_refactor

Conversation

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator

Factor out the monolithic kernel loop into per-track step functions.

@SeverinDiederichs SeverinDiederichs added the cleaning improves code clarity, readability or other label Dec 1, 2026
@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

@codex review

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

/run-test

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T17:49:34.293471Z 467a6bb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 467a6bbe18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@agheata agheata left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI: Codex

No blocking issues found. Reviewed 467a6bbe against febbfea1. I compared the extracted step bodies and verified that queue iteration and all seven early exits preserve their behavior.

  • CUDA control flow. On both revisions, I forced a single CUDA thread to process multiple noncontiguous slots in the electron, positron, gamma and Woodcock gamma kernels. The tests checked slot freeing, finish-on-CPU and step-start kill records, Woodcock fallback to the normal gamma queue, and progress to the final slot.
  • Integration. Both mixed-precision builds passed finish-on-CPU, direct handoff and nested Woodcock tests. The nested test matched event energy and ROOT histograms exactly for equal cuts and produced additional secondary electrons when the child cut was lowered. The CMS surface-handoff test reproduced the same ten boundary diagnostics and Geant4 error on both revisions.
  • CI and timing. Exact-head CI passed all ten monolithic/split drift comparisons and 155 unit cases, with one debug-only skip. CI skipped broader validation after the drift matched. Five matched mixed-precision TestEm3 runs on an RTX 4090 showed no material slowdown.

review by: Codex

@SeverinDiederichs
SeverinDiederichs merged commit f461def into apt-sim:master Dec 1, 2026
6 checks passed
@SeverinDiederichs
SeverinDiederichs deleted the step_function_refactor branch December 1, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning improves code clarity, readability or other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants