Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cuslines/cuda_python/cu_propagate_seeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def __init__(self, gpu_tracker):

self.nSlines_old = np.zeros(self.ngpus, dtype=np.int32)
self.nSlines = np.zeros(self.ngpus, dtype=np.int32)
self.slines = np.zeros(self.ngpus, dtype=np.ndarray)
self.sline_lens = np.zeros(self.ngpus, dtype=np.ndarray)
self.slines = [None] * self.ngpus
self.sline_lens = [None] * self.ngpus

self.seeds_d = np.empty(self.ngpus, dtype=DEV_PTR)
self.slineSeed_d = np.empty(self.ngpus, dtype=DEV_PTR)
Expand Down Expand Up @@ -140,19 +140,19 @@ def _allocate_tracking_memory(self):
)

if self.nSlines[ii] > EXCESS_ALLOC_FACT * self.nSlines_old[ii]:
self.slines[ii] = 0
self.sline_lens[ii] = 0
self.slines[ii] = None
self.sline_lens[ii] = None
gc.collect()

buffer_size = self._get_sl_buffer_size(ii)
logger.debug(f"Streamline buffer size: {buffer_size}")

if not self.slines[ii]:
if self.slines[ii] is None:
self.slines[ii] = np.empty(
(EXCESS_ALLOC_FACT * self.nSlines[ii], MAX_SLINE_LEN * 2, 3),
dtype=REAL_DTYPE,
)
if not self.sline_lens[ii]:
if self.sline_lens[ii] is None:
self.sline_lens[ii] = np.empty(
EXCESS_ALLOC_FACT * self.nSlines[ii], dtype=np.int32
)
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ dependencies = [
"tqdm",
"dipy",
"trx-python",
"nvidia-cuda-runtime",
"nvidia-curand",
"cuda-python",
"cuda-core",
"cuda-cccl"
Comment on lines +17 to 21
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The added dependencies lack version constraints. Consider adding version pins or at minimum version ranges to ensure reproducible builds and avoid potential compatibility issues. For example: nvidia-cuda-runtime>=12.0,<13.0 and nvidia-curand>=12.0,<13.0.

Suggested change
"nvidia-cuda-runtime",
"nvidia-curand",
"cuda-python",
"cuda-core",
"cuda-cccl"
"nvidia-cuda-runtime>=12.0,<13.0",
"nvidia-curand>=12.0,<13.0",
"cuda-python>=12.0,<13.0",
"cuda-core>=12.0,<13.0",
"cuda-cccl>=12.0,<13.0"

Copilot uses AI. Check for mistakes.
Expand Down
Loading