| 130 | return core::wrap_tensor( |
| 131 | ggml_permute(ctx.ggml, value.tensor, ggml_axes[0], ggml_axes[1], ggml_axes[2], ggml_axes[3]), |
| 132 | transpose_last_two(value.shape), |
| 133 | value.type); |
| 134 | } |
| 135 | |
| 136 | int normalize_reduce_axis(int axis, size_t rank) { |
| 137 | if (rank == 0) { |
| 138 | throw std::runtime_error("Reduce input rank must be positive"); |
| 139 | } |