Files
nbrightandClaude Opus 5 609d9a6972 Add SUM Parts reproduction and Seosan Myeongcheon application pipeline
Reproduces the SUM Parts (CVPR 2025) face-labeling benchmark on a single
consumer GPU, then applies it to drone-photogrammetry road survey meshes.

Verified on RTX 3060 12GB / WSL2 Ubuntu 22.04 / CUDA 11.8 / torch 2.0.1:
- CUDA extensions build (pointnet2_batch, pointops, chamfer_dist, emd,
  subsampling)
- PointNet 100 epochs reaches mIoU 17.19, matching the paper's reported 15.1
- OBJ -> PLY conversion round-trips through the model and yields per-point
  predictions

Four upstream source patches, all idempotent, originals preserved:
- numpy aliases removed in 1.24 (np.long etc.) and collections ABCs moved in
  python 3.10
- the blind test split ships label = -1, which crashed ConfusionMatrix
- mode=val referenced `epoch` before assignment

Documents the traps that cost the most time, including VRAM overflow silently
falling back to host RAM on WSL2 (25-100x slowdown, no OOM) and the colour
scale mismatch between r/g/b float32 and red/green/blue uint8.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 10:29:25 +09:00

35 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# SUM Parts - verify PYTORCH_CUDA_ALLOC_CONF is accepted before committing a run
#
# torch 2.0.1 aborts at CUDA init on an unknown key, and the traceback points at
# model.to(device) rather than at the env var, so an invalid setting looks like
# a model problem. Check it in two seconds instead.
set -uo pipefail
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda activate sumparts
CONF="${1:-garbage_collection_threshold:0.7,max_split_size_mb:128}"
echo "torch : $(python -c 'import torch; print(torch.__version__)')"
echo "testing: PYTORCH_CUDA_ALLOC_CONF=$CONF"
PYTORCH_CUDA_ALLOC_CONF="$CONF" python - <<'PY'
import os
import torch
print("env :", os.environ.get("PYTORCH_CUDA_ALLOC_CONF"))
x = torch.zeros(1024, 1024, device="cuda")
y = (x + 1).sum().item()
print("cuda : OK", torch.cuda.get_device_name(0), "| smoke sum =", y)
print("alloc : %.1f MB" % (torch.cuda.memory_allocated() / 1024**2))
PY
rc=$?
if [ $rc -eq 0 ]; then
echo "ACCEPTED"
else
echo "REJECTED (rc=$rc) -- do not launch with this setting"
fi
exit $rc