Ejemplo n.º 1
0
from cimodel.data.simple.util.versions import MultiPartVersion
import cimodel.lib.miniutils as miniutils

XCODE_VERSION = MultiPartVersion([12, 5, 1])


class ArchVariant:
    def __init__(self, name, custom_build_name=""):
        self.name = name
        self.custom_build_name = custom_build_name

    def render(self):
        extra_parts = [self.custom_build_name] if len(self.custom_build_name) > 0 else []
        return "_".join([self.name] + extra_parts)


def get_platform(arch_variant_name):
    return "SIMULATOR" if arch_variant_name == "x86_64" else "OS"


class IOSJob:
    def __init__(self, xcode_version, arch_variant, is_org_member_context=True, extra_props=None):
        self.xcode_version = xcode_version
        self.arch_variant = arch_variant
        self.is_org_member_context = is_org_member_context
        self.extra_props = extra_props

    def gen_name_parts(self, with_version_dots):

        version_parts = self.xcode_version.render_dots_or_parts(with_version_dots)
        build_variant_suffix = "_".join([self.arch_variant.render(), "build"])
Ejemplo n.º 2
0
        props_dict = {
            "name": full_name,
            "build_environment": build_env,
            "requires": ["setup"] + self.extra_requires,
            "resource_class": resource_class,
            "docker_image": docker_image,
        }

        if self.use_cuda_docker:
            props_dict["use_cuda_docker_runtime"] = miniutils.quote(str(1))

        return [{"pytorch_linux_test": props_dict}]


WORKFLOW_DATA = [
    GeConfigTestJob(MultiPartVersion([3, 6], "py"),
                    MultiPartVersion([5, 4], "gcc"), None,
                    ["ge_config_legacy", "test"],
                    ["pytorch_linux_xenial_py3_6_gcc5_4_build"]),
    GeConfigTestJob(MultiPartVersion([3, 6], "py"),
                    MultiPartVersion([5, 4], "gcc"), None,
                    ["ge_config_profiling", "test"],
                    ["pytorch_linux_xenial_py3_6_gcc5_4_build"]),
    GeConfigTestJob(
        MultiPartVersion([3, 6], "py"),
        MultiPartVersion([5, 4], "gcc"),
        None,
        ["ge_config_simple", "test"],
        ["pytorch_linux_xenial_py3_6_gcc5_4_build"],
    ),
    GeConfigTestJob(
Ejemplo n.º 3
0
from cimodel.data.simple.util.versions import MultiPartVersion
import cimodel.lib.miniutils as miniutils

XCODE_VERSION = MultiPartVersion([12, 0, 0])


class ArchVariant:
    def __init__(self, name, custom_build_name=""):
        self.name = name
        self.custom_build_name = custom_build_name

    def render(self):
        extra_parts = [self.custom_build_name
                       ] if len(self.custom_build_name) > 0 else []
        return "_".join([self.name] + extra_parts)


def get_platform(arch_variant_name):
    return "SIMULATOR" if arch_variant_name == "x86_64" else "OS"


class IOSJob:
    def __init__(self,
                 xcode_version,
                 arch_variant,
                 is_org_member_context=True,
                 extra_props=None):
        self.xcode_version = xcode_version
        self.arch_variant = arch_variant
        self.is_org_member_context = is_org_member_context
        self.extra_props = extra_props
Ejemplo n.º 4
0
from cimodel.data.simple.util.versions import MultiPartVersion


IOS_VERSION = MultiPartVersion([11, 2, 1])


class ArchVariant:
    def __init__(self, name, is_custom=False):
        self.name = name
        self.is_custom = is_custom

    def render(self):
        extra_parts = ["custom"] if self.is_custom else []
        return "_".join([self.name] + extra_parts)


def get_platform(arch_variant_name):
    return "SIMULATOR" if arch_variant_name == "x86_64" else "OS"


class IOSJob:
    def __init__(self, ios_version, arch_variant, is_org_member_context=True, extra_props=None):
        self.ios_version = ios_version
        self.arch_variant = arch_variant
        self.is_org_member_context = is_org_member_context
        self.extra_props = extra_props

    def gen_name_parts(self, with_version_dots):

        version_parts = self.ios_version.render_dots_or_parts(with_version_dots)
        build_variant_suffix = "_".join([self.arch_variant.render(), "build"])
        props_dict = {
            "name": full_name,
            "build_environment": build_env,
            "requires": self.extra_requires,
            "resource_class": resource_class,
            "docker_image": docker_image,
        }

        if self.use_cuda_docker:
            props_dict["use_cuda_docker_runtime"] = miniutils.quote(str(1))

        return [{"pytorch_linux_test": props_dict}]


WORKFLOW_DATA = [
    GeConfigTestJob(MultiPartVersion([3, 6], "py"),
                    MultiPartVersion([5, 4],
                                     "gcc"), None, ["jit_legacy", "test"],
                    ["pytorch_linux_xenial_py3_6_gcc5_4_build"]),
    GeConfigTestJob(
        None,
        None,
        CudaVersion(10, 2),
        ["cudnn7", "py3", "jit_legacy", "test"],
        ["pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_build"],
        use_cuda_docker=True,
    ),
]


def get_workflow_jobs():