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

Method get_input_values

src/plugin/impl/infkern_finder.cpp:302–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302InfkernFinder::InputValueRecord::FullRecord InfkernFinder::get_input_values(
303 size_t opr_id) {
304 mgb_assert(m_global_state->record_input_value);
305 auto iter = m_global_state->oprid2ptr.find(opr_id);
306 mgb_assert(
307 iter != m_global_state->oprid2ptr.end(), "operator with ID %zu not found",
308 opr_id);
309 InputValueRecord::FullRecord rec;
310 for (auto i : iter->second->input()) {
311 auto iter = m_global_state->var_value.find(i);
312 if (iter != m_global_state->var_value.end()) {
313 rec.emplace_back(i, iter->second);
314 } else {
315 rec.push_back({i, {}});
316 }
317 }
318 return rec;
319}
320
321// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}

Callers 2

runMethod · 0.80
TEST_FFunction · 0.80

Calls 5

emplace_backMethod · 0.80
findMethod · 0.45
endMethod · 0.45
inputMethod · 0.45
push_backMethod · 0.45

Tested by 2

runMethod · 0.64
TEST_FFunction · 0.64