Skip to content

Docs: operations cookbook (memory, coordinate manager, DDP, torch.compile, determinism) - #15

Merged
alpsaur merged 1 commit into
masterfrom
docs/operations-cookbook
Jul 17, 2026
Merged

Docs: operations cookbook (memory, coordinate manager, DDP, torch.compile, determinism)#15
alpsaur merged 1 commit into
masterfrom
docs/operations-cookbook

Conversation

@alpsaur

@alpsaur alpsaur commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add docs/operations.md: a practical "running ME in production/training" cookbook covering the recurring pain points mined from ~250 upstream and downstream issues
  • Register the page in the docs/index.rst toctree (Miscellanea section, after the performance guide)
  • Add one linking line in README.md below the existing performance-guide paragraph

Sections

  1. Memory management with varying point counts - torch.cuda.empty_cache() on an interval; the OOM-leak caveat from CUDA OOM error leads to GPU memory leak NVIDIA/MinkowskiEngine#359 (C++-side OOM strands GPU memory; restartable subprocess loop for unattended training)
  2. Coordinate-manager lifecycle - ME.clear_global_coordinate_manager() required every iteration under SHARE_COORDINATE_MANAGER mode, or the kernel-map cache grows unbounded
  3. Multi-GPU / DDP recipe - DataParallel is NOT supported (0.5 parallel.replicate cannot replicate dimension attribute for convolution NVIDIA/MinkowskiEngine#264); full DDP recipe with torchrun, NCCL, DistributedSampler(drop_last=True), find_unused_parameters=True; pickling fix from PR Fix pickling error for MinkowskiConvolutionFunction during ddp training NVIDIA/MinkowskiEngine#139. Honest note: multi-GPU is upstream functionality this fork has not re-validated on torch 2.9; single-GPU is the tested path
  4. torch.compile / Dynamo - ME ops are C++ autograd Functions with opaque handles; Dynamo cannot trace. Workaround: torch._dynamo.disable() on the sparse backbone, compile only the dense head
  5. Determinism - two footguns: (a) GPU vs CPU quantization produces different coordinate sets (Coordinates ordering on CPU vs GPU NVIDIA/MinkowskiEngine#441); quantize on one device consistently; (b) conv output varies in low-order bits due to atomics (Non Reproducible Outputs on GPU when using MinkowskiConvolution and stride > 1 NVIDIA/MinkowskiEngine#554); manual coord-sort workaround described, built-in ME.set_deterministic() noted as planned but not yet merged
  6. ME_LAZY_SYNC single-stream safety - the flag assumes all ME work is on the default PyTorch CUDA stream; unsafe with custom side streams or CUDA-graph capture; off by default

Style matches docs/performance.md: code-snippet-first, concise, no em dashes. Upstream issue numbers cited inline as plain links.

Test plan

  • Verify docs/operations.md renders correctly in the hosted Sphinx docs
  • Verify docs/index.rst toctree entry is correctly placed
  • Verify README link resolves to the hosted operations page
  • CI green (docs build / lint checks)

Generated with Claude Code

…pile, determinism)

Add docs/operations.md covering recurring production/training pain points
mined from upstream and downstream issues:
- Memory management with varying point counts (empty_cache interval, OOM-leak
  restartable-subprocess pattern from NVIDIA#359)
- Coordinate-manager lifecycle (clear_global_coordinate_manager under
  SHARE_COORDINATE_MANAGER mode)
- Multi-GPU DDP recipe (DataParallel unsupported per NVIDIA#264, torchrun launch,
  find_unused_parameters, pickling fix from PR NVIDIA#139)
- torch.compile/Dynamo incompatibility (opaque C++ autograd handles,
  _dynamo.disable workaround)
- Determinism (CPU vs GPU quantization per NVIDIA#441, atomic-add conv variation
  per NVIDIA#554, manual coord-sort workaround, planned built-in option)
- ME_LAZY_SYNC single-stream safety callout

Register in docs/index.rst toctree; link from README.md after the
performance-guide link.
@alpsaur
alpsaur merged commit 228a4b4 into master Jul 17, 2026
9 checks passed
@alpsaur
alpsaur deleted the docs/operations-cookbook branch July 17, 2026 04:25
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