77# Usage: ./scripts/setup_pr7916.sh [--force-install] [--skip-install]
88# Env: PR7916_VENV_DIR, PR7916_MAIN_REF (default master), PR7916_FORCE_INSTALL, PR7916_SKIP_INSTALL
99#
10+ # --- Recorded test environment (original bug report / CI reference) ---
11+ # OS: Ubuntu 22.04
12+ # GPU: NVIDIA H100 80GB PCIe
13+ # Python: 3.11
14+ # PyTorch: 2.8.0+cu128 (torch.version.cuda: 12.8)
15+ # DeepSpeed: 0.16.4 wheel (issue); PR validates against editable install + this script's venv
16+ # CUDA (driver): 12.8 (via PyTorch cu128 wheels; nvcc optional / often N/A)
17+ # Launcher: deepspeed CLI (repro uses torchrun --standalone --nproc_per_node=1)
18+ # -------------------------------------------------------------------------
19+ #
1020set -euo pipefail
1121
1222ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
@@ -31,8 +41,26 @@ while [[ $# -gt 0 ]]; do
3141 shift
3242done
3343
34- print_versions () {
35- python -c " import torch, deepspeed; print('torch', torch.__version__, 'cuda', torch.version.cuda); print('deepspeed', deepspeed.__file__); print('deepspeed version', deepspeed.__version__)"
44+ print_runtime_env () {
45+ python << 'PY '
46+ import platform
47+ import sys
48+
49+ import deepspeed
50+ import torch
51+
52+ print("==> Runtime environment (this session)")
53+ print(f" python: {sys.version.split()[0]} ({platform.system()} {platform.release()})")
54+ print(f" torch: {torch.__version__}")
55+ print(f" torch.version.cuda: {torch.version.cuda}")
56+ if torch.cuda.is_available():
57+ print(f" cuda available: yes ({torch.cuda.device_count()} device(s))")
58+ print(f" cuda device 0: {torch.cuda.get_device_name(0)}")
59+ else:
60+ print(" cuda available: no")
61+ print(f" deepspeed: {deepspeed.__version__}")
62+ print(f" deepspeed path: {deepspeed.__file__}")
63+ PY
3664}
3765
3866# Sets: full=1 → wipe + venv + pip; full=0 → activate existing only
@@ -79,7 +107,7 @@ setup_venv() {
79107 pip install pytest
80108 fi
81109
82- print_versions
110+ print_runtime_env
83111}
84112
85113run_repro_compare () {
0 commit comments