11from cimodel .data .simple .util .versions import MultiPartVersion
2+ from cimodel .data .simple .util .branch_filters import gen_filter_dict_exclude
23import cimodel .lib .miniutils as miniutils
34
45XCODE_VERSION = MultiPartVersion ([12 , 5 , 1 ])
@@ -11,7 +12,7 @@ def __init__(self, name, custom_build_name=""):
1112
1213 def render (self ):
1314 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 ( "_" , "-" )
1516
1617
1718def get_platform (arch_variant_name ):
@@ -25,30 +26,25 @@ def __init__(self, xcode_version, arch_variant, is_org_member_context=True, extr
2526 self .is_org_member_context = is_org_member_context
2627 self .extra_props = extra_props
2728
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 ()
3332 return [
34- "pytorch" ,
3533 "ios" ,
3634 ] + version_parts + [
3735 build_variant_suffix ,
3836 ]
3937
4038 def gen_job_name (self ):
41- return "_ " .join (self .gen_name_parts (False ))
39+ return "- " .join (self .gen_name_parts ())
4240
4341 def gen_tree (self ):
44-
4542 platform_name = get_platform (self .arch_variant .name )
46-
4743 props_dict = {
48- "build_environment" : "-" .join (self .gen_name_parts (True )),
44+ "name" : self .gen_job_name (),
45+ "build_environment" : self .gen_job_name (),
4946 "ios_arch" : self .arch_variant .name ,
5047 "ios_platform" : platform_name ,
51- "name" : self .gen_job_name (),
5248 }
5349
5450 if self .is_org_member_context :
@@ -57,30 +53,28 @@ def gen_tree(self):
5753 if self .extra_props :
5854 props_dict .update (self .extra_props )
5955
56+ props_dict ["filters" ] = gen_filter_dict_exclude ()
57+
6058 return [{"pytorch_ios_build" : props_dict }]
6159
6260
6361WORKFLOW_DATA = [
6462 IOSJob (XCODE_VERSION , ArchVariant ("x86_64" ), is_org_member_context = False , extra_props = {
6563 "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)))}),
7872 IOSJob (XCODE_VERSION , ArchVariant ("x86_64" , "coreml" ), is_org_member_context = False , extra_props = {
7973 "use_coreml" : miniutils .quote (str (int (True ))),
8074 "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)))}),
8478]
8579
8680
0 commit comments