Skip to content

[ENH] Add local det tracking gpu#1320

Merged
arnaudbore merged 6 commits intoscilus:masterfrom
arnaudbore:add_local_det_tracking_gpu
Apr 17, 2026
Merged

[ENH] Add local det tracking gpu#1320
arnaudbore merged 6 commits intoscilus:masterfrom
arnaudbore:add_local_det_tracking_gpu

Conversation

@arnaudbore
Copy link
Copy Markdown
Contributor

Quick description

Please include a summary of the changes and the related issue(s) or improvement(s).
Please also include relevant motivation and context. List any dependencies that are required for this change if needed.

...

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Provide data, screenshots, command line to test (if relevant)

...

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@arnaudbore arnaudbore requested review from CHrlS98 and gabknight March 25, 2026 15:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 18.51852% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.52%. Comparing base (eab1330) to head (9b7541d).
⚠️ Report is 7 commits behind head on master.

❌ Your patch status has failed because the patch coverage (18.51%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (72.52%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1320      +/-   ##
==========================================
- Coverage   72.61%   72.52%   -0.09%     
==========================================
  Files         297      297              
  Lines       25850    25886      +36     
  Branches     3638     3644       +6     
==========================================
+ Hits        18771    18775       +4     
- Misses       5549     5580      +31     
- Partials     1530     1531       +1     
Flag Coverage Δ
smoketests 69.70% <18.51%> (-0.09%) ⬇️
unittests 14.08% <9.25%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Scripts 75.07% <66.66%> (-0.01%) ⬇️
Library 69.48% <15.68%> (-0.18%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@CHrlS98 CHrlS98 left a comment

Choose a reason for hiding this comment

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

makes sense. a few comments on documentation

Comment thread src/scilpy/tracking/local_tracking.cl
Comment thread src/scilpy/tracking/local_tracking.cl
Comment thread src/scilpy/cli/scil_tracking_local.py
Comment thread src/scilpy/gpuparallel/opencl_utils.py
CHrlS98
CHrlS98 previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Contributor

@CHrlS98 CHrlS98 left a comment

Choose a reason for hiding this comment

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

A single comment about the doctring. I'll approve anyway.

Tried locally with the fibercup for det/prob and cpu/gpu. Seems consistent. Mean and median length are close.

Stats for prob:

prob_cpu
Num. of fibers: 2321 / 2321
Min. length:    10.0 mm
Max. length:    157.5 mm
Mean length:    81.2 mm
Median length:  79.5 mm
Std. deviation: 44.4 mm
-----------------------------
prob_gpu
Num. of fibers: 2130 / 2130
Min. length:    10.0 mm
Max. length:    158.5 mm
Mean length:    81.1 mm
Median length:  79.5 mm
Std. deviation: 45.2 mm
-----------------------------

Stats for det:

det_cpu
Num. of fibers: 2433 / 2433
Min. length:    10.0 mm
Max. length:    190.5 mm
Mean length:    101.7 mm
Median length:  117.0 mm
Std. deviation: 43.2 mm
-----------------------------
det_gpu
Num. of fibers: 2400 / 2400
Min. length:    10.0 mm
Max. length:    223.5 mm
Mean length:    103.4 mm
Median length:  117.5 mm
Std. deviation: 42.5 mm
-----------------------------

Comment thread src/scilpy/cli/scil_tracking_local.py Outdated
* Forward tracking: For GPU tracking, the `--forward_only` flag can be used
to disable backward tracking. This option isn't available for CPU
tracking.
* RNG stream: CPU and GPU use different RNG implementations, so the same
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.

we call that a "stream"? Also, the command line argument is only --seed and not --rng_seed so not sure it's clear for the user.

Comment thread src/scilpy/cli/scil_tracking_local.py Outdated
@@ -1,3 +1,4 @@

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.

remove linebreak at first line

@arnaudbore arnaudbore merged commit a778439 into scilus:master Apr 17, 2026
3 checks passed
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.

2 participants