| 79 | } |
| 80 | |
| 81 | ASTPtr 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 | |
| 95 | std::pair<std::string, std::string> mgb::jit::codegen_opencl( |
no test coverage detected