mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
tests: test_arc_feed_models describes the Linux Arc route
Six tests (AdoptFeedModels, AppArcPath) built the Linux Arc config and read the sys.platform of the machine they ran on; on Windows adopt.py writes its own flags and intel_app.route_here refuses most packs. adopt.plan gets platform="linux" and the app-install test pins sys.platform to linux.
This commit is contained in:
1 parent
6ef63cf0c1
commit
a28dd780a6
1 file changed
+3
-2
@@ -64,7 +64,7 @@ class Tree:
|
||||
def plan(self, family: str, model: str, fam: dict, notes=None):
|
||||
return adopt.plan(family=family, model=model, model_dir=self.models, data_dir=self.data, src=self.src, context=32768, kv="int8",
|
||||
model_name=f"{fam.get('name', family)}-{model.lower()}", family_def=fam, log=self.root / "x.log", backend="sycl", notes=notes,
|
||||
pack_name=self.pack.name)
|
||||
pack_name=self.pack.name, platform="linux") # the Linux Arc config (Windows Intel writes its own flags: adopt.py win_sycl)
|
||||
|
||||
|
||||
class AdoptFeedModels(unittest.TestCase):
|
||||
@@ -203,7 +203,8 @@ class AppArcPath(unittest.TestCase):
|
||||
mock.patch.object(setup_config, "neutral_profile_if_other_shape", lambda shipped, first, pack, G, say=print: Path(pack) / "expert-profile-4x256.bin"), \
|
||||
mock.patch.object(intel_app, "arc_cards", lambda root="": [dict(A750)]), \
|
||||
mock.patch("strata_cli.launch.adopt.intel_driver", lambda: "i915"), \
|
||||
mock.patch.object(intel_app, "supported_here", lambda platform=None: True):
|
||||
mock.patch.object(intel_app, "supported_here", lambda platform=None: True), \
|
||||
mock.patch.object(sys, "platform", "linux"): # the Linux Arc route (Windows only runs the packs QFN-B70 gated)
|
||||
self.assertEqual(setup.intel_control_setup(a), 0)
|
||||
self.assertEqual(fetched, [{"shape": "q4_lite", "title": "Qwen4 Rehearsal"}])
|
||||
cfg = json.loads((home / "strata-q4rehearsal-b-ud-q4_k_xl-q4rehearsal-b.json").read_text(encoding="utf-8"))
|
||||
|
||||
Reference in new issue
Block a user