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

Method compile_and_load

src/jit/impl/halide/halide_executable.cpp:129–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129HalideExecutable::FunctionHandle HalideExecutable::compile_and_load(
130 CompNode comp_node) const {
131 Target target = get_host_target();
132 auto req_features = m_target_trait->features(comp_node);
133 target.set_feature(Target::UserContext);
134 if (MGB_GETENV("MGB_HALIDE_DEBUG")) {
135 target.set_feature(Target::Debug);
136 }
137 for (size_t i = 0; i < req_features.size(); ++i) {
138 if (req_features.test(i)) {
139 target.set_feature(static_cast<Target::Feature>(i));
140 }
141 }
142
143 return m_target_trait->compile_and_load(comp_node, target, *this);
144}
145
146void HalideExecutable::invoke(
147 void* user_context, const FunctionHandle& handle, const VarNodeArray& inputs,

Callers

nothing calls this directly

Calls 2

featuresMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected