提交 baa08394 编写于 作者: 李寅

map neon allocator

上级 8f3f7d9c
......@@ -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;
}
......
......@@ -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<OperatorBase> CreateOperator(
const OperatorDef& operator_def,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册