blob: 94facc52def42337c0093662136171282eb9cbbf [file] [log] [blame]
Thomasf0f64ca2022-03-30 10:38:01 -07001func.func @test_transpose() {
iree-copybara-botdf503b42021-10-13 09:28:25 -07002 %0 = arith.constant dense<[[[0, 1, 2], [3, 4, 5]]]> : tensor<1x2x3xi32>
3 %1 = arith.constant dense<[1, 2, 0]> : tensor<3xi32>
Han-Chung Wang42e54ab2023-08-22 23:10:14 -07004 %2 = tosa.transpose %0, %1 : (tensor<1x2x3xi32>, tensor<3xi32>) -> (tensor<2x3x1xi32>)
rsuderman8baa8e42021-03-04 17:04:44 -08005 check.expect_eq_const(%2, dense<[[[0], [1], [2]], [[3], [4], [5]]]> : tensor<2x3x1xi32>) : tensor<2x3x1xi32>
6 return
7}