mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Fix some setup issues
This commit is contained in:
parent
0a20e40af1
commit
a36dd5d574
3 changed files with 16 additions and 3 deletions
|
|
@ -1002,8 +1002,10 @@ ProviderInfo_OpenVINO* GetProviderInfo_OpenVINO() {
|
|||
}
|
||||
|
||||
ProviderInfo_CUDA* GetProviderInfo_CUDA() {
|
||||
LOGS_DEFAULT(ERROR) << "GetProviderInfo_CUDA being called...";
|
||||
if (auto provider = s_library_cuda.Get())
|
||||
return reinterpret_cast<ProviderInfo_CUDA*>(provider->GetInfo());
|
||||
LOGS_DEFAULT(ERROR) << "GetProviderInfo_CUDA called, returning nullptr";
|
||||
ORT_THROW("CUDA Provider not available, can't get interface for it");
|
||||
}
|
||||
|
||||
|
|
@ -1092,13 +1094,11 @@ ORT_API_STATUS_IMPL(OrtApis::GetCurrentGpuDeviceId, _In_ int* device_id) {
|
|||
}
|
||||
|
||||
ORT_API_STATUS_IMPL(OrtApis::SessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptions* cuda_options) {
|
||||
#if 0
|
||||
auto factory = onnxruntime::CreateExecutionProviderFactory_Cuda(cuda_options);
|
||||
if (!factory) {
|
||||
return OrtApis::CreateStatus(ORT_FAIL, "OrtSessionOptionsAppendExecutionProvider_Cuda: Failed to load shared library");
|
||||
}
|
||||
|
||||
options->provider_factories.push_back(factory);
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -165,6 +165,7 @@ if platform.system() == 'Linux':
|
|||
libs.extend(['libonnxruntime_providers_dnnl.so'])
|
||||
libs.extend(['libonnxruntime_providers_tensorrt.so'])
|
||||
libs.extend(['libonnxruntime_providers_openvino.so'])
|
||||
libs.extend(['libonnxruntime_providers_cuda.so'])
|
||||
# Nuphar Libs
|
||||
libs.extend(['libtvm.so.0.5.1'])
|
||||
if nightly_build:
|
||||
|
|
@ -175,6 +176,7 @@ elif platform.system() == "Darwin":
|
|||
libs.extend(['libonnxruntime_providers_shared.dylib'])
|
||||
libs.extend(['libonnxruntime_providers_dnnl.dylib'])
|
||||
libs.extend(['libonnxruntime_providers_tensorrt.dylib'])
|
||||
libs.extend(['libonnxruntime_providers_cuda.dylib'])
|
||||
if nightly_build:
|
||||
libs.extend(['libonnxruntime_pywrapper.dylib'])
|
||||
else:
|
||||
|
|
@ -184,6 +186,7 @@ else:
|
|||
libs.extend(['onnxruntime_providers_dnnl.dll'])
|
||||
libs.extend(['onnxruntime_providers_tensorrt.dll'])
|
||||
libs.extend(['onnxruntime_providers_openvino.dll'])
|
||||
libs.extend(['onnxruntime_providers_cuda.dll'])
|
||||
# DirectML Libs
|
||||
libs.extend(['directml.dll'])
|
||||
# Nuphar Libs
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ def generate_files(list, args):
|
|||
'dnnl_ep_shared_lib': 'onnxruntime_providers_dnnl.dll',
|
||||
'tensorrt_ep_shared_lib': 'onnxruntime_providers_tensorrt.dll',
|
||||
'openvino_ep_shared_lib': 'onnxruntime_providers_openvino.dll',
|
||||
'cuda_ep_shared_lib': 'onnxruntime_providers_cuda.dll',
|
||||
'onnxruntime_perf_test': 'onnxruntime_perf_test.exe',
|
||||
'onnx_test_runner': 'onnx_test_runner.exe'}
|
||||
|
||||
|
|
@ -210,6 +211,7 @@ def generate_files(list, args):
|
|||
'dnnl_ep_shared_lib': 'libonnxruntime_providers_dnnl.so',
|
||||
'tensorrt_ep_shared_lib': 'libonnxruntime_providers_tensorrt.so',
|
||||
'openvino_ep_shared_lib': 'libonnxruntime_providers_openvino.so',
|
||||
'cuda_ep_shared_lib': 'libonnxruntime_providers_cuda.so',
|
||||
'onnxruntime_perf_test': 'onnxruntime_perf_test',
|
||||
'onnx_test_runner': 'onnx_test_runner'}
|
||||
|
||||
|
|
@ -354,6 +356,14 @@ def generate_files(list, args):
|
|||
nuget_dependencies['openvino_ep_shared_lib']) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
||||
if args.execution_provider == "cuda":
|
||||
files_list.append('<file src=' + '"' + os.path.join(args.native_build_path,
|
||||
nuget_dependencies['providers_shared_lib']) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
files_list.append('<file src=' + '"' + os.path.join(args.native_build_path,
|
||||
nuget_dependencies['cuda_ep_shared_lib']) +
|
||||
runtimes_target + args.target_architecture + '\\native" />')
|
||||
|
||||
# process all other library dependencies
|
||||
if is_cpu_package or is_cuda_gpu_package or is_dml_package or is_mklml_package:
|
||||
# Process dnnl dependency
|
||||
|
|
@ -468,7 +478,7 @@ def validate_platform():
|
|||
|
||||
def validate_execution_provider(execution_provider):
|
||||
if is_linux():
|
||||
if not (execution_provider == 'None' or execution_provider == 'dnnl'
|
||||
if not (execution_provider == 'None' or execution_provider == 'dnnl' or execution_provider == 'cuda'
|
||||
or execution_provider == 'tensorrt' or execution_provider == 'openvino'):
|
||||
raise Exception('On Linux platform nuget generation is supported only '
|
||||
'for cpu|cuda|dnnl|tensorrt|openvino execution providers.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue