set the callback in async model
| 216 | |
| 217 | //! set the callback in async model |
| 218 | void NetworkImplDft::set_async_callback(const AsyncCallback& callback) { |
| 219 | LITE_ASSERT(!m_is_cpu_inplace_mode, "cpu inplace mode not support async mode"); |
| 220 | LITE_ASSERT( |
| 221 | m_user_config->device_type == LiteDeviceType::LITE_CPU || |
| 222 | m_user_config->device_type == LiteDeviceType::LITE_CUDA, |
| 223 | "Now only cpu and cuda>10.0 support async mode"); |
| 224 | m_async = true; |
| 225 | m_async_callback = std::move(callback); |
| 226 | } |
| 227 | |
| 228 | void NetworkImplDft::make_output_spec() { |
| 229 | m_output_spec.clear(); |
no outgoing calls