Last active
December 22, 2022 07:18
-
-
Save AmosLewis/01e4eaaab7f57940251679b8c818e932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func.func @forward(%arg0: !torch.vtensor<[1,128],si64>) -> !torch.vtensor<[1,2],f32> { | |
%0 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[1,128],si64> to tensor<1x128xi64> | |
%int1 = torch.constant.int 1 | |
%1 = builtin.unrealized_conversion_cast %int1 : !torch.int to i64 | |
%int0 = torch.constant.int 0 | |
%2 = builtin.unrealized_conversion_cast %int0 : !torch.int to i64 | |
%int-1 = torch.constant.int -1 | |
%3 = builtin.unrealized_conversion_cast %int-1 : !torch.int to i64 | |
%true = torch.constant.bool true | |
%4 = builtin.unrealized_conversion_cast %true : !torch.bool to i1 | |
%none = torch.constant.none | |
%false = torch.constant.bool false | |
%5 = builtin.unrealized_conversion_cast %false : !torch.bool to i1 | |
%int128 = torch.constant.int 128 | |
%6 = builtin.unrealized_conversion_cast %int128 : !torch.int to i64 | |
%7 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2x768xf32>} : () -> tensor<2x768xf32> | |
%8 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2x768xf32>) : !torch.vtensor<[2,768],f32> | |
%9 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%10 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%11 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%12 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%13 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%14 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%15 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%16 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%17 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%18 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%19 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%20 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%21 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%22 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%23 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%24 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%25 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%26 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%27 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%28 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%29 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%30 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%31 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%32 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%33 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%34 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%35 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%36 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%37 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%38 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%39 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%40 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%41 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%42 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%43 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%44 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%45 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%46 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%47 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%48 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%49 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%50 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%51 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%52 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%53 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%54 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%55 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%56 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%57 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%58 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%59 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%60 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%61 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%62 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%63 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%64 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%65 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%66 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%67 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%68 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%69 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%70 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%71 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%72 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%73 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%74 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%75 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%76 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%77 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%78 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%79 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%80 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%81 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%82 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%83 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%84 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%85 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%86 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%87 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%88 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%89 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%90 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%91 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%92 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%93 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%94 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%95 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%96 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%97 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%98 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%99 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%100 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%101 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%102 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%103 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%104 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%105 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%106 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%107 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%108 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%109 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%110 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%111 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%112 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%113 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%114 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%115 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%116 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%117 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%118 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%119 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%120 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%121 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%122 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%123 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%124 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%125 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%126 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%127 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%128 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%129 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%130 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%131 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%132 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%133 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072x768xf32>} : () -> tensor<3072x768xf32> | |
%134 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072x768xf32>) : !torch.vtensor<[3072,768],f32> | |
%135 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%136 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%137 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x3072xf32>} : () -> tensor<768x3072xf32> | |
%138 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x3072xf32>) : !torch.vtensor<[768,3072],f32> | |
%139 = "tosa.const"() {value = dense_resource<__elided__> : tensor<3072xf32>} : () -> tensor<3072xf32> | |
%140 = torch.vtensor.literal(dense_resource<__elided__> : tensor<3072xf32>) : !torch.vtensor<[3072],f32> | |
%141 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%142 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%143 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%144 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%145 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x768xf32>} : () -> tensor<768x768xf32> | |
%146 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x768xf32>) : !torch.vtensor<[768,768],f32> | |
%147 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%148 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%149 = "tosa.const"() {value = dense<-3.40282347E+38> : tensor<f32>} : () -> tensor<f32> | |
%150 = torch.vtensor.literal(dense<-3.40282347E+38> : tensor<f32>) : !torch.vtensor<[],f32> | |
%151 = "tosa.const"() {value = dense_resource<__elided__> : tensor<1x1x1024x1024xui8>} : () -> tensor<1x1x1024x1024xi8> | |
%152 = torch.vtensor.literal(dense_resource<__elided__> : tensor<1x1x1024x1024xui8>) : !torch.vtensor<[1,1,1024,1024],ui8> | |
%153 = "tosa.const"() {value = dense<8.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%154 = torch.vtensor.literal(dense<8.000000e+00> : tensor<f32>) : !torch.vtensor<[],f32> | |
%155 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768x2304xf32>} : () -> tensor<768x2304xf32> | |
%156 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768x2304xf32>) : !torch.vtensor<[768,2304],f32> | |
%157 = "tosa.const"() {value = dense_resource<__elided__> : tensor<2304xf32>} : () -> tensor<2304xf32> | |
%158 = torch.vtensor.literal(dense_resource<__elided__> : tensor<2304xf32>) : !torch.vtensor<[2304],f32> | |
%159 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%160 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%161 = "tosa.const"() {value = dense_resource<__elided__> : tensor<768xf32>} : () -> tensor<768xf32> | |
%162 = torch.vtensor.literal(dense_resource<__elided__> : tensor<768xf32>) : !torch.vtensor<[768],f32> | |
%163 = "tosa.const"() {value = dense_resource<__elided__> : tensor<1024x768xf32>} : () -> tensor<1024x768xf32> | |
%164 = torch.vtensor.literal(dense_resource<__elided__> : tensor<1024x768xf32>) : !torch.vtensor<[1024,768],f32> | |
%165 = "tosa.const"() {value = dense_resource<__elided__> : tensor<50257x768xf32>} : () -> tensor<50257x768xf32> | |
%166 = torch.vtensor.literal(dense_resource<__elided__> : tensor<50257x768xf32>) : !torch.vtensor<[50257,768],f32> | |
%int-2 = torch.constant.int -2 | |
%167 = builtin.unrealized_conversion_cast %int-2 : !torch.int to i64 | |
%int11 = torch.constant.int 11 | |
%168 = builtin.unrealized_conversion_cast %int11 : !torch.int to i64 | |
%int4 = torch.constant.int 4 | |
%169 = builtin.unrealized_conversion_cast %int4 : !torch.int to i64 | |
%int768 = torch.constant.int 768 | |
%float1.000000e-05 = torch.constant.float 1.000000e-05 | |
%170 = builtin.unrealized_conversion_cast %float1.000000e-05 : !torch.float to f64 | |
%int2 = torch.constant.int 2 | |
%int2304 = torch.constant.int 2304 | |
%int294912 = torch.constant.int 294912 | |
%int1536 = torch.constant.int 1536 | |
%int12 = torch.constant.int 12 | |
%int64 = torch.constant.int 64 | |
%int3 = torch.constant.int 3 | |
%int1024 = torch.constant.int 1024 | |
%int1048576 = torch.constant.int 1048576 | |
%int3072 = torch.constant.int 3072 | |
%float5.000000e-01 = torch.constant.float 5.000000e-01 | |
%171 = builtin.unrealized_conversion_cast %float5.000000e-01 : !torch.float to f64 | |
%float3.000000e00 = torch.constant.float 3.000000e+00 | |
%172 = builtin.unrealized_conversion_cast %float3.000000e00 : !torch.float to f64 | |
%float4.471500e-02 = torch.constant.float 4.471500e-02 | |
%173 = builtin.unrealized_conversion_cast %float4.471500e-02 : !torch.float to f64 | |
%float7.978850e-01 = torch.constant.float 0.79788456080286541 | |
%174 = builtin.unrealized_conversion_cast %float7.978850e-01 : !torch.float to f64 | |
%float1.000000e00 = torch.constant.float 1.000000e+00 | |
%175 = builtin.unrealized_conversion_cast %float1.000000e00 : !torch.float to f64 | |
%cpu = torch.constant.device "cpu" | |
%176 = torch.prim.ListConstruct %int-1, %int128 : (!torch.int, !torch.int) -> !torch.list<int> | |
%177 = "tosa.reshape"(%0) {new_shape = [-1, 128]} : (tensor<1x128xi64>) -> tensor<1x128xi64> | |
%178 = torch.aten.view %arg0, %176 : !torch.vtensor<[1,128],si64>, !torch.list<int> -> !torch.vtensor<[1,128],si64> | |
%179 = "tosa.const"() {value = dense<"0x00000000000000000100000000000000020000000000000003000000000000000400000000000000050000000000000006000000000000000700000000000000080000000000000009000000000000000A000000000000000B000000000000000C000000000000000D000000000000000E000000000000000F0000000000000010000000000000001100000000000000120000000000000013000000000000001400000000000000150000000000000016000000000000001700000000000000180000000000000019000000000000001A000000000000001B000000000000001C000000000000001D000000000000001E000000000000001F0000000000000020000000000000002100000000000000220000000000000023000000000000002400000000000000250000000000000026000000000000002700000000000000280000000000000029000000000000002A000000000000002B000000000000002C000000000000002D000000000000002E000000000000002F0000000000000030000000000000003100000000000000320000000000000033000000000000003400000000000000350000000000000036000000000000003700000000000000380000000000000039000000000000003A000000000000003B000000000000003C000000000000003D000000000000003E000000000000003F0000000000000040000000000000004100000000000000420000000000000043000000000000004400000000000000450000000000000046000000000000004700000000000000480000000000000049000000000000004A000000000000004B000000000000004C000000000000004D000000000000004E000000000000004F0000000000000050000000000000005100000000000000520000000000000053000000000000005400000000000000550000000000000056000000000000005700000000000000580000000000000059000000000000005A000000000000005B000000000000005C000000000000005D000000000000005E000000000000005F0000000000000060000000000000006100000000000000620000000000000063000000000000006400000000000000650000000000000066000000000000006700000000000000680000000000000069000000000000006A000000000000006B000000000000006C000000000000006D000000000000006E000000000000006F0000000000000070000000000000007100000000000000720000000000000073000000000000007400000000000000750000000000000076000000000000007700000000000000780000000000000079000000000000007A000000000000007B000000000000007C000000000000007D000000000000007E000000000000007F00000000000000"> : tensor<128xi64>} : () -> tensor<128xi64> | |
%180 = "tosa.cast"(%179) : (tensor<128xi64>) -> tensor<128xi64> | |
%181 = torch.aten.arange.start_step %int0, %int128, %int1, %int4, %none, %cpu, %false : !torch.int, !torch.int, !torch.int, !torch.int, !torch.none, !torch.Device, !torch.bool -> !torch.vtensor<[128],si64> | |
%182 = "tosa.reshape"(%180) {new_shape = [1, 128]} : (tensor<128xi64>) -> tensor<1x128xi64> | |
%183 = torch.aten.unsqueeze %181, %int0 : !torch.vtensor<[128],si64>, !torch.int -> !torch.vtensor<[1,128],si64> | |
%184 = "tosa.reshape"(%182) {new_shape = [-1, 128]} : (tensor<1x128xi64>) -> tensor<1x128xi64> | |
%185 = torch.aten.view %183, %176 : !torch.vtensor<[1,128],si64>, !torch.list<int> -> !torch.vtensor<[1,128],si64> | |
%186 = "tosa.reshape"(%165) {new_shape = [1, 50257, 768]} : (tensor<50257x768xf32>) -> tensor<1x50257x768xf32> | |
%187 = "tosa.reshape"(%177) {new_shape = [1, 128]} : (tensor<1x128xi64>) -> tensor<1x128xi64> | |
%188 = "tosa.cast"(%187) : (tensor<1x128xi64>) -> tensor<1x128xi32> | |
%189 = "tosa.gather"(%186, %188) : (tensor<1x50257x768xf32>, tensor<1x128xi32>) -> tensor<1x128x768xf32> | |
%190 = "tosa.reshape"(%189) {new_shape = [1, 128, 768]} : (tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%191 = torch.aten.embedding %166, %178, %int-1, %false, %false : !torch.vtensor<[50257,768],f32>, !torch.vtensor<[1,128],si64>, !torch.int, !torch.bool, !torch.bool -> !torch.vtensor<[1,128,768],f32> | |
%192 = "tosa.reshape"(%163) {new_shape = [1, 1024, 768]} : (tensor<1024x768xf32>) -> tensor<1x1024x768xf32> | |
%193 = "tosa.reshape"(%184) {new_shape = [1, 128]} : (tensor<1x128xi64>) -> tensor<1x128xi64> | |
%194 = "tosa.cast"(%193) : (tensor<1x128xi64>) -> tensor<1x128xi32> | |
%195 = "tosa.gather"(%192, %194) : (tensor<1x1024x768xf32>, tensor<1x128xi32>) -> tensor<1x128x768xf32> | |
%196 = "tosa.reshape"(%195) {new_shape = [1, 128, 768]} : (tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%197 = torch.aten.embedding %164, %185, %int-1, %false, %false : !torch.vtensor<[1024,768],f32>, !torch.vtensor<[1,128],si64>, !torch.int, !torch.bool, !torch.bool -> !torch.vtensor<[1,128,768],f32> | |
%198 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%199 = "tosa.mul"(%196, %198) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%200 = "tosa.add"(%190, %199) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%201 = torch.aten.add.Tensor %191, %197, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%202 = torch.prim.ListConstruct %int768 : (!torch.int) -> !torch.list<int> | |
%203 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%204 = "tosa.reciprocal"(%203) : (tensor<1xf32>) -> tensor<1xf32> | |
%205 = "tosa.reduce_sum"(%200) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%206 = "tosa.reshape"(%205) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%207 = "tosa.mul"(%206, %204) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%208 = "tosa.sub"(%200, %207) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%209 = "tosa.mul"(%208, %208) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%210 = "tosa.reduce_sum"(%209) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%211 = "tosa.reshape"(%210) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%212 = "tosa.mul"(%211, %204) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%213 = "tosa.reshape"(%161) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%214 = "tosa.reshape"(%159) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%215 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%216 = "tosa.sub"(%200, %207) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%217 = "tosa.add"(%212, %215) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%218 = "tosa.rsqrt"(%217) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%219 = "tosa.mul"(%216, %218) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%220 = "tosa.mul"(%219, %213) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%221 = "tosa.add"(%220, %214) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0, %result1, %result2 = torch.aten.native_layer_norm %201, %202, %162, %160, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%222 = torch.prim.ListConstruct %int-1, %int768 : (!torch.int, !torch.int) -> !torch.list<int> | |
%223 = "tosa.reshape"(%221) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%224 = torch.aten.view %result0, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%225 = "tosa.reshape"(%223) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%226 = "tosa.reshape"(%155) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%227 = "tosa.matmul"(%225, %226) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%228 = "tosa.reshape"(%227) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast = tensor.cast %228 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%229 = torch.aten.mm %224, %156 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%230 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%231 = "tosa.mul"(%157, %230) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%232 = torch.aten.mul.Scalar %158, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%233 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%234 = "tosa.mul"(%cast, %233) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%235 = "tosa.add"(%231, %234) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%236 = torch.aten.add.Tensor %232, %229, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%237 = torch.prim.ListConstruct %int1, %int128, %int2304 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%238 = "tosa.reshape"(%235) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%239 = torch.aten.view %236, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%240 = torch.prim.ListConstruct %int1, %int128, %int768 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%241 = torch.prim.ListConstruct %int294912, %int2304, %int1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%242 = torch.aten.as_strided %239, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%243 = builtin.unrealized_conversion_cast %242 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%244 = torch.aten.as_strided %239, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%245 = builtin.unrealized_conversion_cast %244 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%246 = torch.aten.as_strided %239, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%247 = builtin.unrealized_conversion_cast %246 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%248 = torch.prim.ListConstruct %int1, %int128, %int12, %int64 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%249 = "tosa.reshape"(%243) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%250 = torch.aten.view %242, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%251 = torch.prim.ListConstruct %int0, %int2, %int1, %int3 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%252 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%253 = "tosa.transpose"(%249, %252) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%254 = torch.aten.permute %250, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%255 = "tosa.reshape"(%245) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%256 = torch.aten.view %244, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%257 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%258 = "tosa.transpose"(%255, %257) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%259 = torch.aten.permute %256, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%260 = "tosa.reshape"(%247) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%261 = torch.aten.view %246, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%262 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%263 = "tosa.transpose"(%260, %262) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%264 = torch.aten.permute %261, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%265 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%266 = "tosa.transpose"(%258, %265) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%267 = torch.aten.transpose.int %259, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%268 = torch.prim.ListConstruct %int1, %int12, %int128, %int64 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%269 = torch.aten.broadcast_to %254, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%270 = torch.prim.ListConstruct %int12, %int128, %int64 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%271 = "tosa.reshape"(%253) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%272 = torch.aten.view %254, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%273 = torch.prim.ListConstruct %int1, %int12, %int64, %int128 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%274 = torch.aten.broadcast_to %267, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%275 = torch.prim.ListConstruct %int12, %int64, %int128 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%276 = "tosa.reshape"(%266) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%277 = torch.aten.view %267, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%278 = "tosa.matmul"(%271, %276) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_0 = tensor.cast %278 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%279 = torch.aten.bmm %272, %277 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%280 = torch.prim.ListConstruct %int1, %int12, %int128, %int128 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%281 = "tosa.reshape"(%cast_0) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%282 = torch.aten.view %279, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%283 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%284 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%285 = "tosa.reciprocal"(%283) : (tensor<f32>) -> tensor<f32> | |
%286 = "tosa.mul"(%281, %285) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%287 = torch.aten.div.Tensor %282, %284 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%288 = torch.prim.ListConstruct %int1, %int1, %int1024, %int1024 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%289 = torch.prim.ListConstruct %int1048576, %int1048576, %int1024, %int1 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%290 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%291 = torch.aten.as_strided %290, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%292 = torch.prim.ListConstruct %int1, %int1, %int128, %int1024 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%293 = torch.aten.as_strided %291, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%294 = torch.prim.ListConstruct %int1, %int1, %int128, %int128 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%295 = torch.aten.as_strided %293, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%296 = builtin.unrealized_conversion_cast %295 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%297 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%298 = "tosa.equal"(%296, %297) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%299 = "tosa.logical_not"(%298) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%300 = torch.aten.to.dtype %295, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%301 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%302 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%303 = "tosa.select"(%299, %286, %301) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%304 = torch.aten.where.self %300, %287, %302 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%305 = torch.prim.ListConstruct %int-1 : (!torch.int) -> !torch.list<int> | |
%306 = "tosa.reduce_max"(%303) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%307 = "tosa.argmax"(%303) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%308 = "tosa.reshape"(%307) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values, %indices = torch.aten.max.dim %304, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%309 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%310 = "tosa.mul"(%306, %309) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%311 = "tosa.sub"(%303, %310) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%312 = torch.aten.sub.Tensor %304, %values, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%313 = "tosa.exp"(%311) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%314 = torch.aten.exp %312 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%315 = "tosa.reduce_sum"(%313) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%316 = torch.aten.sum.dim_IntList %314, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%317 = "tosa.reciprocal"(%315) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%318 = "tosa.mul"(%313, %317) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%319 = torch.aten.div.Tensor %314, %316 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%320 = torch.aten.broadcast_to %319, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%321 = torch.prim.ListConstruct %int12, %int128, %int128 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%322 = "tosa.reshape"(%318) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%323 = torch.aten.view %319, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%324 = torch.aten.broadcast_to %264, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%325 = "tosa.reshape"(%263) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%326 = torch.aten.view %264, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%327 = "tosa.matmul"(%322, %325) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_1 = tensor.cast %327 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%328 = torch.aten.bmm %323, %326 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%329 = "tosa.reshape"(%cast_1) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%330 = torch.aten.view %328, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%331 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%332 = "tosa.transpose"(%329, %331) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%333 = torch.aten.permute %330, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%334 = "tosa.cast"(%332) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%335 = torch.aten.clone %333, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%336 = "tosa.reshape"(%334) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%337 = torch.aten.view %335, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%338 = "tosa.reshape"(%336) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%339 = torch.aten.view %337, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%340 = "tosa.reshape"(%338) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%341 = "tosa.reshape"(%145) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%342 = "tosa.matmul"(%340, %341) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%343 = "tosa.reshape"(%342) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_2 = tensor.cast %343 : tensor<128x768xf32> to tensor<128x768xf32> | |
%344 = torch.aten.mm %339, %146 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%345 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%346 = "tosa.mul"(%147, %345) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%347 = torch.aten.mul.Scalar %148, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%348 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%349 = "tosa.mul"(%cast_2, %348) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%350 = "tosa.add"(%346, %349) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%351 = torch.aten.add.Tensor %347, %344, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%352 = "tosa.reshape"(%350) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%353 = torch.aten.view %351, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%354 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%355 = "tosa.mul"(%200, %354) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%356 = "tosa.add"(%352, %355) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%357 = torch.aten.add.Tensor %353, %201, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%358 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%359 = "tosa.reciprocal"(%358) : (tensor<1xf32>) -> tensor<1xf32> | |
%360 = "tosa.reduce_sum"(%356) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%361 = "tosa.reshape"(%360) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%362 = "tosa.mul"(%361, %359) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%363 = "tosa.sub"(%356, %362) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%364 = "tosa.mul"(%363, %363) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%365 = "tosa.reduce_sum"(%364) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%366 = "tosa.reshape"(%365) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%367 = "tosa.mul"(%366, %359) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%368 = "tosa.reshape"(%143) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%369 = "tosa.reshape"(%141) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%370 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%371 = "tosa.sub"(%356, %362) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%372 = "tosa.add"(%367, %370) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%373 = "tosa.rsqrt"(%372) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%374 = "tosa.mul"(%371, %373) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%375 = "tosa.mul"(%374, %368) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%376 = "tosa.add"(%375, %369) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_3, %result1_4, %result2_5 = torch.aten.native_layer_norm %357, %202, %144, %142, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%377 = "tosa.reshape"(%376) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%378 = torch.aten.view %result0_3, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%379 = "tosa.reshape"(%377) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%380 = "tosa.reshape"(%137) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%381 = "tosa.matmul"(%379, %380) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%382 = "tosa.reshape"(%381) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_6 = tensor.cast %382 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%383 = torch.aten.mm %378, %138 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%384 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%385 = "tosa.mul"(%139, %384) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%386 = torch.aten.mul.Scalar %140, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%387 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%388 = "tosa.mul"(%cast_6, %387) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%389 = "tosa.add"(%385, %388) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%390 = torch.aten.add.Tensor %386, %383, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%391 = torch.prim.ListConstruct %int1, %int128, %int3072 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%392 = "tosa.reshape"(%389) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%393 = torch.aten.view %390, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%394 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%395 = "tosa.mul"(%392, %394) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%396 = torch.aten.mul.Scalar %393, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%397 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%398 = "tosa.pow"(%392, %397) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%399 = torch.aten.pow.Tensor_Scalar %393, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%400 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%401 = "tosa.mul"(%398, %400) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%402 = torch.aten.mul.Scalar %399, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%403 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%404 = "tosa.mul"(%401, %403) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%405 = "tosa.add"(%392, %404) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%406 = torch.aten.add.Tensor %393, %402, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%407 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%408 = "tosa.mul"(%405, %407) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%409 = torch.aten.mul.Scalar %406, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%410 = "tosa.tanh"(%408) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%411 = torch.aten.tanh %409 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%412 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%413 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%414 = "tosa.mul"(%412, %413) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%415 = "tosa.add"(%410, %414) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%416 = torch.aten.add.Scalar %411, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%417 = "tosa.mul"(%395, %415) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%418 = torch.aten.mul.Tensor %396, %416 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%419 = torch.prim.ListConstruct %int-1, %int3072 : (!torch.int, !torch.int) -> !torch.list<int> | |
%420 = "tosa.reshape"(%417) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%421 = torch.aten.view %418, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%422 = "tosa.reshape"(%420) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%423 = "tosa.reshape"(%133) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%424 = "tosa.matmul"(%422, %423) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%425 = "tosa.reshape"(%424) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_7 = tensor.cast %425 : tensor<128x768xf32> to tensor<128x768xf32> | |
%426 = torch.aten.mm %421, %134 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%427 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%428 = "tosa.mul"(%135, %427) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%429 = torch.aten.mul.Scalar %136, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%430 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%431 = "tosa.mul"(%cast_7, %430) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%432 = "tosa.add"(%428, %431) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%433 = torch.aten.add.Tensor %429, %426, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%434 = "tosa.reshape"(%432) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%435 = torch.aten.view %433, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%436 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%437 = "tosa.mul"(%434, %436) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%438 = "tosa.add"(%356, %437) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%439 = torch.aten.add.Tensor %357, %435, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%440 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%441 = "tosa.reciprocal"(%440) : (tensor<1xf32>) -> tensor<1xf32> | |
%442 = "tosa.reduce_sum"(%438) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%443 = "tosa.reshape"(%442) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%444 = "tosa.mul"(%443, %441) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%445 = "tosa.sub"(%438, %444) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%446 = "tosa.mul"(%445, %445) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%447 = "tosa.reduce_sum"(%446) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%448 = "tosa.reshape"(%447) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%449 = "tosa.mul"(%448, %441) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%450 = "tosa.reshape"(%131) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%451 = "tosa.reshape"(%129) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%452 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%453 = "tosa.sub"(%438, %444) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%454 = "tosa.add"(%449, %452) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%455 = "tosa.rsqrt"(%454) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%456 = "tosa.mul"(%453, %455) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%457 = "tosa.mul"(%456, %450) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%458 = "tosa.add"(%457, %451) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_8, %result1_9, %result2_10 = torch.aten.native_layer_norm %439, %202, %132, %130, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%459 = "tosa.reshape"(%458) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%460 = torch.aten.view %result0_8, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%461 = "tosa.reshape"(%459) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%462 = "tosa.reshape"(%125) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%463 = "tosa.matmul"(%461, %462) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%464 = "tosa.reshape"(%463) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast_11 = tensor.cast %464 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%465 = torch.aten.mm %460, %126 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%466 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%467 = "tosa.mul"(%127, %466) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%468 = torch.aten.mul.Scalar %128, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%469 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%470 = "tosa.mul"(%cast_11, %469) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%471 = "tosa.add"(%467, %470) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%472 = torch.aten.add.Tensor %468, %465, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%473 = "tosa.reshape"(%471) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%474 = torch.aten.view %472, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%475 = torch.aten.as_strided %474, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%476 = builtin.unrealized_conversion_cast %475 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%477 = torch.aten.as_strided %474, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%478 = builtin.unrealized_conversion_cast %477 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%479 = torch.aten.as_strided %474, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%480 = builtin.unrealized_conversion_cast %479 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%481 = "tosa.reshape"(%476) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%482 = torch.aten.view %475, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%483 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%484 = "tosa.transpose"(%481, %483) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%485 = torch.aten.permute %482, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%486 = "tosa.reshape"(%478) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%487 = torch.aten.view %477, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%488 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%489 = "tosa.transpose"(%486, %488) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%490 = torch.aten.permute %487, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%491 = "tosa.reshape"(%480) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%492 = torch.aten.view %479, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%493 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%494 = "tosa.transpose"(%491, %493) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%495 = torch.aten.permute %492, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%496 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%497 = "tosa.transpose"(%489, %496) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%498 = torch.aten.transpose.int %490, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%499 = torch.aten.broadcast_to %485, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%500 = "tosa.reshape"(%484) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%501 = torch.aten.view %485, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%502 = torch.aten.broadcast_to %498, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%503 = "tosa.reshape"(%497) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%504 = torch.aten.view %498, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%505 = "tosa.matmul"(%500, %503) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_12 = tensor.cast %505 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%506 = torch.aten.bmm %501, %504 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%507 = "tosa.reshape"(%cast_12) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%508 = torch.aten.view %506, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%509 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%510 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%511 = "tosa.reciprocal"(%509) : (tensor<f32>) -> tensor<f32> | |
%512 = "tosa.mul"(%507, %511) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%513 = torch.aten.div.Tensor %508, %510 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%514 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%515 = torch.aten.as_strided %514, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%516 = torch.aten.as_strided %515, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%517 = torch.aten.as_strided %516, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%518 = builtin.unrealized_conversion_cast %517 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%519 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%520 = "tosa.equal"(%518, %519) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%521 = "tosa.logical_not"(%520) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%522 = torch.aten.to.dtype %517, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%523 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%524 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%525 = "tosa.select"(%521, %512, %523) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%526 = torch.aten.where.self %522, %513, %524 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%527 = "tosa.reduce_max"(%525) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%528 = "tosa.argmax"(%525) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%529 = "tosa.reshape"(%528) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values_13, %indices_14 = torch.aten.max.dim %526, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%530 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%531 = "tosa.mul"(%527, %530) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%532 = "tosa.sub"(%525, %531) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%533 = torch.aten.sub.Tensor %526, %values_13, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%534 = "tosa.exp"(%532) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%535 = torch.aten.exp %533 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%536 = "tosa.reduce_sum"(%534) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%537 = torch.aten.sum.dim_IntList %535, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%538 = "tosa.reciprocal"(%536) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%539 = "tosa.mul"(%534, %538) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%540 = torch.aten.div.Tensor %535, %537 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%541 = torch.aten.broadcast_to %540, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%542 = "tosa.reshape"(%539) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%543 = torch.aten.view %540, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%544 = torch.aten.broadcast_to %495, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%545 = "tosa.reshape"(%494) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%546 = torch.aten.view %495, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%547 = "tosa.matmul"(%542, %545) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_15 = tensor.cast %547 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%548 = torch.aten.bmm %543, %546 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%549 = "tosa.reshape"(%cast_15) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%550 = torch.aten.view %548, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%551 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%552 = "tosa.transpose"(%549, %551) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%553 = torch.aten.permute %550, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%554 = "tosa.cast"(%552) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%555 = torch.aten.clone %553, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%556 = "tosa.reshape"(%554) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%557 = torch.aten.view %555, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%558 = "tosa.reshape"(%556) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%559 = torch.aten.view %557, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%560 = "tosa.reshape"(%558) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%561 = "tosa.reshape"(%121) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%562 = "tosa.matmul"(%560, %561) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%563 = "tosa.reshape"(%562) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_16 = tensor.cast %563 : tensor<128x768xf32> to tensor<128x768xf32> | |
%564 = torch.aten.mm %559, %122 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%565 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%566 = "tosa.mul"(%123, %565) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%567 = torch.aten.mul.Scalar %124, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%568 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%569 = "tosa.mul"(%cast_16, %568) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%570 = "tosa.add"(%566, %569) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%571 = torch.aten.add.Tensor %567, %564, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%572 = "tosa.reshape"(%570) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%573 = torch.aten.view %571, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%574 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%575 = "tosa.mul"(%438, %574) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%576 = "tosa.add"(%572, %575) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%577 = torch.aten.add.Tensor %573, %439, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%578 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%579 = "tosa.reciprocal"(%578) : (tensor<1xf32>) -> tensor<1xf32> | |
%580 = "tosa.reduce_sum"(%576) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%581 = "tosa.reshape"(%580) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%582 = "tosa.mul"(%581, %579) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%583 = "tosa.sub"(%576, %582) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%584 = "tosa.mul"(%583, %583) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%585 = "tosa.reduce_sum"(%584) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%586 = "tosa.reshape"(%585) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%587 = "tosa.mul"(%586, %579) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%588 = "tosa.reshape"(%119) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%589 = "tosa.reshape"(%117) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%590 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%591 = "tosa.sub"(%576, %582) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%592 = "tosa.add"(%587, %590) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%593 = "tosa.rsqrt"(%592) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%594 = "tosa.mul"(%591, %593) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%595 = "tosa.mul"(%594, %588) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%596 = "tosa.add"(%595, %589) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_17, %result1_18, %result2_19 = torch.aten.native_layer_norm %577, %202, %120, %118, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%597 = "tosa.reshape"(%596) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%598 = torch.aten.view %result0_17, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%599 = "tosa.reshape"(%597) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%600 = "tosa.reshape"(%113) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%601 = "tosa.matmul"(%599, %600) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%602 = "tosa.reshape"(%601) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_20 = tensor.cast %602 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%603 = torch.aten.mm %598, %114 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%604 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%605 = "tosa.mul"(%115, %604) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%606 = torch.aten.mul.Scalar %116, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%607 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%608 = "tosa.mul"(%cast_20, %607) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%609 = "tosa.add"(%605, %608) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%610 = torch.aten.add.Tensor %606, %603, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%611 = "tosa.reshape"(%609) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%612 = torch.aten.view %610, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%613 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%614 = "tosa.mul"(%611, %613) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%615 = torch.aten.mul.Scalar %612, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%616 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%617 = "tosa.pow"(%611, %616) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%618 = torch.aten.pow.Tensor_Scalar %612, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%619 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%620 = "tosa.mul"(%617, %619) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%621 = torch.aten.mul.Scalar %618, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%622 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%623 = "tosa.mul"(%620, %622) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%624 = "tosa.add"(%611, %623) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%625 = torch.aten.add.Tensor %612, %621, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%626 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%627 = "tosa.mul"(%624, %626) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%628 = torch.aten.mul.Scalar %625, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%629 = "tosa.tanh"(%627) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%630 = torch.aten.tanh %628 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%631 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%632 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%633 = "tosa.mul"(%631, %632) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%634 = "tosa.add"(%629, %633) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%635 = torch.aten.add.Scalar %630, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%636 = "tosa.mul"(%614, %634) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%637 = torch.aten.mul.Tensor %615, %635 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%638 = "tosa.reshape"(%636) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%639 = torch.aten.view %637, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%640 = "tosa.reshape"(%638) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%641 = "tosa.reshape"(%109) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%642 = "tosa.matmul"(%640, %641) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%643 = "tosa.reshape"(%642) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_21 = tensor.cast %643 : tensor<128x768xf32> to tensor<128x768xf32> | |
%644 = torch.aten.mm %639, %110 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%645 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%646 = "tosa.mul"(%111, %645) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%647 = torch.aten.mul.Scalar %112, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%648 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%649 = "tosa.mul"(%cast_21, %648) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%650 = "tosa.add"(%646, %649) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%651 = torch.aten.add.Tensor %647, %644, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%652 = "tosa.reshape"(%650) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%653 = torch.aten.view %651, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%654 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%655 = "tosa.mul"(%652, %654) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%656 = "tosa.add"(%576, %655) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%657 = torch.aten.add.Tensor %577, %653, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%658 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%659 = "tosa.reciprocal"(%658) : (tensor<1xf32>) -> tensor<1xf32> | |
%660 = "tosa.reduce_sum"(%656) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%661 = "tosa.reshape"(%660) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%662 = "tosa.mul"(%661, %659) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%663 = "tosa.sub"(%656, %662) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%664 = "tosa.mul"(%663, %663) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%665 = "tosa.reduce_sum"(%664) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%666 = "tosa.reshape"(%665) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%667 = "tosa.mul"(%666, %659) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%668 = "tosa.reshape"(%107) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%669 = "tosa.reshape"(%105) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%670 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%671 = "tosa.sub"(%656, %662) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%672 = "tosa.add"(%667, %670) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%673 = "tosa.rsqrt"(%672) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%674 = "tosa.mul"(%671, %673) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%675 = "tosa.mul"(%674, %668) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%676 = "tosa.add"(%675, %669) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_22, %result1_23, %result2_24 = torch.aten.native_layer_norm %657, %202, %108, %106, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%677 = "tosa.reshape"(%676) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%678 = torch.aten.view %result0_22, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%679 = "tosa.reshape"(%677) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%680 = "tosa.reshape"(%101) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%681 = "tosa.matmul"(%679, %680) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%682 = "tosa.reshape"(%681) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast_25 = tensor.cast %682 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%683 = torch.aten.mm %678, %102 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%684 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%685 = "tosa.mul"(%103, %684) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%686 = torch.aten.mul.Scalar %104, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%687 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%688 = "tosa.mul"(%cast_25, %687) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%689 = "tosa.add"(%685, %688) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%690 = torch.aten.add.Tensor %686, %683, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%691 = "tosa.reshape"(%689) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%692 = torch.aten.view %690, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%693 = torch.aten.as_strided %692, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%694 = builtin.unrealized_conversion_cast %693 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%695 = torch.aten.as_strided %692, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%696 = builtin.unrealized_conversion_cast %695 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%697 = torch.aten.as_strided %692, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%698 = builtin.unrealized_conversion_cast %697 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%699 = "tosa.reshape"(%694) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%700 = torch.aten.view %693, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%701 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%702 = "tosa.transpose"(%699, %701) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%703 = torch.aten.permute %700, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%704 = "tosa.reshape"(%696) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%705 = torch.aten.view %695, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%706 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%707 = "tosa.transpose"(%704, %706) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%708 = torch.aten.permute %705, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%709 = "tosa.reshape"(%698) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%710 = torch.aten.view %697, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%711 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%712 = "tosa.transpose"(%709, %711) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%713 = torch.aten.permute %710, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%714 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%715 = "tosa.transpose"(%707, %714) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%716 = torch.aten.transpose.int %708, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%717 = torch.aten.broadcast_to %703, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%718 = "tosa.reshape"(%702) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%719 = torch.aten.view %703, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%720 = torch.aten.broadcast_to %716, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%721 = "tosa.reshape"(%715) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%722 = torch.aten.view %716, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%723 = "tosa.matmul"(%718, %721) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_26 = tensor.cast %723 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%724 = torch.aten.bmm %719, %722 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%725 = "tosa.reshape"(%cast_26) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%726 = torch.aten.view %724, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%727 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%728 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%729 = "tosa.reciprocal"(%727) : (tensor<f32>) -> tensor<f32> | |
%730 = "tosa.mul"(%725, %729) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%731 = torch.aten.div.Tensor %726, %728 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%732 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%733 = torch.aten.as_strided %732, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%734 = torch.aten.as_strided %733, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%735 = torch.aten.as_strided %734, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%736 = builtin.unrealized_conversion_cast %735 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%737 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%738 = "tosa.equal"(%736, %737) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%739 = "tosa.logical_not"(%738) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%740 = torch.aten.to.dtype %735, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%741 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%742 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%743 = "tosa.select"(%739, %730, %741) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%744 = torch.aten.where.self %740, %731, %742 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%745 = "tosa.reduce_max"(%743) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%746 = "tosa.argmax"(%743) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%747 = "tosa.reshape"(%746) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values_27, %indices_28 = torch.aten.max.dim %744, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%748 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%749 = "tosa.mul"(%745, %748) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%750 = "tosa.sub"(%743, %749) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%751 = torch.aten.sub.Tensor %744, %values_27, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%752 = "tosa.exp"(%750) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%753 = torch.aten.exp %751 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%754 = "tosa.reduce_sum"(%752) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%755 = torch.aten.sum.dim_IntList %753, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%756 = "tosa.reciprocal"(%754) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%757 = "tosa.mul"(%752, %756) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%758 = torch.aten.div.Tensor %753, %755 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%759 = torch.aten.broadcast_to %758, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%760 = "tosa.reshape"(%757) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%761 = torch.aten.view %758, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%762 = torch.aten.broadcast_to %713, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%763 = "tosa.reshape"(%712) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%764 = torch.aten.view %713, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%765 = "tosa.matmul"(%760, %763) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_29 = tensor.cast %765 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%766 = torch.aten.bmm %761, %764 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%767 = "tosa.reshape"(%cast_29) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%768 = torch.aten.view %766, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%769 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%770 = "tosa.transpose"(%767, %769) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%771 = torch.aten.permute %768, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%772 = "tosa.cast"(%770) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%773 = torch.aten.clone %771, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%774 = "tosa.reshape"(%772) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%775 = torch.aten.view %773, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%776 = "tosa.reshape"(%774) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%777 = torch.aten.view %775, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%778 = "tosa.reshape"(%776) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%779 = "tosa.reshape"(%97) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%780 = "tosa.matmul"(%778, %779) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%781 = "tosa.reshape"(%780) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_30 = tensor.cast %781 : tensor<128x768xf32> to tensor<128x768xf32> | |
%782 = torch.aten.mm %777, %98 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%783 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%784 = "tosa.mul"(%99, %783) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%785 = torch.aten.mul.Scalar %100, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%786 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%787 = "tosa.mul"(%cast_30, %786) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%788 = "tosa.add"(%784, %787) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%789 = torch.aten.add.Tensor %785, %782, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%790 = "tosa.reshape"(%788) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%791 = torch.aten.view %789, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%792 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%793 = "tosa.mul"(%656, %792) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%794 = "tosa.add"(%790, %793) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%795 = torch.aten.add.Tensor %791, %657, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%796 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%797 = "tosa.reciprocal"(%796) : (tensor<1xf32>) -> tensor<1xf32> | |
%798 = "tosa.reduce_sum"(%794) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%799 = "tosa.reshape"(%798) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%800 = "tosa.mul"(%799, %797) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%801 = "tosa.sub"(%794, %800) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%802 = "tosa.mul"(%801, %801) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%803 = "tosa.reduce_sum"(%802) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%804 = "tosa.reshape"(%803) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%805 = "tosa.mul"(%804, %797) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%806 = "tosa.reshape"(%95) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%807 = "tosa.reshape"(%93) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%808 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%809 = "tosa.sub"(%794, %800) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%810 = "tosa.add"(%805, %808) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%811 = "tosa.rsqrt"(%810) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%812 = "tosa.mul"(%809, %811) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%813 = "tosa.mul"(%812, %806) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%814 = "tosa.add"(%813, %807) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_31, %result1_32, %result2_33 = torch.aten.native_layer_norm %795, %202, %96, %94, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%815 = "tosa.reshape"(%814) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%816 = torch.aten.view %result0_31, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%817 = "tosa.reshape"(%815) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%818 = "tosa.reshape"(%89) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%819 = "tosa.matmul"(%817, %818) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%820 = "tosa.reshape"(%819) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_34 = tensor.cast %820 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%821 = torch.aten.mm %816, %90 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%822 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%823 = "tosa.mul"(%91, %822) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%824 = torch.aten.mul.Scalar %92, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%825 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%826 = "tosa.mul"(%cast_34, %825) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%827 = "tosa.add"(%823, %826) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%828 = torch.aten.add.Tensor %824, %821, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%829 = "tosa.reshape"(%827) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%830 = torch.aten.view %828, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%831 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%832 = "tosa.mul"(%829, %831) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%833 = torch.aten.mul.Scalar %830, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%834 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%835 = "tosa.pow"(%829, %834) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%836 = torch.aten.pow.Tensor_Scalar %830, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%837 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%838 = "tosa.mul"(%835, %837) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%839 = torch.aten.mul.Scalar %836, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%840 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%841 = "tosa.mul"(%838, %840) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%842 = "tosa.add"(%829, %841) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%843 = torch.aten.add.Tensor %830, %839, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%844 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%845 = "tosa.mul"(%842, %844) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%846 = torch.aten.mul.Scalar %843, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%847 = "tosa.tanh"(%845) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%848 = torch.aten.tanh %846 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%849 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%850 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%851 = "tosa.mul"(%849, %850) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%852 = "tosa.add"(%847, %851) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%853 = torch.aten.add.Scalar %848, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%854 = "tosa.mul"(%832, %852) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%855 = torch.aten.mul.Tensor %833, %853 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%856 = "tosa.reshape"(%854) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%857 = torch.aten.view %855, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%858 = "tosa.reshape"(%856) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%859 = "tosa.reshape"(%85) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%860 = "tosa.matmul"(%858, %859) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%861 = "tosa.reshape"(%860) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_35 = tensor.cast %861 : tensor<128x768xf32> to tensor<128x768xf32> | |
%862 = torch.aten.mm %857, %86 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%863 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%864 = "tosa.mul"(%87, %863) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%865 = torch.aten.mul.Scalar %88, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%866 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%867 = "tosa.mul"(%cast_35, %866) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%868 = "tosa.add"(%864, %867) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%869 = torch.aten.add.Tensor %865, %862, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%870 = "tosa.reshape"(%868) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%871 = torch.aten.view %869, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%872 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%873 = "tosa.mul"(%870, %872) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%874 = "tosa.add"(%794, %873) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%875 = torch.aten.add.Tensor %795, %871, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%876 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%877 = "tosa.reciprocal"(%876) : (tensor<1xf32>) -> tensor<1xf32> | |
%878 = "tosa.reduce_sum"(%874) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%879 = "tosa.reshape"(%878) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%880 = "tosa.mul"(%879, %877) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%881 = "tosa.sub"(%874, %880) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%882 = "tosa.mul"(%881, %881) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%883 = "tosa.reduce_sum"(%882) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%884 = "tosa.reshape"(%883) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%885 = "tosa.mul"(%884, %877) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%886 = "tosa.reshape"(%83) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%887 = "tosa.reshape"(%81) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%888 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%889 = "tosa.sub"(%874, %880) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%890 = "tosa.add"(%885, %888) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%891 = "tosa.rsqrt"(%890) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%892 = "tosa.mul"(%889, %891) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%893 = "tosa.mul"(%892, %886) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%894 = "tosa.add"(%893, %887) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_36, %result1_37, %result2_38 = torch.aten.native_layer_norm %875, %202, %84, %82, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%895 = "tosa.reshape"(%894) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%896 = torch.aten.view %result0_36, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%897 = "tosa.reshape"(%895) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%898 = "tosa.reshape"(%77) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%899 = "tosa.matmul"(%897, %898) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%900 = "tosa.reshape"(%899) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast_39 = tensor.cast %900 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%901 = torch.aten.mm %896, %78 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%902 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%903 = "tosa.mul"(%79, %902) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%904 = torch.aten.mul.Scalar %80, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%905 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%906 = "tosa.mul"(%cast_39, %905) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%907 = "tosa.add"(%903, %906) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%908 = torch.aten.add.Tensor %904, %901, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%909 = "tosa.reshape"(%907) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%910 = torch.aten.view %908, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%911 = torch.aten.as_strided %910, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%912 = builtin.unrealized_conversion_cast %911 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%913 = torch.aten.as_strided %910, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%914 = builtin.unrealized_conversion_cast %913 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%915 = torch.aten.as_strided %910, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%916 = builtin.unrealized_conversion_cast %915 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%917 = "tosa.reshape"(%912) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%918 = torch.aten.view %911, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%919 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%920 = "tosa.transpose"(%917, %919) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%921 = torch.aten.permute %918, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%922 = "tosa.reshape"(%914) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%923 = torch.aten.view %913, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%924 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%925 = "tosa.transpose"(%922, %924) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%926 = torch.aten.permute %923, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%927 = "tosa.reshape"(%916) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%928 = torch.aten.view %915, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%929 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%930 = "tosa.transpose"(%927, %929) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%931 = torch.aten.permute %928, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%932 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%933 = "tosa.transpose"(%925, %932) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%934 = torch.aten.transpose.int %926, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%935 = torch.aten.broadcast_to %921, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%936 = "tosa.reshape"(%920) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%937 = torch.aten.view %921, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%938 = torch.aten.broadcast_to %934, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%939 = "tosa.reshape"(%933) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%940 = torch.aten.view %934, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%941 = "tosa.matmul"(%936, %939) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_40 = tensor.cast %941 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%942 = torch.aten.bmm %937, %940 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%943 = "tosa.reshape"(%cast_40) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%944 = torch.aten.view %942, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%945 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%946 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%947 = "tosa.reciprocal"(%945) : (tensor<f32>) -> tensor<f32> | |
%948 = "tosa.mul"(%943, %947) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%949 = torch.aten.div.Tensor %944, %946 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%950 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%951 = torch.aten.as_strided %950, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%952 = torch.aten.as_strided %951, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%953 = torch.aten.as_strided %952, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%954 = builtin.unrealized_conversion_cast %953 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%955 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%956 = "tosa.equal"(%954, %955) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%957 = "tosa.logical_not"(%956) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%958 = torch.aten.to.dtype %953, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%959 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%960 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%961 = "tosa.select"(%957, %948, %959) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%962 = torch.aten.where.self %958, %949, %960 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%963 = "tosa.reduce_max"(%961) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%964 = "tosa.argmax"(%961) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%965 = "tosa.reshape"(%964) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values_41, %indices_42 = torch.aten.max.dim %962, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%966 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%967 = "tosa.mul"(%963, %966) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%968 = "tosa.sub"(%961, %967) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%969 = torch.aten.sub.Tensor %962, %values_41, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%970 = "tosa.exp"(%968) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%971 = torch.aten.exp %969 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%972 = "tosa.reduce_sum"(%970) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%973 = torch.aten.sum.dim_IntList %971, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%974 = "tosa.reciprocal"(%972) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%975 = "tosa.mul"(%970, %974) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%976 = torch.aten.div.Tensor %971, %973 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%977 = torch.aten.broadcast_to %976, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%978 = "tosa.reshape"(%975) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%979 = torch.aten.view %976, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%980 = torch.aten.broadcast_to %931, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%981 = "tosa.reshape"(%930) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%982 = torch.aten.view %931, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%983 = "tosa.matmul"(%978, %981) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_43 = tensor.cast %983 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%984 = torch.aten.bmm %979, %982 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%985 = "tosa.reshape"(%cast_43) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%986 = torch.aten.view %984, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%987 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%988 = "tosa.transpose"(%985, %987) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%989 = torch.aten.permute %986, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%990 = "tosa.cast"(%988) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%991 = torch.aten.clone %989, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%992 = "tosa.reshape"(%990) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%993 = torch.aten.view %991, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%994 = "tosa.reshape"(%992) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%995 = torch.aten.view %993, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%996 = "tosa.reshape"(%994) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%997 = "tosa.reshape"(%73) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%998 = "tosa.matmul"(%996, %997) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%999 = "tosa.reshape"(%998) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_44 = tensor.cast %999 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1000 = torch.aten.mm %995, %74 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1001 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1002 = "tosa.mul"(%75, %1001) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1003 = torch.aten.mul.Scalar %76, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1004 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1005 = "tosa.mul"(%cast_44, %1004) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1006 = "tosa.add"(%1002, %1005) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1007 = torch.aten.add.Tensor %1003, %1000, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1008 = "tosa.reshape"(%1006) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1009 = torch.aten.view %1007, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1010 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1011 = "tosa.mul"(%874, %1010) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1012 = "tosa.add"(%1008, %1011) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1013 = torch.aten.add.Tensor %1009, %875, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1014 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1015 = "tosa.reciprocal"(%1014) : (tensor<1xf32>) -> tensor<1xf32> | |
%1016 = "tosa.reduce_sum"(%1012) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1017 = "tosa.reshape"(%1016) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1018 = "tosa.mul"(%1017, %1015) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1019 = "tosa.sub"(%1012, %1018) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1020 = "tosa.mul"(%1019, %1019) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1021 = "tosa.reduce_sum"(%1020) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1022 = "tosa.reshape"(%1021) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1023 = "tosa.mul"(%1022, %1015) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1024 = "tosa.reshape"(%71) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1025 = "tosa.reshape"(%69) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1026 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1027 = "tosa.sub"(%1012, %1018) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1028 = "tosa.add"(%1023, %1026) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1029 = "tosa.rsqrt"(%1028) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1030 = "tosa.mul"(%1027, %1029) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1031 = "tosa.mul"(%1030, %1024) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1032 = "tosa.add"(%1031, %1025) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_45, %result1_46, %result2_47 = torch.aten.native_layer_norm %1013, %202, %72, %70, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1033 = "tosa.reshape"(%1032) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1034 = torch.aten.view %result0_45, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1035 = "tosa.reshape"(%1033) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1036 = "tosa.reshape"(%65) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%1037 = "tosa.matmul"(%1035, %1036) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%1038 = "tosa.reshape"(%1037) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_48 = tensor.cast %1038 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%1039 = torch.aten.mm %1034, %66 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%1040 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1041 = "tosa.mul"(%67, %1040) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%1042 = torch.aten.mul.Scalar %68, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%1043 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1044 = "tosa.mul"(%cast_48, %1043) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%1045 = "tosa.add"(%1041, %1044) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%1046 = torch.aten.add.Tensor %1042, %1039, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%1047 = "tosa.reshape"(%1045) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1048 = torch.aten.view %1046, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%1049 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%1050 = "tosa.mul"(%1047, %1049) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1051 = torch.aten.mul.Scalar %1048, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1052 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1053 = "tosa.pow"(%1047, %1052) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1054 = torch.aten.pow.Tensor_Scalar %1048, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1055 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%1056 = "tosa.mul"(%1053, %1055) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1057 = torch.aten.mul.Scalar %1054, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1058 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1059 = "tosa.mul"(%1056, %1058) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1060 = "tosa.add"(%1047, %1059) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1061 = torch.aten.add.Tensor %1048, %1057, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1062 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%1063 = "tosa.mul"(%1060, %1062) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1064 = torch.aten.mul.Scalar %1061, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1065 = "tosa.tanh"(%1063) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1066 = torch.aten.tanh %1064 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1067 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1068 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1069 = "tosa.mul"(%1067, %1068) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%1070 = "tosa.add"(%1065, %1069) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1071 = torch.aten.add.Scalar %1066, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1072 = "tosa.mul"(%1050, %1070) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1073 = torch.aten.mul.Tensor %1051, %1071 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1074 = "tosa.reshape"(%1072) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%1075 = torch.aten.view %1073, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%1076 = "tosa.reshape"(%1074) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1077 = "tosa.reshape"(%61) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%1078 = "tosa.matmul"(%1076, %1077) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%1079 = "tosa.reshape"(%1078) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_49 = tensor.cast %1079 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1080 = torch.aten.mm %1075, %62 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1081 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1082 = "tosa.mul"(%63, %1081) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1083 = torch.aten.mul.Scalar %64, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1084 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1085 = "tosa.mul"(%cast_49, %1084) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1086 = "tosa.add"(%1082, %1085) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1087 = torch.aten.add.Tensor %1083, %1080, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1088 = "tosa.reshape"(%1086) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1089 = torch.aten.view %1087, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1090 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1091 = "tosa.mul"(%1088, %1090) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1092 = "tosa.add"(%1012, %1091) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1093 = torch.aten.add.Tensor %1013, %1089, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1094 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1095 = "tosa.reciprocal"(%1094) : (tensor<1xf32>) -> tensor<1xf32> | |
%1096 = "tosa.reduce_sum"(%1092) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1097 = "tosa.reshape"(%1096) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1098 = "tosa.mul"(%1097, %1095) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1099 = "tosa.sub"(%1092, %1098) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1100 = "tosa.mul"(%1099, %1099) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1101 = "tosa.reduce_sum"(%1100) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1102 = "tosa.reshape"(%1101) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1103 = "tosa.mul"(%1102, %1095) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1104 = "tosa.reshape"(%59) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1105 = "tosa.reshape"(%57) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1106 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1107 = "tosa.sub"(%1092, %1098) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1108 = "tosa.add"(%1103, %1106) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1109 = "tosa.rsqrt"(%1108) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1110 = "tosa.mul"(%1107, %1109) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1111 = "tosa.mul"(%1110, %1104) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1112 = "tosa.add"(%1111, %1105) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_50, %result1_51, %result2_52 = torch.aten.native_layer_norm %1093, %202, %60, %58, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1113 = "tosa.reshape"(%1112) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1114 = torch.aten.view %result0_50, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1115 = "tosa.reshape"(%1113) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1116 = "tosa.reshape"(%53) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%1117 = "tosa.matmul"(%1115, %1116) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%1118 = "tosa.reshape"(%1117) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast_53 = tensor.cast %1118 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%1119 = torch.aten.mm %1114, %54 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%1120 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1121 = "tosa.mul"(%55, %1120) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%1122 = torch.aten.mul.Scalar %56, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%1123 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1124 = "tosa.mul"(%cast_53, %1123) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%1125 = "tosa.add"(%1121, %1124) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%1126 = torch.aten.add.Tensor %1122, %1119, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%1127 = "tosa.reshape"(%1125) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%1128 = torch.aten.view %1126, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%1129 = torch.aten.as_strided %1128, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1130 = builtin.unrealized_conversion_cast %1129 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1131 = torch.aten.as_strided %1128, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1132 = builtin.unrealized_conversion_cast %1131 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1133 = torch.aten.as_strided %1128, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1134 = builtin.unrealized_conversion_cast %1133 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1135 = "tosa.reshape"(%1130) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1136 = torch.aten.view %1129, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1137 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1138 = "tosa.transpose"(%1135, %1137) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1139 = torch.aten.permute %1136, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1140 = "tosa.reshape"(%1132) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1141 = torch.aten.view %1131, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1142 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1143 = "tosa.transpose"(%1140, %1142) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1144 = torch.aten.permute %1141, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1145 = "tosa.reshape"(%1134) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1146 = torch.aten.view %1133, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1147 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1148 = "tosa.transpose"(%1145, %1147) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1149 = torch.aten.permute %1146, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1150 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%1151 = "tosa.transpose"(%1143, %1150) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%1152 = torch.aten.transpose.int %1144, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%1153 = torch.aten.broadcast_to %1139, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1154 = "tosa.reshape"(%1138) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%1155 = torch.aten.view %1139, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%1156 = torch.aten.broadcast_to %1152, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%1157 = "tosa.reshape"(%1151) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%1158 = torch.aten.view %1152, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%1159 = "tosa.matmul"(%1154, %1157) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_54 = tensor.cast %1159 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%1160 = torch.aten.bmm %1155, %1158 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%1161 = "tosa.reshape"(%cast_54) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%1162 = torch.aten.view %1160, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%1163 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%1164 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%1165 = "tosa.reciprocal"(%1163) : (tensor<f32>) -> tensor<f32> | |
%1166 = "tosa.mul"(%1161, %1165) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%1167 = torch.aten.div.Tensor %1162, %1164 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1168 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%1169 = torch.aten.as_strided %1168, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%1170 = torch.aten.as_strided %1169, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%1171 = torch.aten.as_strided %1170, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%1172 = builtin.unrealized_conversion_cast %1171 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%1173 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%1174 = "tosa.equal"(%1172, %1173) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%1175 = "tosa.logical_not"(%1174) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%1176 = torch.aten.to.dtype %1171, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%1177 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%1178 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%1179 = "tosa.select"(%1175, %1166, %1177) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%1180 = torch.aten.where.self %1176, %1167, %1178 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1181 = "tosa.reduce_max"(%1179) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%1182 = "tosa.argmax"(%1179) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%1183 = "tosa.reshape"(%1182) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values_55, %indices_56 = torch.aten.max.dim %1180, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%1184 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1185 = "tosa.mul"(%1181, %1184) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%1186 = "tosa.sub"(%1179, %1185) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%1187 = torch.aten.sub.Tensor %1180, %values_55, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%1188 = "tosa.exp"(%1186) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%1189 = torch.aten.exp %1187 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1190 = "tosa.reduce_sum"(%1188) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%1191 = torch.aten.sum.dim_IntList %1189, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%1192 = "tosa.reciprocal"(%1190) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%1193 = "tosa.mul"(%1188, %1192) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%1194 = torch.aten.div.Tensor %1189, %1191 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1195 = torch.aten.broadcast_to %1194, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%1196 = "tosa.reshape"(%1193) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%1197 = torch.aten.view %1194, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%1198 = torch.aten.broadcast_to %1149, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1199 = "tosa.reshape"(%1148) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%1200 = torch.aten.view %1149, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%1201 = "tosa.matmul"(%1196, %1199) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_57 = tensor.cast %1201 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%1202 = torch.aten.bmm %1197, %1200 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%1203 = "tosa.reshape"(%cast_57) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%1204 = torch.aten.view %1202, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1205 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1206 = "tosa.transpose"(%1203, %1205) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%1207 = torch.aten.permute %1204, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1208 = "tosa.cast"(%1206) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%1209 = torch.aten.clone %1207, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%1210 = "tosa.reshape"(%1208) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%1211 = torch.aten.view %1209, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1212 = "tosa.reshape"(%1210) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1213 = torch.aten.view %1211, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1214 = "tosa.reshape"(%1212) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1215 = "tosa.reshape"(%49) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%1216 = "tosa.matmul"(%1214, %1215) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%1217 = "tosa.reshape"(%1216) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_58 = tensor.cast %1217 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1218 = torch.aten.mm %1213, %50 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1219 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1220 = "tosa.mul"(%51, %1219) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1221 = torch.aten.mul.Scalar %52, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1222 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1223 = "tosa.mul"(%cast_58, %1222) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1224 = "tosa.add"(%1220, %1223) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1225 = torch.aten.add.Tensor %1221, %1218, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1226 = "tosa.reshape"(%1224) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1227 = torch.aten.view %1225, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1228 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1229 = "tosa.mul"(%1092, %1228) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1230 = "tosa.add"(%1226, %1229) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1231 = torch.aten.add.Tensor %1227, %1093, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1232 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1233 = "tosa.reciprocal"(%1232) : (tensor<1xf32>) -> tensor<1xf32> | |
%1234 = "tosa.reduce_sum"(%1230) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1235 = "tosa.reshape"(%1234) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1236 = "tosa.mul"(%1235, %1233) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1237 = "tosa.sub"(%1230, %1236) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1238 = "tosa.mul"(%1237, %1237) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1239 = "tosa.reduce_sum"(%1238) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1240 = "tosa.reshape"(%1239) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1241 = "tosa.mul"(%1240, %1233) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1242 = "tosa.reshape"(%47) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1243 = "tosa.reshape"(%45) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1244 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1245 = "tosa.sub"(%1230, %1236) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1246 = "tosa.add"(%1241, %1244) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1247 = "tosa.rsqrt"(%1246) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1248 = "tosa.mul"(%1245, %1247) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1249 = "tosa.mul"(%1248, %1242) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1250 = "tosa.add"(%1249, %1243) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_59, %result1_60, %result2_61 = torch.aten.native_layer_norm %1231, %202, %48, %46, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1251 = "tosa.reshape"(%1250) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1252 = torch.aten.view %result0_59, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1253 = "tosa.reshape"(%1251) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1254 = "tosa.reshape"(%41) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%1255 = "tosa.matmul"(%1253, %1254) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%1256 = "tosa.reshape"(%1255) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_62 = tensor.cast %1256 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%1257 = torch.aten.mm %1252, %42 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%1258 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1259 = "tosa.mul"(%43, %1258) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%1260 = torch.aten.mul.Scalar %44, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%1261 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1262 = "tosa.mul"(%cast_62, %1261) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%1263 = "tosa.add"(%1259, %1262) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%1264 = torch.aten.add.Tensor %1260, %1257, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%1265 = "tosa.reshape"(%1263) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1266 = torch.aten.view %1264, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%1267 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%1268 = "tosa.mul"(%1265, %1267) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1269 = torch.aten.mul.Scalar %1266, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1270 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1271 = "tosa.pow"(%1265, %1270) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1272 = torch.aten.pow.Tensor_Scalar %1266, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1273 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%1274 = "tosa.mul"(%1271, %1273) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1275 = torch.aten.mul.Scalar %1272, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1276 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1277 = "tosa.mul"(%1274, %1276) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1278 = "tosa.add"(%1265, %1277) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1279 = torch.aten.add.Tensor %1266, %1275, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1280 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%1281 = "tosa.mul"(%1278, %1280) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1282 = torch.aten.mul.Scalar %1279, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1283 = "tosa.tanh"(%1281) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1284 = torch.aten.tanh %1282 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1285 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1286 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1287 = "tosa.mul"(%1285, %1286) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%1288 = "tosa.add"(%1283, %1287) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1289 = torch.aten.add.Scalar %1284, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1290 = "tosa.mul"(%1268, %1288) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1291 = torch.aten.mul.Tensor %1269, %1289 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1292 = "tosa.reshape"(%1290) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%1293 = torch.aten.view %1291, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%1294 = "tosa.reshape"(%1292) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1295 = "tosa.reshape"(%37) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%1296 = "tosa.matmul"(%1294, %1295) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%1297 = "tosa.reshape"(%1296) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_63 = tensor.cast %1297 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1298 = torch.aten.mm %1293, %38 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1299 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1300 = "tosa.mul"(%39, %1299) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1301 = torch.aten.mul.Scalar %40, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1302 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1303 = "tosa.mul"(%cast_63, %1302) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1304 = "tosa.add"(%1300, %1303) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1305 = torch.aten.add.Tensor %1301, %1298, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1306 = "tosa.reshape"(%1304) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1307 = torch.aten.view %1305, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1308 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1309 = "tosa.mul"(%1306, %1308) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1310 = "tosa.add"(%1230, %1309) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1311 = torch.aten.add.Tensor %1231, %1307, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1312 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1313 = "tosa.reciprocal"(%1312) : (tensor<1xf32>) -> tensor<1xf32> | |
%1314 = "tosa.reduce_sum"(%1310) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1315 = "tosa.reshape"(%1314) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1316 = "tosa.mul"(%1315, %1313) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1317 = "tosa.sub"(%1310, %1316) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1318 = "tosa.mul"(%1317, %1317) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1319 = "tosa.reduce_sum"(%1318) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1320 = "tosa.reshape"(%1319) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1321 = "tosa.mul"(%1320, %1313) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1322 = "tosa.reshape"(%35) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1323 = "tosa.reshape"(%33) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1324 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1325 = "tosa.sub"(%1310, %1316) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1326 = "tosa.add"(%1321, %1324) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1327 = "tosa.rsqrt"(%1326) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1328 = "tosa.mul"(%1325, %1327) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1329 = "tosa.mul"(%1328, %1322) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1330 = "tosa.add"(%1329, %1323) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_64, %result1_65, %result2_66 = torch.aten.native_layer_norm %1311, %202, %36, %34, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1331 = "tosa.reshape"(%1330) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1332 = torch.aten.view %result0_64, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1333 = "tosa.reshape"(%1331) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1334 = "tosa.reshape"(%29) {new_shape = [1, 768, 2304]} : (tensor<768x2304xf32>) -> tensor<1x768x2304xf32> | |
%1335 = "tosa.matmul"(%1333, %1334) : (tensor<1x128x768xf32>, tensor<1x768x2304xf32>) -> tensor<1x128x2304xf32> | |
%1336 = "tosa.reshape"(%1335) {new_shape = [128, 2304]} : (tensor<1x128x2304xf32>) -> tensor<128x2304xf32> | |
%cast_67 = tensor.cast %1336 : tensor<128x2304xf32> to tensor<128x2304xf32> | |
%1337 = torch.aten.mm %1332, %30 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2304],f32> -> !torch.vtensor<[128,2304],f32> | |
%1338 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1339 = "tosa.mul"(%31, %1338) {shift = 0 : i32} : (tensor<2304xf32>, tensor<f32>) -> tensor<2304xf32> | |
%1340 = torch.aten.mul.Scalar %32, %int1 : !torch.vtensor<[2304],f32>, !torch.int -> !torch.vtensor<[2304],f32> | |
%1341 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1342 = "tosa.mul"(%cast_67, %1341) {shift = 0 : i32} : (tensor<128x2304xf32>, tensor<f32>) -> tensor<128x2304xf32> | |
%1343 = "tosa.add"(%1339, %1342) : (tensor<2304xf32>, tensor<128x2304xf32>) -> tensor<128x2304xf32> | |
%1344 = torch.aten.add.Tensor %1340, %1337, %int1 : !torch.vtensor<[2304],f32>, !torch.vtensor<[128,2304],f32>, !torch.int -> !torch.vtensor<[128,2304],f32> | |
%1345 = "tosa.reshape"(%1343) {new_shape = [1, 128, 2304]} : (tensor<128x2304xf32>) -> tensor<1x128x2304xf32> | |
%1346 = torch.aten.view %1344, %237 : !torch.vtensor<[128,2304],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2304],f32> | |
%1347 = torch.aten.as_strided %1346, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1348 = builtin.unrealized_conversion_cast %1347 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1349 = torch.aten.as_strided %1346, %240, %241, %int768 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1350 = builtin.unrealized_conversion_cast %1349 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1351 = torch.aten.as_strided %1346, %240, %241, %int1536 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1352 = builtin.unrealized_conversion_cast %1351 : !torch.vtensor<[1,128,768],f32> to tensor<1x128x768xf32> | |
%1353 = "tosa.reshape"(%1348) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1354 = torch.aten.view %1347, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1355 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1356 = "tosa.transpose"(%1353, %1355) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1357 = torch.aten.permute %1354, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1358 = "tosa.reshape"(%1350) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1359 = torch.aten.view %1349, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1360 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1361 = "tosa.transpose"(%1358, %1360) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1362 = torch.aten.permute %1359, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1363 = "tosa.reshape"(%1352) {new_shape = [1, 128, 12, 64]} : (tensor<1x128x768xf32>) -> tensor<1x128x12x64xf32> | |
%1364 = torch.aten.view %1351, %248 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1365 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1366 = "tosa.transpose"(%1363, %1365) : (tensor<1x128x12x64xf32>, tensor<4xi64>) -> tensor<1x12x128x64xf32> | |
%1367 = torch.aten.permute %1364, %251 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1368 = "tosa.const"() {value = dense<[0, 1, 3, 2]> : tensor<4xi32>} : () -> tensor<4xi32> | |
%1369 = "tosa.transpose"(%1361, %1368) : (tensor<1x12x128x64xf32>, tensor<4xi32>) -> tensor<1x12x64x128xf32> | |
%1370 = torch.aten.transpose.int %1362, %int-1, %int-2 : !torch.vtensor<[1,12,128,64],f32>, !torch.int, !torch.int -> !torch.vtensor<[1,12,64,128],f32> | |
%1371 = torch.aten.broadcast_to %1357, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1372 = "tosa.reshape"(%1356) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%1373 = torch.aten.view %1357, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%1374 = torch.aten.broadcast_to %1370, %273 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,64,128],f32> | |
%1375 = "tosa.reshape"(%1369) {new_shape = [12, 64, 128]} : (tensor<1x12x64x128xf32>) -> tensor<12x64x128xf32> | |
%1376 = torch.aten.view %1370, %275 : !torch.vtensor<[1,12,64,128],f32>, !torch.list<int> -> !torch.vtensor<[12,64,128],f32> | |
%1377 = "tosa.matmul"(%1372, %1375) : (tensor<12x128x64xf32>, tensor<12x64x128xf32>) -> tensor<12x128x128xf32> | |
%cast_68 = tensor.cast %1377 : tensor<12x128x128xf32> to tensor<12x128x128xf32> | |
%1378 = torch.aten.bmm %1373, %1376 : !torch.vtensor<[12,128,64],f32>, !torch.vtensor<[12,64,128],f32> -> !torch.vtensor<[12,128,128],f32> | |
%1379 = "tosa.reshape"(%cast_68) {new_shape = [1, 12, 128, 128]} : (tensor<12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%1380 = torch.aten.view %1378, %280 : !torch.vtensor<[12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%1381 = "tosa.cast"(%153) : (tensor<f32>) -> tensor<f32> | |
%1382 = torch.aten.clone %154, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%1383 = "tosa.reciprocal"(%1381) : (tensor<f32>) -> tensor<f32> | |
%1384 = "tosa.mul"(%1379, %1383) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%1385 = torch.aten.div.Tensor %1380, %1382 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1386 = torch.aten.as_strided %152, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%1387 = torch.aten.as_strided %1386, %288, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,1024,1024],ui8> | |
%1388 = torch.aten.as_strided %1387, %292, %289, %int0 : !torch.vtensor<[1,1,1024,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,1024],ui8> | |
%1389 = torch.aten.as_strided %1388, %294, %289, %int0 : !torch.vtensor<[1,1,128,1024],ui8>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,128,128],ui8> | |
%1390 = builtin.unrealized_conversion_cast %1389 : !torch.vtensor<[1,1,128,128],ui8> to tensor<1x1x128x128xi8> | |
%1391 = "tosa.const"() {value = dense<0> : tensor<1x1x128x128xi8>} : () -> tensor<1x1x128x128xi8> | |
%1392 = "tosa.equal"(%1390, %1391) : (tensor<1x1x128x128xi8>, tensor<1x1x128x128xi8>) -> tensor<1x1x128x128xi1> | |
%1393 = "tosa.logical_not"(%1392) : (tensor<1x1x128x128xi1>) -> tensor<1x1x128x128xi1> | |
%1394 = torch.aten.to.dtype %1389, %int11, %false, %false, %none : !torch.vtensor<[1,1,128,128],ui8>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,128,128],i1> | |
%1395 = "tosa.cast"(%149) : (tensor<f32>) -> tensor<f32> | |
%1396 = torch.aten.clone %150, %none : !torch.vtensor<[],f32>, !torch.none -> !torch.vtensor<[],f32> | |
%1397 = "tosa.select"(%1393, %1384, %1395) : (tensor<1x1x128x128xi1>, tensor<1x12x128x128xf32>, tensor<f32>) -> tensor<1x12x128x128xf32> | |
%1398 = torch.aten.where.self %1394, %1385, %1396 : !torch.vtensor<[1,1,128,128],i1>, !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1399 = "tosa.reduce_max"(%1397) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%1400 = "tosa.argmax"(%1397) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128xi64> | |
%1401 = "tosa.reshape"(%1400) {new_shape = [1, 12, 128, 1]} : (tensor<1x12x128xi64>) -> tensor<1x12x128x1xi64> | |
%values_69, %indices_70 = torch.aten.max.dim %1398, %int-1, %true : !torch.vtensor<[1,12,128,128],f32>, !torch.int, !torch.bool -> !torch.vtensor<[1,12,128,1],f32>, !torch.vtensor<[1,12,128,1],si64> | |
%1402 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1403 = "tosa.mul"(%1399, %1402) {shift = 0 : i32} : (tensor<1x12x128x1xf32>, tensor<f32>) -> tensor<1x12x128x1xf32> | |
%1404 = "tosa.sub"(%1397, %1403) : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%1405 = torch.aten.sub.Tensor %1398, %values_69, %int1 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32>, !torch.int -> !torch.vtensor<[1,12,128,128],f32> | |
%1406 = "tosa.exp"(%1404) : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x128xf32> | |
%1407 = torch.aten.exp %1405 : !torch.vtensor<[1,12,128,128],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1408 = "tosa.reduce_sum"(%1406) {axis = 3 : i64} : (tensor<1x12x128x128xf32>) -> tensor<1x12x128x1xf32> | |
%1409 = torch.aten.sum.dim_IntList %1407, %305, %true, %none : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,12,128,1],f32> | |
%1410 = "tosa.reciprocal"(%1408) : (tensor<1x12x128x1xf32>) -> tensor<1x12x128x1xf32> | |
%1411 = "tosa.mul"(%1406, %1410) {shift = 0 : i32} : (tensor<1x12x128x128xf32>, tensor<1x12x128x1xf32>) -> tensor<1x12x128x128xf32> | |
%1412 = torch.aten.div.Tensor %1407, %1409 : !torch.vtensor<[1,12,128,128],f32>, !torch.vtensor<[1,12,128,1],f32> -> !torch.vtensor<[1,12,128,128],f32> | |
%1413 = torch.aten.broadcast_to %1412, %280 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,128],f32> | |
%1414 = "tosa.reshape"(%1411) {new_shape = [12, 128, 128]} : (tensor<1x12x128x128xf32>) -> tensor<12x128x128xf32> | |
%1415 = torch.aten.view %1412, %321 : !torch.vtensor<[1,12,128,128],f32>, !torch.list<int> -> !torch.vtensor<[12,128,128],f32> | |
%1416 = torch.aten.broadcast_to %1367, %268 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1417 = "tosa.reshape"(%1366) {new_shape = [12, 128, 64]} : (tensor<1x12x128x64xf32>) -> tensor<12x128x64xf32> | |
%1418 = torch.aten.view %1367, %270 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[12,128,64],f32> | |
%1419 = "tosa.matmul"(%1414, %1417) : (tensor<12x128x128xf32>, tensor<12x128x64xf32>) -> tensor<12x128x64xf32> | |
%cast_71 = tensor.cast %1419 : tensor<12x128x64xf32> to tensor<12x128x64xf32> | |
%1420 = torch.aten.bmm %1415, %1418 : !torch.vtensor<[12,128,128],f32>, !torch.vtensor<[12,128,64],f32> -> !torch.vtensor<[12,128,64],f32> | |
%1421 = "tosa.reshape"(%cast_71) {new_shape = [1, 12, 128, 64]} : (tensor<12x128x64xf32>) -> tensor<1x12x128x64xf32> | |
%1422 = torch.aten.view %1420, %268 : !torch.vtensor<[12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,12,128,64],f32> | |
%1423 = "tosa.const"() {value = dense<[0, 2, 1, 3]> : tensor<4xi64>} : () -> tensor<4xi64> | |
%1424 = "tosa.transpose"(%1421, %1423) : (tensor<1x12x128x64xf32>, tensor<4xi64>) -> tensor<1x128x12x64xf32> | |
%1425 = torch.aten.permute %1422, %251 : !torch.vtensor<[1,12,128,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,12,64],f32> | |
%1426 = "tosa.cast"(%1424) : (tensor<1x128x12x64xf32>) -> tensor<1x128x12x64xf32> | |
%1427 = torch.aten.clone %1425, %int0 : !torch.vtensor<[1,128,12,64],f32>, !torch.int -> !torch.vtensor<[1,128,12,64],f32> | |
%1428 = "tosa.reshape"(%1426) {new_shape = [1, 128, 768]} : (tensor<1x128x12x64xf32>) -> tensor<1x128x768xf32> | |
%1429 = torch.aten.view %1427, %240 : !torch.vtensor<[1,128,12,64],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1430 = "tosa.reshape"(%1428) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1431 = torch.aten.view %1429, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1432 = "tosa.reshape"(%1430) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1433 = "tosa.reshape"(%25) {new_shape = [1, 768, 768]} : (tensor<768x768xf32>) -> tensor<1x768x768xf32> | |
%1434 = "tosa.matmul"(%1432, %1433) : (tensor<1x128x768xf32>, tensor<1x768x768xf32>) -> tensor<1x128x768xf32> | |
%1435 = "tosa.reshape"(%1434) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_72 = tensor.cast %1435 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1436 = torch.aten.mm %1431, %26 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1437 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1438 = "tosa.mul"(%27, %1437) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1439 = torch.aten.mul.Scalar %28, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1440 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1441 = "tosa.mul"(%cast_72, %1440) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1442 = "tosa.add"(%1438, %1441) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1443 = torch.aten.add.Tensor %1439, %1436, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1444 = "tosa.reshape"(%1442) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1445 = torch.aten.view %1443, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1446 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1447 = "tosa.mul"(%1310, %1446) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1448 = "tosa.add"(%1444, %1447) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1449 = torch.aten.add.Tensor %1445, %1311, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1450 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1451 = "tosa.reciprocal"(%1450) : (tensor<1xf32>) -> tensor<1xf32> | |
%1452 = "tosa.reduce_sum"(%1448) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1453 = "tosa.reshape"(%1452) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1454 = "tosa.mul"(%1453, %1451) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1455 = "tosa.sub"(%1448, %1454) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1456 = "tosa.mul"(%1455, %1455) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1457 = "tosa.reduce_sum"(%1456) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1458 = "tosa.reshape"(%1457) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1459 = "tosa.mul"(%1458, %1451) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1460 = "tosa.reshape"(%23) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1461 = "tosa.reshape"(%21) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1462 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1463 = "tosa.sub"(%1448, %1454) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1464 = "tosa.add"(%1459, %1462) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1465 = "tosa.rsqrt"(%1464) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1466 = "tosa.mul"(%1463, %1465) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1467 = "tosa.mul"(%1466, %1460) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1468 = "tosa.add"(%1467, %1461) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_73, %result1_74, %result2_75 = torch.aten.native_layer_norm %1449, %202, %24, %22, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1469 = "tosa.reshape"(%1468) {new_shape = [-1, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1470 = torch.aten.view %result0_73, %222 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1471 = "tosa.reshape"(%1469) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1472 = "tosa.reshape"(%17) {new_shape = [1, 768, 3072]} : (tensor<768x3072xf32>) -> tensor<1x768x3072xf32> | |
%1473 = "tosa.matmul"(%1471, %1472) : (tensor<1x128x768xf32>, tensor<1x768x3072xf32>) -> tensor<1x128x3072xf32> | |
%1474 = "tosa.reshape"(%1473) {new_shape = [128, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%cast_76 = tensor.cast %1474 : tensor<128x3072xf32> to tensor<128x3072xf32> | |
%1475 = torch.aten.mm %1470, %18 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,3072],f32> -> !torch.vtensor<[128,3072],f32> | |
%1476 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1477 = "tosa.mul"(%19, %1476) {shift = 0 : i32} : (tensor<3072xf32>, tensor<f32>) -> tensor<3072xf32> | |
%1478 = torch.aten.mul.Scalar %20, %int1 : !torch.vtensor<[3072],f32>, !torch.int -> !torch.vtensor<[3072],f32> | |
%1479 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1480 = "tosa.mul"(%cast_76, %1479) {shift = 0 : i32} : (tensor<128x3072xf32>, tensor<f32>) -> tensor<128x3072xf32> | |
%1481 = "tosa.add"(%1477, %1480) : (tensor<3072xf32>, tensor<128x3072xf32>) -> tensor<128x3072xf32> | |
%1482 = torch.aten.add.Tensor %1478, %1475, %int1 : !torch.vtensor<[3072],f32>, !torch.vtensor<[128,3072],f32>, !torch.int -> !torch.vtensor<[128,3072],f32> | |
%1483 = "tosa.reshape"(%1481) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1484 = torch.aten.view %1482, %391 : !torch.vtensor<[128,3072],f32>, !torch.list<int> -> !torch.vtensor<[1,128,3072],f32> | |
%1485 = "tosa.const"() {value = dense<5.000000e-01> : tensor<f32>} : () -> tensor<f32> | |
%1486 = "tosa.mul"(%1483, %1485) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1487 = torch.aten.mul.Scalar %1484, %float5.000000e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1488 = "tosa.const"() {value = dense<3.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1489 = "tosa.pow"(%1483, %1488) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1490 = torch.aten.pow.Tensor_Scalar %1484, %float3.000000e00 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1491 = "tosa.const"() {value = dense<4.471500e-02> : tensor<f32>} : () -> tensor<f32> | |
%1492 = "tosa.mul"(%1489, %1491) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1493 = torch.aten.mul.Scalar %1490, %float4.471500e-02 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1494 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1495 = "tosa.mul"(%1492, %1494) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1496 = "tosa.add"(%1483, %1495) : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1497 = torch.aten.add.Tensor %1484, %1493, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32>, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1498 = "tosa.const"() {value = dense<0.797884583> : tensor<f32>} : () -> tensor<f32> | |
%1499 = "tosa.mul"(%1496, %1498) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1500 = torch.aten.mul.Scalar %1497, %float7.978850e-01 : !torch.vtensor<[1,128,3072],f32>, !torch.float -> !torch.vtensor<[1,128,3072],f32> | |
%1501 = "tosa.tanh"(%1499) : (tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1502 = torch.aten.tanh %1500 : !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1503 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1504 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1505 = "tosa.mul"(%1503, %1504) {shift = 0 : i32} : (tensor<f32>, tensor<f32>) -> tensor<f32> | |
%1506 = "tosa.add"(%1501, %1505) : (tensor<1x128x3072xf32>, tensor<f32>) -> tensor<1x128x3072xf32> | |
%1507 = torch.aten.add.Scalar %1502, %float1.000000e00, %int1 : !torch.vtensor<[1,128,3072],f32>, !torch.float, !torch.int -> !torch.vtensor<[1,128,3072],f32> | |
%1508 = "tosa.mul"(%1486, %1506) {shift = 0 : i32} : (tensor<1x128x3072xf32>, tensor<1x128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1509 = torch.aten.mul.Tensor %1487, %1507 : !torch.vtensor<[1,128,3072],f32>, !torch.vtensor<[1,128,3072],f32> -> !torch.vtensor<[1,128,3072],f32> | |
%1510 = "tosa.reshape"(%1508) {new_shape = [-1, 3072]} : (tensor<1x128x3072xf32>) -> tensor<128x3072xf32> | |
%1511 = torch.aten.view %1509, %419 : !torch.vtensor<[1,128,3072],f32>, !torch.list<int> -> !torch.vtensor<[128,3072],f32> | |
%1512 = "tosa.reshape"(%1510) {new_shape = [1, 128, 3072]} : (tensor<128x3072xf32>) -> tensor<1x128x3072xf32> | |
%1513 = "tosa.reshape"(%13) {new_shape = [1, 3072, 768]} : (tensor<3072x768xf32>) -> tensor<1x3072x768xf32> | |
%1514 = "tosa.matmul"(%1512, %1513) : (tensor<1x128x3072xf32>, tensor<1x3072x768xf32>) -> tensor<1x128x768xf32> | |
%1515 = "tosa.reshape"(%1514) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%cast_77 = tensor.cast %1515 : tensor<128x768xf32> to tensor<128x768xf32> | |
%1516 = torch.aten.mm %1511, %14 : !torch.vtensor<[128,3072],f32>, !torch.vtensor<[3072,768],f32> -> !torch.vtensor<[128,768],f32> | |
%1517 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1518 = "tosa.mul"(%15, %1517) {shift = 0 : i32} : (tensor<768xf32>, tensor<f32>) -> tensor<768xf32> | |
%1519 = torch.aten.mul.Scalar %16, %int1 : !torch.vtensor<[768],f32>, !torch.int -> !torch.vtensor<[768],f32> | |
%1520 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1521 = "tosa.mul"(%cast_77, %1520) {shift = 0 : i32} : (tensor<128x768xf32>, tensor<f32>) -> tensor<128x768xf32> | |
%1522 = "tosa.add"(%1518, %1521) : (tensor<768xf32>, tensor<128x768xf32>) -> tensor<128x768xf32> | |
%1523 = torch.aten.add.Tensor %1519, %1516, %int1 : !torch.vtensor<[768],f32>, !torch.vtensor<[128,768],f32>, !torch.int -> !torch.vtensor<[128,768],f32> | |
%1524 = "tosa.reshape"(%1522) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1525 = torch.aten.view %1523, %240 : !torch.vtensor<[128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1526 = "tosa.const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32> | |
%1527 = "tosa.mul"(%1524, %1526) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<f32>) -> tensor<1x128x768xf32> | |
%1528 = "tosa.add"(%1448, %1527) : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1529 = torch.aten.add.Tensor %1449, %1525, %int1 : !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,768],f32>, !torch.int -> !torch.vtensor<[1,128,768],f32> | |
%1530 = "tosa.const"() {value = dense<7.680000e+02> : tensor<1xf32>} : () -> tensor<1xf32> | |
%1531 = "tosa.reciprocal"(%1530) : (tensor<1xf32>) -> tensor<1xf32> | |
%1532 = "tosa.reduce_sum"(%1528) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1533 = "tosa.reshape"(%1532) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1534 = "tosa.mul"(%1533, %1531) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1535 = "tosa.sub"(%1528, %1534) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1536 = "tosa.mul"(%1535, %1535) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1537 = "tosa.reduce_sum"(%1536) {axis = 2 : i64} : (tensor<1x128x768xf32>) -> tensor<1x128x1xf32> | |
%1538 = "tosa.reshape"(%1537) {new_shape = [1, 128, 1]} : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1539 = "tosa.mul"(%1538, %1531) {shift = 0 : i32} : (tensor<1x128x1xf32>, tensor<1xf32>) -> tensor<1x128x1xf32> | |
%1540 = "tosa.reshape"(%11) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1541 = "tosa.reshape"(%9) {new_shape = [1, 1, 768]} : (tensor<768xf32>) -> tensor<1x1x768xf32> | |
%1542 = "tosa.const"() {value = dense<9.99999974E-6> : tensor<f32>} : () -> tensor<f32> | |
%1543 = "tosa.sub"(%1528, %1534) : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1544 = "tosa.add"(%1539, %1542) : (tensor<1x128x1xf32>, tensor<f32>) -> tensor<1x128x1xf32> | |
%1545 = "tosa.rsqrt"(%1544) : (tensor<1x128x1xf32>) -> tensor<1x128x1xf32> | |
%1546 = "tosa.mul"(%1543, %1545) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x128x1xf32>) -> tensor<1x128x768xf32> | |
%1547 = "tosa.mul"(%1546, %1540) {shift = 0 : i32} : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%1548 = "tosa.add"(%1547, %1541) : (tensor<1x128x768xf32>, tensor<1x1x768xf32>) -> tensor<1x128x768xf32> | |
%result0_78, %result1_79, %result2_80 = torch.aten.native_layer_norm %1529, %202, %12, %10, %float1.000000e-05 : !torch.vtensor<[1,128,768],f32>, !torch.list<int>, !torch.vtensor<[768],f32>, !torch.vtensor<[768],f32>, !torch.float -> !torch.vtensor<[1,128,768],f32>, !torch.vtensor<[1,128,1],f32>, !torch.vtensor<[1,128,1],f32> | |
%1549 = "tosa.reshape"(%1548) {new_shape = [1, 128, 768]} : (tensor<1x128x768xf32>) -> tensor<1x128x768xf32> | |
%1550 = torch.aten.view %result0_78, %240 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[1,128,768],f32> | |
%1551 = "tosa.const"() {value = dense<[1, 0]> : tensor<2xi32>} : () -> tensor<2xi32> | |
%1552 = "tosa.transpose"(%7, %1551) : (tensor<2x768xf32>, tensor<2xi32>) -> tensor<768x2xf32> | |
%1553 = torch.aten.transpose.int %8, %int0, %int1 : !torch.vtensor<[2,768],f32>, !torch.int, !torch.int -> !torch.vtensor<[768,2],f32> | |
%1554 = torch.prim.ListConstruct %int128, %int768 : (!torch.int, !torch.int) -> !torch.list<int> | |
%1555 = "tosa.reshape"(%1549) {new_shape = [128, 768]} : (tensor<1x128x768xf32>) -> tensor<128x768xf32> | |
%1556 = torch.aten.view %1550, %1554 : !torch.vtensor<[1,128,768],f32>, !torch.list<int> -> !torch.vtensor<[128,768],f32> | |
%1557 = "tosa.reshape"(%1555) {new_shape = [1, 128, 768]} : (tensor<128x768xf32>) -> tensor<1x128x768xf32> | |
%1558 = "tosa.reshape"(%1552) {new_shape = [1, 768, 2]} : (tensor<768x2xf32>) -> tensor<1x768x2xf32> | |
%1559 = "tosa.matmul"(%1557, %1558) : (tensor<1x128x768xf32>, tensor<1x768x2xf32>) -> tensor<1x128x2xf32> | |
%1560 = "tosa.reshape"(%1559) {new_shape = [128, 2]} : (tensor<1x128x2xf32>) -> tensor<128x2xf32> | |
%cast_81 = tensor.cast %1560 : tensor<128x2xf32> to tensor<128x2xf32> | |
%1561 = torch.aten.mm %1556, %1553 : !torch.vtensor<[128,768],f32>, !torch.vtensor<[768,2],f32> -> !torch.vtensor<[128,2],f32> | |
%1562 = torch.prim.ListConstruct %int1, %int128, %int2 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%1563 = "tosa.reshape"(%cast_81) {new_shape = [1, 128, 2]} : (tensor<128x2xf32>) -> tensor<1x128x2xf32> | |
%1564 = torch.aten.view %1561, %1562 : !torch.vtensor<[128,2],f32>, !torch.list<int> -> !torch.vtensor<[1,128,2],f32> | |
%1565 = "tosa.const"() {value = dense<0> : tensor<1xi64>} : () -> tensor<1xi64> | |
%1566 = "tosa.cast"(%1565) : (tensor<1xi64>) -> tensor<1xi64> | |
%1567 = torch.aten.arange.start_step %int0, %int1, %int1, %none, %none, %cpu, %false : !torch.int, !torch.int, !torch.int, !torch.none, !torch.none, !torch.Device, !torch.bool -> !torch.vtensor<[1],si64> | |
%1568 = torch.aten.slice.Tensor %1564, %int1, %int-1, %int0, %int1 : !torch.vtensor<[1,128,2],f32>, !torch.int, !torch.int, !torch.int, !torch.int -> !torch.vtensor<[1,1,2],f32> | |
%1569 = torch.aten.squeeze.dim %1568, %int1 : !torch.vtensor<[1,1,2],f32>, !torch.int -> !torch.vtensor<[1,2],f32> | |
%1570 = torch.prim.ListConstruct %1567 : (!torch.vtensor<[1],si64>) -> !torch.list<vtensor> | |
%1571 = torch.aten.index.Tensor %1569, %1570 : !torch.vtensor<[1,2],f32>, !torch.list<vtensor> -> !torch.vtensor<[1,2],f32> | |
return %1571 : !torch.vtensor<[1,2],f32> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
torch-mlir-opt -pass-pipeline='builtin.module(torch-backend-to-tosa-backend-pipeline)' /tmp/_lambda.mlir -mlir-print-ir-after-all -mlir-disable-threading --debug