kernel gen
| 19 | |
| 20 | //! kernel gen |
| 21 | std::string PowCKernel::GetKernelSymbol(TContext* context) const { |
| 22 | std::stringstream ss; |
| 23 | auto exp_str = std::to_string(context->getAttrFloat("exp")); |
| 24 | if (exp_str.find('.') != std::string::npos) { |
| 25 | exp_str[exp_str.find('.')] = '_'; |
| 26 | } |
| 27 | if (exp_str.find('-') != std::string::npos) { |
| 28 | exp_str[exp_str.find('-')] = 'N'; |
| 29 | } |
| 30 | ss << "kernel_powc_" << exp_str << "_" << context->getAttrOprand("operand:0").dtype; |
| 31 | return ss.str(); |
| 32 | } |
| 33 | |
| 34 | std::string PowCKernel::GetKernelBody(TContext* context) const { |
| 35 | std::stringstream ss; |
nothing calls this directly
no test coverage detected