cosanlab / cosanlab/nltools

GPU roadmap: torch port for SRM/DetSRM

Open
#485 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
130
Forks
48
Avg merge
6h 42m
Merged PRs (30d)
34

Description

From the [#484 scoping survey](https://github.com/cosanlab/nltools/issues/484#issuecomment-5432492136). As of the 0.6.0 GPU consolidation on #483, `SRM`/`DetSRM` raise `NotImplementedError` on `parallel='gpu'` (run-or-raise policy) instead of silently running on CPU, and the dead `max_gpu_memory_gb` kwarg is removed.

The real GPU path is a torch port of the iterative EM solver (orthogonal W updates + shared-response estimation per iteration) — a genuine numerical-parity project (float32 accumulation across iterations, MPS's missing float64), on the order of the ridge port. Build it on the 0.6.0 core layer in `algorithms/backends.py`: `device_memory_budget` for the budget, `auto_batch_size` with an SRM working-set estimate, `compute_oom_safe` for the batched device compute, and reinstate `max_gpu_memory_gb: float | None = None` alongside the implementation.

Not a 0.6.0 blocker; 0.6.x roadmap.

Contributor guide

Open the contributing guide

Research direction

Start in algorithms/backends.py and read the 0.6.0 core layer, especially device_memory_budget, auto_batch_size, and compute_oom_safe, then trace the SRM/DetSRM iterative EM solver. Done means a torch GPU path with numerical parity, float32-safe accumulation, an SRM working-set estimate, batched OOM-safe computation, and the max_gpu_memory_gb argument restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend-api-design, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.