metal: the DSpark drafter stays off on a Mac unless asked for (its quantised Markov bias has no Metal kernel; the setup test stopped with kernel launch with no Metal dispatch)
This commit is contained in:
1 parent
5729a6e50a
commit
d50f6a77ed
2 files changed
+10
-2
No files matched your search
@@ -2229,6 +2229,14 @@ struct Model::Impl {
|
||||
if (o.vision_only) return true;
|
||||
|
||||
// layers: roles and the sources they read
|
||||
#if defined(STRATA_METAL)
|
||||
// On a Mac the drafter is off unless it is asked for outright: it gave the same answers and no speed-up there, and the head of its
|
||||
// quantised Markov bias has no Metal kernel (the engine stopped with "kernel launch with no Metal dispatch" on the setup test).
|
||||
if (o.dspark_auto && o.dspark && g.n_mtp > 0) {
|
||||
o.dspark = false;
|
||||
std::fprintf(stderr, "ds4: DSpark not loaded on a Mac (--dspark on loads it anyway)\n");
|
||||
}
|
||||
#endif
|
||||
if (o.dspark_auto && o.dspark && g.n_mtp > 0) { // (see Options::dspark_auto)
|
||||
double exp_b = 0, room_b = 0;
|
||||
for (const auto& kt : pk.t)
|
||||
|
||||
@@ -77,8 +77,8 @@ def main() -> int:
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
f = Path(d) / "ids.txt"
|
||||
f.write_text(",".join(str(i) for i in ids), encoding="ascii")
|
||||
cmd = [a.exe, "--pack", str(pack), "--ids", "@" + str(f), "--n", str(a.tokens), "--max-context", "1024", "--dspark", "auto",
|
||||
"--window", "16"]
|
||||
cmd = [a.exe, "--pack", str(pack), "--ids", "@" + str(f), "--n", str(a.tokens), "--max-context", "1024", "--dspark", "none" if sys.platform == "darwin" else "auto",
|
||||
"--window", "16"] # (a Mac runs without the drafter: its Metal engine has no kernels for it)
|
||||
if a.gpus:
|
||||
cmd += ["--gpus", a.gpus]
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user