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

Function gen_opr_ast

src/jit/impl/tiny_opencl/codegen_opencl.cpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81ASTPtr gen_opr_ast(cg::OperatorNodeBase* opr, const VarNode2AST& var2ast) {
82 mgb_assert(
83 !opr->same_type<opr::Reduce>() && !opr->same_type<opr::GetVarShape>() &&
84 !opr->same_type<opr::Dimshuffle>() && !opr->same_type<opr::PowC>(),
85 "OpenCL jit not support Reduce/GetVarShape/Dimshuffle/PowC type now");
86 ASTPtrArray cur_inputs;
87 for (auto inp_node : opr->input()) {
88 cur_inputs.push_back(var2ast.at(inp_node));
89 }
90
91 return opr2AST(opr, cur_inputs, CompNode::DeviceType::OPENCL).at(0);
92}
93} // anonymous namespace
94
95std::pair<std::string, std::string> mgb::jit::codegen_opencl(

Callers 1

codegen_openclMethod · 0.70

Calls 3

inputMethod · 0.45
push_backMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected