Skip to content

Commit 1eb67a0

Browse files
authored
Add cann_dependencies (#19929)
### Description <!-- Describe your changes. --> Add `cann_dependencies` ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> The previous [PR](#17365) avioded using patchelf but lost `cann_dependencies`, This PR adds `cann_dependencies` to avoid require cann libraries when repairing wheel.
1 parent b29849a commit 1eb67a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ def run(self):
232232

233233
tensorrt_dependencies = ["libnvinfer.so.8", "libnvinfer_plugin.so.8", "libnvonnxparser.so.8"]
234234

235+
cann_dependencies = ["libascendcl.so", "libacl_op_compiler.so", "libfmk_onnx_parser.so"]
236+
235237
dest = "onnxruntime/capi/libonnxruntime_providers_openvino.so"
236238
if path.isfile(dest):
237239
subprocess.run(
@@ -255,7 +257,7 @@ def run(self):
255257
file = glob(path.join(self.dist_dir, "*linux*.whl"))[0]
256258
logger.info("repairing %s for manylinux1", file)
257259
auditwheel_cmd = ["auditwheel", "-v", "repair", "-w", self.dist_dir, file]
258-
for i in cuda_dependencies + rocm_dependencies + tensorrt_dependencies:
260+
for i in cuda_dependencies + rocm_dependencies + tensorrt_dependencies + cann_dependencies:
259261
auditwheel_cmd += ["--exclude", i]
260262
logger.info("Running %s", " ".join([shlex.quote(arg) for arg in auditwheel_cmd]))
261263
try:

0 commit comments

Comments
 (0)