GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold
Python
diff --git tensorfold/families/glm5_next/cuda/hcsplit.py tensorfold/families/glm5_next/cuda/hcsplit.py
index a294319..17acbf9 100644
--- tensorfold/families/glm5_next/cuda/hcsplit.py
+++ tensorfold/families/glm5_next/cuda/hcsplit.py
@@ -107,9 +107,10 @@ class HcSplit:
self.got: list[torch.Tensor] = []
self.stream = None
if settings.overlap:
- # TF_GLM_OVERLAP_PRIORITY: the side stream's priority (-1 high, 0 normal); a high-priority stream in the
- # process may cost decode rounds (graphs on the default stream) a little: measured per boot
- self.stream = torch.cuda.Stream(priority=-1 if os.environ.get("TF_GLM_OVERLAP_PRIORITY", "-1").strip() != "0" else 0)
+ # TF_GLM_OVERLAP_PRIORITY: the side stream's priority, 0 (normal, the default) or -1 (high). Two Sparks, two
+ # boots each: prefill the same, decode rounds after a high-priority prompt ~0.5-1% slower
+ high = os.environ.get("TF_GLM_OVERLAP_PRIORITY", "0").strip() == "-1"
+ self.stream = torch.cuda.Stream(priority=-1 if high else 0)
n = settings.piece_count()
self.ev_fill = [torch.cuda.Event() for _ in range(n)]
self.ev_part = [torch.cuda.Event() for _ in range(n)]