| 11 | using namespace BareMetal; |
| 12 | |
| 13 | bool MatrixInvKernel::IsAvailable(TContext* context) const { |
| 14 | bool ok_dtype = context->getAttrOprand("operand:0").dtype == "f32"; |
| 15 | auto src_shape = context->getAttrOprand("operand:0").shape; |
| 16 | bool ok_shape = src_shape.size() >= 2 && |
| 17 | src_shape[src_shape.size() - 1] == src_shape[src_shape.size() - 2]; |
| 18 | return ok_dtype && ok_shape; |
| 19 | } |
| 20 | |
| 21 | //! kernel gen |
| 22 | std::string MatrixInvKernel::GetKernelSymbol(TContext* context) const { |
nothing calls this directly
no test coverage detected