[Config] Register the fork's knobs by cache identity; lint; gpu test marker

- Every fork knob is registered in envs.py and classified as a compile/capture
  factor or runtime-only; envs.py documents that capture identity and AOT
  cache identity are different things.
- ruff findings cleared on lines this fork authored; upstream lines untouched.
- A `gpu` pytest marker so the GPU-free tier can be selected, not just skipped.
- Duplicate knob-table entries from two branches reconciled onto one
  off|warn|raise normaliser.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 19:47:45 +07:00
co-authored by Hinata
parent 31ad7e113f
commit f1e5437a3a
6 changed files with 358 additions and 68 deletions
+6 -9
View File
@@ -145,16 +145,12 @@ class FaultSpec:
if bytes_sent is not None or frame_size is None:
return False
suffix = (
f" bytes_written={int(bytes_written)}"
f" frame_size={int(frame_size)}"
f" bytes_written={int(bytes_written)} frame_size={int(frame_size)}"
)
elif bytes_sent is not None:
if frame_size is None:
return False
suffix = (
f" bytes_sent={int(bytes_sent)}"
f" frame_size={int(frame_size)}"
)
suffix = f" bytes_sent={int(bytes_sent)} frame_size={int(frame_size)}"
elif frame_size is not None:
return False
message = (
@@ -306,7 +302,9 @@ def _parse_fault_spec(value: str | None) -> FaultSpec | None:
if value is None:
return None
if not value or value != value.strip():
raise ValueError(f"{_ENV_NAME}: spec must be non-empty with no outer whitespace")
raise ValueError(
f"{_ENV_NAME}: spec must be non-empty with no outer whitespace"
)
fields: dict[str, str] = {}
for item in value.split(","):
@@ -355,8 +353,7 @@ def _parse_fault_spec(value: str | None) -> FaultSpec | None:
if role in {"offload", "bootstrap"} and not has_any_rank:
raise ValueError(
f"{_ENV_NAME}: {role} cut {cut!r} requires rank=any; "
"it has no TP/PP rank"
f"{_ENV_NAME}: {role} cut {cut!r} requires rank=any; it has no TP/PP rank"
)
if role == "gpu":
if pp_rank is not None and pp_rank != 0: