File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 55# This source code is licensed under the BSD-style license found in the
66# LICENSE file in the root directory of this source tree.
77
8+ import os
9+ import subprocess
810import test_base
911from examples .models import Backend , Model
12+ from test_base import ModelTest
13+ from typing import List
14+
15+ def map_backend_name (name : str ) -> str :
16+ # Map the backend name to the string used by the Windows test jobs, which use
17+ # a slightly different convention. This is an artifact of us being mid-update
18+ # of the model test logic.
19+ # TODO(gjcomer) Clean this up when we update the model test CI.
20+
21+ if name == "xnnpack-quantization-delegation" :
22+ return "xnnpack-q8"
23+ else :
24+ return name
25+
26+ def run_tests (model_tests : List [ModelTest ]) -> None :
27+ for model_test in model_tests :
28+ subprocess .run (
29+ [
30+ os .path .join (test_base ._repository_root_dir (), ".ci/scripts/test_model.ps1" ),
31+ "-ModelName" ,
32+ str (model_test .model ),
33+ "-Backend" ,
34+ map_backend_name (str (model_test .backend )),
35+ ],
36+ check = True ,
37+ cwd = test_base ._repository_root_dir (),
38+ )
39+
1040
1141if __name__ == "__main__" :
1242 test_base .run_tests (
1343 model_tests = [
14- test_base . ModelTest (
44+ ModelTest (
1545 model = Model .Mv3 ,
1646 backend = Backend .XnnpackQuantizationDelegation ,
1747 ),
You can’t perform that action at this time.
0 commit comments