| 20 | } |
| 21 | |
| 22 | void NormBase::check_exec( |
| 23 | const TensorLayout& src, const TensorLayout& dst, size_t workspace_in_bytes) { |
| 24 | megdnn_assert_eq_dtype(src, dst); |
| 25 | |
| 26 | #if !MEGDNN_DISABLE_FLOAT16 |
| 27 | megdnn_assert( |
| 28 | src.dtype.enumv() == DTypeEnum::Float16 || |
| 29 | src.dtype.enumv() == DTypeEnum::Float32, |
| 30 | "Float16 or Float32 is only supported."); |
| 31 | #else |
| 32 | megdnn_assert( |
| 33 | src.dtype.enumv() == DTypeEnum::Float32, "Float32 is only supported."); |
| 34 | #endif |
| 35 | |
| 36 | TensorLayout dst_expected; |
| 37 | deduce_layout(src, dst_expected); |
| 38 | megdnn_assert_eq_layout(dst_expected, dst); |
| 39 | |
| 40 | auto required_workspace_in_bytes = get_workspace_in_bytes(src, dst); |
| 41 | megdnn_assert(workspace_in_bytes >= required_workspace_in_bytes); |
| 42 | } |
| 43 | } // namespace megdnn |
nothing calls this directly
no test coverage detected