| 13 | using namespace BareMetal; |
| 14 | |
| 15 | bool ResizeKernel::IsAvailable(TContext* context) const { |
| 16 | auto src_dtype = context->getAttrOprand("operand:0").dtype; |
| 17 | bool dtype_ok = src_dtype == "f32"; |
| 18 | bool mode_ok = context->getAttrStr("imode") == "LINEAR" || |
| 19 | context->getAttrStr("imode") == "NEAREST"; |
| 20 | |
| 21 | bool format_ok = context->getAttrStr("format") == "NCHW" || |
| 22 | (context->getAttrStr("format") == "NCHW44" && |
| 23 | context->getAttrStr("imode") == "LINEAR"); |
| 24 | return dtype_ok && mode_ok && format_ok; |
| 25 | } |
| 26 | //! kernel gen |
| 27 | std::string ResizeKernel::GetKernelSymbol(TContext* context) const { |
| 28 | std::stringstream ss; |
nothing calls this directly
no test coverage detected