@@ -48,7 +48,7 @@ def complete_wheel(folder: str):
48
48
os .system (f"mv /{ folder } /wheelhouse/{ repaired_wheel_name } /{ folder } /dist/" )
49
49
else :
50
50
repaired_wheel_name = wheel_name
51
-
51
+
52
52
print (f"Copying { repaired_wheel_name } to artfacts" )
53
53
os .system (f"mv /{ folder } /dist/{ repaired_wheel_name } /artifacts/" )
54
54
@@ -85,12 +85,18 @@ def parse_arguments():
85
85
build_vars = "CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 "
86
86
os .system ("python setup.py clean" )
87
87
88
- if branch == 'nightly' or branch == 'master' :
89
- build_date = subprocess .check_output (['git' , 'log' , '--pretty=format:%cs' , '-1' ], cwd = '/pytorch' ).decode ().replace ('-' , '' )
90
- version = subprocess .check_output (['cat' , 'version.txt' ], cwd = '/pytorch' ).decode ().strip ()[:- 2 ]
91
- build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={ version } .dev{ build_date } PYTORCH_BUILD_NUMBER=1 "
92
- if branch .startswith ("v1." ) or branch .startswith ("v2." ):
93
- build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={ branch [1 :branch .find ('-' )]} PYTORCH_BUILD_NUMBER=1 "
88
+ override_package_version = os .getenv ("OVERRIDE_PACKAGE_VERSION" )
89
+ if override_package_version is not None :
90
+ version = override_package_version
91
+ build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={ version } PYTORCH_BUILD_NUMBER=1 "
92
+ else :
93
+ if branch == 'nightly' or branch == 'master' :
94
+ build_date = subprocess .check_output (['git' , 'log' , '--pretty=format:%cs' , '-1' ], cwd = '/pytorch' ).decode ().replace ('-' , '' )
95
+ version = subprocess .check_output (['cat' , 'version.txt' ], cwd = '/pytorch' ).decode ().strip ()[:- 2 ]
96
+ build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={ version } .dev{ build_date } PYTORCH_BUILD_NUMBER=1 "
97
+ if branch .startswith ("v1." ) or branch .startswith ("v2." ):
98
+ build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={ branch [1 :branch .find ('-' )]} PYTORCH_BUILD_NUMBER=1 "
99
+
94
100
if enable_mkldnn :
95
101
build_ArmComputeLibrary (git_clone_flags )
96
102
print ("build pytorch with mkldnn+acl backend" )
0 commit comments