| 52 | |
| 53 | template <typename NativeT> |
| 54 | Array2D<uint32> PackLargeInput(Array2D<NativeT> &input) { |
| 55 | const int64 size_per_pack = sizeof(uint32) / sizeof(NativeT); |
| 56 | int64 width = input.width(); |
| 57 | |
| 58 | int64 padded_output_width = CeilOfRatio(width, size_per_pack); |
| 59 | |
| 60 | Array2D<uint32> pack_input(input.height(), padded_output_width); |
| 61 | |
| 62 | for (int h = 0; h < input.height(); h++) { |
| 63 | std::vector<NativeT> input_row; |
| 64 | for (int w = 0; w < width; w++) { |
| 65 | input_row.push_back(input({h, w})); |
| 66 | } |
| 67 | |
| 68 | auto pack_input_vec = PackToUint32<uint8>(input_row); |
| 69 | |
| 70 | for (int w = 0; w < padded_output_width; w++) { |
| 71 | pack_input(h, w) = pack_input_vec[w]; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | return pack_input; |
| 76 | } |
| 77 | |
| 78 | template <typename NativeT> |
| 79 | Array2D<bfloat16> GenerateLargeSizeMinCombinedOutput( |
nothing calls this directly
no test coverage detected