From c583218be65a9f4e5ac2f7b4dc673a08e36f133e Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Sep 2023 07:30:25 -0700 Subject: [PATCH 1/3] Aarch64 fix overrdie passing from CI to build --- aarch64_linux/aarch64_wheel_ci_build.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/aarch64_linux/aarch64_wheel_ci_build.py b/aarch64_linux/aarch64_wheel_ci_build.py index 5d80a95e4..eccd60bed 100755 --- a/aarch64_linux/aarch64_wheel_ci_build.py +++ b/aarch64_linux/aarch64_wheel_ci_build.py @@ -48,7 +48,7 @@ def complete_wheel(folder: str): os.system(f"mv /{folder}/wheelhouse/{repaired_wheel_name} /{folder}/dist/") else: repaired_wheel_name = wheel_name - + print(f"Copying {repaired_wheel_name} to artfacts") os.system(f"mv /{folder}/dist/{repaired_wheel_name} /artifacts/") @@ -85,12 +85,18 @@ def parse_arguments(): build_vars = "CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 " os.system("python setup.py clean") - if branch == 'nightly' or branch == 'master': - build_date = subprocess.check_output(['git', 'log', '--pretty=format:%cs', '-1'], cwd='/pytorch').decode().replace('-', '') - version = subprocess.check_output(['cat', 'version.txt'], cwd='/pytorch').decode().strip()[:-2] - build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version}.dev{build_date} PYTORCH_BUILD_NUMBER=1 " - if branch.startswith("v1.") or branch.startswith("v2."): - build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={branch[1:branch.find('-')]} PYTORCH_BUILD_NUMBER=1 " + override_package_version = os.getenv("OVERRIDE_PACKAGE_VERSION") + if override_package_version is not None + version = override_package_version + build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version} PYTORCH_BUILD_NUMBER=1 " + else + if branch == 'nightly' or branch == 'master': + build_date = subprocess.check_output(['git', 'log', '--pretty=format:%cs', '-1'], cwd='/pytorch').decode().replace('-', '') + version = subprocess.check_output(['cat', 'version.txt'], cwd='/pytorch').decode().strip()[:-2] + build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version}.dev{build_date} PYTORCH_BUILD_NUMBER=1 " + if branch.startswith("v1.") or branch.startswith("v2."): + build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={branch[1:branch.find('-')]} PYTORCH_BUILD_NUMBER=1 " + if enable_mkldnn: build_ArmComputeLibrary(git_clone_flags) print("build pytorch with mkldnn+acl backend") From 4136d1d4693fe8ad7558c254a831cd46ca312c3b Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Sep 2023 07:30:49 -0700 Subject: [PATCH 2/3] Aarch64 fix overrdie passing from CI to build --- aarch64_linux/aarch64_wheel_ci_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aarch64_linux/aarch64_wheel_ci_build.py b/aarch64_linux/aarch64_wheel_ci_build.py index eccd60bed..d00dd4aec 100755 --- a/aarch64_linux/aarch64_wheel_ci_build.py +++ b/aarch64_linux/aarch64_wheel_ci_build.py @@ -86,7 +86,7 @@ def parse_arguments(): os.system("python setup.py clean") override_package_version = os.getenv("OVERRIDE_PACKAGE_VERSION") - if override_package_version is not None + if override_package_version is not None: version = override_package_version build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version} PYTORCH_BUILD_NUMBER=1 " else From b51f79498e842ee0eee5cdba5ca5c406dc695afb Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Sep 2023 08:09:22 -0700 Subject: [PATCH 3/3] Aarch64 fix overrdie passing from CI to build --- aarch64_linux/aarch64_wheel_ci_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aarch64_linux/aarch64_wheel_ci_build.py b/aarch64_linux/aarch64_wheel_ci_build.py index d00dd4aec..4ad620ba2 100755 --- a/aarch64_linux/aarch64_wheel_ci_build.py +++ b/aarch64_linux/aarch64_wheel_ci_build.py @@ -89,7 +89,7 @@ def parse_arguments(): if override_package_version is not None: version = override_package_version build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version} PYTORCH_BUILD_NUMBER=1 " - else + else: if branch == 'nightly' or branch == 'master': build_date = subprocess.check_output(['git', 'log', '--pretty=format:%cs', '-1'], cwd='/pytorch').decode().replace('-', '') version = subprocess.check_output(['cat', 'version.txt'], cwd='/pytorch').decode().strip()[:-2]