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

Function init_imperative_rt

imperative/python/src/imperative_rt.cpp:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace interpreter;
20
21void init_imperative_rt(py::module m) {
22 auto make_backward_graph = [](const OpDef& def,
23 const SmallVector<LogicalTensorDesc>& inputs,
24 const SmallVector<bool>& input_requires_grad,
25 const SmallVector<bool>& output_has_grad) {
26 auto result = OpDef::make_backward_graph(
27 def, inputs, input_requires_grad, output_has_grad);
28 return std::make_tuple("backward_graph", result.input_mask, result.output_mask);
29 };
30 m.def("make_backward_graph", make_backward_graph);
31}

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 1

make_backward_graphFunction · 0.50

Tested by

no test coverage detected