(a: TensorLikeType, sections: DimsType)
| 4327 | |
| 4328 | # CompositeImplicitAutograd - don't register decomp |
| 4329 | def dsplit(a: TensorLikeType, sections: DimsType) -> TensorSequenceType: |
| 4330 | if a.ndim < 3: |
| 4331 | raise RuntimeError( |
| 4332 | f"torch.dsplit requires a tensor with at least 3 dimension, but got a tensor with {a.ndim} dimensions!" |
| 4333 | ) |
| 4334 | if isinstance(sections, IntLike) and (sections == 0 or a.shape[2] % sections != 0): |
| 4335 | raise RuntimeError( |
| 4336 | "torch.dsplit attempted to split along dimension 2, " |
| 4337 | + f"but the size of the dimension {a.shape[2]} is not divisible by the split_size {sections}!" |
| 4338 | ) |
| 4339 | return tensor_split(a, sections, 2) |
| 4340 | |
| 4341 | |
| 4342 | @register_decomposition(aten.t.default) |
nothing calls this directly
no test coverage detected
searching dependent graphs…