| 8 | } |
| 9 | |
| 10 | void LSQBase::check_layout_fwd( |
| 11 | const TensorLayout& input, const TensorLayout& scale, |
| 12 | const TensorLayout& zero_point, const TensorLayout& grad_scale, |
| 13 | const TensorLayout& output) { |
| 14 | megdnn_assert(input.dtype == dtype::Float32()); |
| 15 | megdnn_assert(scale.dtype == dtype::Float32()); |
| 16 | megdnn_assert(zero_point.dtype == dtype::Float32()); |
| 17 | megdnn_assert(grad_scale.dtype == dtype::Float32()); |
| 18 | TensorLayout expected; |
| 19 | deduce_layout_fwd(input, expected); |
| 20 | megdnn_assert_eq_layout(expected, output); |
| 21 | } |
| 22 | |
| 23 | void LSQForward::deduce_layout( |
| 24 | const TensorLayout& input, const TensorLayout& /* scale */, |