diff --git a/mace/core/allocator.cc b/mace/core/allocator.cc index fd1f50c3910a6878505bee7c0655f346b644c5ff..8b8a79ea01f5529f3a8cec2918171df1f1247bcc 100644 --- a/mace/core/allocator.cc +++ b/mace/core/allocator.cc @@ -16,10 +16,12 @@ void SetCPUAllocator(CPUAllocator* alloc) { } Allocator* GetDeviceAllocator(DeviceType type) { - if (type == DeviceType::CPU) { - return cpu_allocator(); - } else { - REQUIRE(false, "device type ", type, " is not supported."); + switch (type) { + case DeviceType::CPU: + case DeviceType::NEON: + return cpu_allocator(); + default: + REQUIRE(false, "device type ", type, " is not supported."); } return nullptr; } diff --git a/mace/core/operator.cc b/mace/core/operator.cc index 078574a7d48433f3ead86e3b50962eb5370a41cb..2e5086ac222a70503bf655ff9d92557369beccb4 100644 --- a/mace/core/operator.cc +++ b/mace/core/operator.cc @@ -23,7 +23,7 @@ MACE_DEFINE_REGISTRY( OperatorBase, const OperatorDef&, Workspace*); -MACE_REGISTER_DEVICE_TYPE(DeviceType::NEON, CPUOperatorRegistry); +MACE_REGISTER_DEVICE_TYPE(DeviceType::NEON, NEONOperatorRegistry); unique_ptr CreateOperator( const OperatorDef& operator_def,