| 34 | } // anonymous namespace |
| 35 | |
| 36 | void CumsumForwardImpl::exec( |
| 37 | _megdnn_tensor_in src, _megdnn_tensor_in dst, _megdnn_workspace workspace) { |
| 38 | check_exec(src.layout, dst.layout, workspace.size); |
| 39 | size_t A, B, C; |
| 40 | reduce::get_ABC(src.layout, A, B, C, param().axis); |
| 41 | auto stream = cuda_stream(handle()); |
| 42 | #define cb(DType) \ |
| 43 | if (src.layout.dtype == DType()) { \ |
| 44 | using ctype = DTypeTrait<DType>::ctype; \ |
| 45 | dispatch<ctype, SumOp<ctype>>( \ |
| 46 | dst.ptr<ctype>(), workspace.ptr<ctype>(), workspace.size, A, B, C, \ |
| 47 | param().exclusive, param().reverse, src.ptr<ctype>(), stream); \ |
| 48 | return; \ |
| 49 | } |
| 50 | MEGDNN_FOREACH_COMPUTING_DTYPE(cb) |
| 51 | #undef cb |
| 52 | megdnn_assert_internal(false); |
| 53 | } |
| 54 | |
| 55 | size_t CumsumForwardImpl::get_workspace_in_bytes( |
| 56 | const TensorLayout& src, const TensorLayout&) { |
nothing calls this directly
no test coverage detected