Skip to content

Commit a280485

Browse files
authored
hpu build with auto_round package name (#838)
1 parent f44d1f7 commit a280485

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,22 @@ def fetch_requirements(path):
115115
if __name__ == "__main__":
116116
# There are two ways to install hpu-only package:
117117
# 1. python setup.py lib install
118-
# 2. Within the gaudi docker where the HPU is available, we install the auto_round_lib by default.
118+
# 2. Within the gaudi docker where the HPU is available, we install the "auto_round_lib" by default.
119119
is_user_requesting_library_build = "lib" in sys.argv
120120
if is_user_requesting_library_build:
121121
sys.argv.remove("lib")
122122
should_build_library = is_user_requesting_library_build or BUILD_HPU_ONLY
123-
124123
if should_build_library:
125124
package_name = "auto_round_lib"
125+
126+
# Install hpu dependencies when hpu is build args, and keep "auto_round" package name.
127+
# Only available for source code installation, "python setup.py install hpu".
128+
hpu_build = "hpu" in sys.argv
129+
if hpu_build:
130+
sys.argv.remove("hpu")
131+
package_name = "auto_round"
132+
133+
if should_build_library or hpu_build:
126134
INSTALL_CFG = LIB_INSTALL_CFG
127135
else:
128136
package_name = "auto_round"

0 commit comments

Comments
 (0)