Skip to content

Commit

Permalink
lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
baijumeswani committed Jul 1, 2024
1 parent b1866c2 commit 28b7c88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
18 changes: 14 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ def finalize_options(self):
"libmklml_gnu.so",
"libiomp5.so",
"mimalloc.so",
"libonnxruntime.so*",
]
dl_libs = ["libonnxruntime_providers_shared.so"]
dl_libs.append(providers_cuda_or_rocm)
Expand All @@ -311,22 +312,31 @@ def finalize_options(self):
libs.append(providers_cuda_or_rocm)
libs.append(providers_tensorrt_or_migraphx)
libs.append(providers_cann)
libs.append("libonnxruntime.so*")
if nightly_build:
libs.extend(["libonnxruntime_pywrapper.so"])
elif platform.system() == "Darwin":
libs = ["onnxruntime_pybind11_state.so", "libdnnl.2.dylib", "mimalloc.so"] # TODO add libmklml and libiomp5 later.
libs = [
"onnxruntime_pybind11_state.so",
"libdnnl.2.dylib",
"mimalloc.so",
"libonnxruntime.dylib*",
] # TODO add libmklml and libiomp5 later.
# DNNL & TensorRT EPs are built as shared libs
libs.extend(["libonnxruntime_providers_shared.dylib"])
libs.extend(["libonnxruntime_providers_dnnl.dylib"])
libs.extend(["libonnxruntime_providers_tensorrt.dylib"])
libs.extend(["libonnxruntime_providers_cuda.dylib"])
libs.extend(["libonnxruntime_providers_vitisai.dylib"])
libs.append("libonnxruntime.dylib*")
if nightly_build:
libs.extend(["libonnxruntime_pywrapper.dylib"])
else:
libs = ["onnxruntime_pybind11_state.pyd", "dnnl.dll", "mklml.dll", "libiomp5md.dll", "onnxruntime.dll",]
libs = [
"onnxruntime_pybind11_state.pyd",
"dnnl.dll",
"mklml.dll",
"libiomp5md.dll",
"onnxruntime.dll",
]
# DNNL, TensorRT & OpenVINO EPs are built as shared libs
libs.extend(["onnxruntime_providers_shared.dll"])
libs.extend(["onnxruntime_providers_dnnl.dll"])
Expand Down
8 changes: 7 additions & 1 deletion tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2591,7 +2591,13 @@ def main():
if args.build_wheel or args.gen_doc or args.use_tvm or args.enable_training:
args.enable_pybind = True

if args.build_csharp or args.build_nuget or args.build_java or args.build_nodejs or (args.enable_pybind and not args.enable_training):
if (
args.build_csharp
or args.build_nuget
or args.build_java
or args.build_nodejs
or (args.enable_pybind and not args.enable_training)
):
# If pyhon bindings are enabled, we embed the shared lib in the python package.
# If training is enabled, we don't embed the shared lib in the python package since training requires
# torch interop.
Expand Down

0 comments on commit 28b7c88

Please sign in to comment.