| 106 | } |
| 107 | |
| 108 | inline bool FastContiguousJudge(const std::vector<int64_t>& coalesce_shape, |
| 109 | const DenseTensor& input) { |
| 110 | if (coalesce_shape.size() > 3 || input.dims().size() == 0) return false; |
| 111 | auto x_meta = input.meta(); |
| 112 | if (coalesce_shape.size() == 3 && |
| 113 | !OnlyTransposed(x_meta.dims, x_meta.strides, x_meta.offset)) |
| 114 | return false; |
| 115 | return true; |
| 116 | } |
| 117 | |
| 118 | inline bool FastTransposeCopyValid(const DenseTensor& self, |
| 119 | const DenseTensor& src) { |
no test coverage detected