feat: add Jetson contributor validation path

This commit is contained in:
Joseph Magly
2026-08-21 20:12:35 -04:00
parent 1e870ccee0
commit 06e80af7b6
23 changed files with 1128 additions and 30 deletions
+10 -2
View File
@@ -7,6 +7,7 @@ import argparse
import importlib.util
import json
import os
import platform
import subprocess
import sys
from datetime import datetime, timezone
@@ -21,24 +22,31 @@ GATES = {
"operator-ui": "tests/conditional/test_operator_ui.py",
"cuda-runtime": "tests/conditional/test_cuda_runtime.py",
"bitsandbytes-runtime": "tests/conditional/test_cuda_runtime.py",
"jetson-runtime": "tests/conditional/test_jetson_runtime.py",
"mps-runtime": "tests/conditional/test_mps_runtime.py",
"mlx-runtime": "tests/conditional/test_mlx_runtime.py",
"remote-execution": "tests/conditional/test_remote_runtime.py",
}
JETSON_RELEASE = Path("/etc/nv_tegra_release")
def missing_prerequisites(gate: str) -> list[str]:
missing: list[str] = []
if gate in {"cuda-runtime", "bitsandbytes-runtime", "mps-runtime"}:
if gate in {"cuda-runtime", "bitsandbytes-runtime", "jetson-runtime", "mps-runtime"}:
import torch
if gate.startswith("cuda") or gate.startswith("bitsandbytes"):
if gate.startswith(("cuda", "bitsandbytes", "jetson")):
if not torch.cuda.is_available():
missing.append("a CUDA-capable PyTorch runtime")
elif not (hasattr(torch.backends, "mps") and torch.backends.mps.is_available()):
missing.append("an available Apple MPS backend")
if gate == "bitsandbytes-runtime" and importlib.util.find_spec("bitsandbytes") is None:
missing.append("bitsandbytes")
if gate == "jetson-runtime":
if platform.machine().lower() not in {"aarch64", "arm64"}:
missing.append("an ARM64 host")
if not JETSON_RELEASE.is_file():
missing.append("a Jetson L4T runtime")
if gate == "mlx-runtime":
for module in ("mlx", "mlx_lm"):
if importlib.util.find_spec(module) is None: