A buffer should flatten to a 1-d shape
()
| 179 | |
| 180 | |
| 181 | def test_buffer_flatten(): |
| 182 | """A buffer should flatten to a 1-d shape""" |
| 183 | buf = tvm.tirx.decl_buffer([16, 32]) |
| 184 | flat = buf.get_flattened_buffer() |
| 185 | assert buf.data.same_as(flat.data) |
| 186 | tvm.ir.assert_structural_equal(flat.shape, [T.int32(16 * 32)]) |
| 187 | |
| 188 | |
| 189 | def test_buffer_flatten_preserves_identity(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…