@@ -29,6 +29,7 @@ class OperatingSystem(Enum):
29
29
DEFAULT = "default"
30
30
ENABLE = "enable"
31
31
DISABLE = "disable"
32
+ MACOS = "macos"
32
33
33
34
# Mapping json to release matrix default values
34
35
acc_arch_ver_default = {
@@ -56,6 +57,7 @@ class OperatingSystem(Enum):
56
57
CXX11_ABI : "Download here (cxx11 ABI):" ,
57
58
RELEASE : "Download here (Release version):" ,
58
59
DEBUG : "Download here (Debug version):" ,
60
+ MACOS : "Download default libtorch here (ROCm and CUDA not supported):" ,
59
61
}
60
62
61
63
def load_json_from_basedir (filename : str ):
@@ -137,6 +139,13 @@ def update_versions(versions, release_matrix, release_version):
137
139
if instr ["versions" ] is not None :
138
140
for ver in [RELEASE , DEBUG ]:
139
141
instr ["versions" ][LIBTORCH_DWNL_INSTR [ver ]] = rel_entry_dict [ver ]
142
+ elif os_key == OperatingSystem .MACOS .value :
143
+ rel_entry_dict = {
144
+ x ["devtoolset" ]: x ["installation" ] for x in pkg_arch_matrix
145
+ if x ["libtorch_variant" ] == "shared-with-deps"
146
+ }
147
+ if instr ["versions" ] is not None :
148
+ instr ["versions" ][LIBTORCH_DWNL_INSTR [MACOS ]] = list (rel_entry_dict .values ())[0 ]
140
149
141
150
# This method is used for generating new quick-start-module.js
142
151
# from the versions json object
@@ -188,7 +197,7 @@ def gen_ver_list(chan, gpu_arch_type):
188
197
def main ():
189
198
parser = argparse .ArgumentParser ()
190
199
parser .add_argument ('--autogenerate' , dest = 'autogenerate' , action = 'store_true' )
191
- parser .set_defaults (autogenerate = False )
200
+ parser .set_defaults (autogenerate = True )
192
201
193
202
options = parser .parse_args ()
194
203
versions = read_published_versions ()
0 commit comments