mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-28 22:56:32 +00:00
Java fix for CPU build
This commit is contained in:
parent
912b61e490
commit
12224c88b7
2 changed files with 4 additions and 2 deletions
|
|
@ -219,6 +219,9 @@ final class OnnxRuntime {
|
|||
logger.log(Level.FINE, "Extracted native library '" + library + "' from resource path");
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
if(systemLoad) // We only throw if we're loading the library, otherwise failure is okay
|
||||
throw e;
|
||||
} finally {
|
||||
cleanUp(tempFile, !systemLoad);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ static AllocatorPtr GetCudaAllocator(OrtDevice::DeviceId id) {
|
|||
|
||||
if (id_to_allocator_map->find(id) == id_to_allocator_map->end()) {
|
||||
// TODO: Expose knobs so that users can set fields associated with OrtArenaCfg so that we can pass it to the following method
|
||||
id_to_allocator_map->insert({id, GetProviderInfo_CUDA()->CreateCudaAllocator(id, gpu_mem_limit, arena_extend_strategy, external_allocator_info)});
|
||||
id_to_allocator_map->insert({id, GetProviderInfo_CUDA()->CreateCudaAllocator(id, gpu_mem_limit, arena_extend_strategy, external_allocator_info, nullptr)});
|
||||
}
|
||||
|
||||
return (*id_to_allocator_map)[id];
|
||||
|
|
@ -2155,4 +2155,3 @@ onnxruntime::Environment& GetEnv() {
|
|||
|
||||
} // namespace python
|
||||
} // namespace onnxruntime
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue