• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Only used for PyTorch open source BUCK build
2
3def compose_platform_setting_list(settings):
4    """Settings object:
5    os/cpu pair: should be valid key, or at most one part can be wildcard.
6    flags: the values added to the compiler flags
7    """
8    if read_config("pt", "is_oss", "0") == "0":
9        fail("This file is for open source pytorch build. Do not use it in fbsource!")
10
11    result = []
12    for setting in settings:
13        result.append([
14            "^{}-{}$".format(setting["os"], setting["cpu"]),
15            setting["flags"],
16        ])
17    return result
18