| 10 | indices = TensorLayout(TensorShape({src.shape[0]}), dtype::Int32()); |
| 11 | } |
| 12 | void ShuffleRNGForward::check_exec( |
| 13 | const TensorLayout& src, const TensorLayout& dst, const TensorLayout& indices, |
| 14 | size_t workspace_in_bytes) { |
| 15 | TensorLayout dst_expected, indices_expected; |
| 16 | megdnn_assert_contiguous(src); |
| 17 | deduce_layout(src, dst_expected, indices_expected); |
| 18 | |
| 19 | megdnn_assert_eq_layout(dst_expected, dst); |
| 20 | megdnn_assert_eq_layout(indices_expected, indices); |
| 21 | megdnn_assert_contiguous(indices); |
| 22 | megdnn_assert(src.dtype == dst.dtype); |
| 23 | megdnn_assert(indices.dtype == dtype::Int32()); |
| 24 | |
| 25 | auto required_workspace_in_bytes = get_workspace_in_bytes(src, dst, indices); |
| 26 | megdnn_assert(workspace_in_bytes >= required_workspace_in_bytes); |
| 27 | } |
| 28 | |
| 29 | void ShuffleRNGBackward::check_exec( |
| 30 | const TensorLayout& diff, const TensorLayout& indices, const TensorLayout& grad, |
nothing calls this directly
no test coverage detected