Skip to content

Add clustering_chunk_size to bound assign_iclust memory - #1037

Open
grahamfindlay wants to merge 1 commit into
MouseLand:mainfrom
grahamfindlay:perf/clustering_chunk_size
Open

Add clustering_chunk_size to bound assign_iclust memory#1037
grahamfindlay wants to merge 1 commit into
MouseLand:mainfrom
grahamfindlay:perf/clustering_chunk_size

Conversation

@grahamfindlay

Copy link
Copy Markdown

The graph-clustering step builds a dense (n_spikes x n_clusters) assignment matrix. For very long recordings (tens of millions of spikes per clustering center) this can exhaust GPU memory.

Added an optional clustering_chunk_size setting that computes the assignment in row chunks, bounding peak memory to roughly one (chunk x n_clusters) tile. No row is split across a chunk boundary and each spike's argmax depends only on its own neighbors, so the result is identical to the unchunked path.

The graph-clustering step builds a dense (n_spikes x n_clusters)
assignment matrix. For very long recordings (tens of millions of spikes
per clustering center) this can exhaust GPU memory.

Added an optional `clustering_chunk_size` setting that computes the
assignment in row chunks, bounding peak memory to roughly one
(chunk x n_clusters) tile. No row is split across a chunk boundary and
each spike's argmax depends only on its own neighbors, so the result is
identical to the unchunked path.
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