Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to optimize TRX generation in the CUDA tractography pipeline by adjusting batching defaults and TRX preallocation/output dtypes.
Changes:
- Reduce the default
chunk_size(seeds processed per chunk per GPU) from100000to25000and document it in the class docstring. - Increase TRX preallocation heuristic
sl_per_seed_guessfrom3to4. - Cast TRX streamline storage arrays to
float32(points) anduint64(offsets).
Comments suppressed due to low confidence (1)
cuslines/cuda_python/cu_tractography.py:52
- Changing the default
chunk_sizefrom 100000 to 25000 is a behavioral change for callers that rely on defaults (it can increase kernel launch/host overhead and alter memory/perf characteristics). If this is intended, consider documenting it as a breaking/behavioral change (e.g., in release notes/README) or keeping the previous default and adjusting it only in the CLI/config path that needs it.
chunk_size: int = 25000,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
cuslines/cuda_python/cu_tractography.py:258
- The TODO comment about outputting in VOX space directly was removed, but the code on line 290 still calls
tractogram.to_world(), which suggests the conversion is still happening. If the TODO was meant to be addressed by this PR, the conversion should be removed or modified. If the TODO is not being addressed, it should remain in the code.
def generate_trx(self, seeds, ref_img):
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.