Spaces:
Paused
Paused
Create info.sh
Browse files
info.sh
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
echo "================= RUNTIME CAPABILITIES ================="
|
| 3 |
+
|
| 4 |
+
echo "[GPU / Driver / CUDA]"
|
| 5 |
+
nvidia-smi || true
|
| 6 |
+
echo "CUDA_HOME: ${CUDA_HOME:-/usr/local/cuda}"
|
| 7 |
+
echo "NVCC: $(nvcc --version 2>/dev/null | tail -n1 || echo 'N/A')"
|
| 8 |
+
echo
|
| 9 |
+
|
| 10 |
+
echo "[PyTorch / CUDA backend]"
|
| 11 |
+
python3 - <<'PY'
|
| 12 |
+
import json, sys
|
| 13 |
+
try:
|
| 14 |
+
import torch
|
| 15 |
+
info = {
|
| 16 |
+
"torch": torch.__version__,
|
| 17 |
+
"cuda_available": torch.cuda.is_available(),
|
| 18 |
+
"cuda_device_count": torch.cuda.device_count(),
|
| 19 |
+
"cuda_runtime_version": torch.version.cuda if hasattr(torch.version, "cuda") else None,
|
| 20 |
+
"cudnn_version": (torch.backends.cudnn.version() if torch.cuda.is_available() else None),
|
| 21 |
+
"tf32": (torch.backends.cuda.matmul.allow_tf32 if torch.cuda.is_available() else None),
|
| 22 |
+
"flash_sdp": (torch.backends.cuda.flash_sdp_enabled() if hasattr(torch.backends.cuda, "flash_sdp_enabled") else None),
|
| 23 |
+
"mem_efficient_sdp": (torch.backends.cuda.mem_efficient_sdp_enabled() if hasattr(torch.backends.cuda, "mem_efficient_sdp_enabled") else None),
|
| 24 |
+
"math_sdp": (torch.backends.cuda.math_sdp_enabled() if hasattr(torch.backends.cuda, "math_sdp_enabled") else None),
|
| 25 |
+
}
|
| 26 |
+
print(json.dumps(info, indent=2))
|
| 27 |
+
if torch.cuda.is_available():
|
| 28 |
+
for i in range(torch.cuda.device_count()):
|
| 29 |
+
print(f"GPU {i}: {torch.cuda.get_device_name(i)}")
|
| 30 |
+
except Exception as e:
|
| 31 |
+
print(f"[ERR torch] {type(e).__name__}: {e}")
|
| 32 |
+
PY
|
| 33 |
+
echo
|
| 34 |
+
|
| 35 |
+
echo "[Apex]"
|
| 36 |
+
python3 - <<'PY'
|
| 37 |
+
try:
|
| 38 |
+
import importlib
|
| 39 |
+
importlib.import_module("apex.normalization")
|
| 40 |
+
print("apex.normalization: OK")
|
| 41 |
+
except Exception as e:
|
| 42 |
+
print(f"Apex: ERR {type(e).__name__}: {e}")
|
| 43 |
+
PY
|
| 44 |
+
echo
|
| 45 |
+
|
| 46 |
+
echo "[FlashAttention]"
|
| 47 |
+
python3 - <<'PY'
|
| 48 |
+
try:
|
| 49 |
+
import flash_attn
|
| 50 |
+
print(f"flash_attn: OK (version={getattr(flash_attn,'__version__', 'unknown')})")
|
| 51 |
+
try:
|
| 52 |
+
import flash_attn_2_cuda
|
| 53 |
+
print("flash_attn_2_cuda: OK")
|
| 54 |
+
except Exception as e:
|
| 55 |
+
print(f"flash_attn_2_cuda: ERR {type(e).__name__}: {e}")
|
| 56 |
+
except Exception as e:
|
| 57 |
+
print(f"flash_attn: ERR {type(e).__name__}: {e}")
|
| 58 |
+
PY
|
| 59 |
+
echo
|
| 60 |
+
|
| 61 |
+
echo "[Triton]"
|
| 62 |
+
python3 - <<'PY'
|
| 63 |
+
try:
|
| 64 |
+
import triton
|
| 65 |
+
print(f"triton: OK (version={getattr(triton,'__version__','unknown')})")
|
| 66 |
+
try:
|
| 67 |
+
import triton.ops
|
| 68 |
+
print("triton.ops: OK")
|
| 69 |
+
except Exception as e:
|
| 70 |
+
print(f"triton.ops: ERR {type(e).__name__}: {e}")
|
| 71 |
+
except Exception as e:
|
| 72 |
+
print(f"triton: ERR {type(e).__name__}: {e}")
|
| 73 |
+
PY
|
| 74 |
+
echo
|
| 75 |
+
|
| 76 |
+
echo "[BitsAndBytes (Q8/Q4)]"
|
| 77 |
+
python3 - <<'PY'
|
| 78 |
+
try:
|
| 79 |
+
import bitsandbytes as bnb
|
| 80 |
+
import importlib
|
| 81 |
+
v = getattr(bnb, "__version__", "unknown")
|
| 82 |
+
print(f"bitsandbytes: OK (version={v})")
|
| 83 |
+
# Teste de presença de kernels Triton/Q8
|
| 84 |
+
try:
|
| 85 |
+
import bitsandbytes.triton.int8_matmul_mixed_dequantize as q8
|
| 86 |
+
print("bnb.triton.int8_matmul_mixed_dequantize: OK")
|
| 87 |
+
except Exception as e:
|
| 88 |
+
print(f"bnb.triton.int8_matmul_mixed_dequantize: ERR {type(e).__name__}: {e}")
|
| 89 |
+
except Exception as e:
|
| 90 |
+
print(f"bitsandbytes: ERR {type(e).__name__}: {e}")
|
| 91 |
+
PY
|
| 92 |
+
echo
|
| 93 |
+
|
| 94 |
+
echo "[Transformers / Diffusers / XFormers]"
|
| 95 |
+
python3 - <<'PY'
|
| 96 |
+
import importlib
|
| 97 |
+
def ver(name):
|
| 98 |
+
try:
|
| 99 |
+
m = importlib.import_module(name)
|
| 100 |
+
return getattr(m, "__version__", "unknown")
|
| 101 |
+
except Exception as e:
|
| 102 |
+
return f"ERR:{type(e).__name__}"
|
| 103 |
+
print("transformers:", ver("transformers"))
|
| 104 |
+
print("diffusers:", ver("diffusers"))
|
| 105 |
+
print("xformers:", ver("xformers"))
|
| 106 |
+
PY
|
| 107 |
+
echo
|
| 108 |
+
|
| 109 |
+
echo "[Distribuído / NCCL Env]"
|
| 110 |
+
env | egrep 'MASTER_|NCCL|CUDA_VISIBLE_DEVICES|TORCH_|ENABLE_' | sort
|
| 111 |
+
echo "================= END CAPABILITIES ================="
|