Skip to content

Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.

tests: a missing repository extension stops hy4_forward, HY4_ALLOW_SLOW=1 continues

YanissAmz8600ae7ba82b
diff --git a/tests/test_hy4_fail_loud.py b/tests/test_hy4_fail_loud.py
new file mode 100644
index 0000000..6b0cdda
--- /dev/null
+++ b/tests/test_hy4_fail_loud.py
@@ -0,0 +1,25 @@
+"""A missing built kernel library stops hy4_forward with the install step; HY4_ALLOW_SLOW=1 keeps the slow path."""
+import pytest
+
+from exllamav3.loader import hy4_forward as hf
+
+
+def no_ext(monkeypatch, tmp_path):
+ monkeypatch.setenv("HY4_EXT_DIR", str(tmp_path))
+ monkeypatch.setattr(hf, "_EXT", [])
+ return tmp_path
+
+
+def test_missing_extension_stops(no_ext, monkeypatch):
+ monkeypatch.delenv("HY4_ALLOW_SLOW", raising = False)
+ with pytest.raises(RuntimeError, match = r"build\.sh.*install_strix\.sh"):
+ hf._ext()
+ assert hf._EXT == [] # nothing cached: the next call stops again
+
+
+def test_allow_slow_continues(no_ext, monkeypatch, capsys):
+ monkeypatch.setenv("HY4_ALLOW_SLOW", "1")
+ assert hf._ext() is None
+ assert hf.mmvq_fn(12, 256) is None
+ assert "slow path" in capsys.readouterr().out