mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-10 17:37:14 +00:00
Make GetProviderInfo_CUDA throw
This commit is contained in:
parent
4b8fba4f26
commit
f2d14cd74e
1 changed files with 1 additions and 4 deletions
|
|
@ -1004,7 +1004,7 @@ ProviderInfo_OpenVINO* GetProviderInfo_OpenVINO() {
|
|||
ProviderInfo_CUDA* GetProviderInfo_CUDA() {
|
||||
if (auto provider = s_library_cuda.Get())
|
||||
return reinterpret_cast<ProviderInfo_CUDA*>(provider->GetInfo());
|
||||
return nullptr;
|
||||
ORT_THROW("CUDA Provider not available, can't get interface for it");
|
||||
}
|
||||
|
||||
void CopyGpuToCpu(
|
||||
|
|
@ -1093,13 +1093,10 @@ 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) {
|
||||
auto factory = onnxruntime::CreateExecutionProviderFactory_Cuda(cuda_options);
|
||||
return nullptr;
|
||||
#if 0
|
||||
if (!factory) {
|
||||
return OrtApis::CreateStatus(ORT_FAIL, "OrtSessionOptionsAppendExecutionProvider_Cuda: Failed to load shared library");
|
||||
}
|
||||
|
||||
options->provider_factories.push_back(factory);
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue