1
1
from cimodel .data .simple .util .versions import MultiPartVersion
2
+ from cimodel .data .simple .util .branch_filters import gen_filter_dict_exclude
2
3
import cimodel .lib .miniutils as miniutils
3
4
4
5
XCODE_VERSION = MultiPartVersion ([12 , 5 , 1 ])
@@ -11,7 +12,7 @@ def __init__(self, name, custom_build_name=""):
11
12
12
13
def render (self ):
13
14
extra_parts = [self .custom_build_name ] if len (self .custom_build_name ) > 0 else []
14
- return "_ " .join ([self .name ] + extra_parts )
15
+ return "- " .join ([self .name ] + extra_parts ). replace ( "_" , "-" )
15
16
16
17
17
18
def get_platform (arch_variant_name ):
@@ -25,30 +26,25 @@ def __init__(self, xcode_version, arch_variant, is_org_member_context=True, extr
25
26
self .is_org_member_context = is_org_member_context
26
27
self .extra_props = extra_props
27
28
28
- def gen_name_parts (self , with_version_dots ):
29
-
30
- version_parts = self .xcode_version .render_dots_or_parts (with_version_dots )
31
- build_variant_suffix = "_" .join ([self .arch_variant .render (), "build" ])
32
-
29
+ def gen_name_parts (self ):
30
+ version_parts = self .xcode_version .render_dots_or_parts ("-" )
31
+ build_variant_suffix = self .arch_variant .render ()
33
32
return [
34
- "pytorch" ,
35
33
"ios" ,
36
34
] + version_parts + [
37
35
build_variant_suffix ,
38
36
]
39
37
40
38
def gen_job_name (self ):
41
- return "_ " .join (self .gen_name_parts (False ))
39
+ return "- " .join (self .gen_name_parts ())
42
40
43
41
def gen_tree (self ):
44
-
45
42
platform_name = get_platform (self .arch_variant .name )
46
-
47
43
props_dict = {
48
- "build_environment" : "-" .join (self .gen_name_parts (True )),
44
+ "name" : self .gen_job_name (),
45
+ "build_environment" : self .gen_job_name (),
49
46
"ios_arch" : self .arch_variant .name ,
50
47
"ios_platform" : platform_name ,
51
- "name" : self .gen_job_name (),
52
48
}
53
49
54
50
if self .is_org_member_context :
@@ -57,30 +53,28 @@ def gen_tree(self):
57
53
if self .extra_props :
58
54
props_dict .update (self .extra_props )
59
55
56
+ props_dict ["filters" ] = gen_filter_dict_exclude ()
57
+
60
58
return [{"pytorch_ios_build" : props_dict }]
61
59
62
60
63
61
WORKFLOW_DATA = [
64
62
IOSJob (XCODE_VERSION , ArchVariant ("x86_64" ), is_org_member_context = False , extra_props = {
65
63
"lite_interpreter" : miniutils .quote (str (int (True )))}),
66
- IOSJob (XCODE_VERSION , ArchVariant ("x86_64" , "full_jit" ), is_org_member_context = False , extra_props = {
67
- "lite_interpreter" : miniutils .quote (str (int (False )))}),
68
- IOSJob (XCODE_VERSION , ArchVariant ("arm64" ), extra_props = {
69
- "lite_interpreter" : miniutils .quote (str (int (True )))}),
70
- IOSJob (XCODE_VERSION , ArchVariant ("arm64" , "metal" ), extra_props = {
71
- "use_metal" : miniutils .quote (str (int (True ))),
72
- "lite_interpreter" : miniutils .quote (str (int (True )))}),
73
- IOSJob (XCODE_VERSION , ArchVariant ("arm64" , "full_jit" ), extra_props = {
74
- "lite_interpreter" : miniutils .quote (str (int (False )))}),
75
- IOSJob (XCODE_VERSION , ArchVariant ("arm64" , "custom" ), extra_props = {
76
- "op_list" : "mobilenetv2.yaml" ,
77
- "lite_interpreter" : miniutils .quote (str (int (True )))}),
64
+ # IOSJob(XCODE_VERSION, ArchVariant("arm64"), extra_props={
65
+ # "lite_interpreter": miniutils.quote(str(int(True)))}),
66
+ # IOSJob(XCODE_VERSION, ArchVariant("arm64", "metal"), extra_props={
67
+ # "use_metal": miniutils.quote(str(int(True))),
68
+ # "lite_interpreter": miniutils.quote(str(int(True)))}),
69
+ # IOSJob(XCODE_VERSION, ArchVariant("arm64", "custom-ops"), extra_props={
70
+ # "op_list": "mobilenetv2.yaml",
71
+ # "lite_interpreter": miniutils.quote(str(int(True)))}),
78
72
IOSJob (XCODE_VERSION , ArchVariant ("x86_64" , "coreml" ), is_org_member_context = False , extra_props = {
79
73
"use_coreml" : miniutils .quote (str (int (True ))),
80
74
"lite_interpreter" : miniutils .quote (str (int (True )))}),
81
- IOSJob (XCODE_VERSION , ArchVariant ("arm64" , "coreml" ), extra_props = {
82
- "use_coreml" : miniutils .quote (str (int (True ))),
83
- "lite_interpreter" : miniutils .quote (str (int (True )))}),
75
+ # IOSJob(XCODE_VERSION, ArchVariant("arm64", "coreml"), extra_props={
76
+ # "use_coreml": miniutils.quote(str(int(True))),
77
+ # "lite_interpreter": miniutils.quote(str(int(True)))}),
84
78
]
85
79
86
80
0 commit comments