MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / set_async_callback

Method set_async_callback

lite/src/mge/network_impl.cpp:218–226  ·  view source on GitHub ↗

set the callback in async model

Source from the content-addressed store, hash-verified

216
217//! set the callback in async model
218void 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
228void NetworkImplDft::make_output_spec() {
229 m_output_spec.clear();

Callers 5

async_forwardFunction · 0.80
TESTFunction · 0.80
network.cppFile · 0.80
LITE_set_async_callbackFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64