mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
fix build break from PR#2850 api change (#4451)
This commit is contained in:
parent
cb5c4292b8
commit
f24d8e4587
2 changed files with 16 additions and 24 deletions
|
|
@ -73,27 +73,21 @@ ArmNNExecutionProvider::ArmNNExecutionProvider(const ArmNNExecutionProviderInfo&
|
|||
: IExecutionProvider{onnxruntime::kArmNNExecutionProvider} {
|
||||
ORT_UNUSED_PARAMETER(info);
|
||||
|
||||
auto default_allocator_factory = [](int) {
|
||||
auto memory_info = onnxruntime::make_unique<OrtMemoryInfo>(ArmNN, OrtAllocatorType::OrtDeviceAllocator);
|
||||
return onnxruntime::make_unique<CPUAllocator>(std::move(memory_info));
|
||||
};
|
||||
|
||||
DeviceAllocatorRegistrationInfo default_memory_info{
|
||||
OrtMemTypeDefault,
|
||||
std::move(default_allocator_factory),
|
||||
[](int) {
|
||||
return onnxruntime::make_unique<CPUAllocator>(OrtMemoryInfo(ArmNN, OrtAllocatorType::OrtDeviceAllocator));
|
||||
},
|
||||
std::numeric_limits<size_t>::max()};
|
||||
|
||||
InsertAllocator(CreateAllocator(default_memory_info));
|
||||
|
||||
auto cpu_allocator_factory = [](int) {
|
||||
auto memory_info = onnxruntime::make_unique<OrtMemoryInfo>(
|
||||
ArmNN_CPU, OrtAllocatorType::OrtDeviceAllocator, OrtDevice(), 0, OrtMemTypeCPUOutput);
|
||||
return onnxruntime::make_unique<CPUAllocator>(std::move(memory_info));
|
||||
};
|
||||
|
||||
DeviceAllocatorRegistrationInfo cpu_memory_info{
|
||||
OrtMemTypeCPUOutput,
|
||||
std::move(cpu_allocator_factory),
|
||||
[](int) {
|
||||
return onnxruntime::make_unique<CPUAllocator>(
|
||||
OrtMemoryInfo(ArmNN_CPU, OrtAllocatorType::OrtDeviceAllocator, OrtDevice(), 0, OrtMemTypeCPUOutput));
|
||||
},
|
||||
std::numeric_limits<size_t>::max()};
|
||||
|
||||
InsertAllocator(CreateAllocator(cpu_memory_info));
|
||||
|
|
|
|||
|
|
@ -39,25 +39,23 @@ struct RknpuFuncState {
|
|||
|
||||
RknpuExecutionProvider::RknpuExecutionProvider()
|
||||
: IExecutionProvider{onnxruntime::kRknpuExecutionProvider} {
|
||||
auto default_allocator_factory = [](int) {
|
||||
auto memory_info = onnxruntime::make_unique<OrtMemoryInfo>(RKNPU, OrtAllocatorType::OrtDeviceAllocator);
|
||||
return onnxruntime::make_unique<CPUAllocator>(std::move(memory_info));
|
||||
};
|
||||
DeviceAllocatorRegistrationInfo default_memory_info{
|
||||
OrtMemTypeDefault,
|
||||
std::move(default_allocator_factory),
|
||||
[](int) {
|
||||
return onnxruntime::make_unique<CPUAllocator>(OrtMemoryInfo(RKNPU, OrtAllocatorType::OrtDeviceAllocator));
|
||||
},
|
||||
std::numeric_limits<size_t>::max()};
|
||||
|
||||
InsertAllocator(CreateAllocator(default_memory_info));
|
||||
|
||||
auto cpu_allocator_factory = [](int) {
|
||||
auto memory_info = onnxruntime::make_unique<OrtMemoryInfo>(
|
||||
RKNPU, OrtAllocatorType::OrtDeviceAllocator, OrtDevice(), 0, OrtMemTypeCPUOutput);
|
||||
return onnxruntime::make_unique<CPUAllocator>(std::move(memory_info));
|
||||
};
|
||||
DeviceAllocatorRegistrationInfo cpu_memory_info{
|
||||
OrtMemTypeCPUOutput,
|
||||
std::move(cpu_allocator_factory),
|
||||
[](int) {
|
||||
return onnxruntime::make_unique<CPUAllocator>(
|
||||
OrtMemoryInfo(RKNPU, OrtAllocatorType::OrtDeviceAllocator, OrtDevice(), 0, OrtMemTypeCPUOutput));
|
||||
},
|
||||
std::numeric_limits<size_t>::max()};
|
||||
|
||||
InsertAllocator(CreateAllocator(cpu_memory_info));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue