Skip to content

Commit 3c5c885

Browse files
committed
Add 3.11 and --pytorch-only options
1 parent 56177be commit 3c5c885

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build_aarch64_wheel.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ def start_build(host: RemoteHost, *,
475475
compiler="gcc-8",
476476
use_conda=True,
477477
python_version="3.8",
478+
pytorch_only:bool=False,
478479
shallow_clone=True,
479480
enable_mkldnn=False) -> Tuple[str, str]:
480481
git_clone_flags = " --depth 1 --shallow-submodules" if shallow_clone else ""
@@ -543,6 +544,8 @@ def start_build(host: RemoteHost, *,
543544
print('Installing PyTorch wheel')
544545
host.run_cmd(f"pip3 install pytorch/dist/{pytorch_wheel_name}")
545546

547+
if pytorch_only:
548+
return pytorch_wheel_name, None
546549
vision_wheel_name = build_torchvision(host, branch=branch, use_conda=use_conda, git_clone_flags=git_clone_flags)
547550
build_torchaudio(host, branch=branch, use_conda=use_conda, git_clone_flags=git_clone_flags)
548551
build_torchtext(host, branch=branch, use_conda=use_conda, git_clone_flags=git_clone_flags)
@@ -674,9 +677,10 @@ def parse_arguments():
674677
parser.add_argument("--build-only", action="store_true")
675678
parser.add_argument("--test-only", type=str)
676679
parser.add_argument("--os", type=str, choices=list(os_amis.keys()), default='ubuntu18_04')
677-
parser.add_argument("--python-version", type=str, choices=['3.6', '3.7', '3.8', '3.9', '3.10'], default=None)
680+
parser.add_argument("--python-version", type=str, choices=['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'], default=None)
678681
parser.add_argument("--alloc-instance", action="store_true")
679682
parser.add_argument("--list-instances", action="store_true")
683+
parser.add_argument("--pytorch-only", action="store_true")
680684
parser.add_argument("--keep-running", action="store_true")
681685
parser.add_argument("--terminate-instances", action="store_true")
682686
parser.add_argument("--instance-type", type=str, default="t4g.2xlarge")
@@ -754,6 +758,7 @@ def parse_arguments():
754758
branch=args.branch,
755759
compiler=args.compiler,
756760
python_version=python_version,
761+
pytorch_only=args.pytorch_only,
757762
enable_mkldnn=args.enable_mkldnn)
758763
if not args.keep_running:
759764
print(f'Waiting for instance {inst.id} to terminate')

0 commit comments

Comments
 (0)