mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Openvino ep nuget (#9909)
* Changes *Fixed merge conflicts Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * C# Nuget fix for windows -> OpenVINO Libs included in Nuget package -> Updated nuget.exe path for openvino ep build in Windows -> Include mvcmd file along with openvino dlls * Fixing PEP Style comments * Comment Removed Co-authored-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: saharfraza <sfatima.3001@gmail.com>
This commit is contained in:
parent
a23cd5b697
commit
5e4d58a50a
2 changed files with 32 additions and 3 deletions
|
|
@ -1822,8 +1822,12 @@ def build_nuget_package(source_dir, build_dir, configs, use_cuda, use_openvino,
|
|||
run_subprocess(cmd_args, cwd=csharp_build_dir)
|
||||
|
||||
if is_windows():
|
||||
# this path is setup by cmake/nuget_helpers.cmake for MSVC on Windows
|
||||
nuget_exe = os.path.normpath(os.path.join(native_dir, config, "nuget_exe", "src", "nuget.exe"))
|
||||
if use_openvino:
|
||||
# user needs to make sure nuget is installed and added to the path variable
|
||||
nuget_exe = "nuget.exe"
|
||||
else:
|
||||
# this path is setup by cmake/nuget_helpers.cmake for MSVC on Windows
|
||||
nuget_exe = os.path.normpath(os.path.join(native_dir, config, "nuget_exe", "src", "nuget.exe"))
|
||||
else:
|
||||
# user needs to make sure nuget is installed and can be found
|
||||
nuget_exe = "nuget"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ def get_package_name(os, cpu_arch, ep):
|
|||
|
||||
|
||||
# Currently we take onnxruntime_providers_cuda from CUDA build
|
||||
# And onnxruntime, onnxruntime_providers_shared and onnxruntime_providers_tensorrt from tensorrt build
|
||||
# And onnxruntime, onnxruntime_providers_shared and
|
||||
# onnxruntime_providers_tensorrt from tensorrt build
|
||||
def is_this_file_needed(ep, filename):
|
||||
return (ep != 'cuda' or 'cuda' in filename) and (ep != 'tensorrt' or 'cuda' not in filename)
|
||||
|
||||
|
|
@ -453,6 +454,7 @@ def generate_files(list, args):
|
|||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
||||
if args.execution_provider == "openvino":
|
||||
openvino_path = get_env_var('INTEL_OPENVINO_DIR')
|
||||
files_list.append('<file src=' + '"' + os.path.join(args.native_build_path,
|
||||
nuget_dependencies['providers_shared_lib']) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
|
@ -460,6 +462,29 @@ def generate_files(list, args):
|
|||
nuget_dependencies['openvino_ep_shared_lib']) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
||||
if is_windows():
|
||||
dll_list_path = os.path.join(openvino_path, 'deployment_tools\\inference_engine\\bin\\intel64\\Release\\')
|
||||
for dll_element in os.listdir(dll_list_path):
|
||||
if dll_element.endswith('dll'):
|
||||
files_list.append('<file src=' + '"' + os.path.join(dll_list_path, dll_element) + runtimes_target +
|
||||
args.target_architecture + '\\native" />')
|
||||
ngraph_list_path = os.path.join(openvino_path, 'deployment_tools\\ngraph\\lib\\')
|
||||
for ngraph_element in os.listdir(ngraph_list_path):
|
||||
if ngraph_element.endswith('dll'):
|
||||
files_list.append('<file src=' + '"' + os.path.join(ngraph_list_path, ngraph_element) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
# plugins.xml
|
||||
files_list.append('<file src=' + '"' + os.path.join(dll_list_path, 'plugins.xml') +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
# usb-ma2x8x.mvcmd
|
||||
files_list.append('<file src=' + '"' + os.path.join(dll_list_path, 'usb-ma2x8x.mvcmd') +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
tbb_list_path = os.path.join(openvino_path, 'deployment_tools\\inference_engine\\external\\tbb\\bin\\')
|
||||
for tbb_element in os.listdir(tbb_list_path):
|
||||
if tbb_element.endswith('dll'):
|
||||
files_list.append('<file src=' + '"' + os.path.join(tbb_list_path, tbb_element) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
||||
if args.execution_provider == "cuda" or is_cuda_gpu_package and not is_ado_packaging_build:
|
||||
files_list.append('<file src=' + '"' + os.path.join(args.native_build_path,
|
||||
nuget_dependencies['providers_shared_lib']) +
|
||||
|
|
|
|||
Loading…
Reference in a new issue