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

Method apply

src/tensorrt/impl/opr_replace.cpp:1606–1615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1604}
1605
1606void TensorRTReplacePass::apply(OptState& opt) const {
1607 if (CompNode::get_device_count(CompNode::DeviceType::CUDA)) {
1608 opt.set_var_replace_check_flag(
1609 gopt::VarReplaceCheckFlag::CHECK_SHAPE |
1610 gopt::VarReplaceCheckFlag::CHECK_DTYPE);
1611 Impl(*this, opt);
1612 } else {
1613 mgb_log_debug("cuda is not available; TensorRTReplacePass is ignored");
1614 }
1615}
1616
1617// ===================== TensorRTGraph =================
1618void TensorRTReplacePass::Impl::TensorRTGraph::mark_varnode_format_nchw4() {

Callers 2

ensure_init_graphMethod · 0.45
TESTFunction · 0.45

Calls 2

get_device_countFunction · 0.85
ImplClass · 0.50

Tested by 2

ensure_init_graphMethod · 0.36
TESTFunction · 0.36