| 55 | }; |
| 56 | |
| 57 | mace::RuntimeType ParseDeviceType(const std::string &device) { |
| 58 | if (device.compare("CPU") == 0) { |
| 59 | return mace::RuntimeType::RT_CPU; |
| 60 | } else if (device.compare("GPU") == 0) { |
| 61 | return mace::RuntimeType::RT_OPENCL; |
| 62 | } else if (device.compare("HEXAGON") == 0) { |
| 63 | return mace::RuntimeType::RT_HEXAGON; |
| 64 | } else { |
| 65 | return mace::RuntimeType::RT_CPU; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | MaceContext& GetMaceContext() { |
| 70 | // TODO(yejianwu): In multi-dlopen process, this step may cause memory leak. |
no test coverage detected