Commit cd7b0801 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: GPU_CHUNK env-tunable + GPU_CHUNK=4/expandable_segments for 16GB local

infer_server decode batched GPU_CHUNK scenes (p=[chunk,121,H,W]); 16 -> ~2.5GB -> OOM on the 16GB 5060 Ti
(shared with Eyesis JCuda). Make GPU_CHUNK env-tunable (default 16 for big GPUs); run_infer_local.sh sets
GPU_CHUNK=4 (+ expandable_segments) so local L1+L2 fits. By Claude 06/27/2026.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 609ba690
Pipeline #3828 failed with stages
......@@ -46,7 +46,7 @@ from model import RawFCN
CMD_BYE, CMD_UPLOAD, CMD_INFER, CMD_READBACK = 0, 1, 2, 3
CMD_STATUS = 4 # report loaded L1/L2 model paths so the client can detect a model change. By Claude on 06/24/2026
GPU_CHUNK = 16 # scenes processed per batched GPU pass (memory vs utilization)
GPU_CHUNK = int(os.environ.get("GPU_CHUNK", "16")) # scenes per batched GPU pass (memory vs utilization); lower for small-VRAM GPUs (e.g. GPU_CHUNK=4 for 16GB). By Claude 06/27/2026
VEL_DECIMATE = 4 # velocity-grid cells per px/level-frame (Java curt_vel_decimate); L2 was trained on Vx,Vy in px/frame (cells/4). By Claude on 06/22/2026
AGE_THR = 0.2 # L2 track-age death threshold: a cell with det<=AGE_THR "dies" (age 0). Raised 0.01->0.2 so the
# weak noise halo dies and the 5x5 max-pool can't dilate age across gaps. By Claude on 06/24/2026
......
......@@ -11,6 +11,8 @@
# Run the PyTorch infer_server LOCALLY on the workstation GPU (no DGX, no docker, no network transfer).
# Point the Java pipeline at host:port 127.0.0.1:5577 (DNN remote host). By Claude on 06/27/2026.
set -e
export GPU_CHUNK="${GPU_CHUNK:-4}" # 16GB 5060 Ti: small batch to avoid CUDA OOM (DGX can use 16+)
export PYTORCH_CUDA_ALLOC_CONF="${PYTORCH_CUDA_ALLOC_CONF:-expandable_segments:True}" # reduce fragmentation
VENV="${VENV:-/home/elphel/git/dnn_infer_venv}" # torch==2.7.1+cu128 GPU venv
RUN="${RUN:-runs/weighted9_pm_s}" # L1 run dir (model.pt)
RUN2="${RUN2:-runs/mexhat_gaps_boost40}" # L2 run dir (empty -> L1-only)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment