Skip to content

Commit

Permalink
Add cann_dependencies (#19929)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
wangshuai09 authored Mar 16, 2024
1 parent b29849a commit 1eb67a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def run(self):

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

cann_dependencies = ["libascendcl.so", "libacl_op_compiler.so", "libfmk_onnx_parser.so"]

dest = "onnxruntime/capi/libonnxruntime_providers_openvino.so"
if path.isfile(dest):
subprocess.run(
Expand All @@ -255,7 +257,7 @@ def run(self):
file = glob(path.join(self.dist_dir, "*linux*.whl"))[0]
logger.info("repairing %s for manylinux1", file)
auditwheel_cmd = ["auditwheel", "-v", "repair", "-w", self.dist_dir, file]
for i in cuda_dependencies + rocm_dependencies + tensorrt_dependencies:
for i in cuda_dependencies + rocm_dependencies + tensorrt_dependencies + cann_dependencies:
auditwheel_cmd += ["--exclude", i]
logger.info("Running %s", " ".join([shlex.quote(arg) for arg in auditwheel_cmd]))
try:
Expand Down

0 comments on commit 1eb67a0

Please sign in to comment.