Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AmosLewis/969a8e1e6f70c3d4a874b27c70e1484c to your computer and use it in GitHub Desktop.
Save AmosLewis/969a8e1e6f70c3d4a874b27c70e1484c to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
#map = affine_map<(d0, d1) -> (d0, d1)>
#map1 = affine_map<() -> ()>
#map2 = affine_map<(d0, d1) -> ()>
#map3 = affine_map<()[s0, s1] -> (s0 * s1)>
#map4 = affine_map<(d0, d1) -> (d0)>
#map5 = affine_map<(d0, d1, d2) -> (d0, d1, d2)>
#map6 = affine_map<(d0) -> (d0)>
#map7 = affine_map<(d0, d1, d2) -> (d0, d1, 0)>
#map8 = affine_map<(d0) -> ()>
#map9 = affine_map<(d0, d1, d2, d3) -> (d0, d1, d2, d3)>
#map10 = affine_map<(d0, d1, d2) -> ()>
#map11 = affine_map<(d0, d1) -> (d1)>
#map12 = affine_map<(d0, d1) -> (d0, 0)>
#map13 = affine_map<(d0, d1, d2, d3) -> ()>
#map14 = affine_map<(d0, d1, d2) -> (d2)>
#map15 = affine_map<()[s0, s1] -> (s0 + s1)>
#map16 = affine_map<(d0, d1, d2) -> (d1, d2)>
#map17 = affine_map<(d0, d1, d2, d3) -> (d0, d2, d1, d3)>
#map18 = affine_map<(d0, d1, d2) -> (d0, d2, d1)>
#map19 = affine_map<(d0, d1, d2) -> (d0, d1)>
module {
ml_program.global private mutable @global_seed(dense<0> : tensor<i64>) : tensor<i64>
func.func @main_graph(%arg0: tensor<?x?xi64>, %arg1: tensor<?x?xi64>, %arg2: tensor<?x12x?x64xf32>, %arg3: tensor<?x12x?x64xf32>, %arg4: tensor<?x12x?x64xf32>, %arg5: tensor<?x12x?x64xf32>, %arg6: tensor<?x12x?x64xf32>, %arg7: tensor<?x12x?x64xf32>, %arg8: tensor<?x12x?x64xf32>, %arg9: tensor<?x12x?x64xf32>, %arg10: tensor<?x12x?x64xf32>, %arg11: tensor<?x12x?x64xf32>, %arg12: tensor<?x12x?x64xf32>, %arg13: tensor<?x12x?x64xf32>, %arg14: tensor<?x12x?x64xf32>, %arg15: tensor<?x12x?x64xf32>, %arg16: tensor<?x12x?x64xf32>, %arg17: tensor<?x12x?x64xf32>, %arg18: tensor<?x12x?x64xf32>, %arg19: tensor<?x12x?x64xf32>, %arg20: tensor<?x12x?x64xf32>, %arg21: tensor<?x12x?x64xf32>, %arg22: tensor<?x12x?x64xf32>, %arg23: tensor<?x12x?x64xf32>, %arg24: tensor<?x12x?x64xf32>, %arg25: tensor<?x12x?x64xf32>) -> (tensor<?x?x50272xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) {
%cst = arith.constant dense<2.550000e+02> : tensor<f64>
%c2 = arith.constant 2 : index
%cst_0 = arith.constant 0.000000e+00 : f32
%cst_1 = arith.constant 0xFF800000 : f32
%cst_2 = arith.constant 0x7F800000 : f32
%cst_3 = arith.constant 2.550000e+02 : f32
%c-128_i32 = arith.constant -128 : i32
%c-128_i8 = arith.constant -128 : i8
%c0_i32 = arith.constant 0 : i32
%c12_i64 = arith.constant 12 : i64
%c64_i64 = arith.constant 64 : i64
%c12 = arith.constant 12 : index
%c2_i64 = arith.constant 2 : i64
%c9223372036854775807 = arith.constant 9223372036854775807 : index
%cst_4 = arith.constant 7.680000e+02 : f32
%c768_i64 = arith.constant 768 : i64
%cst_5 = arith.constant dense<0.000000e+00> : tensor<f64>
%cst_6 = arith.constant dense<-3.4028234663852886E+38> : tensor<f64>
%cst_7 = arith.constant dense<64> : tensor<i64>
%cst_8 = arith.constant dense<768> : tensor<i64>
%cst_9 = arith.constant dense<-1> : tensor<4xi64>
%c2050_i64 = arith.constant 2050 : i64
%cst_10 = arith.constant dense<1> : tensor<4xi64>
%c50272_i64 = arith.constant 50272 : i64
%c0_i64 = arith.constant 0 : i64
%c1_i64 = arith.constant 1 : i64
%cst_11 = arith.constant dense_resource<__elided__> : tensor<50272x768xf32>
%cst_12 = arith.constant dense_resource<__elided__> : tensor<2050x768xf32>
%cst_13 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_14 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_15 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_16 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_17 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_18 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_19 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_20 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_21 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_22 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_23 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_24 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_25 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_26 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_27 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_28 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_29 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_30 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_31 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_32 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_33 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_34 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_35 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_36 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_37 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_38 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_39 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_40 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_41 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_42 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_43 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_44 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_45 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_46 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_47 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_48 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_49 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_50 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_51 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_52 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_53 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_54 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_55 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_56 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_57 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_58 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_59 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_60 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_61 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_62 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_63 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_64 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_65 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_66 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_67 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_68 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_69 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_70 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_71 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_72 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_73 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_74 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_75 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_76 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_77 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_78 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_79 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_80 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_81 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_82 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_83 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_84 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_85 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_86 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_87 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_88 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_89 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_90 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_91 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_92 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_93 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_94 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_95 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_96 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_97 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_98 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_99 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_100 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_101 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_102 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_103 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_104 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_105 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_106 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_107 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_108 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_109 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_110 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_111 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_112 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_113 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_114 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_115 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_116 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_117 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_118 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_119 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_120 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_121 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_122 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_123 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_124 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_125 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_126 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_127 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_128 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_129 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_130 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_131 = arith.constant dense_resource<__elided__> : tensor<3072xf32>
%cst_132 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_133 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_134 = arith.constant dense_resource<__elided__> : tensor<768xf32>
%cst_135 = arith.constant dense<0.0118838353> : tensor<f32>
%cst_136 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_137 = arith.constant dense<0.0125419935> : tensor<f32>
%cst_138 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_139 = arith.constant dense<0.00299873739> : tensor<f32>
%cst_140 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_141 = arith.constant dense<0.00612466177> : tensor<f32>
%cst_142 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_143 = arith.constant dense<0.0079568345> : tensor<f32>
%cst_144 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_145 = arith.constant dense<0.00789708457> : tensor<f32>
%cst_146 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_147 = arith.constant dense<0.010433659> : tensor<f32>
%cst_148 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_149 = arith.constant dense<0.0136971604> : tensor<f32>
%cst_150 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_151 = arith.constant dense<0.00239531975> : tensor<f32>
%cst_152 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_153 = arith.constant dense<0.00707815587> : tensor<f32>
%cst_154 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_155 = arith.constant dense<0.0113380831> : tensor<f32>
%cst_156 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_157 = arith.constant dense<0.0094657354> : tensor<f32>
%cst_158 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_159 = arith.constant dense<0.0175963696> : tensor<f32>
%cst_160 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_161 = arith.constant dense<0.0132530695> : tensor<f32>
%cst_162 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_163 = arith.constant dense<0.00454129511> : tensor<f32>
%cst_164 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_165 = arith.constant dense<0.00323726633> : tensor<f32>
%cst_166 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_167 = arith.constant dense<0.0176051315> : tensor<f32>
%cst_168 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_169 = arith.constant dense<0.00898898859> : tensor<f32>
%cst_170 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_171 = arith.constant dense<0.0180873219> : tensor<f32>
%cst_172 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_173 = arith.constant dense<0.0165697504> : tensor<f32>
%cst_174 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_175 = arith.constant dense<0.00545453839> : tensor<f32>
%cst_176 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_177 = arith.constant dense<0.00394085282> : tensor<f32>
%cst_178 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_179 = arith.constant dense<0.012627298> : tensor<f32>
%cst_180 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_181 = arith.constant dense<8.381520e-03> : tensor<f32>
%cst_182 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_183 = arith.constant dense<0.0160656292> : tensor<f32>
%cst_184 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_185 = arith.constant dense<0.0184960905> : tensor<f32>
%cst_186 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_187 = arith.constant dense<7.596340e-03> : tensor<f32>
%cst_188 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_189 = arith.constant dense<0.00217419723> : tensor<f32>
%cst_190 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_191 = arith.constant dense<0.0187151935> : tensor<f32>
%cst_192 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_193 = arith.constant dense<0.00828155782> : tensor<f32>
%cst_194 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_195 = arith.constant dense<0.0174627136> : tensor<f32>
%cst_196 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_197 = arith.constant dense<0.0184990317> : tensor<f32>
%cst_198 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_199 = arith.constant dense<0.00344777643> : tensor<f32>
%cst_200 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_201 = arith.constant dense<0.00161574956> : tensor<f32>
%cst_202 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_203 = arith.constant dense<0.0133577287> : tensor<f32>
%cst_204 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_205 = arith.constant dense<0.00821235217> : tensor<f32>
%cst_206 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_207 = arith.constant dense<0.0146707231> : tensor<f32>
%cst_208 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_209 = arith.constant dense<0.0191107839> : tensor<f32>
%cst_210 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_211 = arith.constant dense<0.0042488547> : tensor<f32>
%cst_212 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_213 = arith.constant dense<0.00208000117> : tensor<f32>
%cst_214 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_215 = arith.constant dense<0.01240745> : tensor<f32>
%cst_216 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_217 = arith.constant dense<0.00794322137> : tensor<f32>
%cst_218 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_219 = arith.constant dense<0.0151966754> : tensor<f32>
%cst_220 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_221 = arith.constant dense<0.0198152866> : tensor<f32>
%cst_222 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_223 = arith.constant dense<0.00556773599> : tensor<f32>
%cst_224 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_225 = arith.constant dense<0.00150713581> : tensor<f32>
%cst_226 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_227 = arith.constant dense<0.0154742412> : tensor<f32>
%cst_228 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_229 = arith.constant dense<0.00787401571> : tensor<f32>
%cst_230 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_231 = arith.constant dense<0.0162585955> : tensor<f32>
%cst_232 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_233 = arith.constant dense<0.0185864698> : tensor<f32>
%cst_234 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_235 = arith.constant dense<0.00519847311> : tensor<f32>
%cst_236 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_237 = arith.constant dense<0.00233375374> : tensor<f32>
%cst_238 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_239 = arith.constant dense<0.0184934419> : tensor<f32>
%cst_240 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_241 = arith.constant dense<0.00704355305> : tensor<f32>
%cst_242 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_243 = arith.constant dense<0.0180700831> : tensor<f32>
%cst_244 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_245 = arith.constant dense<1.692060e-02> : tensor<f32>
%cst_246 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_247 = arith.constant dense<0.00660017226> : tensor<f32>
%cst_248 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_249 = arith.constant dense<0.00270477054> : tensor<f32>
%cst_250 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_251 = arith.constant dense<0.0184166115> : tensor<f32>
%cst_252 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_253 = arith.constant dense<0.00502506783> : tensor<f32>
%cst_254 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_255 = arith.constant dense<0.0171747468> : tensor<f32>
%cst_256 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_257 = arith.constant dense<0.0171191972> : tensor<f32>
%cst_258 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_259 = arith.constant dense<0.00597049948> : tensor<f32>
%cst_260 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_261 = arith.constant dense<0.00272207195> : tensor<f32>
%cst_262 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_263 = arith.constant dense<0.0146255773> : tensor<f32>
%cst_264 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_265 = arith.constant dense<0.00615926413> : tensor<f32>
%cst_266 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_267 = arith.constant dense<0.0176132508> : tensor<f32>
%cst_268 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_269 = arith.constant dense<0.0142887076> : tensor<f32>
%cst_270 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_271 = arith.constant dense<0.00848853309> : tensor<f32>
%cst_272 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_273 = arith.constant dense<0.00703970855> : tensor<f32>
%cst_274 = arith.constant dense_resource<__elided__> : tensor<768x768xi8>
%cst_275 = arith.constant dense<0.0189423561> : tensor<f32>
%cst_276 = arith.constant dense_resource<__elided__> : tensor<768x3072xi8>
%cst_277 = arith.constant dense<0.0122877704> : tensor<f32>
%cst_278 = arith.constant dense_resource<__elided__> : tensor<3072x768xi8>
%cst_279 = arith.constant dense<0.00421382859> : tensor<f32>
%cst_280 = arith.constant dense_resource<__elided__> : tensor<768x50272xi8>
%cst_281 = arith.constant dense<1> : tensor<i64>
%cst_282 = arith.constant dense<-1> : tensor<1xi64>
%cst_283 = arith.constant dense<2> : tensor<i64>
%cst_284 = arith.constant dense<1> : tensor<1xi64>
%cst_285 = arith.constant dense<0.000000e+00> : tensor<f32>
%cst_286 = arith.constant dense<1.000000e+00> : tensor<f32>
%cst_287 = arith.constant dense<-3.40282347E+38> : tensor<f32>
%cst_288 = arith.constant dense<2.000000e+00> : tensor<f32>
%cst_289 = arith.constant dense<9.99999974E-6> : tensor<f32>
%cst_290 = arith.constant dense<1.250000e-01> : tensor<f32>
%cst_291 = arith.constant dense<64> : tensor<1xi64>
%cst_292 = arith.constant dense<12> : tensor<i64>
%cst_293 = arith.constant dense<768> : tensor<1xi64>
%c0 = arith.constant 0 : index
%c1 = arith.constant 1 : index
%dim = tensor.dim %arg1, %c0 : tensor<?x?xi64>
%0 = arith.index_cast %dim : index to i64
%dim_294 = tensor.dim %arg1, %c1 : tensor<?x?xi64>
%1 = arith.index_cast %dim_294 : index to i64
%dim_295 = tensor.dim %arg0, %c0 : tensor<?x?xi64>
%2 = arith.index_cast %dim_295 : index to i64
%dim_296 = tensor.dim %arg0, %c1 : tensor<?x?xi64>
%3 = arith.index_cast %dim_296 : index to i64
%dim_297 = tensor.dim %arg2, %c2 : tensor<?x12x?x64xf32>
%4 = arith.index_cast %dim_297 : index to i64
%5 = tensor.empty(%dim, %dim_294) : tensor<?x?xi64>
%6 = linalg.fill ins(%c0_i64 : i64) outs(%5 : tensor<?x?xi64>) -> tensor<?x?xi64>
%7 = tensor.empty(%dim) : tensor<?xi64>
%8 = linalg.fill ins(%c0_i64 : i64) outs(%7 : tensor<?xi64>) -> tensor<?xi64>
%9:2 = tm_tensor.scan dimension(1) inclusive(true) ins(%arg1 : tensor<?x?xi64>) outs(%6, %8 : tensor<?x?xi64>, tensor<?xi64>) {
^bb0(%arg26: i64, %arg27: i64):
%6766 = arith.addi %arg26, %arg27 : i64
tm_tensor.yield %6766 : i64
} -> tensor<?x?xi64>, tensor<?xi64>
%10 = tensor.empty() : tensor<i64>
%11 = linalg.fill ins(%3 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%12 = linalg.fill ins(%4 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%expanded = tensor.expand_shape %arg1 [[0], [1, 2, 3]] output_shape [%dim, 1, 1, %dim_294] : tensor<?x?xi64> into tensor<?x1x1x?xi64>
%dim_298 = tensor.dim %9#0, %c0 : tensor<?x?xi64>
%dim_299 = tensor.dim %9#0, %c1 : tensor<?x?xi64>
%13 = arith.cmpi eq, %dim_298, %dim : index
cf.assert %13, "mismatched size for broadcast"
%14 = arith.cmpi eq, %dim_299, %dim_294 : index
cf.assert %14, "mismatched size for broadcast"
%15 = tensor.empty(%dim_298, %dim_299) : tensor<?x?xi64>
%16 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%9#0, %arg1 : tensor<?x?xi64>, tensor<?x?xi64>) outs(%15 : tensor<?x?xi64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%17 = tensor.empty() : tensor<1xi64>
%18 = linalg.fill ins(%2 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%19 = linalg.fill ins(%3 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%20 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%11, %12 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.addi %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%from_elements = tensor.from_elements %0, %c1_i64, %3, %1 : tensor<4xi64>
%expanded_300 = tensor.expand_shape %20 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%21 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%16, %cst_281 : tensor<?x?xi64>, tensor<i64>) outs(%15 : tensor<?x?xi64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.subi %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%22 = arith.cmpi slt, %3, %c0_i64 : i64
%23 = arith.select %22, %c1_i64, %3 : i64
%24 = arith.select %22, %c2_i64, %c1_i64 : i64
%25 = arith.cmpi sle, %24, %c1_i64 : i64
cf.assert %25, "must have at most one inferred (negative) dimension"
%26 = arith.muli %2, %3 : i64
%27 = arith.divsi %26, %23 : i64
%28 = arith.select %22, %27, %3 : i64
%from_elements_301 = tensor.from_elements %27, %28 : tensor<2xi64>
%reshape = tensor.reshape %arg0(%from_elements_301) : (tensor<?x?xi64>, tensor<2xi64>) -> tensor<?x?xi64>
%collapsed = tensor.collapse_shape %17 [] : tensor<1xi64> into tensor<i64>
%29 = linalg.fill ins(%3 : i64) outs(%collapsed : tensor<i64>) -> tensor<i64>
%extracted = tensor.extract %29[] : tensor<i64>
%30 = tensor.empty() : tensor<f32>
%31 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%cst_6 : tensor<f64>) outs(%30 : tensor<f32>) {
^bb0(%in: f64, %out: f32):
%6766 = arith.truncf %in : f64 to f32
linalg.yield %6766 : f32
} -> tensor<f32>
%32 = arith.cmpi sge, %extracted, %c0_i64 : i64
cf.assert %32, "negative values not allowed in new dimensions"
%33 = arith.index_cast %extracted : i64 to index
cf.assert %32, "negative values not allowed in new dimensions"
%34 = tensor.empty(%33, %33) : tensor<?x?xf32>
%35 = linalg.generic {indexing_maps = [#map2, #map], iterator_types = ["parallel", "parallel"]} ins(%31 : tensor<f32>) outs(%34 : tensor<?x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?xf32>
%36 = linalg.fill ins(%4 : i64) outs(%collapsed : tensor<i64>) -> tensor<i64>
%extracted_302 = tensor.extract %36[] : tensor<i64>
%37 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%cst_5 : tensor<f64>) outs(%30 : tensor<f32>) {
^bb0(%in: f64, %out: f32):
%6766 = arith.truncf %in : f64 to f32
linalg.yield %6766 : f32
} -> tensor<f32>
cf.assert %32, "negative values not allowed in new dimensions"
%38 = arith.cmpi sge, %extracted_302, %c0_i64 : i64
cf.assert %38, "negative values not allowed in new dimensions"
%39 = arith.index_cast %extracted_302 : i64 to index
%40 = tensor.empty(%33, %39) : tensor<?x?xf32>
%41 = linalg.generic {indexing_maps = [#map2, #map], iterator_types = ["parallel", "parallel"]} ins(%37 : tensor<f32>) outs(%40 : tensor<?x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?xf32>
%concat = tensor.concat dim(0) %18, %cst_284, %19, %expanded_300 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<4xi64>
%42 = arith.index_cast %dim_299 : index to i64
%43 = arith.addi %4, %42 : i64
%44 = arith.cmpi sge, %4, %c0_i64 : i64
%45 = arith.select %44, %4, %43 : i64
%46 = arith.cmpi slt, %45, %c0_i64 : i64
%47 = arith.select %46, %c0_i64, %45 : i64
%48 = arith.cmpi sgt, %47, %42 : i64
%49 = arith.select %48, %42, %47 : i64
%50 = arith.index_cast %49 : i64 to index
%51 = arith.cmpi slt, %dim_299, %c9223372036854775807 : index
%52 = arith.select %51, %dim_299, %c9223372036854775807 : index
%53 = arith.subi %52, %50 : index
%54 = arith.cmpi slt, %53, %c0 : index
%55 = arith.select %54, %c0, %53 : index
%extracted_slice = tensor.extract_slice %21[0, %50] [%dim_298, %55] [1, 1] : tensor<?x?xi64> to tensor<?x?xi64>
%56 = arith.index_cast %27 : i64 to index
%57 = arith.index_cast %28 : i64 to index
%58 = tensor.empty(%56, %57) : tensor<?x?xi1>
%59 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape : tensor<?x?xi64>) outs(%58 : tensor<?x?xi1>) {
^bb0(%in: i64, %out: i1):
%6766 = arith.cmpi slt, %in, %c0_i64 : i64
linalg.yield %6766 : i1
} -> tensor<?x?xi1>
%60 = tensor.empty(%56, %57) : tensor<?x?xi64>
%61 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape : tensor<?x?xi64>) outs(%60 : tensor<?x?xi64>) {
^bb0(%in: i64, %out: i64):
%6766 = arith.addi %in, %c50272_i64 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%62 = linalg.generic {indexing_maps = [#map, #map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%59, %61, %reshape : tensor<?x?xi1>, tensor<?x?xi64>, tensor<?x?xi64>) outs(%60 : tensor<?x?xi64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%collapsed_303 = tensor.collapse_shape %62 [[0, 1]] : tensor<?x?xi64> into tensor<?xi64>
%63 = affine.apply #map3()[%56, %57]
%64 = tensor.empty(%63) : tensor<?x768xf32>
%65 = linalg.generic {indexing_maps = [#map4, #map], iterator_types = ["parallel", "parallel"]} ins(%collapsed_303 : tensor<?xi64>) outs(%64 : tensor<?x768xf32>) {
^bb0(%in: i64, %out: f32):
%6766 = arith.index_cast %in : i64 to index
%6767 = linalg.index 1 : index
%extracted_1373 = tensor.extract %cst_11[%6766, %6767] : tensor<50272x768xf32>
linalg.yield %extracted_1373 : f32
} -> tensor<?x768xf32>
%from_elements_304 = tensor.from_elements %27, %28, %c768_i64 : tensor<3xi64>
%reshape_305 = tensor.reshape %65(%from_elements_304) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%66 = tensor.empty(%dim_298, %55) : tensor<?x?xi64>
%67 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%extracted_slice, %cst_283 : tensor<?x?xi64>, tensor<i64>) outs(%66 : tensor<?x?xi64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.addi %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%68 = tensor.empty(%dim_298, %55) : tensor<?x?xi1>
%69 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%67 : tensor<?x?xi64>) outs(%68 : tensor<?x?xi1>) {
^bb0(%in: i64, %out: i1):
%6766 = arith.cmpi slt, %in, %c0_i64 : i64
linalg.yield %6766 : i1
} -> tensor<?x?xi1>
%70 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%67 : tensor<?x?xi64>) outs(%66 : tensor<?x?xi64>) {
^bb0(%in: i64, %out: i64):
%6766 = arith.addi %in, %c2050_i64 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%71 = linalg.generic {indexing_maps = [#map, #map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%69, %70, %67 : tensor<?x?xi1>, tensor<?x?xi64>, tensor<?x?xi64>) outs(%66 : tensor<?x?xi64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<?x?xi64>
%72 = arith.index_cast %dim_298 : index to i64
%73 = arith.index_cast %55 : index to i64
%collapsed_306 = tensor.collapse_shape %71 [[0, 1]] : tensor<?x?xi64> into tensor<?xi64>
%74 = affine.apply #map3()[%dim_298, %55]
%75 = tensor.empty(%74) : tensor<?x768xf32>
%76 = linalg.generic {indexing_maps = [#map4, #map], iterator_types = ["parallel", "parallel"]} ins(%collapsed_306 : tensor<?xi64>) outs(%75 : tensor<?x768xf32>) {
^bb0(%in: i64, %out: f32):
%6766 = arith.index_cast %in : i64 to index
%6767 = linalg.index 1 : index
%extracted_1373 = tensor.extract %cst_12[%6766, %6767] : tensor<2050x768xf32>
linalg.yield %extracted_1373 : f32
} -> tensor<?x768xf32>
%from_elements_307 = tensor.from_elements %72, %73, %c768_i64 : tensor<3xi64>
%reshape_308 = tensor.reshape %76(%from_elements_307) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%77 = linalg.fill ins(%extracted : i64) outs(%collapsed : tensor<i64>) -> tensor<i64>
%78 = arith.index_cast %27 : i64 to index
%79 = arith.index_cast %28 : i64 to index
%80 = arith.index_cast %72 : i64 to index
%81 = arith.cmpi eq, %78, %80 : index
cf.assert %81, "mismatched size for broadcast"
%82 = arith.index_cast %73 : i64 to index
%83 = arith.cmpi eq, %79, %82 : index
cf.assert %83, "mismatched size for broadcast"
%84 = tensor.empty(%78, %79) : tensor<?x?x768xf32>
%85 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_305, %reshape_308 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%86 = linalg.fill ins(%extracted : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%87 = tensor.empty() : tensor<4xi1>
%88 = linalg.generic {indexing_maps = [#map6, #map6, #map6], iterator_types = ["parallel"]} ins(%from_elements, %cst_9 : tensor<4xi64>, tensor<4xi64>) outs(%87 : tensor<4xi1>) {
^bb0(%in: i64, %in_1373: i64, %out: i1):
%6766 = arith.cmpi eq, %in, %in_1373 : i64
linalg.yield %6766 : i1
} -> tensor<4xi1>
%89 = tensor.empty(%78, %79) : tensor<?x?x1xf32>
%90 = linalg.fill ins(%cst_0 : f32) outs(%89 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%91 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%85 : tensor<?x?x768xf32>) outs(%90 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%92 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%91 : tensor<?x?x1xf32>) outs(%89 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%extracted_309 = tensor.extract %77[] : tensor<i64>
%93 = arith.index_cast %extracted_309 : i64 to index
%94 = tensor.empty(%93) : tensor<?xi64>
%95 = linalg.generic {indexing_maps = [#map6], iterator_types = ["parallel"]} outs(%94 : tensor<?xi64>) {
^bb0(%out: i64):
%6766 = linalg.index 0 : index
%6767 = arith.index_cast %6766 : index to i64
linalg.yield %6767 : i64
} -> tensor<?xi64>
%concat_310 = tensor.concat dim(0) %86, %cst_284 : (tensor<1xi64>, tensor<1xi64>) -> tensor<2xi64>
%96 = tensor.empty() : tensor<4xi64>
%97 = linalg.generic {indexing_maps = [#map6, #map6, #map6, #map6], iterator_types = ["parallel"]} ins(%88, %cst_10, %from_elements : tensor<4xi1>, tensor<4xi64>, tensor<4xi64>) outs(%96 : tensor<4xi64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<4xi64>
%98 = linalg.generic {indexing_maps = [#map6, #map6, #map6], iterator_types = ["parallel"]} ins(%concat, %cst_9 : tensor<4xi64>, tensor<4xi64>) outs(%87 : tensor<4xi1>) {
^bb0(%in: i64, %in_1373: i64, %out: i1):
%6766 = arith.cmpi eq, %in, %in_1373 : i64
linalg.yield %6766 : i1
} -> tensor<4xi1>
%99 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%85, %92 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%100 = linalg.generic {indexing_maps = [#map6, #map8, #map6], iterator_types = ["parallel"]} ins(%95, %cst_281 : tensor<?xi64>, tensor<i64>) outs(%94 : tensor<?xi64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.addi %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<?xi64>
%extracted_slice_311 = tensor.extract_slice %97[0] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_312 = tensor.collapse_shape %extracted_slice_311 [] : tensor<1xi64> into tensor<i64>
%extracted_313 = tensor.extract %collapsed_312[] : tensor<i64>
%101 = arith.maxsi %extracted_313, %0 : i64
%extracted_slice_314 = tensor.extract_slice %97[1] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_315 = tensor.collapse_shape %extracted_slice_314 [] : tensor<1xi64> into tensor<i64>
%extracted_316 = tensor.extract %collapsed_315[] : tensor<i64>
%102 = arith.maxsi %extracted_316, %c1_i64 : i64
%extracted_slice_317 = tensor.extract_slice %97[2] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_318 = tensor.collapse_shape %extracted_slice_317 [] : tensor<1xi64> into tensor<i64>
%extracted_319 = tensor.extract %collapsed_318[] : tensor<i64>
%103 = arith.maxsi %extracted_319, %c1_i64 : i64
%extracted_slice_320 = tensor.extract_slice %97[3] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_321 = tensor.collapse_shape %extracted_slice_320 [] : tensor<1xi64> into tensor<i64>
%extracted_322 = tensor.extract %collapsed_321[] : tensor<i64>
%104 = arith.maxsi %extracted_322, %1 : i64
%105 = arith.index_cast %101 : i64 to index
%106 = arith.cmpi sge, %101, %c0_i64 : i64
cf.assert %106, "unimplemented: dynamic negative broadcast sizes"
%107 = arith.cmpi slt, %102, %c0_i64 : i64
%108 = arith.index_cast %102 : i64 to index
%109 = arith.select %107, %c1, %108 : index
%110 = arith.cmpi slt, %103, %c0_i64 : i64
%111 = arith.index_cast %103 : i64 to index
%112 = arith.select %110, %c1, %111 : index
%113 = arith.index_cast %104 : i64 to index
%114 = arith.cmpi sge, %104, %c0_i64 : i64
cf.assert %114, "unimplemented: dynamic negative broadcast sizes"
%115 = tensor.empty(%105, %112, %113) : tensor<?x12x?x?xi64>
%116 = linalg.generic {indexing_maps = [#map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} outs(%115 : tensor<?x12x?x?xi64>) {
^bb0(%out: i64):
%6766 = linalg.index 0 : index
%6767 = linalg.index 3 : index
%6768 = arith.cmpi eq, %dim, %c1 : index
%6769 = arith.select %6768, %c0, %6766 : index
%6770 = arith.cmpi eq, %dim_294, %c1 : index
%6771 = arith.select %6770, %c0, %6767 : index
%extracted_1373 = tensor.extract %expanded[%6769, %c0, %c0, %6771] : tensor<?x1x1x?xi64>
linalg.yield %extracted_1373 : i64
} -> tensor<?x12x?x?xi64>
%117 = linalg.generic {indexing_maps = [#map6, #map6, #map6, #map6], iterator_types = ["parallel"]} ins(%98, %cst_10, %concat : tensor<4xi1>, tensor<4xi64>, tensor<4xi64>) outs(%96 : tensor<4xi64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<4xi64>
%118 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%99, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%extracted_slice_323 = tensor.extract_slice %concat_310[0] [1] [1] : tensor<2xi64> to tensor<1xi64>
%extracted_324 = tensor.extract %extracted_slice_323[%c0] : tensor<1xi64>
%119 = arith.cmpi eq, %extracted_324, %c0_i64 : i64
%120 = arith.extui %119 : i1 to i64
%121 = arith.cmpi ne, %120, %c0_i64 : i64
%122 = tensor.empty() : tensor<i1>
%123 = linalg.fill ins(%121 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%124 = linalg.fill ins(%extracted_309 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%125 = linalg.fill ins(%extracted_324 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%126 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%123, %124, %125 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_325 = tensor.extract %126[] : tensor<i64>
%extracted_slice_326 = tensor.extract_slice %concat_310[1] [1] [1] : tensor<2xi64> to tensor<1xi64>
%extracted_327 = tensor.extract %extracted_slice_326[%c0] : tensor<1xi64>
%127 = arith.cmpi slt, %extracted_325, %c0_i64 : i64
%128 = arith.select %127, %c1_i64, %extracted_325 : i64
%129 = arith.extui %127 : i1 to i64
%130 = arith.muli %128, %extracted_327 : i64
%131 = arith.addi %129, %c1_i64 : i64
%132 = arith.cmpi slt, %extracted_327, %c0_i64 : i64
%133 = arith.select %132, %128, %130 : i64
%134 = arith.select %132, %131, %129 : i64
%135 = arith.cmpi sle, %134, %c1_i64 : i64
cf.assert %135, "must have at most one inferred (negative) dimension"
%136 = arith.divsi %extracted_309, %133 : i64
%137 = arith.select %127, %136, %extracted_325 : i64
%138 = arith.select %132, %136, %extracted_327 : i64
%from_elements_328 = tensor.from_elements %137, %138 : tensor<2xi64>
%reshape_329 = tensor.reshape %100(%from_elements_328) : (tensor<?xi64>, tensor<2xi64>) -> tensor<?x1xi64>
%139 = tensor.empty(%105, %112, %113) : tensor<?x12x?x?xf32>
%140 = linalg.generic {indexing_maps = [#map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%116 : tensor<?x12x?x?xi64>) outs(%139 : tensor<?x12x?x?xf32>) {
^bb0(%in: i64, %out: f32):
%6766 = arith.sitofp %in : i64 to f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%141 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%118 : tensor<?x?x768xf32>) outs(%90 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%142 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%141 : tensor<?x?x1xf32>) outs(%89 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%143 = arith.index_cast %137 : i64 to index
%144 = tensor.empty(%143, %93) : tensor<?x?xi1>
%145 = linalg.generic {indexing_maps = [#map11, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%95, %reshape_329 : tensor<?xi64>, tensor<?x1xi64>) outs(%144 : tensor<?x?xi1>) {
^bb0(%in: i64, %in_1373: i64, %out: i1):
%6766 = arith.cmpi slt, %in, %in_1373 : i64
linalg.yield %6766 : i1
} -> tensor<?x?xi1>
%146 = linalg.generic {indexing_maps = [#map13, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%cst_286, %140 : tensor<f32>, tensor<?x12x?x?xf32>) outs(%139 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%147 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%142, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%89 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%148 = tensor.empty(%105, %112, %113) : tensor<?x12x?x?xi1>
%149 = linalg.generic {indexing_maps = [#map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%146 : tensor<?x12x?x?xf32>) outs(%148 : tensor<?x12x?x?xi1>) {
^bb0(%in: f32, %out: i1):
%6766 = arith.cmpf une, %in, %cst_0 : f32
linalg.yield %6766 : i1
} -> tensor<?x12x?x?xi1>
%150 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%147 : tensor<?x?x1xf32>) outs(%89 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%151 = arith.cmpi eq, %143, %33 : index
cf.assert %151, "mismatched size for broadcast"
%152 = arith.cmpi eq, %93, %33 : index
cf.assert %152, "mismatched size for broadcast"
%153 = tensor.empty(%143, %93) : tensor<?x?xf32>
%154 = linalg.generic {indexing_maps = [#map, #map2, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%145, %cst_285, %35 : tensor<?x?xi1>, tensor<f32>, tensor<?x?xf32>) outs(%153 : tensor<?x?xf32>) {
^bb0(%in: i1, %in_1373: f32, %in_1374: f32, %out: f32):
%6766 = arith.select %in, %in_1373, %in_1374 : f32
linalg.yield %6766 : f32
} -> tensor<?x?xf32>
%155 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%99, %150 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%156 = linalg.generic {indexing_maps = [#map9, #map13, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%149, %cst_287, %146 : tensor<?x12x?x?xi1>, tensor<f32>, tensor<?x12x?x?xf32>) outs(%139 : tensor<?x12x?x?xf32>) {
^bb0(%in: i1, %in_1373: f32, %in_1374: f32, %out: f32):
%6766 = arith.select %in, %in_1373, %in_1374 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%157 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%155, %cst_19 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_330 = tensor.concat dim(1) %41, %154 : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
%158 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%157, %cst_20 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%159 = linalg.fill ins(%cst_1 : f32) outs(%30 : tensor<f32>) -> tensor<f32>
%160 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%158 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%161 = linalg.fill ins(%cst_2 : f32) outs(%30 : tensor<f32>) -> tensor<f32>
%162 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%158 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%163 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%160, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%164 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%162, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%165 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%163, %164 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%166 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%cst : tensor<f64>) outs(%30 : tensor<f32>) {
^bb0(%in: f64, %out: f32):
%6766 = arith.truncf %in : f64 to f32
linalg.yield %6766 : f32
} -> tensor<f32>
%167 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%165, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%168 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%162, %167 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%169 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %168 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%170 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%169 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%171 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%170 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%172 = tensor.empty() : tensor<i8>
%173 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%171 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_331 = tensor.extract %173[] : tensor<i8>
%174 = arith.extui %extracted_331 : i8 to i64
%extracted_332 = tensor.extract %167[] : tensor<f32>
%175 = arith.extf %extracted_332 : f32 to f64
%176 = tensor.empty(%78, %79) : tensor<?x?x768xi8>
%177 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%158 : tensor<?x?x768xf32>) outs(%176 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %174 : i64 to f32
%6767 = arith.truncf %175 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%dim_333 = tensor.dim %41, %c0 : tensor<?x?xf32>
%dim_334 = tensor.dim %41, %c1 : tensor<?x?xf32>
%dim_335 = tensor.dim %154, %c1 : tensor<?x?xf32>
%178 = affine.apply #map15()[%dim_334, %dim_335]
%expanded_336 = tensor.expand_shape %concat_330 [[0, 1, 2], [3]] output_shape [1, 1, %dim_333, %178] : tensor<?x?xf32> into tensor<1x1x?x?xf32>
%179 = linalg.fill ins(%27 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%180 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%167, %cst_135 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%181 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%167, %cst_137 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%182 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%167, %cst_139 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%183 = arith.trunci %174 : i64 to i32
%184 = arith.addi %183, %c-128_i32 : i32
%185 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%177 : tensor<?x?x768xi8>) outs(%176 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%186 = arith.cmpi sge, %27, %c0_i64 : i64
cf.assert %186, "negative values not allowed in new dimensions"
%187 = tensor.empty(%78) : tensor<?x768x768xi8>
%188 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_136 : tensor<768x768xi8>) outs(%187 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%189 = tensor.empty(%78, %79) : tensor<?x?x768xi32>
%190 = linalg.fill ins(%c0_i32 : i32) outs(%189 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%191 = linalg.quantized_batch_matmul ins(%185, %188, %184, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%190 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %186, "negative values not allowed in new dimensions"
%192 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_138 : tensor<768x768xi8>) outs(%187 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%193 = linalg.quantized_batch_matmul ins(%185, %192, %184, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%190 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %186, "negative values not allowed in new dimensions"
%194 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_140 : tensor<768x768xi8>) outs(%187 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%195 = linalg.quantized_batch_matmul ins(%185, %194, %184, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%190 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%extracted_slice_337 = tensor.extract_slice %117[0] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_338 = tensor.collapse_shape %extracted_slice_337 [] : tensor<1xi64> into tensor<i64>
%extracted_339 = tensor.extract %collapsed_338[] : tensor<i64>
%196 = arith.maxsi %extracted_339, %c1_i64 : i64
%extracted_slice_340 = tensor.extract_slice %117[1] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_341 = tensor.collapse_shape %extracted_slice_340 [] : tensor<1xi64> into tensor<i64>
%extracted_342 = tensor.extract %collapsed_341[] : tensor<i64>
%197 = arith.maxsi %extracted_342, %c1_i64 : i64
%extracted_slice_343 = tensor.extract_slice %117[2] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_344 = tensor.collapse_shape %extracted_slice_343 [] : tensor<1xi64> into tensor<i64>
%extracted_345 = tensor.extract %collapsed_344[] : tensor<i64>
%198 = arith.index_cast %dim_333 : index to i64
%199 = arith.maxsi %extracted_345, %198 : i64
%extracted_slice_346 = tensor.extract_slice %117[3] [1] [1] : tensor<4xi64> to tensor<1xi64>
%collapsed_347 = tensor.collapse_shape %extracted_slice_346 [] : tensor<1xi64> into tensor<i64>
%extracted_348 = tensor.extract %collapsed_347[] : tensor<i64>
%200 = arith.index_cast %178 : index to i64
%201 = arith.maxsi %extracted_348, %200 : i64
%202 = arith.cmpi slt, %196, %c0_i64 : i64
%203 = arith.index_cast %196 : i64 to index
%204 = arith.select %202, %c1, %203 : index
%205 = arith.cmpi slt, %197, %c0_i64 : i64
%206 = arith.index_cast %197 : i64 to index
%207 = arith.select %205, %c1, %206 : index
%208 = arith.index_cast %199 : i64 to index
%209 = arith.cmpi sge, %199, %c0_i64 : i64
cf.assert %209, "unimplemented: dynamic negative broadcast sizes"
%210 = arith.index_cast %201 : i64 to index
%211 = arith.cmpi sge, %201, %c0_i64 : i64
cf.assert %211, "unimplemented: dynamic negative broadcast sizes"
%212 = tensor.empty(%204, %208, %210) : tensor<?x12x?x?xf32>
%213 = linalg.generic {indexing_maps = [#map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} outs(%212 : tensor<?x12x?x?xf32>) {
^bb0(%out: f32):
%6766 = linalg.index 2 : index
%6767 = linalg.index 3 : index
%6768 = arith.cmpi eq, %dim_333, %c1 : index
%6769 = arith.select %6768, %c0, %6766 : index
%6770 = arith.cmpi eq, %178, %c1 : index
%6771 = arith.select %6770, %c0, %6767 : index
%extracted_1373 = tensor.extract %expanded_336[%c0, %c0, %6769, %6771] : tensor<1x1x?x?xf32>
linalg.yield %extracted_1373 : f32
} -> tensor<?x12x?x?xf32>
%214 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%179, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%215 = linalg.fill ins(%28 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%216 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%191 : tensor<?x?x768xi32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%217 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%193 : tensor<?x?x768xi32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%218 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%195 : tensor<?x?x768xi32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%219 = arith.cmpi eq, %105, %204 : index
cf.assert %219, "mismatched size for broadcast"
%220 = arith.cmpi eq, %109, %207 : index
cf.assert %220, "mismatched size for broadcast"
%221 = arith.cmpi eq, %112, %208 : index
cf.assert %221, "mismatched size for broadcast"
%222 = arith.cmpi eq, %113, %210 : index
cf.assert %222, "mismatched size for broadcast"
%223 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%156, %213 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%139 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%expanded_349 = tensor.expand_shape %214 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%224 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%216, %180 : tensor<?x?x768xf32>, tensor<f32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%225 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%217, %181 : tensor<?x?x768xf32>, tensor<f32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%226 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%218, %182 : tensor<?x?x768xf32>, tensor<f32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_350 = tensor.concat dim(0) %expanded_349, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%227 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_17, %224 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%228 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_15, %225 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%229 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_16, %226 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%230 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%227, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%231 = arith.cmpi eq, %27, %c0_i64 : i64
%232 = arith.extui %231 : i1 to i64
%233 = arith.cmpi ne, %232, %c0_i64 : i64
%234 = linalg.fill ins(%233 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%235 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%234, %179, %179 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_351 = tensor.extract %235[] : tensor<i64>
%236 = arith.cmpi slt, %extracted_351, %c0_i64 : i64
%237 = arith.select %236, %c1_i64, %extracted_351 : i64
%238 = arith.extui %236 : i1 to i64
%239 = arith.addi %238, %c1_i64 : i64
%240 = arith.muli %237, %c768_i64 : i64
%241 = arith.cmpi sle, %239, %c1_i64 : i64
cf.assert %241, "must have at most one inferred (negative) dimension"
%242 = arith.muli %27, %28 : i64
%243 = arith.muli %242, %c768_i64 : i64
%244 = arith.divsi %243, %240 : i64
%245 = arith.select %236, %244, %extracted_351 : i64
%from_elements_352 = tensor.from_elements %245, %244, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_353 = tensor.reshape %228(%from_elements_352) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %241, "must have at most one inferred (negative) dimension"
%reshape_354 = tensor.reshape %229(%from_elements_352) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%246 = arith.cmpi eq, %28, %c0_i64 : i64
%247 = arith.extui %246 : i1 to i64
%248 = arith.cmpi ne, %247, %c0_i64 : i64
%249 = linalg.fill ins(%248 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%250 = linalg.fill ins(%28 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%251 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%249, %250, %250 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_355 = tensor.extract %251[] : tensor<i64>
%252 = arith.muli %237, %extracted_355 : i64
%253 = arith.cmpi slt, %extracted_355, %c0_i64 : i64
%254 = arith.select %253, %237, %252 : i64
%255 = arith.select %253, %239, %238 : i64
%256 = arith.muli %254, %c768_i64 : i64
%257 = arith.cmpi sle, %255, %c1_i64 : i64
cf.assert %257, "must have at most one inferred (negative) dimension"
%258 = arith.divsi %243, %256 : i64
%259 = arith.select %236, %258, %extracted_351 : i64
%260 = arith.select %253, %258, %extracted_355 : i64
%from_elements_356 = tensor.from_elements %259, %260, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_357 = tensor.reshape %230(%from_elements_356) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%261 = arith.index_cast %245 : i64 to index
%262 = arith.index_cast %244 : i64 to index
%263 = tensor.empty(%261, %262) : tensor<?x12x?x64xf32>
%264 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_353 : tensor<?x?x12x64xf32>) outs(%263 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%265 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_354 : tensor<?x?x12x64xf32>) outs(%263 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%266 = arith.index_cast %259 : i64 to index
%267 = arith.index_cast %260 : i64 to index
%268 = tensor.empty(%266, %267) : tensor<?x12x?x64xf32>
%269 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_357 : tensor<?x?x12x64xf32>) outs(%268 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_358 = tensor.concat dim(2) %arg2, %264 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_359 = tensor.concat dim(2) %arg3, %265 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_360 = tensor.extract_slice %concat_350[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_361 = tensor.extract %extracted_slice_360[%c0] : tensor<1xi64>
%270 = arith.cmpi eq, %extracted_361, %c0_i64 : i64
%271 = arith.extui %270 : i1 to i64
%272 = arith.cmpi ne, %271, %c0_i64 : i64
%273 = linalg.fill ins(%272 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%274 = linalg.fill ins(%259 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%275 = linalg.fill ins(%extracted_361 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%276 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%273, %274, %275 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_362 = tensor.extract %276[] : tensor<i64>
%extracted_slice_363 = tensor.extract_slice %concat_350[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_364 = tensor.extract %extracted_slice_363[%c0] : tensor<1xi64>
%277 = arith.cmpi eq, %extracted_364, %c0_i64 : i64
%278 = arith.extui %277 : i1 to i64
%279 = arith.cmpi ne, %278, %c0_i64 : i64
%280 = linalg.fill ins(%279 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%281 = linalg.fill ins(%extracted_364 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%282 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%280, %cst_292, %281 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_365 = tensor.extract %282[] : tensor<i64>
%extracted_slice_366 = tensor.extract_slice %concat_350[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_367 = tensor.extract %extracted_slice_366[%c0] : tensor<1xi64>
%283 = arith.cmpi eq, %extracted_367, %c0_i64 : i64
%284 = arith.extui %283 : i1 to i64
%285 = arith.cmpi ne, %284, %c0_i64 : i64
%286 = linalg.fill ins(%285 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%287 = linalg.fill ins(%260 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%288 = linalg.fill ins(%extracted_367 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%289 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%286, %287, %288 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_368 = tensor.extract %289[] : tensor<i64>
%290 = arith.cmpi slt, %extracted_362, %c0_i64 : i64
%291 = arith.select %290, %c1_i64, %extracted_362 : i64
%292 = arith.extui %290 : i1 to i64
%293 = arith.muli %291, %extracted_365 : i64
%294 = arith.addi %292, %c1_i64 : i64
%295 = arith.cmpi slt, %extracted_365, %c0_i64 : i64
%296 = arith.select %295, %291, %293 : i64
%297 = arith.select %295, %294, %292 : i64
%298 = arith.muli %296, %extracted_368 : i64
%299 = arith.addi %297, %c1_i64 : i64
%300 = arith.cmpi slt, %extracted_368, %c0_i64 : i64
%301 = arith.select %300, %296, %298 : i64
%302 = arith.select %300, %299, %297 : i64
%303 = arith.cmpi sle, %302, %c1_i64 : i64
cf.assert %303, "must have at most one inferred (negative) dimension"
%304 = arith.muli %259, %c12_i64 : i64
%305 = arith.muli %304, %260 : i64
%306 = arith.muli %305, %c64_i64 : i64
%307 = arith.divsi %306, %301 : i64
%308 = arith.select %290, %307, %extracted_362 : i64
%309 = arith.select %295, %307, %extracted_365 : i64
%310 = arith.select %300, %307, %extracted_368 : i64
%from_elements_369 = tensor.from_elements %308, %309, %310 : tensor<3xi64>
%reshape_370 = tensor.reshape %269(%from_elements_369) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_371 = tensor.dim %arg2, %c0 : tensor<?x12x?x64xf32>
%311 = arith.index_cast %dim_371 : index to i64
%312 = linalg.fill ins(%311 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%313 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%273, %312, %275 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_372 = tensor.extract %313[] : tensor<i64>
%dim_373 = tensor.dim %264, %c2 : tensor<?x12x?x64xf32>
%314 = affine.apply #map15()[%dim_297, %dim_373]
%315 = arith.index_cast %314 : index to i64
%316 = linalg.fill ins(%315 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%317 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%286, %316, %288 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_374 = tensor.extract %317[] : tensor<i64>
%318 = arith.cmpi slt, %extracted_372, %c0_i64 : i64
%319 = arith.select %318, %c1_i64, %extracted_372 : i64
%320 = arith.extui %318 : i1 to i64
%321 = arith.muli %319, %extracted_365 : i64
%322 = arith.addi %320, %c1_i64 : i64
%323 = arith.select %295, %319, %321 : i64
%324 = arith.select %295, %322, %320 : i64
%325 = arith.muli %323, %extracted_374 : i64
%326 = arith.addi %324, %c1_i64 : i64
%327 = arith.cmpi slt, %extracted_374, %c0_i64 : i64
%328 = arith.select %327, %323, %325 : i64
%329 = arith.select %327, %326, %324 : i64
%330 = arith.cmpi sle, %329, %c1_i64 : i64
cf.assert %330, "must have at most one inferred (negative) dimension"
%331 = arith.muli %311, %c12_i64 : i64
%332 = arith.muli %331, %315 : i64
%333 = arith.muli %332, %c64_i64 : i64
%334 = arith.divsi %333, %328 : i64
%335 = arith.select %318, %334, %extracted_372 : i64
%336 = arith.select %295, %334, %extracted_365 : i64
%337 = arith.select %327, %334, %extracted_374 : i64
%from_elements_375 = tensor.from_elements %335, %336, %337 : tensor<3xi64>
%reshape_376 = tensor.reshape %concat_358(%from_elements_375) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_377 = tensor.dim %arg3, %c0 : tensor<?x12x?x64xf32>
%338 = arith.index_cast %dim_377 : index to i64
%339 = linalg.fill ins(%338 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%340 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%273, %339, %275 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_378 = tensor.extract %340[] : tensor<i64>
%dim_379 = tensor.dim %arg3, %c2 : tensor<?x12x?x64xf32>
%dim_380 = tensor.dim %265, %c2 : tensor<?x12x?x64xf32>
%341 = affine.apply #map15()[%dim_379, %dim_380]
%342 = arith.index_cast %341 : index to i64
%343 = linalg.fill ins(%342 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%344 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%286, %343, %288 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_381 = tensor.extract %344[] : tensor<i64>
%345 = arith.cmpi slt, %extracted_378, %c0_i64 : i64
%346 = arith.select %345, %c1_i64, %extracted_378 : i64
%347 = arith.extui %345 : i1 to i64
%348 = arith.muli %346, %extracted_365 : i64
%349 = arith.addi %347, %c1_i64 : i64
%350 = arith.select %295, %346, %348 : i64
%351 = arith.select %295, %349, %347 : i64
%352 = arith.muli %350, %extracted_381 : i64
%353 = arith.addi %351, %c1_i64 : i64
%354 = arith.cmpi slt, %extracted_381, %c0_i64 : i64
%355 = arith.select %354, %350, %352 : i64
%356 = arith.select %354, %353, %351 : i64
%357 = arith.cmpi sle, %356, %c1_i64 : i64
cf.assert %357, "must have at most one inferred (negative) dimension"
%358 = arith.muli %338, %c12_i64 : i64
%359 = arith.muli %358, %342 : i64
%360 = arith.muli %359, %c64_i64 : i64
%361 = arith.divsi %360, %355 : i64
%362 = arith.select %345, %361, %extracted_378 : i64
%363 = arith.select %295, %361, %extracted_365 : i64
%364 = arith.select %354, %361, %extracted_381 : i64
%from_elements_382 = tensor.from_elements %362, %363, %364 : tensor<3xi64>
%reshape_383 = tensor.reshape %concat_359(%from_elements_382) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%365 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_370 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%366 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_370 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%367 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%365, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%368 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%366, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%369 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%367, %368 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%370 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%369, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%371 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%366, %370 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%372 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %371 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%373 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%372 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%374 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%373 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%375 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%374 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_384 = tensor.extract %375[] : tensor<i8>
%376 = arith.extui %extracted_384 : i8 to i64
%extracted_385 = tensor.extract %370[] : tensor<f32>
%377 = arith.extf %extracted_385 : f32 to f64
%378 = arith.index_cast %308 : i64 to index
%379 = arith.index_cast %309 : i64 to index
%380 = tensor.empty(%378, %379) : tensor<?x?x64xi8>
%381 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_370 : tensor<?x?x64xf32>) outs(%380 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %376 : i64 to f32
%6767 = arith.truncf %377 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%382 = arith.index_cast %335 : i64 to index
%383 = arith.index_cast %336 : i64 to index
%384 = tensor.empty(%382, %383) : tensor<?x64x?xf32>
%385 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_376 : tensor<?x?x64xf32>) outs(%384 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%386 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_383 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%387 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_383 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%388 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%386, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%389 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%387, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%390 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%388, %389 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%391 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%390, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%392 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%387, %391 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%393 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %392 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%394 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%393 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%395 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%394 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%396 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%395 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_386 = tensor.extract %396[] : tensor<i8>
%397 = arith.extui %extracted_386 : i8 to i64
%extracted_387 = tensor.extract %391[] : tensor<f32>
%398 = arith.extf %extracted_387 : f32 to f64
%399 = arith.index_cast %362 : i64 to index
%400 = arith.index_cast %363 : i64 to index
%401 = tensor.empty(%399, %400) : tensor<?x?x64xi8>
%402 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_383 : tensor<?x?x64xf32>) outs(%401 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %397 : i64 to f32
%6767 = arith.truncf %398 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%403 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%385 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%404 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%385 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%405 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%403, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%406 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%404, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%407 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%405, %406 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%408 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%407, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%409 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%404, %408 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%410 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %409 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%411 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%410 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%412 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%411 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%413 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%412 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_388 = tensor.extract %413[] : tensor<i8>
%414 = arith.extui %extracted_388 : i8 to i64
%extracted_389 = tensor.extract %408[] : tensor<f32>
%415 = arith.extf %extracted_389 : f32 to f64
%416 = tensor.empty(%382, %383) : tensor<?x64x?xi8>
%417 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%385 : tensor<?x64x?xf32>) outs(%416 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %414 : i64 to f32
%6767 = arith.truncf %415 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%418 = linalg.fill ins(%336 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%419 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%370, %408 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%420 = arith.cmpi eq, %308, %335 : i64
cf.assert %420, "mismatching contracting dimension"
%421 = tensor.empty(%378, %379, %383) : tensor<?x?x?xi32>
%422 = linalg.fill ins(%c0_i32 : i32) outs(%421 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%423 = linalg.batch_matmul ins(%381, %417 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%422 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_390 = tensor.concat dim(0) %expanded_349, %215, %418 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%424 = tensor.empty(%378, %379, %383) : tensor<?x?x?xf32>
%425 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%423 : tensor<?x?x?xi32>) outs(%424 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%426 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%425, %419 : tensor<?x?x?xf32>, tensor<f32>) outs(%424 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%427 = linalg.fill ins(%308 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%428 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%234, %427, %179 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_391 = tensor.extract %428[] : tensor<i64>
%429 = linalg.fill ins(%336 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%430 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%249, %429, %250 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_392 = tensor.extract %430[] : tensor<i64>
%431 = arith.cmpi slt, %extracted_391, %c0_i64 : i64
%432 = arith.select %431, %c1_i64, %extracted_391 : i64
%433 = arith.extui %431 : i1 to i64
%434 = arith.muli %432, %c12_i64 : i64
%435 = arith.muli %434, %extracted_392 : i64
%436 = arith.addi %433, %c1_i64 : i64
%437 = arith.cmpi slt, %extracted_392, %c0_i64 : i64
%438 = arith.select %437, %434, %435 : i64
%439 = arith.select %437, %436, %433 : i64
%440 = arith.muli %438, %336 : i64
%441 = arith.addi %439, %c1_i64 : i64
%442 = arith.cmpi slt, %336, %c0_i64 : i64
%443 = arith.select %442, %438, %440 : i64
%444 = arith.select %442, %441, %439 : i64
%445 = arith.cmpi sle, %444, %c1_i64 : i64
cf.assert %445, "must have at most one inferred (negative) dimension"
%446 = arith.muli %308, %309 : i64
%447 = arith.muli %446, %336 : i64
%448 = arith.divsi %447, %443 : i64
%449 = arith.select %431, %448, %extracted_391 : i64
%450 = arith.select %437, %448, %extracted_392 : i64
%451 = arith.select %442, %448, %336 : i64
%from_elements_393 = tensor.from_elements %449, %c12_i64, %450, %451 : tensor<4xi64>
%reshape_394 = tensor.reshape %426(%from_elements_393) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%452 = arith.index_cast %449 : i64 to index
%453 = arith.index_cast %450 : i64 to index
%454 = arith.index_cast %451 : i64 to index
%455 = arith.cmpi eq, %452, %105 : index
cf.assert %455, "mismatched size for broadcast"
%456 = arith.cmpi eq, %109, %c12 : index
cf.assert %456, "mismatched size for broadcast"
%457 = arith.cmpi eq, %453, %112 : index
cf.assert %457, "mismatched size for broadcast"
%458 = arith.cmpi eq, %454, %113 : index
cf.assert %458, "mismatched size for broadcast"
%459 = tensor.empty(%452, %453, %454) : tensor<?x12x?x?xf32>
%460 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_394, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%459 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%461 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%460, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%459 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_395 = tensor.extract_slice %concat_390[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_396 = tensor.extract %extracted_slice_395[%c0] : tensor<1xi64>
%462 = arith.cmpi eq, %extracted_396, %c0_i64 : i64
%463 = arith.extui %462 : i1 to i64
%464 = arith.cmpi ne, %463, %c0_i64 : i64
%465 = linalg.fill ins(%464 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%466 = linalg.fill ins(%449 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%467 = linalg.fill ins(%extracted_396 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%468 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%465, %466, %467 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_397 = tensor.extract %468[] : tensor<i64>
%extracted_slice_398 = tensor.extract_slice %concat_390[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_399 = tensor.extract %extracted_slice_398[%c0] : tensor<1xi64>
%469 = arith.cmpi eq, %extracted_399, %c0_i64 : i64
%470 = arith.extui %469 : i1 to i64
%471 = arith.cmpi ne, %470, %c0_i64 : i64
%472 = linalg.fill ins(%471 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%473 = linalg.fill ins(%extracted_399 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%474 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%472, %cst_292, %473 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_400 = tensor.extract %474[] : tensor<i64>
%extracted_slice_401 = tensor.extract_slice %concat_390[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_402 = tensor.extract %extracted_slice_401[%c0] : tensor<1xi64>
%475 = arith.cmpi eq, %extracted_402, %c0_i64 : i64
%476 = arith.extui %475 : i1 to i64
%477 = arith.cmpi ne, %476, %c0_i64 : i64
%478 = linalg.fill ins(%477 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%479 = linalg.fill ins(%450 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%480 = linalg.fill ins(%extracted_402 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%481 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%478, %479, %480 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_403 = tensor.extract %481[] : tensor<i64>
%482 = arith.cmpi slt, %extracted_397, %c0_i64 : i64
%483 = arith.select %482, %c1_i64, %extracted_397 : i64
%484 = arith.extui %482 : i1 to i64
%485 = arith.muli %483, %extracted_400 : i64
%486 = arith.addi %484, %c1_i64 : i64
%487 = arith.cmpi slt, %extracted_400, %c0_i64 : i64
%488 = arith.select %487, %483, %485 : i64
%489 = arith.select %487, %486, %484 : i64
%490 = arith.muli %488, %extracted_403 : i64
%491 = arith.addi %489, %c1_i64 : i64
%492 = arith.cmpi slt, %extracted_403, %c0_i64 : i64
%493 = arith.select %492, %488, %490 : i64
%494 = arith.select %492, %491, %489 : i64
%495 = arith.cmpi sle, %494, %c1_i64 : i64
cf.assert %495, "must have at most one inferred (negative) dimension"
%496 = arith.muli %449, %c12_i64 : i64
%497 = arith.muli %496, %450 : i64
%498 = arith.muli %497, %451 : i64
%499 = arith.divsi %498, %493 : i64
%500 = arith.select %482, %499, %extracted_397 : i64
%501 = arith.select %487, %499, %extracted_400 : i64
%502 = arith.select %492, %499, %extracted_403 : i64
%from_elements_404 = tensor.from_elements %500, %501, %502 : tensor<3xi64>
%reshape_405 = tensor.reshape %461(%from_elements_404) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%503 = arith.index_cast %500 : i64 to index
%504 = arith.index_cast %501 : i64 to index
%505 = tensor.empty(%503, %504) : tensor<?x?xi64>
%506 = linalg.fill ins(%c0_i64 : i64) outs(%505 : tensor<?x?xi64>) -> tensor<?x?xi64>
%507 = tensor.empty(%503, %504) : tensor<?x?xf32>
%508 = linalg.fill ins(%cst_1 : f32) outs(%507 : tensor<?x?xf32>) -> tensor<?x?xf32>
%509:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_405 : tensor<?x?x?xf32>) outs(%508, %506 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_406 = tensor.expand_shape %509#0 [[0], [1, 2]] output_shape [%503, %504, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%510 = arith.index_cast %502 : i64 to index
%511 = tensor.empty(%503, %504, %510) : tensor<?x?x?xf32>
%512 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_405, %expanded_406 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%511 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%513 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%512 : tensor<?x?x?xf32>) outs(%511 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%514 = tensor.empty(%503, %504) : tensor<?x?x1xf32>
%515 = linalg.fill ins(%cst_0 : f32) outs(%514 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%516 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%513 : tensor<?x?x?xf32>) outs(%515 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%517 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%513, %516 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%511 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%518 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%517 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%519 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%517 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%520 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%518, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%521 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%519, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%522 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%520, %521 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%523 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%522, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%524 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%519, %523 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%525 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %524 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%526 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%525 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%527 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%526 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%528 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%527 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_407 = tensor.extract %528[] : tensor<i8>
%529 = arith.extui %extracted_407 : i8 to i64
%extracted_408 = tensor.extract %523[] : tensor<f32>
%530 = arith.extf %extracted_408 : f32 to f64
%531 = tensor.empty(%503, %504, %510) : tensor<?x?x?xi8>
%532 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%517 : tensor<?x?x?xf32>) outs(%531 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %529 : i64 to f32
%6767 = arith.truncf %530 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%533 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%523, %391 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%534 = arith.cmpi eq, %500, %362 : i64
cf.assert %534, "mismatching contracting dimension"
%535 = arith.cmpi eq, %502, %363 : i64
cf.assert %535, "mismatching contracting dimension"
%536 = tensor.empty(%503, %504) : tensor<?x?x64xi32>
%537 = linalg.fill ins(%c0_i32 : i32) outs(%536 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%538 = linalg.batch_matmul ins(%532, %402 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%537 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%539 = tensor.empty(%503, %504) : tensor<?x?x64xf32>
%540 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%538 : tensor<?x?x64xi32>) outs(%539 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%541 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%540, %533 : tensor<?x?x64xf32>, tensor<f32>) outs(%539 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%542 = linalg.fill ins(%500 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%543 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%234, %542, %179 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_409 = tensor.extract %543[] : tensor<i64>
%544 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%249, %cst_7, %250 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_410 = tensor.extract %544[] : tensor<i64>
%545 = arith.cmpi slt, %extracted_409, %c0_i64 : i64
%546 = arith.select %545, %c1_i64, %extracted_409 : i64
%547 = arith.extui %545 : i1 to i64
%548 = arith.muli %546, %c12_i64 : i64
%549 = arith.muli %548, %extracted_410 : i64
%550 = arith.addi %547, %c1_i64 : i64
%551 = arith.cmpi slt, %extracted_410, %c0_i64 : i64
%552 = arith.select %551, %548, %549 : i64
%553 = arith.select %551, %550, %547 : i64
%554 = arith.muli %552, %c64_i64 : i64
%555 = arith.cmpi sle, %553, %c1_i64 : i64
cf.assert %555, "must have at most one inferred (negative) dimension"
%556 = arith.muli %500, %501 : i64
%557 = arith.muli %556, %c64_i64 : i64
%558 = arith.divsi %557, %554 : i64
%559 = arith.select %545, %558, %extracted_409 : i64
%560 = arith.select %551, %558, %extracted_410 : i64
%from_elements_411 = tensor.from_elements %559, %c12_i64, %560, %c64_i64 : tensor<4xi64>
%reshape_412 = tensor.reshape %541(%from_elements_411) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%561 = arith.index_cast %559 : i64 to index
%562 = arith.index_cast %560 : i64 to index
%563 = tensor.empty(%561, %562) : tensor<?x?x12x64xf32>
%564 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_412 : tensor<?x12x?x64xf32>) outs(%563 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%565 = linalg.fill ins(%559 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%566 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%234, %565, %179 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_413 = tensor.extract %566[] : tensor<i64>
%567 = linalg.fill ins(%560 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%568 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%249, %567, %250 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_414 = tensor.extract %568[] : tensor<i64>
%569 = arith.cmpi slt, %extracted_413, %c0_i64 : i64
%570 = arith.select %569, %c1_i64, %extracted_413 : i64
%571 = arith.extui %569 : i1 to i64
%572 = arith.muli %570, %extracted_414 : i64
%573 = arith.addi %571, %c1_i64 : i64
%574 = arith.cmpi slt, %extracted_414, %c0_i64 : i64
%575 = arith.select %574, %570, %572 : i64
%576 = arith.select %574, %573, %571 : i64
%577 = arith.muli %575, %c768_i64 : i64
%578 = arith.cmpi sle, %576, %c1_i64 : i64
cf.assert %578, "must have at most one inferred (negative) dimension"
%579 = arith.muli %559, %560 : i64
%580 = arith.muli %579, %c768_i64 : i64
%581 = arith.divsi %580, %577 : i64
%582 = arith.select %569, %581, %extracted_413 : i64
%583 = arith.select %574, %581, %extracted_414 : i64
%from_elements_415 = tensor.from_elements %582, %583, %c768_i64 : tensor<3xi64>
%reshape_416 = tensor.reshape %564(%from_elements_415) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%584 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_416 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%585 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_416 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%586 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%584, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%587 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%585, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%588 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%586, %587 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%589 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%588, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%590 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%585, %589 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%591 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %590 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%592 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%591 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%593 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%592 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%594 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%593 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_417 = tensor.extract %594[] : tensor<i8>
%595 = arith.extui %extracted_417 : i8 to i64
%extracted_418 = tensor.extract %589[] : tensor<f32>
%596 = arith.extf %extracted_418 : f32 to f64
%597 = arith.index_cast %582 : i64 to index
%598 = arith.index_cast %583 : i64 to index
%599 = tensor.empty(%597, %598) : tensor<?x?x768xi8>
%600 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_416 : tensor<?x?x768xf32>) outs(%599 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %595 : i64 to f32
%6767 = arith.truncf %596 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%601 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%589, %cst_141 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%602 = arith.trunci %595 : i64 to i32
%603 = arith.addi %602, %c-128_i32 : i32
%604 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%600 : tensor<?x?x768xi8>) outs(%599 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%605 = arith.cmpi sge, %582, %c0_i64 : i64
cf.assert %605, "negative values not allowed in new dimensions"
%606 = tensor.empty(%597) : tensor<?x768x768xi8>
%607 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_142 : tensor<768x768xi8>) outs(%606 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%608 = tensor.empty(%597, %598) : tensor<?x?x768xi32>
%609 = linalg.fill ins(%c0_i32 : i32) outs(%608 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%610 = linalg.quantized_batch_matmul ins(%604, %607, %603, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%609 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%611 = tensor.empty(%597, %598) : tensor<?x?x768xf32>
%612 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%610 : tensor<?x?x768xi32>) outs(%611 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%613 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%612, %601 : tensor<?x?x768xf32>, tensor<f32>) outs(%611 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%614 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_18, %613 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%611 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%615 = arith.cmpi eq, %78, %597 : index
cf.assert %615, "mismatched size for broadcast"
%616 = arith.cmpi eq, %79, %598 : index
cf.assert %616, "mismatched size for broadcast"
%617 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%85, %614 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%84 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_419 = tensor.concat dim(0) %cst_282, %cst_293 : (tensor<1xi64>, tensor<1xi64>) -> tensor<2xi64>
%extracted_slice_420 = tensor.extract_slice %concat_419[0] [1] [1] : tensor<2xi64> to tensor<1xi64>
%extracted_421 = tensor.extract %extracted_slice_420[%c0] : tensor<1xi64>
%618 = arith.cmpi eq, %extracted_421, %c0_i64 : i64
%619 = arith.extui %618 : i1 to i64
%620 = arith.cmpi ne, %619, %c0_i64 : i64
%621 = linalg.fill ins(%620 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%622 = linalg.fill ins(%extracted_421 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%623 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %179, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_422 = tensor.extract %623[] : tensor<i64>
%extracted_slice_423 = tensor.extract_slice %concat_419[1] [1] [1] : tensor<2xi64> to tensor<1xi64>
%extracted_424 = tensor.extract %extracted_slice_423[%c0] : tensor<1xi64>
%624 = arith.cmpi eq, %extracted_424, %c0_i64 : i64
%625 = arith.extui %624 : i1 to i64
%626 = arith.cmpi ne, %625, %c0_i64 : i64
%627 = linalg.fill ins(%626 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%628 = linalg.fill ins(%extracted_424 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%629 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %250, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_425 = tensor.extract %629[] : tensor<i64>
%630 = arith.cmpi slt, %extracted_422, %c0_i64 : i64
%631 = arith.select %630, %c1_i64, %extracted_422 : i64
%632 = arith.extui %630 : i1 to i64
%633 = arith.muli %631, %extracted_425 : i64
%634 = arith.addi %632, %c1_i64 : i64
%635 = arith.cmpi slt, %extracted_425, %c0_i64 : i64
%636 = arith.select %635, %631, %633 : i64
%637 = arith.select %635, %634, %632 : i64
%638 = arith.cmpi sle, %637, %c1_i64 : i64
cf.assert %638, "must have at most one inferred (negative) dimension"
%639 = arith.divsi %243, %636 : i64
%640 = arith.select %630, %639, %extracted_422 : i64
%641 = arith.select %635, %639, %extracted_425 : i64
%from_elements_426 = tensor.from_elements %640, %641 : tensor<2xi64>
%reshape_427 = tensor.reshape %617(%from_elements_426) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%642 = arith.index_cast %640 : i64 to index
%643 = tensor.empty(%642) : tensor<?x1xf32>
%644 = linalg.fill ins(%cst_0 : f32) outs(%643 : tensor<?x1xf32>) -> tensor<?x1xf32>
%645 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_427 : tensor<?x768xf32>) outs(%644 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%646 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%645 : tensor<?x1xf32>) outs(%643 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%647 = tensor.empty(%642) : tensor<?x768xf32>
%648 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_427, %646 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%649 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%648, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%650 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%649 : tensor<?x768xf32>) outs(%644 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%651 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%650 : tensor<?x1xf32>) outs(%643 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%652 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%651, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%643 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%653 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%652 : tensor<?x1xf32>) outs(%643 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%654 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%648, %653 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%655 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%654, %cst_23 : tensor<?x768xf32>, tensor<768xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%656 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%655, %cst_24 : tensor<?x768xf32>, tensor<768xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%657 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%656 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%658 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%656 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%659 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%657, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%660 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%658, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%661 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%659, %660 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%662 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%661, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%663 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%658, %662 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%664 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %663 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%665 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%664 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%666 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%665 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%667 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%666 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_428 = tensor.extract %667[] : tensor<i8>
%668 = arith.extui %extracted_428 : i8 to i64
%extracted_429 = tensor.extract %662[] : tensor<f32>
%669 = arith.extf %extracted_429 : f32 to f64
%670 = tensor.empty(%642) : tensor<?x768xi8>
%671 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%656 : tensor<?x768xf32>) outs(%670 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %668 : i64 to f32
%6767 = arith.truncf %669 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%672 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%662, %cst_143 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%673 = tensor.empty(%642) : tensor<?x3072xi32>
%674 = linalg.fill ins(%c0_i32 : i32) outs(%673 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%675 = arith.trunci %668 : i64 to i32
%676 = arith.addi %675, %c-128_i32 : i32
%677 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%671 : tensor<?x768xi8>) outs(%670 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%678 = linalg.quantized_matmul ins(%677, %cst_144, %676, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%674 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%679 = tensor.empty(%642) : tensor<?x3072xf32>
%680 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%678 : tensor<?x3072xi32>) outs(%679 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%681 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%680, %672 : tensor<?x3072xf32>, tensor<f32>) outs(%679 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%682 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%681, %cst_21 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%679 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%683 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%682 : tensor<?x3072xf32>) outs(%679 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%684 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%683 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%685 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%683 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%686 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%684, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%687 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%685, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%688 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%686, %687 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%689 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%688, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%690 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%685, %689 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%691 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %690 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%692 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%691 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%693 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%692 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%694 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%693 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_430 = tensor.extract %694[] : tensor<i8>
%695 = arith.extui %extracted_430 : i8 to i64
%extracted_431 = tensor.extract %689[] : tensor<f32>
%696 = arith.extf %extracted_431 : f32 to f64
%697 = tensor.empty(%642) : tensor<?x3072xi8>
%698 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%683 : tensor<?x3072xf32>) outs(%697 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %695 : i64 to f32
%6767 = arith.truncf %696 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%699 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%689, %cst_145 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%700 = tensor.empty(%642) : tensor<?x768xi32>
%701 = linalg.fill ins(%c0_i32 : i32) outs(%700 : tensor<?x768xi32>) -> tensor<?x768xi32>
%702 = arith.trunci %695 : i64 to i32
%703 = arith.addi %702, %c-128_i32 : i32
%704 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%698 : tensor<?x3072xi8>) outs(%697 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%705 = linalg.quantized_matmul ins(%704, %cst_146, %703, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%701 : tensor<?x768xi32>) -> tensor<?x768xi32>
%706 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%705 : tensor<?x768xi32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%707 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%706, %699 : tensor<?x768xf32>, tensor<f32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%708 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%707, %cst_22 : tensor<?x768xf32>, tensor<768xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%709 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_427, %708 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%647 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%710 = linalg.fill ins(%640 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%711 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%234, %710, %179 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_432 = tensor.extract %711[] : tensor<i64>
%712 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%249, %cst_8, %250 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_433 = tensor.extract %712[] : tensor<i64>
%713 = arith.cmpi slt, %extracted_432, %c0_i64 : i64
%714 = arith.select %713, %c1_i64, %extracted_432 : i64
%715 = arith.extui %713 : i1 to i64
%716 = arith.muli %714, %extracted_433 : i64
%717 = arith.addi %715, %c1_i64 : i64
%718 = arith.cmpi slt, %extracted_433, %c0_i64 : i64
%719 = arith.select %718, %714, %716 : i64
%720 = arith.select %718, %717, %715 : i64
%721 = arith.muli %719, %c768_i64 : i64
%722 = arith.cmpi sle, %720, %c1_i64 : i64
cf.assert %722, "must have at most one inferred (negative) dimension"
%723 = arith.muli %640, %c768_i64 : i64
%724 = arith.divsi %723, %721 : i64
%725 = arith.select %713, %724, %extracted_432 : i64
%726 = arith.select %718, %724, %extracted_433 : i64
%from_elements_434 = tensor.from_elements %725, %726, %c768_i64 : tensor<3xi64>
%reshape_435 = tensor.reshape %709(%from_elements_434) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%727 = arith.index_cast %725 : i64 to index
%728 = arith.index_cast %726 : i64 to index
%729 = tensor.empty(%727, %728) : tensor<?x?x1xf32>
%730 = linalg.fill ins(%cst_0 : f32) outs(%729 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%731 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_435 : tensor<?x?x768xf32>) outs(%730 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%732 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%731 : tensor<?x?x1xf32>) outs(%729 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%733 = tensor.empty(%727, %728) : tensor<?x?x768xf32>
%734 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_435, %732 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%735 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%734, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%736 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%735 : tensor<?x?x768xf32>) outs(%730 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%737 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%736 : tensor<?x?x1xf32>) outs(%729 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%738 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%737, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%729 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%739 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%738 : tensor<?x?x1xf32>) outs(%729 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%740 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%734, %739 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%741 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%740, %cst_29 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%742 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%741, %cst_30 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%743 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%742 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%744 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%742 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%745 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%743, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%746 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%744, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%747 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%745, %746 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%748 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%747, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%749 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%744, %748 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%750 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %749 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%751 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%750 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%752 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%751 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%753 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%752 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_436 = tensor.extract %753[] : tensor<i8>
%754 = arith.extui %extracted_436 : i8 to i64
%extracted_437 = tensor.extract %748[] : tensor<f32>
%755 = arith.extf %extracted_437 : f32 to f64
%756 = tensor.empty(%727, %728) : tensor<?x?x768xi8>
%757 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%742 : tensor<?x?x768xf32>) outs(%756 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %754 : i64 to f32
%6767 = arith.truncf %755 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%758 = linalg.fill ins(%725 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%759 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%748, %cst_147 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%760 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%748, %cst_149 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%761 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%748, %cst_151 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%762 = arith.trunci %754 : i64 to i32
%763 = arith.addi %762, %c-128_i32 : i32
%764 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%757 : tensor<?x?x768xi8>) outs(%756 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%765 = arith.cmpi sge, %725, %c0_i64 : i64
cf.assert %765, "negative values not allowed in new dimensions"
%766 = tensor.empty(%727) : tensor<?x768x768xi8>
%767 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_148 : tensor<768x768xi8>) outs(%766 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%768 = tensor.empty(%727, %728) : tensor<?x?x768xi32>
%769 = linalg.fill ins(%c0_i32 : i32) outs(%768 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%770 = linalg.quantized_batch_matmul ins(%764, %767, %763, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%769 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %765, "negative values not allowed in new dimensions"
%771 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_150 : tensor<768x768xi8>) outs(%766 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%772 = linalg.quantized_batch_matmul ins(%764, %771, %763, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%769 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %765, "negative values not allowed in new dimensions"
%773 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_152 : tensor<768x768xi8>) outs(%766 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%774 = linalg.quantized_batch_matmul ins(%764, %773, %763, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%769 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%775 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%758, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%776 = linalg.fill ins(%726 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%777 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%770 : tensor<?x?x768xi32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%778 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%772 : tensor<?x?x768xi32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%779 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%774 : tensor<?x?x768xi32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_438 = tensor.expand_shape %775 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%780 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%777, %759 : tensor<?x?x768xf32>, tensor<f32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%781 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%778, %760 : tensor<?x?x768xf32>, tensor<f32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%782 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%779, %761 : tensor<?x?x768xf32>, tensor<f32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_439 = tensor.concat dim(0) %expanded_438, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%783 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_27, %780 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%784 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_25, %781 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%785 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_26, %782 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%786 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%783, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%787 = arith.cmpi eq, %725, %c0_i64 : i64
%788 = arith.extui %787 : i1 to i64
%789 = arith.cmpi ne, %788, %c0_i64 : i64
%790 = linalg.fill ins(%789 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%791 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%790, %758, %758 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_440 = tensor.extract %791[] : tensor<i64>
%792 = arith.cmpi slt, %extracted_440, %c0_i64 : i64
%793 = arith.select %792, %c1_i64, %extracted_440 : i64
%794 = arith.extui %792 : i1 to i64
%795 = arith.addi %794, %c1_i64 : i64
%796 = arith.muli %793, %c768_i64 : i64
%797 = arith.cmpi sle, %795, %c1_i64 : i64
cf.assert %797, "must have at most one inferred (negative) dimension"
%798 = arith.muli %725, %726 : i64
%799 = arith.muli %798, %c768_i64 : i64
%800 = arith.divsi %799, %796 : i64
%801 = arith.select %792, %800, %extracted_440 : i64
%from_elements_441 = tensor.from_elements %801, %800, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_442 = tensor.reshape %784(%from_elements_441) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %797, "must have at most one inferred (negative) dimension"
%reshape_443 = tensor.reshape %785(%from_elements_441) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%802 = arith.cmpi eq, %726, %c0_i64 : i64
%803 = arith.extui %802 : i1 to i64
%804 = arith.cmpi ne, %803, %c0_i64 : i64
%805 = linalg.fill ins(%804 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%806 = linalg.fill ins(%726 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%807 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%805, %806, %806 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_444 = tensor.extract %807[] : tensor<i64>
%808 = arith.muli %793, %extracted_444 : i64
%809 = arith.cmpi slt, %extracted_444, %c0_i64 : i64
%810 = arith.select %809, %793, %808 : i64
%811 = arith.select %809, %795, %794 : i64
%812 = arith.muli %810, %c768_i64 : i64
%813 = arith.cmpi sle, %811, %c1_i64 : i64
cf.assert %813, "must have at most one inferred (negative) dimension"
%814 = arith.divsi %799, %812 : i64
%815 = arith.select %792, %814, %extracted_440 : i64
%816 = arith.select %809, %814, %extracted_444 : i64
%from_elements_445 = tensor.from_elements %815, %816, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_446 = tensor.reshape %786(%from_elements_445) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%817 = arith.index_cast %801 : i64 to index
%818 = arith.index_cast %800 : i64 to index
%819 = tensor.empty(%817, %818) : tensor<?x12x?x64xf32>
%820 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_442 : tensor<?x?x12x64xf32>) outs(%819 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%821 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_443 : tensor<?x?x12x64xf32>) outs(%819 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%822 = arith.index_cast %815 : i64 to index
%823 = arith.index_cast %816 : i64 to index
%824 = tensor.empty(%822, %823) : tensor<?x12x?x64xf32>
%825 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_446 : tensor<?x?x12x64xf32>) outs(%824 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_447 = tensor.concat dim(2) %arg4, %820 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_448 = tensor.concat dim(2) %arg5, %821 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_449 = tensor.extract_slice %concat_439[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_450 = tensor.extract %extracted_slice_449[%c0] : tensor<1xi64>
%826 = arith.cmpi eq, %extracted_450, %c0_i64 : i64
%827 = arith.extui %826 : i1 to i64
%828 = arith.cmpi ne, %827, %c0_i64 : i64
%829 = linalg.fill ins(%828 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%830 = linalg.fill ins(%815 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%831 = linalg.fill ins(%extracted_450 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%832 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%829, %830, %831 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_451 = tensor.extract %832[] : tensor<i64>
%extracted_slice_452 = tensor.extract_slice %concat_439[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_453 = tensor.extract %extracted_slice_452[%c0] : tensor<1xi64>
%833 = arith.cmpi eq, %extracted_453, %c0_i64 : i64
%834 = arith.extui %833 : i1 to i64
%835 = arith.cmpi ne, %834, %c0_i64 : i64
%836 = linalg.fill ins(%835 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%837 = linalg.fill ins(%extracted_453 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%838 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%836, %cst_292, %837 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_454 = tensor.extract %838[] : tensor<i64>
%extracted_slice_455 = tensor.extract_slice %concat_439[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_456 = tensor.extract %extracted_slice_455[%c0] : tensor<1xi64>
%839 = arith.cmpi eq, %extracted_456, %c0_i64 : i64
%840 = arith.extui %839 : i1 to i64
%841 = arith.cmpi ne, %840, %c0_i64 : i64
%842 = linalg.fill ins(%841 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%843 = linalg.fill ins(%816 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%844 = linalg.fill ins(%extracted_456 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%845 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%842, %843, %844 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_457 = tensor.extract %845[] : tensor<i64>
%846 = arith.cmpi slt, %extracted_451, %c0_i64 : i64
%847 = arith.select %846, %c1_i64, %extracted_451 : i64
%848 = arith.extui %846 : i1 to i64
%849 = arith.muli %847, %extracted_454 : i64
%850 = arith.addi %848, %c1_i64 : i64
%851 = arith.cmpi slt, %extracted_454, %c0_i64 : i64
%852 = arith.select %851, %847, %849 : i64
%853 = arith.select %851, %850, %848 : i64
%854 = arith.muli %852, %extracted_457 : i64
%855 = arith.addi %853, %c1_i64 : i64
%856 = arith.cmpi slt, %extracted_457, %c0_i64 : i64
%857 = arith.select %856, %852, %854 : i64
%858 = arith.select %856, %855, %853 : i64
%859 = arith.cmpi sle, %858, %c1_i64 : i64
cf.assert %859, "must have at most one inferred (negative) dimension"
%860 = arith.muli %815, %c12_i64 : i64
%861 = arith.muli %860, %816 : i64
%862 = arith.muli %861, %c64_i64 : i64
%863 = arith.divsi %862, %857 : i64
%864 = arith.select %846, %863, %extracted_451 : i64
%865 = arith.select %851, %863, %extracted_454 : i64
%866 = arith.select %856, %863, %extracted_457 : i64
%from_elements_458 = tensor.from_elements %864, %865, %866 : tensor<3xi64>
%reshape_459 = tensor.reshape %825(%from_elements_458) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_460 = tensor.dim %arg4, %c0 : tensor<?x12x?x64xf32>
%867 = arith.index_cast %dim_460 : index to i64
%868 = linalg.fill ins(%867 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%869 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%829, %868, %831 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_461 = tensor.extract %869[] : tensor<i64>
%dim_462 = tensor.dim %arg4, %c2 : tensor<?x12x?x64xf32>
%dim_463 = tensor.dim %820, %c2 : tensor<?x12x?x64xf32>
%870 = affine.apply #map15()[%dim_462, %dim_463]
%871 = arith.index_cast %870 : index to i64
%872 = linalg.fill ins(%871 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%873 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%842, %872, %844 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_464 = tensor.extract %873[] : tensor<i64>
%874 = arith.cmpi slt, %extracted_461, %c0_i64 : i64
%875 = arith.select %874, %c1_i64, %extracted_461 : i64
%876 = arith.extui %874 : i1 to i64
%877 = arith.muli %875, %extracted_454 : i64
%878 = arith.addi %876, %c1_i64 : i64
%879 = arith.select %851, %875, %877 : i64
%880 = arith.select %851, %878, %876 : i64
%881 = arith.muli %879, %extracted_464 : i64
%882 = arith.addi %880, %c1_i64 : i64
%883 = arith.cmpi slt, %extracted_464, %c0_i64 : i64
%884 = arith.select %883, %879, %881 : i64
%885 = arith.select %883, %882, %880 : i64
%886 = arith.cmpi sle, %885, %c1_i64 : i64
cf.assert %886, "must have at most one inferred (negative) dimension"
%887 = arith.muli %867, %c12_i64 : i64
%888 = arith.muli %887, %871 : i64
%889 = arith.muli %888, %c64_i64 : i64
%890 = arith.divsi %889, %884 : i64
%891 = arith.select %874, %890, %extracted_461 : i64
%892 = arith.select %851, %890, %extracted_454 : i64
%893 = arith.select %883, %890, %extracted_464 : i64
%from_elements_465 = tensor.from_elements %891, %892, %893 : tensor<3xi64>
%reshape_466 = tensor.reshape %concat_447(%from_elements_465) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_467 = tensor.dim %arg5, %c0 : tensor<?x12x?x64xf32>
%894 = arith.index_cast %dim_467 : index to i64
%895 = linalg.fill ins(%894 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%896 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%829, %895, %831 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_468 = tensor.extract %896[] : tensor<i64>
%dim_469 = tensor.dim %arg5, %c2 : tensor<?x12x?x64xf32>
%dim_470 = tensor.dim %821, %c2 : tensor<?x12x?x64xf32>
%897 = affine.apply #map15()[%dim_469, %dim_470]
%898 = arith.index_cast %897 : index to i64
%899 = linalg.fill ins(%898 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%900 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%842, %899, %844 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_471 = tensor.extract %900[] : tensor<i64>
%901 = arith.cmpi slt, %extracted_468, %c0_i64 : i64
%902 = arith.select %901, %c1_i64, %extracted_468 : i64
%903 = arith.extui %901 : i1 to i64
%904 = arith.muli %902, %extracted_454 : i64
%905 = arith.addi %903, %c1_i64 : i64
%906 = arith.select %851, %902, %904 : i64
%907 = arith.select %851, %905, %903 : i64
%908 = arith.muli %906, %extracted_471 : i64
%909 = arith.addi %907, %c1_i64 : i64
%910 = arith.cmpi slt, %extracted_471, %c0_i64 : i64
%911 = arith.select %910, %906, %908 : i64
%912 = arith.select %910, %909, %907 : i64
%913 = arith.cmpi sle, %912, %c1_i64 : i64
cf.assert %913, "must have at most one inferred (negative) dimension"
%914 = arith.muli %894, %c12_i64 : i64
%915 = arith.muli %914, %898 : i64
%916 = arith.muli %915, %c64_i64 : i64
%917 = arith.divsi %916, %911 : i64
%918 = arith.select %901, %917, %extracted_468 : i64
%919 = arith.select %851, %917, %extracted_454 : i64
%920 = arith.select %910, %917, %extracted_471 : i64
%from_elements_472 = tensor.from_elements %918, %919, %920 : tensor<3xi64>
%reshape_473 = tensor.reshape %concat_448(%from_elements_472) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%921 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_459 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%922 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_459 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%923 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%921, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%924 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%922, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%925 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%923, %924 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%926 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%925, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%927 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%922, %926 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%928 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %927 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%929 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%928 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%930 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%929 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%931 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%930 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_474 = tensor.extract %931[] : tensor<i8>
%932 = arith.extui %extracted_474 : i8 to i64
%extracted_475 = tensor.extract %926[] : tensor<f32>
%933 = arith.extf %extracted_475 : f32 to f64
%934 = arith.index_cast %864 : i64 to index
%935 = arith.index_cast %865 : i64 to index
%936 = tensor.empty(%934, %935) : tensor<?x?x64xi8>
%937 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_459 : tensor<?x?x64xf32>) outs(%936 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %932 : i64 to f32
%6767 = arith.truncf %933 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%938 = arith.index_cast %891 : i64 to index
%939 = arith.index_cast %892 : i64 to index
%940 = tensor.empty(%938, %939) : tensor<?x64x?xf32>
%941 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_466 : tensor<?x?x64xf32>) outs(%940 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%942 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_473 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%943 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_473 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%944 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%942, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%945 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%943, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%946 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%944, %945 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%947 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%946, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%948 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%943, %947 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%949 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %948 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%950 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%949 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%951 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%950 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%952 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%951 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_476 = tensor.extract %952[] : tensor<i8>
%953 = arith.extui %extracted_476 : i8 to i64
%extracted_477 = tensor.extract %947[] : tensor<f32>
%954 = arith.extf %extracted_477 : f32 to f64
%955 = arith.index_cast %918 : i64 to index
%956 = arith.index_cast %919 : i64 to index
%957 = tensor.empty(%955, %956) : tensor<?x?x64xi8>
%958 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_473 : tensor<?x?x64xf32>) outs(%957 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %953 : i64 to f32
%6767 = arith.truncf %954 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%959 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%941 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%960 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%941 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%961 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%959, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%962 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%960, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%963 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%961, %962 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%964 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%963, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%965 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%960, %964 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%966 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %965 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%967 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%966 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%968 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%967 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%969 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%968 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_478 = tensor.extract %969[] : tensor<i8>
%970 = arith.extui %extracted_478 : i8 to i64
%extracted_479 = tensor.extract %964[] : tensor<f32>
%971 = arith.extf %extracted_479 : f32 to f64
%972 = tensor.empty(%938, %939) : tensor<?x64x?xi8>
%973 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%941 : tensor<?x64x?xf32>) outs(%972 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %970 : i64 to f32
%6767 = arith.truncf %971 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%974 = linalg.fill ins(%892 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%975 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%926, %964 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%976 = arith.cmpi eq, %864, %891 : i64
cf.assert %976, "mismatching contracting dimension"
%977 = tensor.empty(%934, %935, %939) : tensor<?x?x?xi32>
%978 = linalg.fill ins(%c0_i32 : i32) outs(%977 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%979 = linalg.batch_matmul ins(%937, %973 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%978 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_480 = tensor.concat dim(0) %expanded_438, %776, %974 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%980 = tensor.empty(%934, %935, %939) : tensor<?x?x?xf32>
%981 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%979 : tensor<?x?x?xi32>) outs(%980 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%982 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%981, %975 : tensor<?x?x?xf32>, tensor<f32>) outs(%980 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%983 = linalg.fill ins(%864 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%984 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%790, %983, %758 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_481 = tensor.extract %984[] : tensor<i64>
%985 = linalg.fill ins(%892 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%986 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%805, %985, %806 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_482 = tensor.extract %986[] : tensor<i64>
%987 = arith.cmpi slt, %extracted_481, %c0_i64 : i64
%988 = arith.select %987, %c1_i64, %extracted_481 : i64
%989 = arith.extui %987 : i1 to i64
%990 = arith.muli %988, %c12_i64 : i64
%991 = arith.muli %990, %extracted_482 : i64
%992 = arith.addi %989, %c1_i64 : i64
%993 = arith.cmpi slt, %extracted_482, %c0_i64 : i64
%994 = arith.select %993, %990, %991 : i64
%995 = arith.select %993, %992, %989 : i64
%996 = arith.muli %994, %892 : i64
%997 = arith.addi %995, %c1_i64 : i64
%998 = arith.cmpi slt, %892, %c0_i64 : i64
%999 = arith.select %998, %994, %996 : i64
%1000 = arith.select %998, %997, %995 : i64
%1001 = arith.cmpi sle, %1000, %c1_i64 : i64
cf.assert %1001, "must have at most one inferred (negative) dimension"
%1002 = arith.muli %864, %865 : i64
%1003 = arith.muli %1002, %892 : i64
%1004 = arith.divsi %1003, %999 : i64
%1005 = arith.select %987, %1004, %extracted_481 : i64
%1006 = arith.select %993, %1004, %extracted_482 : i64
%1007 = arith.select %998, %1004, %892 : i64
%from_elements_483 = tensor.from_elements %1005, %c12_i64, %1006, %1007 : tensor<4xi64>
%reshape_484 = tensor.reshape %982(%from_elements_483) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%1008 = arith.index_cast %1005 : i64 to index
%1009 = arith.index_cast %1006 : i64 to index
%1010 = arith.index_cast %1007 : i64 to index
%1011 = arith.cmpi eq, %1008, %105 : index
cf.assert %1011, "mismatched size for broadcast"
%1012 = arith.cmpi eq, %1009, %112 : index
cf.assert %1012, "mismatched size for broadcast"
%1013 = arith.cmpi eq, %1010, %113 : index
cf.assert %1013, "mismatched size for broadcast"
%1014 = tensor.empty(%1008, %1009, %1010) : tensor<?x12x?x?xf32>
%1015 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_484, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%1014 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%1016 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%1015, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%1014 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_485 = tensor.extract_slice %concat_480[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_486 = tensor.extract %extracted_slice_485[%c0] : tensor<1xi64>
%1017 = arith.cmpi eq, %extracted_486, %c0_i64 : i64
%1018 = arith.extui %1017 : i1 to i64
%1019 = arith.cmpi ne, %1018, %c0_i64 : i64
%1020 = linalg.fill ins(%1019 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1021 = linalg.fill ins(%1005 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1022 = linalg.fill ins(%extracted_486 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1023 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1020, %1021, %1022 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_487 = tensor.extract %1023[] : tensor<i64>
%extracted_slice_488 = tensor.extract_slice %concat_480[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_489 = tensor.extract %extracted_slice_488[%c0] : tensor<1xi64>
%1024 = arith.cmpi eq, %extracted_489, %c0_i64 : i64
%1025 = arith.extui %1024 : i1 to i64
%1026 = arith.cmpi ne, %1025, %c0_i64 : i64
%1027 = linalg.fill ins(%1026 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1028 = linalg.fill ins(%extracted_489 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1029 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1027, %cst_292, %1028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_490 = tensor.extract %1029[] : tensor<i64>
%extracted_slice_491 = tensor.extract_slice %concat_480[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_492 = tensor.extract %extracted_slice_491[%c0] : tensor<1xi64>
%1030 = arith.cmpi eq, %extracted_492, %c0_i64 : i64
%1031 = arith.extui %1030 : i1 to i64
%1032 = arith.cmpi ne, %1031, %c0_i64 : i64
%1033 = linalg.fill ins(%1032 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1034 = linalg.fill ins(%1006 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1035 = linalg.fill ins(%extracted_492 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1036 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1033, %1034, %1035 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_493 = tensor.extract %1036[] : tensor<i64>
%1037 = arith.cmpi slt, %extracted_487, %c0_i64 : i64
%1038 = arith.select %1037, %c1_i64, %extracted_487 : i64
%1039 = arith.extui %1037 : i1 to i64
%1040 = arith.muli %1038, %extracted_490 : i64
%1041 = arith.addi %1039, %c1_i64 : i64
%1042 = arith.cmpi slt, %extracted_490, %c0_i64 : i64
%1043 = arith.select %1042, %1038, %1040 : i64
%1044 = arith.select %1042, %1041, %1039 : i64
%1045 = arith.muli %1043, %extracted_493 : i64
%1046 = arith.addi %1044, %c1_i64 : i64
%1047 = arith.cmpi slt, %extracted_493, %c0_i64 : i64
%1048 = arith.select %1047, %1043, %1045 : i64
%1049 = arith.select %1047, %1046, %1044 : i64
%1050 = arith.cmpi sle, %1049, %c1_i64 : i64
cf.assert %1050, "must have at most one inferred (negative) dimension"
%1051 = arith.muli %1005, %c12_i64 : i64
%1052 = arith.muli %1051, %1006 : i64
%1053 = arith.muli %1052, %1007 : i64
%1054 = arith.divsi %1053, %1048 : i64
%1055 = arith.select %1037, %1054, %extracted_487 : i64
%1056 = arith.select %1042, %1054, %extracted_490 : i64
%1057 = arith.select %1047, %1054, %extracted_493 : i64
%from_elements_494 = tensor.from_elements %1055, %1056, %1057 : tensor<3xi64>
%reshape_495 = tensor.reshape %1016(%from_elements_494) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%1058 = arith.index_cast %1055 : i64 to index
%1059 = arith.index_cast %1056 : i64 to index
%1060 = tensor.empty(%1058, %1059) : tensor<?x?xi64>
%1061 = linalg.fill ins(%c0_i64 : i64) outs(%1060 : tensor<?x?xi64>) -> tensor<?x?xi64>
%1062 = tensor.empty(%1058, %1059) : tensor<?x?xf32>
%1063 = linalg.fill ins(%cst_1 : f32) outs(%1062 : tensor<?x?xf32>) -> tensor<?x?xf32>
%1064:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_495 : tensor<?x?x?xf32>) outs(%1063, %1061 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_496 = tensor.expand_shape %1064#0 [[0], [1, 2]] output_shape [%1058, %1059, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%1065 = arith.index_cast %1057 : i64 to index
%1066 = tensor.empty(%1058, %1059, %1065) : tensor<?x?x?xf32>
%1067 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_495, %expanded_496 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%1066 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1068 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1067 : tensor<?x?x?xf32>) outs(%1066 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1069 = tensor.empty(%1058, %1059) : tensor<?x?x1xf32>
%1070 = linalg.fill ins(%cst_0 : f32) outs(%1069 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%1071 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%1068 : tensor<?x?x?xf32>) outs(%1070 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1072 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1068, %1071 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%1066 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1073 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1072 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1074 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1072 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1075 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1073, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1076 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1074, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1077 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1075, %1076 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1078 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1077, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1079 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1074, %1078 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1080 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1079 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1081 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1080 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1082 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1081 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1083 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1082 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_497 = tensor.extract %1083[] : tensor<i8>
%1084 = arith.extui %extracted_497 : i8 to i64
%extracted_498 = tensor.extract %1078[] : tensor<f32>
%1085 = arith.extf %extracted_498 : f32 to f64
%1086 = tensor.empty(%1058, %1059, %1065) : tensor<?x?x?xi8>
%1087 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1072 : tensor<?x?x?xf32>) outs(%1086 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1084 : i64 to f32
%6767 = arith.truncf %1085 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%1088 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1078, %947 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1089 = arith.cmpi eq, %1055, %918 : i64
cf.assert %1089, "mismatching contracting dimension"
%1090 = arith.cmpi eq, %1057, %919 : i64
cf.assert %1090, "mismatching contracting dimension"
%1091 = tensor.empty(%1058, %1059) : tensor<?x?x64xi32>
%1092 = linalg.fill ins(%c0_i32 : i32) outs(%1091 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%1093 = linalg.batch_matmul ins(%1087, %958 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%1092 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%1094 = tensor.empty(%1058, %1059) : tensor<?x?x64xf32>
%1095 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1093 : tensor<?x?x64xi32>) outs(%1094 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%1096 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1095, %1088 : tensor<?x?x64xf32>, tensor<f32>) outs(%1094 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%1097 = linalg.fill ins(%1055 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1098 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%790, %1097, %758 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_499 = tensor.extract %1098[] : tensor<i64>
%1099 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%805, %cst_7, %806 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_500 = tensor.extract %1099[] : tensor<i64>
%1100 = arith.cmpi slt, %extracted_499, %c0_i64 : i64
%1101 = arith.select %1100, %c1_i64, %extracted_499 : i64
%1102 = arith.extui %1100 : i1 to i64
%1103 = arith.muli %1101, %c12_i64 : i64
%1104 = arith.muli %1103, %extracted_500 : i64
%1105 = arith.addi %1102, %c1_i64 : i64
%1106 = arith.cmpi slt, %extracted_500, %c0_i64 : i64
%1107 = arith.select %1106, %1103, %1104 : i64
%1108 = arith.select %1106, %1105, %1102 : i64
%1109 = arith.muli %1107, %c64_i64 : i64
%1110 = arith.cmpi sle, %1108, %c1_i64 : i64
cf.assert %1110, "must have at most one inferred (negative) dimension"
%1111 = arith.muli %1055, %1056 : i64
%1112 = arith.muli %1111, %c64_i64 : i64
%1113 = arith.divsi %1112, %1109 : i64
%1114 = arith.select %1100, %1113, %extracted_499 : i64
%1115 = arith.select %1106, %1113, %extracted_500 : i64
%from_elements_501 = tensor.from_elements %1114, %c12_i64, %1115, %c64_i64 : tensor<4xi64>
%reshape_502 = tensor.reshape %1096(%from_elements_501) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%1116 = arith.index_cast %1114 : i64 to index
%1117 = arith.index_cast %1115 : i64 to index
%1118 = tensor.empty(%1116, %1117) : tensor<?x?x12x64xf32>
%1119 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_502 : tensor<?x12x?x64xf32>) outs(%1118 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%1120 = linalg.fill ins(%1114 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1121 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%790, %1120, %758 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_503 = tensor.extract %1121[] : tensor<i64>
%1122 = linalg.fill ins(%1115 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1123 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%805, %1122, %806 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_504 = tensor.extract %1123[] : tensor<i64>
%1124 = arith.cmpi slt, %extracted_503, %c0_i64 : i64
%1125 = arith.select %1124, %c1_i64, %extracted_503 : i64
%1126 = arith.extui %1124 : i1 to i64
%1127 = arith.muli %1125, %extracted_504 : i64
%1128 = arith.addi %1126, %c1_i64 : i64
%1129 = arith.cmpi slt, %extracted_504, %c0_i64 : i64
%1130 = arith.select %1129, %1125, %1127 : i64
%1131 = arith.select %1129, %1128, %1126 : i64
%1132 = arith.muli %1130, %c768_i64 : i64
%1133 = arith.cmpi sle, %1131, %c1_i64 : i64
cf.assert %1133, "must have at most one inferred (negative) dimension"
%1134 = arith.muli %1114, %1115 : i64
%1135 = arith.muli %1134, %c768_i64 : i64
%1136 = arith.divsi %1135, %1132 : i64
%1137 = arith.select %1124, %1136, %extracted_503 : i64
%1138 = arith.select %1129, %1136, %extracted_504 : i64
%from_elements_505 = tensor.from_elements %1137, %1138, %c768_i64 : tensor<3xi64>
%reshape_506 = tensor.reshape %1119(%from_elements_505) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%1139 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_506 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1140 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_506 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1141 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1139, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1142 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1140, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1143 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1141, %1142 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1144 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1143, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1145 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1140, %1144 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1146 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1145 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1147 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1146 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1148 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1147 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1149 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1148 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_507 = tensor.extract %1149[] : tensor<i8>
%1150 = arith.extui %extracted_507 : i8 to i64
%extracted_508 = tensor.extract %1144[] : tensor<f32>
%1151 = arith.extf %extracted_508 : f32 to f64
%1152 = arith.index_cast %1137 : i64 to index
%1153 = arith.index_cast %1138 : i64 to index
%1154 = tensor.empty(%1152, %1153) : tensor<?x?x768xi8>
%1155 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_506 : tensor<?x?x768xf32>) outs(%1154 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1150 : i64 to f32
%6767 = arith.truncf %1151 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%1156 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1144, %cst_153 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1157 = arith.trunci %1150 : i64 to i32
%1158 = arith.addi %1157, %c-128_i32 : i32
%1159 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1155 : tensor<?x?x768xi8>) outs(%1154 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%1160 = arith.cmpi sge, %1137, %c0_i64 : i64
cf.assert %1160, "negative values not allowed in new dimensions"
%1161 = tensor.empty(%1152) : tensor<?x768x768xi8>
%1162 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_154 : tensor<768x768xi8>) outs(%1161 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1163 = tensor.empty(%1152, %1153) : tensor<?x?x768xi32>
%1164 = linalg.fill ins(%c0_i32 : i32) outs(%1163 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1165 = linalg.quantized_batch_matmul ins(%1159, %1162, %1158, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1164 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1166 = tensor.empty(%1152, %1153) : tensor<?x?x768xf32>
%1167 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1165 : tensor<?x?x768xi32>) outs(%1166 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1168 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1167, %1156 : tensor<?x?x768xf32>, tensor<f32>) outs(%1166 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1169 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_28, %1168 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1166 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1170 = arith.cmpi eq, %727, %1152 : index
cf.assert %1170, "mismatched size for broadcast"
%1171 = arith.cmpi eq, %728, %1153 : index
cf.assert %1171, "mismatched size for broadcast"
%1172 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_435, %1169 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%733 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1173 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %758, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_509 = tensor.extract %1173[] : tensor<i64>
%1174 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %806, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_510 = tensor.extract %1174[] : tensor<i64>
%1175 = arith.cmpi slt, %extracted_509, %c0_i64 : i64
%1176 = arith.select %1175, %c1_i64, %extracted_509 : i64
%1177 = arith.extui %1175 : i1 to i64
%1178 = arith.muli %1176, %extracted_510 : i64
%1179 = arith.addi %1177, %c1_i64 : i64
%1180 = arith.cmpi slt, %extracted_510, %c0_i64 : i64
%1181 = arith.select %1180, %1176, %1178 : i64
%1182 = arith.select %1180, %1179, %1177 : i64
%1183 = arith.cmpi sle, %1182, %c1_i64 : i64
cf.assert %1183, "must have at most one inferred (negative) dimension"
%1184 = arith.divsi %799, %1181 : i64
%1185 = arith.select %1175, %1184, %extracted_509 : i64
%1186 = arith.select %1180, %1184, %extracted_510 : i64
%from_elements_511 = tensor.from_elements %1185, %1186 : tensor<2xi64>
%reshape_512 = tensor.reshape %1172(%from_elements_511) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%1187 = arith.index_cast %1185 : i64 to index
%1188 = tensor.empty(%1187) : tensor<?x1xf32>
%1189 = linalg.fill ins(%cst_0 : f32) outs(%1188 : tensor<?x1xf32>) -> tensor<?x1xf32>
%1190 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_512 : tensor<?x768xf32>) outs(%1189 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1191 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1190 : tensor<?x1xf32>) outs(%1188 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1192 = tensor.empty(%1187) : tensor<?x768xf32>
%1193 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_512, %1191 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1194 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1193, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1195 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%1194 : tensor<?x768xf32>) outs(%1189 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1196 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1195 : tensor<?x1xf32>) outs(%1188 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1197 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1196, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%1188 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1198 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1197 : tensor<?x1xf32>) outs(%1188 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1199 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1193, %1198 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1200 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1199, %cst_33 : tensor<?x768xf32>, tensor<768xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1201 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1200, %cst_34 : tensor<?x768xf32>, tensor<768xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1202 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1201 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1203 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1201 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1204 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1202, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1205 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1203, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1206 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1204, %1205 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1207 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1206, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1208 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1203, %1207 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1209 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1208 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1210 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1209 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1211 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1210 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1212 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1211 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_513 = tensor.extract %1212[] : tensor<i8>
%1213 = arith.extui %extracted_513 : i8 to i64
%extracted_514 = tensor.extract %1207[] : tensor<f32>
%1214 = arith.extf %extracted_514 : f32 to f64
%1215 = tensor.empty(%1187) : tensor<?x768xi8>
%1216 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1201 : tensor<?x768xf32>) outs(%1215 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1213 : i64 to f32
%6767 = arith.truncf %1214 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%1217 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1207, %cst_155 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1218 = tensor.empty(%1187) : tensor<?x3072xi32>
%1219 = linalg.fill ins(%c0_i32 : i32) outs(%1218 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%1220 = arith.trunci %1213 : i64 to i32
%1221 = arith.addi %1220, %c-128_i32 : i32
%1222 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1216 : tensor<?x768xi8>) outs(%1215 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%1223 = linalg.quantized_matmul ins(%1222, %cst_156, %1221, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%1219 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%1224 = tensor.empty(%1187) : tensor<?x3072xf32>
%1225 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1223 : tensor<?x3072xi32>) outs(%1224 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1226 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1225, %1217 : tensor<?x3072xf32>, tensor<f32>) outs(%1224 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1227 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1226, %cst_31 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%1224 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1228 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1227 : tensor<?x3072xf32>) outs(%1224 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%1229 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1228 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1230 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1228 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1231 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1229, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1232 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1230, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1233 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1231, %1232 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1234 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1233, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1235 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1230, %1234 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1236 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1235 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1237 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1236 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1238 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1237 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1239 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1238 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_515 = tensor.extract %1239[] : tensor<i8>
%1240 = arith.extui %extracted_515 : i8 to i64
%extracted_516 = tensor.extract %1234[] : tensor<f32>
%1241 = arith.extf %extracted_516 : f32 to f64
%1242 = tensor.empty(%1187) : tensor<?x3072xi8>
%1243 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1228 : tensor<?x3072xf32>) outs(%1242 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1240 : i64 to f32
%6767 = arith.truncf %1241 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%1244 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1234, %cst_157 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1245 = tensor.empty(%1187) : tensor<?x768xi32>
%1246 = linalg.fill ins(%c0_i32 : i32) outs(%1245 : tensor<?x768xi32>) -> tensor<?x768xi32>
%1247 = arith.trunci %1240 : i64 to i32
%1248 = arith.addi %1247, %c-128_i32 : i32
%1249 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1243 : tensor<?x3072xi8>) outs(%1242 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%1250 = linalg.quantized_matmul ins(%1249, %cst_158, %1248, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%1246 : tensor<?x768xi32>) -> tensor<?x768xi32>
%1251 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1250 : tensor<?x768xi32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1252 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1251, %1244 : tensor<?x768xf32>, tensor<f32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1253 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1252, %cst_32 : tensor<?x768xf32>, tensor<768xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1254 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_512, %1253 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%1192 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1255 = linalg.fill ins(%1185 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1256 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%790, %1255, %758 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_517 = tensor.extract %1256[] : tensor<i64>
%1257 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%805, %cst_8, %806 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_518 = tensor.extract %1257[] : tensor<i64>
%1258 = arith.cmpi slt, %extracted_517, %c0_i64 : i64
%1259 = arith.select %1258, %c1_i64, %extracted_517 : i64
%1260 = arith.extui %1258 : i1 to i64
%1261 = arith.muli %1259, %extracted_518 : i64
%1262 = arith.addi %1260, %c1_i64 : i64
%1263 = arith.cmpi slt, %extracted_518, %c0_i64 : i64
%1264 = arith.select %1263, %1259, %1261 : i64
%1265 = arith.select %1263, %1262, %1260 : i64
%1266 = arith.muli %1264, %c768_i64 : i64
%1267 = arith.cmpi sle, %1265, %c1_i64 : i64
cf.assert %1267, "must have at most one inferred (negative) dimension"
%1268 = arith.muli %1185, %c768_i64 : i64
%1269 = arith.divsi %1268, %1266 : i64
%1270 = arith.select %1258, %1269, %extracted_517 : i64
%1271 = arith.select %1263, %1269, %extracted_518 : i64
%from_elements_519 = tensor.from_elements %1270, %1271, %c768_i64 : tensor<3xi64>
%reshape_520 = tensor.reshape %1254(%from_elements_519) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%1272 = arith.index_cast %1270 : i64 to index
%1273 = arith.index_cast %1271 : i64 to index
%1274 = tensor.empty(%1272, %1273) : tensor<?x?x1xf32>
%1275 = linalg.fill ins(%cst_0 : f32) outs(%1274 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%1276 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_520 : tensor<?x?x768xf32>) outs(%1275 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1277 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1276 : tensor<?x?x1xf32>) outs(%1274 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1278 = tensor.empty(%1272, %1273) : tensor<?x?x768xf32>
%1279 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_520, %1277 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1280 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1279, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1281 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%1280 : tensor<?x?x768xf32>) outs(%1275 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1282 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1281 : tensor<?x?x1xf32>) outs(%1274 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1283 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1282, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%1274 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1284 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1283 : tensor<?x?x1xf32>) outs(%1274 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1285 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1279, %1284 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1286 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1285, %cst_39 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1287 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1286, %cst_40 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1288 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1287 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1289 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1287 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1290 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1288, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1291 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1289, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1292 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1290, %1291 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1293 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1292, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1294 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1289, %1293 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1295 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1294 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1296 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1295 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1297 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1296 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1298 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1297 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_521 = tensor.extract %1298[] : tensor<i8>
%1299 = arith.extui %extracted_521 : i8 to i64
%extracted_522 = tensor.extract %1293[] : tensor<f32>
%1300 = arith.extf %extracted_522 : f32 to f64
%1301 = tensor.empty(%1272, %1273) : tensor<?x?x768xi8>
%1302 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1287 : tensor<?x?x768xf32>) outs(%1301 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1299 : i64 to f32
%6767 = arith.truncf %1300 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%1303 = linalg.fill ins(%1270 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1304 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1293, %cst_159 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1305 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1293, %cst_161 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1306 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1293, %cst_163 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1307 = arith.trunci %1299 : i64 to i32
%1308 = arith.addi %1307, %c-128_i32 : i32
%1309 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1302 : tensor<?x?x768xi8>) outs(%1301 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%1310 = arith.cmpi sge, %1270, %c0_i64 : i64
cf.assert %1310, "negative values not allowed in new dimensions"
%1311 = tensor.empty(%1272) : tensor<?x768x768xi8>
%1312 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_160 : tensor<768x768xi8>) outs(%1311 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1313 = tensor.empty(%1272, %1273) : tensor<?x?x768xi32>
%1314 = linalg.fill ins(%c0_i32 : i32) outs(%1313 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1315 = linalg.quantized_batch_matmul ins(%1309, %1312, %1308, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1314 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %1310, "negative values not allowed in new dimensions"
%1316 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_162 : tensor<768x768xi8>) outs(%1311 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1317 = linalg.quantized_batch_matmul ins(%1309, %1316, %1308, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1314 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %1310, "negative values not allowed in new dimensions"
%1318 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_164 : tensor<768x768xi8>) outs(%1311 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1319 = linalg.quantized_batch_matmul ins(%1309, %1318, %1308, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1314 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1320 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1303, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%1321 = linalg.fill ins(%1271 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%1322 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1315 : tensor<?x?x768xi32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1323 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1317 : tensor<?x?x768xi32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1324 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1319 : tensor<?x?x768xi32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_523 = tensor.expand_shape %1320 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%1325 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1322, %1304 : tensor<?x?x768xf32>, tensor<f32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1326 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1323, %1305 : tensor<?x?x768xf32>, tensor<f32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1327 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1324, %1306 : tensor<?x?x768xf32>, tensor<f32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_524 = tensor.concat dim(0) %expanded_523, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%1328 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_37, %1325 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1329 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_35, %1326 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1330 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_36, %1327 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1331 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1328, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1332 = arith.cmpi eq, %1270, %c0_i64 : i64
%1333 = arith.extui %1332 : i1 to i64
%1334 = arith.cmpi ne, %1333, %c0_i64 : i64
%1335 = linalg.fill ins(%1334 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1336 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1335, %1303, %1303 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_525 = tensor.extract %1336[] : tensor<i64>
%1337 = arith.cmpi slt, %extracted_525, %c0_i64 : i64
%1338 = arith.select %1337, %c1_i64, %extracted_525 : i64
%1339 = arith.extui %1337 : i1 to i64
%1340 = arith.addi %1339, %c1_i64 : i64
%1341 = arith.muli %1338, %c768_i64 : i64
%1342 = arith.cmpi sle, %1340, %c1_i64 : i64
cf.assert %1342, "must have at most one inferred (negative) dimension"
%1343 = arith.muli %1270, %1271 : i64
%1344 = arith.muli %1343, %c768_i64 : i64
%1345 = arith.divsi %1344, %1341 : i64
%1346 = arith.select %1337, %1345, %extracted_525 : i64
%from_elements_526 = tensor.from_elements %1346, %1345, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_527 = tensor.reshape %1329(%from_elements_526) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %1342, "must have at most one inferred (negative) dimension"
%reshape_528 = tensor.reshape %1330(%from_elements_526) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%1347 = arith.cmpi eq, %1271, %c0_i64 : i64
%1348 = arith.extui %1347 : i1 to i64
%1349 = arith.cmpi ne, %1348, %c0_i64 : i64
%1350 = linalg.fill ins(%1349 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1351 = linalg.fill ins(%1271 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1352 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1350, %1351, %1351 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_529 = tensor.extract %1352[] : tensor<i64>
%1353 = arith.muli %1338, %extracted_529 : i64
%1354 = arith.cmpi slt, %extracted_529, %c0_i64 : i64
%1355 = arith.select %1354, %1338, %1353 : i64
%1356 = arith.select %1354, %1340, %1339 : i64
%1357 = arith.muli %1355, %c768_i64 : i64
%1358 = arith.cmpi sle, %1356, %c1_i64 : i64
cf.assert %1358, "must have at most one inferred (negative) dimension"
%1359 = arith.divsi %1344, %1357 : i64
%1360 = arith.select %1337, %1359, %extracted_525 : i64
%1361 = arith.select %1354, %1359, %extracted_529 : i64
%from_elements_530 = tensor.from_elements %1360, %1361, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_531 = tensor.reshape %1331(%from_elements_530) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%1362 = arith.index_cast %1346 : i64 to index
%1363 = arith.index_cast %1345 : i64 to index
%1364 = tensor.empty(%1362, %1363) : tensor<?x12x?x64xf32>
%1365 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_527 : tensor<?x?x12x64xf32>) outs(%1364 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%1366 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_528 : tensor<?x?x12x64xf32>) outs(%1364 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%1367 = arith.index_cast %1360 : i64 to index
%1368 = arith.index_cast %1361 : i64 to index
%1369 = tensor.empty(%1367, %1368) : tensor<?x12x?x64xf32>
%1370 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_531 : tensor<?x?x12x64xf32>) outs(%1369 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_532 = tensor.concat dim(2) %arg6, %1365 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_533 = tensor.concat dim(2) %arg7, %1366 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_534 = tensor.extract_slice %concat_524[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_535 = tensor.extract %extracted_slice_534[%c0] : tensor<1xi64>
%1371 = arith.cmpi eq, %extracted_535, %c0_i64 : i64
%1372 = arith.extui %1371 : i1 to i64
%1373 = arith.cmpi ne, %1372, %c0_i64 : i64
%1374 = linalg.fill ins(%1373 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1375 = linalg.fill ins(%1360 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1376 = linalg.fill ins(%extracted_535 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1377 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1374, %1375, %1376 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_536 = tensor.extract %1377[] : tensor<i64>
%extracted_slice_537 = tensor.extract_slice %concat_524[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_538 = tensor.extract %extracted_slice_537[%c0] : tensor<1xi64>
%1378 = arith.cmpi eq, %extracted_538, %c0_i64 : i64
%1379 = arith.extui %1378 : i1 to i64
%1380 = arith.cmpi ne, %1379, %c0_i64 : i64
%1381 = linalg.fill ins(%1380 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1382 = linalg.fill ins(%extracted_538 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1383 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1381, %cst_292, %1382 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_539 = tensor.extract %1383[] : tensor<i64>
%extracted_slice_540 = tensor.extract_slice %concat_524[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_541 = tensor.extract %extracted_slice_540[%c0] : tensor<1xi64>
%1384 = arith.cmpi eq, %extracted_541, %c0_i64 : i64
%1385 = arith.extui %1384 : i1 to i64
%1386 = arith.cmpi ne, %1385, %c0_i64 : i64
%1387 = linalg.fill ins(%1386 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1388 = linalg.fill ins(%1361 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1389 = linalg.fill ins(%extracted_541 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1390 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1387, %1388, %1389 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_542 = tensor.extract %1390[] : tensor<i64>
%1391 = arith.cmpi slt, %extracted_536, %c0_i64 : i64
%1392 = arith.select %1391, %c1_i64, %extracted_536 : i64
%1393 = arith.extui %1391 : i1 to i64
%1394 = arith.muli %1392, %extracted_539 : i64
%1395 = arith.addi %1393, %c1_i64 : i64
%1396 = arith.cmpi slt, %extracted_539, %c0_i64 : i64
%1397 = arith.select %1396, %1392, %1394 : i64
%1398 = arith.select %1396, %1395, %1393 : i64
%1399 = arith.muli %1397, %extracted_542 : i64
%1400 = arith.addi %1398, %c1_i64 : i64
%1401 = arith.cmpi slt, %extracted_542, %c0_i64 : i64
%1402 = arith.select %1401, %1397, %1399 : i64
%1403 = arith.select %1401, %1400, %1398 : i64
%1404 = arith.cmpi sle, %1403, %c1_i64 : i64
cf.assert %1404, "must have at most one inferred (negative) dimension"
%1405 = arith.muli %1360, %c12_i64 : i64
%1406 = arith.muli %1405, %1361 : i64
%1407 = arith.muli %1406, %c64_i64 : i64
%1408 = arith.divsi %1407, %1402 : i64
%1409 = arith.select %1391, %1408, %extracted_536 : i64
%1410 = arith.select %1396, %1408, %extracted_539 : i64
%1411 = arith.select %1401, %1408, %extracted_542 : i64
%from_elements_543 = tensor.from_elements %1409, %1410, %1411 : tensor<3xi64>
%reshape_544 = tensor.reshape %1370(%from_elements_543) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_545 = tensor.dim %arg6, %c0 : tensor<?x12x?x64xf32>
%1412 = arith.index_cast %dim_545 : index to i64
%1413 = linalg.fill ins(%1412 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1414 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1374, %1413, %1376 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_546 = tensor.extract %1414[] : tensor<i64>
%dim_547 = tensor.dim %arg6, %c2 : tensor<?x12x?x64xf32>
%dim_548 = tensor.dim %1365, %c2 : tensor<?x12x?x64xf32>
%1415 = affine.apply #map15()[%dim_547, %dim_548]
%1416 = arith.index_cast %1415 : index to i64
%1417 = linalg.fill ins(%1416 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1418 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1387, %1417, %1389 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_549 = tensor.extract %1418[] : tensor<i64>
%1419 = arith.cmpi slt, %extracted_546, %c0_i64 : i64
%1420 = arith.select %1419, %c1_i64, %extracted_546 : i64
%1421 = arith.extui %1419 : i1 to i64
%1422 = arith.muli %1420, %extracted_539 : i64
%1423 = arith.addi %1421, %c1_i64 : i64
%1424 = arith.select %1396, %1420, %1422 : i64
%1425 = arith.select %1396, %1423, %1421 : i64
%1426 = arith.muli %1424, %extracted_549 : i64
%1427 = arith.addi %1425, %c1_i64 : i64
%1428 = arith.cmpi slt, %extracted_549, %c0_i64 : i64
%1429 = arith.select %1428, %1424, %1426 : i64
%1430 = arith.select %1428, %1427, %1425 : i64
%1431 = arith.cmpi sle, %1430, %c1_i64 : i64
cf.assert %1431, "must have at most one inferred (negative) dimension"
%1432 = arith.muli %1412, %c12_i64 : i64
%1433 = arith.muli %1432, %1416 : i64
%1434 = arith.muli %1433, %c64_i64 : i64
%1435 = arith.divsi %1434, %1429 : i64
%1436 = arith.select %1419, %1435, %extracted_546 : i64
%1437 = arith.select %1396, %1435, %extracted_539 : i64
%1438 = arith.select %1428, %1435, %extracted_549 : i64
%from_elements_550 = tensor.from_elements %1436, %1437, %1438 : tensor<3xi64>
%reshape_551 = tensor.reshape %concat_532(%from_elements_550) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_552 = tensor.dim %arg7, %c0 : tensor<?x12x?x64xf32>
%1439 = arith.index_cast %dim_552 : index to i64
%1440 = linalg.fill ins(%1439 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1441 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1374, %1440, %1376 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_553 = tensor.extract %1441[] : tensor<i64>
%dim_554 = tensor.dim %arg7, %c2 : tensor<?x12x?x64xf32>
%dim_555 = tensor.dim %1366, %c2 : tensor<?x12x?x64xf32>
%1442 = affine.apply #map15()[%dim_554, %dim_555]
%1443 = arith.index_cast %1442 : index to i64
%1444 = linalg.fill ins(%1443 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1445 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1387, %1444, %1389 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_556 = tensor.extract %1445[] : tensor<i64>
%1446 = arith.cmpi slt, %extracted_553, %c0_i64 : i64
%1447 = arith.select %1446, %c1_i64, %extracted_553 : i64
%1448 = arith.extui %1446 : i1 to i64
%1449 = arith.muli %1447, %extracted_539 : i64
%1450 = arith.addi %1448, %c1_i64 : i64
%1451 = arith.select %1396, %1447, %1449 : i64
%1452 = arith.select %1396, %1450, %1448 : i64
%1453 = arith.muli %1451, %extracted_556 : i64
%1454 = arith.addi %1452, %c1_i64 : i64
%1455 = arith.cmpi slt, %extracted_556, %c0_i64 : i64
%1456 = arith.select %1455, %1451, %1453 : i64
%1457 = arith.select %1455, %1454, %1452 : i64
%1458 = arith.cmpi sle, %1457, %c1_i64 : i64
cf.assert %1458, "must have at most one inferred (negative) dimension"
%1459 = arith.muli %1439, %c12_i64 : i64
%1460 = arith.muli %1459, %1443 : i64
%1461 = arith.muli %1460, %c64_i64 : i64
%1462 = arith.divsi %1461, %1456 : i64
%1463 = arith.select %1446, %1462, %extracted_553 : i64
%1464 = arith.select %1396, %1462, %extracted_539 : i64
%1465 = arith.select %1455, %1462, %extracted_556 : i64
%from_elements_557 = tensor.from_elements %1463, %1464, %1465 : tensor<3xi64>
%reshape_558 = tensor.reshape %concat_533(%from_elements_557) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%1466 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_544 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1467 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_544 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1468 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1466, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1469 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1467, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1470 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1468, %1469 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1471 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1470, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1472 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1467, %1471 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1473 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1472 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1474 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1473 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1475 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1474 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1476 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1475 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_559 = tensor.extract %1476[] : tensor<i8>
%1477 = arith.extui %extracted_559 : i8 to i64
%extracted_560 = tensor.extract %1471[] : tensor<f32>
%1478 = arith.extf %extracted_560 : f32 to f64
%1479 = arith.index_cast %1409 : i64 to index
%1480 = arith.index_cast %1410 : i64 to index
%1481 = tensor.empty(%1479, %1480) : tensor<?x?x64xi8>
%1482 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_544 : tensor<?x?x64xf32>) outs(%1481 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1477 : i64 to f32
%6767 = arith.truncf %1478 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%1483 = arith.index_cast %1436 : i64 to index
%1484 = arith.index_cast %1437 : i64 to index
%1485 = tensor.empty(%1483, %1484) : tensor<?x64x?xf32>
%1486 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_551 : tensor<?x?x64xf32>) outs(%1485 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%1487 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_558 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1488 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_558 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1489 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1487, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1490 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1488, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1491 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1489, %1490 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1492 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1491, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1493 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1488, %1492 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1494 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1493 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1495 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1494 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1496 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1495 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1497 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1496 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_561 = tensor.extract %1497[] : tensor<i8>
%1498 = arith.extui %extracted_561 : i8 to i64
%extracted_562 = tensor.extract %1492[] : tensor<f32>
%1499 = arith.extf %extracted_562 : f32 to f64
%1500 = arith.index_cast %1463 : i64 to index
%1501 = arith.index_cast %1464 : i64 to index
%1502 = tensor.empty(%1500, %1501) : tensor<?x?x64xi8>
%1503 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_558 : tensor<?x?x64xf32>) outs(%1502 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1498 : i64 to f32
%6767 = arith.truncf %1499 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%1504 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1486 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1505 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1486 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1506 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1504, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1507 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1505, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1508 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1506, %1507 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1509 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1508, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1510 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1505, %1509 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1511 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1510 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1512 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1511 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1513 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1512 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1514 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1513 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_563 = tensor.extract %1514[] : tensor<i8>
%1515 = arith.extui %extracted_563 : i8 to i64
%extracted_564 = tensor.extract %1509[] : tensor<f32>
%1516 = arith.extf %extracted_564 : f32 to f64
%1517 = tensor.empty(%1483, %1484) : tensor<?x64x?xi8>
%1518 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1486 : tensor<?x64x?xf32>) outs(%1517 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1515 : i64 to f32
%6767 = arith.truncf %1516 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%1519 = linalg.fill ins(%1437 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%1520 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1471, %1509 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1521 = arith.cmpi eq, %1409, %1436 : i64
cf.assert %1521, "mismatching contracting dimension"
%1522 = tensor.empty(%1479, %1480, %1484) : tensor<?x?x?xi32>
%1523 = linalg.fill ins(%c0_i32 : i32) outs(%1522 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%1524 = linalg.batch_matmul ins(%1482, %1518 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%1523 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_565 = tensor.concat dim(0) %expanded_523, %1321, %1519 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%1525 = tensor.empty(%1479, %1480, %1484) : tensor<?x?x?xf32>
%1526 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1524 : tensor<?x?x?xi32>) outs(%1525 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1527 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1526, %1520 : tensor<?x?x?xf32>, tensor<f32>) outs(%1525 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1528 = linalg.fill ins(%1409 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1529 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1335, %1528, %1303 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_566 = tensor.extract %1529[] : tensor<i64>
%1530 = linalg.fill ins(%1437 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1531 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1350, %1530, %1351 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_567 = tensor.extract %1531[] : tensor<i64>
%1532 = arith.cmpi slt, %extracted_566, %c0_i64 : i64
%1533 = arith.select %1532, %c1_i64, %extracted_566 : i64
%1534 = arith.extui %1532 : i1 to i64
%1535 = arith.muli %1533, %c12_i64 : i64
%1536 = arith.muli %1535, %extracted_567 : i64
%1537 = arith.addi %1534, %c1_i64 : i64
%1538 = arith.cmpi slt, %extracted_567, %c0_i64 : i64
%1539 = arith.select %1538, %1535, %1536 : i64
%1540 = arith.select %1538, %1537, %1534 : i64
%1541 = arith.muli %1539, %1437 : i64
%1542 = arith.addi %1540, %c1_i64 : i64
%1543 = arith.cmpi slt, %1437, %c0_i64 : i64
%1544 = arith.select %1543, %1539, %1541 : i64
%1545 = arith.select %1543, %1542, %1540 : i64
%1546 = arith.cmpi sle, %1545, %c1_i64 : i64
cf.assert %1546, "must have at most one inferred (negative) dimension"
%1547 = arith.muli %1409, %1410 : i64
%1548 = arith.muli %1547, %1437 : i64
%1549 = arith.divsi %1548, %1544 : i64
%1550 = arith.select %1532, %1549, %extracted_566 : i64
%1551 = arith.select %1538, %1549, %extracted_567 : i64
%1552 = arith.select %1543, %1549, %1437 : i64
%from_elements_568 = tensor.from_elements %1550, %c12_i64, %1551, %1552 : tensor<4xi64>
%reshape_569 = tensor.reshape %1527(%from_elements_568) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%1553 = arith.index_cast %1550 : i64 to index
%1554 = arith.index_cast %1551 : i64 to index
%1555 = arith.index_cast %1552 : i64 to index
%1556 = arith.cmpi eq, %1553, %105 : index
cf.assert %1556, "mismatched size for broadcast"
%1557 = arith.cmpi eq, %1554, %112 : index
cf.assert %1557, "mismatched size for broadcast"
%1558 = arith.cmpi eq, %1555, %113 : index
cf.assert %1558, "mismatched size for broadcast"
%1559 = tensor.empty(%1553, %1554, %1555) : tensor<?x12x?x?xf32>
%1560 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_569, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%1559 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%1561 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%1560, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%1559 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_570 = tensor.extract_slice %concat_565[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_571 = tensor.extract %extracted_slice_570[%c0] : tensor<1xi64>
%1562 = arith.cmpi eq, %extracted_571, %c0_i64 : i64
%1563 = arith.extui %1562 : i1 to i64
%1564 = arith.cmpi ne, %1563, %c0_i64 : i64
%1565 = linalg.fill ins(%1564 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1566 = linalg.fill ins(%1550 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1567 = linalg.fill ins(%extracted_571 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1568 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1565, %1566, %1567 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_572 = tensor.extract %1568[] : tensor<i64>
%extracted_slice_573 = tensor.extract_slice %concat_565[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_574 = tensor.extract %extracted_slice_573[%c0] : tensor<1xi64>
%1569 = arith.cmpi eq, %extracted_574, %c0_i64 : i64
%1570 = arith.extui %1569 : i1 to i64
%1571 = arith.cmpi ne, %1570, %c0_i64 : i64
%1572 = linalg.fill ins(%1571 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1573 = linalg.fill ins(%extracted_574 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1574 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1572, %cst_292, %1573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_575 = tensor.extract %1574[] : tensor<i64>
%extracted_slice_576 = tensor.extract_slice %concat_565[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_577 = tensor.extract %extracted_slice_576[%c0] : tensor<1xi64>
%1575 = arith.cmpi eq, %extracted_577, %c0_i64 : i64
%1576 = arith.extui %1575 : i1 to i64
%1577 = arith.cmpi ne, %1576, %c0_i64 : i64
%1578 = linalg.fill ins(%1577 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1579 = linalg.fill ins(%1551 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1580 = linalg.fill ins(%extracted_577 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1581 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1578, %1579, %1580 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_578 = tensor.extract %1581[] : tensor<i64>
%1582 = arith.cmpi slt, %extracted_572, %c0_i64 : i64
%1583 = arith.select %1582, %c1_i64, %extracted_572 : i64
%1584 = arith.extui %1582 : i1 to i64
%1585 = arith.muli %1583, %extracted_575 : i64
%1586 = arith.addi %1584, %c1_i64 : i64
%1587 = arith.cmpi slt, %extracted_575, %c0_i64 : i64
%1588 = arith.select %1587, %1583, %1585 : i64
%1589 = arith.select %1587, %1586, %1584 : i64
%1590 = arith.muli %1588, %extracted_578 : i64
%1591 = arith.addi %1589, %c1_i64 : i64
%1592 = arith.cmpi slt, %extracted_578, %c0_i64 : i64
%1593 = arith.select %1592, %1588, %1590 : i64
%1594 = arith.select %1592, %1591, %1589 : i64
%1595 = arith.cmpi sle, %1594, %c1_i64 : i64
cf.assert %1595, "must have at most one inferred (negative) dimension"
%1596 = arith.muli %1550, %c12_i64 : i64
%1597 = arith.muli %1596, %1551 : i64
%1598 = arith.muli %1597, %1552 : i64
%1599 = arith.divsi %1598, %1593 : i64
%1600 = arith.select %1582, %1599, %extracted_572 : i64
%1601 = arith.select %1587, %1599, %extracted_575 : i64
%1602 = arith.select %1592, %1599, %extracted_578 : i64
%from_elements_579 = tensor.from_elements %1600, %1601, %1602 : tensor<3xi64>
%reshape_580 = tensor.reshape %1561(%from_elements_579) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%1603 = arith.index_cast %1600 : i64 to index
%1604 = arith.index_cast %1601 : i64 to index
%1605 = tensor.empty(%1603, %1604) : tensor<?x?xi64>
%1606 = linalg.fill ins(%c0_i64 : i64) outs(%1605 : tensor<?x?xi64>) -> tensor<?x?xi64>
%1607 = tensor.empty(%1603, %1604) : tensor<?x?xf32>
%1608 = linalg.fill ins(%cst_1 : f32) outs(%1607 : tensor<?x?xf32>) -> tensor<?x?xf32>
%1609:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_580 : tensor<?x?x?xf32>) outs(%1608, %1606 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_581 = tensor.expand_shape %1609#0 [[0], [1, 2]] output_shape [%1603, %1604, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%1610 = arith.index_cast %1602 : i64 to index
%1611 = tensor.empty(%1603, %1604, %1610) : tensor<?x?x?xf32>
%1612 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_580, %expanded_581 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%1611 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1613 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1612 : tensor<?x?x?xf32>) outs(%1611 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1614 = tensor.empty(%1603, %1604) : tensor<?x?x1xf32>
%1615 = linalg.fill ins(%cst_0 : f32) outs(%1614 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%1616 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%1613 : tensor<?x?x?xf32>) outs(%1615 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1617 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1613, %1616 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%1611 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%1618 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1617 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1619 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1617 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1620 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1618, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1621 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1619, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1622 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1620, %1621 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1623 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1622, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1624 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1619, %1623 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1625 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1624 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1626 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1625 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1627 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1626 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1628 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1627 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_582 = tensor.extract %1628[] : tensor<i8>
%1629 = arith.extui %extracted_582 : i8 to i64
%extracted_583 = tensor.extract %1623[] : tensor<f32>
%1630 = arith.extf %extracted_583 : f32 to f64
%1631 = tensor.empty(%1603, %1604, %1610) : tensor<?x?x?xi8>
%1632 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1617 : tensor<?x?x?xf32>) outs(%1631 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1629 : i64 to f32
%6767 = arith.truncf %1630 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%1633 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1623, %1492 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1634 = arith.cmpi eq, %1600, %1463 : i64
cf.assert %1634, "mismatching contracting dimension"
%1635 = arith.cmpi eq, %1602, %1464 : i64
cf.assert %1635, "mismatching contracting dimension"
%1636 = tensor.empty(%1603, %1604) : tensor<?x?x64xi32>
%1637 = linalg.fill ins(%c0_i32 : i32) outs(%1636 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%1638 = linalg.batch_matmul ins(%1632, %1503 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%1637 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%1639 = tensor.empty(%1603, %1604) : tensor<?x?x64xf32>
%1640 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1638 : tensor<?x?x64xi32>) outs(%1639 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%1641 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1640, %1633 : tensor<?x?x64xf32>, tensor<f32>) outs(%1639 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%1642 = linalg.fill ins(%1600 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1643 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1335, %1642, %1303 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_584 = tensor.extract %1643[] : tensor<i64>
%1644 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1350, %cst_7, %1351 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_585 = tensor.extract %1644[] : tensor<i64>
%1645 = arith.cmpi slt, %extracted_584, %c0_i64 : i64
%1646 = arith.select %1645, %c1_i64, %extracted_584 : i64
%1647 = arith.extui %1645 : i1 to i64
%1648 = arith.muli %1646, %c12_i64 : i64
%1649 = arith.muli %1648, %extracted_585 : i64
%1650 = arith.addi %1647, %c1_i64 : i64
%1651 = arith.cmpi slt, %extracted_585, %c0_i64 : i64
%1652 = arith.select %1651, %1648, %1649 : i64
%1653 = arith.select %1651, %1650, %1647 : i64
%1654 = arith.muli %1652, %c64_i64 : i64
%1655 = arith.cmpi sle, %1653, %c1_i64 : i64
cf.assert %1655, "must have at most one inferred (negative) dimension"
%1656 = arith.muli %1600, %1601 : i64
%1657 = arith.muli %1656, %c64_i64 : i64
%1658 = arith.divsi %1657, %1654 : i64
%1659 = arith.select %1645, %1658, %extracted_584 : i64
%1660 = arith.select %1651, %1658, %extracted_585 : i64
%from_elements_586 = tensor.from_elements %1659, %c12_i64, %1660, %c64_i64 : tensor<4xi64>
%reshape_587 = tensor.reshape %1641(%from_elements_586) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%1661 = arith.index_cast %1659 : i64 to index
%1662 = arith.index_cast %1660 : i64 to index
%1663 = tensor.empty(%1661, %1662) : tensor<?x?x12x64xf32>
%1664 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_587 : tensor<?x12x?x64xf32>) outs(%1663 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%1665 = linalg.fill ins(%1659 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1666 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1335, %1665, %1303 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_588 = tensor.extract %1666[] : tensor<i64>
%1667 = linalg.fill ins(%1660 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1668 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1350, %1667, %1351 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_589 = tensor.extract %1668[] : tensor<i64>
%1669 = arith.cmpi slt, %extracted_588, %c0_i64 : i64
%1670 = arith.select %1669, %c1_i64, %extracted_588 : i64
%1671 = arith.extui %1669 : i1 to i64
%1672 = arith.muli %1670, %extracted_589 : i64
%1673 = arith.addi %1671, %c1_i64 : i64
%1674 = arith.cmpi slt, %extracted_589, %c0_i64 : i64
%1675 = arith.select %1674, %1670, %1672 : i64
%1676 = arith.select %1674, %1673, %1671 : i64
%1677 = arith.muli %1675, %c768_i64 : i64
%1678 = arith.cmpi sle, %1676, %c1_i64 : i64
cf.assert %1678, "must have at most one inferred (negative) dimension"
%1679 = arith.muli %1659, %1660 : i64
%1680 = arith.muli %1679, %c768_i64 : i64
%1681 = arith.divsi %1680, %1677 : i64
%1682 = arith.select %1669, %1681, %extracted_588 : i64
%1683 = arith.select %1674, %1681, %extracted_589 : i64
%from_elements_590 = tensor.from_elements %1682, %1683, %c768_i64 : tensor<3xi64>
%reshape_591 = tensor.reshape %1664(%from_elements_590) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%1684 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_591 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1685 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_591 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1686 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1684, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1687 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1685, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1688 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1686, %1687 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1689 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1688, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1690 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1685, %1689 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1691 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1690 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1692 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1691 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1693 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1692 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1694 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1693 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_592 = tensor.extract %1694[] : tensor<i8>
%1695 = arith.extui %extracted_592 : i8 to i64
%extracted_593 = tensor.extract %1689[] : tensor<f32>
%1696 = arith.extf %extracted_593 : f32 to f64
%1697 = arith.index_cast %1682 : i64 to index
%1698 = arith.index_cast %1683 : i64 to index
%1699 = tensor.empty(%1697, %1698) : tensor<?x?x768xi8>
%1700 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_591 : tensor<?x?x768xf32>) outs(%1699 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1695 : i64 to f32
%6767 = arith.truncf %1696 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%1701 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1689, %cst_165 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1702 = arith.trunci %1695 : i64 to i32
%1703 = arith.addi %1702, %c-128_i32 : i32
%1704 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1700 : tensor<?x?x768xi8>) outs(%1699 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%1705 = arith.cmpi sge, %1682, %c0_i64 : i64
cf.assert %1705, "negative values not allowed in new dimensions"
%1706 = tensor.empty(%1697) : tensor<?x768x768xi8>
%1707 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_166 : tensor<768x768xi8>) outs(%1706 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1708 = tensor.empty(%1697, %1698) : tensor<?x?x768xi32>
%1709 = linalg.fill ins(%c0_i32 : i32) outs(%1708 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1710 = linalg.quantized_batch_matmul ins(%1704, %1707, %1703, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1709 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1711 = tensor.empty(%1697, %1698) : tensor<?x?x768xf32>
%1712 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1710 : tensor<?x?x768xi32>) outs(%1711 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1713 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1712, %1701 : tensor<?x?x768xf32>, tensor<f32>) outs(%1711 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1714 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_38, %1713 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1711 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1715 = arith.cmpi eq, %1272, %1697 : index
cf.assert %1715, "mismatched size for broadcast"
%1716 = arith.cmpi eq, %1273, %1698 : index
cf.assert %1716, "mismatched size for broadcast"
%1717 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_520, %1714 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%1278 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1718 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %1303, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_594 = tensor.extract %1718[] : tensor<i64>
%1719 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %1351, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_595 = tensor.extract %1719[] : tensor<i64>
%1720 = arith.cmpi slt, %extracted_594, %c0_i64 : i64
%1721 = arith.select %1720, %c1_i64, %extracted_594 : i64
%1722 = arith.extui %1720 : i1 to i64
%1723 = arith.muli %1721, %extracted_595 : i64
%1724 = arith.addi %1722, %c1_i64 : i64
%1725 = arith.cmpi slt, %extracted_595, %c0_i64 : i64
%1726 = arith.select %1725, %1721, %1723 : i64
%1727 = arith.select %1725, %1724, %1722 : i64
%1728 = arith.cmpi sle, %1727, %c1_i64 : i64
cf.assert %1728, "must have at most one inferred (negative) dimension"
%1729 = arith.divsi %1344, %1726 : i64
%1730 = arith.select %1720, %1729, %extracted_594 : i64
%1731 = arith.select %1725, %1729, %extracted_595 : i64
%from_elements_596 = tensor.from_elements %1730, %1731 : tensor<2xi64>
%reshape_597 = tensor.reshape %1717(%from_elements_596) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%1732 = arith.index_cast %1730 : i64 to index
%1733 = tensor.empty(%1732) : tensor<?x1xf32>
%1734 = linalg.fill ins(%cst_0 : f32) outs(%1733 : tensor<?x1xf32>) -> tensor<?x1xf32>
%1735 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_597 : tensor<?x768xf32>) outs(%1734 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1736 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1735 : tensor<?x1xf32>) outs(%1733 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1737 = tensor.empty(%1732) : tensor<?x768xf32>
%1738 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_597, %1736 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1739 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1738, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1740 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%1739 : tensor<?x768xf32>) outs(%1734 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1741 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1740 : tensor<?x1xf32>) outs(%1733 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1742 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1741, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%1733 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1743 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1742 : tensor<?x1xf32>) outs(%1733 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%1744 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%1738, %1743 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1745 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1744, %cst_43 : tensor<?x768xf32>, tensor<768xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1746 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1745, %cst_44 : tensor<?x768xf32>, tensor<768xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1747 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1746 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1748 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1746 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1749 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1747, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1750 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1748, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1751 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1749, %1750 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1752 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1751, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1753 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1748, %1752 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1754 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1753 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1755 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1754 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1756 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1755 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1757 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1756 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_598 = tensor.extract %1757[] : tensor<i8>
%1758 = arith.extui %extracted_598 : i8 to i64
%extracted_599 = tensor.extract %1752[] : tensor<f32>
%1759 = arith.extf %extracted_599 : f32 to f64
%1760 = tensor.empty(%1732) : tensor<?x768xi8>
%1761 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1746 : tensor<?x768xf32>) outs(%1760 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1758 : i64 to f32
%6767 = arith.truncf %1759 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%1762 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1752, %cst_167 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1763 = tensor.empty(%1732) : tensor<?x3072xi32>
%1764 = linalg.fill ins(%c0_i32 : i32) outs(%1763 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%1765 = arith.trunci %1758 : i64 to i32
%1766 = arith.addi %1765, %c-128_i32 : i32
%1767 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1761 : tensor<?x768xi8>) outs(%1760 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%1768 = linalg.quantized_matmul ins(%1767, %cst_168, %1766, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%1764 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%1769 = tensor.empty(%1732) : tensor<?x3072xf32>
%1770 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1768 : tensor<?x3072xi32>) outs(%1769 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1771 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1770, %1762 : tensor<?x3072xf32>, tensor<f32>) outs(%1769 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1772 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1771, %cst_41 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%1769 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%1773 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1772 : tensor<?x3072xf32>) outs(%1769 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%1774 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1773 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1775 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%1773 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1776 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1774, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1777 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1775, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1778 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1776, %1777 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1779 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1778, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1780 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1775, %1779 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1781 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1780 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1782 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1781 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1783 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1782 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1784 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1783 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_600 = tensor.extract %1784[] : tensor<i8>
%1785 = arith.extui %extracted_600 : i8 to i64
%extracted_601 = tensor.extract %1779[] : tensor<f32>
%1786 = arith.extf %extracted_601 : f32 to f64
%1787 = tensor.empty(%1732) : tensor<?x3072xi8>
%1788 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1773 : tensor<?x3072xf32>) outs(%1787 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1785 : i64 to f32
%6767 = arith.truncf %1786 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%1789 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1779, %cst_169 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1790 = tensor.empty(%1732) : tensor<?x768xi32>
%1791 = linalg.fill ins(%c0_i32 : i32) outs(%1790 : tensor<?x768xi32>) -> tensor<?x768xi32>
%1792 = arith.trunci %1785 : i64 to i32
%1793 = arith.addi %1792, %c-128_i32 : i32
%1794 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1788 : tensor<?x3072xi8>) outs(%1787 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%1795 = linalg.quantized_matmul ins(%1794, %cst_170, %1793, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%1791 : tensor<?x768xi32>) -> tensor<?x768xi32>
%1796 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%1795 : tensor<?x768xi32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1797 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%1796, %1789 : tensor<?x768xf32>, tensor<f32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1798 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%1797, %cst_42 : tensor<?x768xf32>, tensor<768xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1799 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_597, %1798 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%1737 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%1800 = linalg.fill ins(%1730 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1801 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1335, %1800, %1303 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_602 = tensor.extract %1801[] : tensor<i64>
%1802 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1350, %cst_8, %1351 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_603 = tensor.extract %1802[] : tensor<i64>
%1803 = arith.cmpi slt, %extracted_602, %c0_i64 : i64
%1804 = arith.select %1803, %c1_i64, %extracted_602 : i64
%1805 = arith.extui %1803 : i1 to i64
%1806 = arith.muli %1804, %extracted_603 : i64
%1807 = arith.addi %1805, %c1_i64 : i64
%1808 = arith.cmpi slt, %extracted_603, %c0_i64 : i64
%1809 = arith.select %1808, %1804, %1806 : i64
%1810 = arith.select %1808, %1807, %1805 : i64
%1811 = arith.muli %1809, %c768_i64 : i64
%1812 = arith.cmpi sle, %1810, %c1_i64 : i64
cf.assert %1812, "must have at most one inferred (negative) dimension"
%1813 = arith.muli %1730, %c768_i64 : i64
%1814 = arith.divsi %1813, %1811 : i64
%1815 = arith.select %1803, %1814, %extracted_602 : i64
%1816 = arith.select %1808, %1814, %extracted_603 : i64
%from_elements_604 = tensor.from_elements %1815, %1816, %c768_i64 : tensor<3xi64>
%reshape_605 = tensor.reshape %1799(%from_elements_604) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%1817 = arith.index_cast %1815 : i64 to index
%1818 = arith.index_cast %1816 : i64 to index
%1819 = tensor.empty(%1817, %1818) : tensor<?x?x1xf32>
%1820 = linalg.fill ins(%cst_0 : f32) outs(%1819 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%1821 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_605 : tensor<?x?x768xf32>) outs(%1820 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1822 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1821 : tensor<?x?x1xf32>) outs(%1819 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1823 = tensor.empty(%1817, %1818) : tensor<?x?x768xf32>
%1824 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_605, %1822 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1825 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1824, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1826 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%1825 : tensor<?x?x768xf32>) outs(%1820 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1827 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1826 : tensor<?x?x1xf32>) outs(%1819 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1828 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1827, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%1819 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1829 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1828 : tensor<?x?x1xf32>) outs(%1819 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%1830 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1824, %1829 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1831 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1830, %cst_49 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1832 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1831, %cst_50 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1833 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1832 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1834 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%1832 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1835 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1833, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1836 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1834, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%1837 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1835, %1836 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1838 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1837, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1839 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1834, %1838 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1840 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %1839 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1841 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1840 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%1842 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1841 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1843 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%1842 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_606 = tensor.extract %1843[] : tensor<i8>
%1844 = arith.extui %extracted_606 : i8 to i64
%extracted_607 = tensor.extract %1838[] : tensor<f32>
%1845 = arith.extf %extracted_607 : f32 to f64
%1846 = tensor.empty(%1817, %1818) : tensor<?x?x768xi8>
%1847 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1832 : tensor<?x?x768xf32>) outs(%1846 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %1844 : i64 to f32
%6767 = arith.truncf %1845 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%1848 = linalg.fill ins(%1815 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1849 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1838, %cst_171 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1850 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1838, %cst_173 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1851 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1838, %cst_175 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%1852 = arith.trunci %1844 : i64 to i32
%1853 = arith.addi %1852, %c-128_i32 : i32
%1854 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1847 : tensor<?x?x768xi8>) outs(%1846 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%1855 = arith.cmpi sge, %1815, %c0_i64 : i64
cf.assert %1855, "negative values not allowed in new dimensions"
%1856 = tensor.empty(%1817) : tensor<?x768x768xi8>
%1857 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_172 : tensor<768x768xi8>) outs(%1856 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1858 = tensor.empty(%1817, %1818) : tensor<?x?x768xi32>
%1859 = linalg.fill ins(%c0_i32 : i32) outs(%1858 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1860 = linalg.quantized_batch_matmul ins(%1854, %1857, %1853, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1859 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %1855, "negative values not allowed in new dimensions"
%1861 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_174 : tensor<768x768xi8>) outs(%1856 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1862 = linalg.quantized_batch_matmul ins(%1854, %1861, %1853, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1859 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %1855, "negative values not allowed in new dimensions"
%1863 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_176 : tensor<768x768xi8>) outs(%1856 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%1864 = linalg.quantized_batch_matmul ins(%1854, %1863, %1853, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%1859 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%1865 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%1848, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%1866 = linalg.fill ins(%1816 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%1867 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1860 : tensor<?x?x768xi32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1868 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1862 : tensor<?x?x768xi32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1869 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1864 : tensor<?x?x768xi32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_608 = tensor.expand_shape %1865 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%1870 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1867, %1849 : tensor<?x?x768xf32>, tensor<f32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1871 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1868, %1850 : tensor<?x?x768xf32>, tensor<f32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1872 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1869, %1851 : tensor<?x?x768xf32>, tensor<f32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_609 = tensor.concat dim(0) %expanded_608, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%1873 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_47, %1870 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1874 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_45, %1871 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1875 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_46, %1872 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1876 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1873, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%1877 = arith.cmpi eq, %1815, %c0_i64 : i64
%1878 = arith.extui %1877 : i1 to i64
%1879 = arith.cmpi ne, %1878, %c0_i64 : i64
%1880 = linalg.fill ins(%1879 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1881 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1880, %1848, %1848 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_610 = tensor.extract %1881[] : tensor<i64>
%1882 = arith.cmpi slt, %extracted_610, %c0_i64 : i64
%1883 = arith.select %1882, %c1_i64, %extracted_610 : i64
%1884 = arith.extui %1882 : i1 to i64
%1885 = arith.addi %1884, %c1_i64 : i64
%1886 = arith.muli %1883, %c768_i64 : i64
%1887 = arith.cmpi sle, %1885, %c1_i64 : i64
cf.assert %1887, "must have at most one inferred (negative) dimension"
%1888 = arith.muli %1815, %1816 : i64
%1889 = arith.muli %1888, %c768_i64 : i64
%1890 = arith.divsi %1889, %1886 : i64
%1891 = arith.select %1882, %1890, %extracted_610 : i64
%from_elements_611 = tensor.from_elements %1891, %1890, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_612 = tensor.reshape %1874(%from_elements_611) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %1887, "must have at most one inferred (negative) dimension"
%reshape_613 = tensor.reshape %1875(%from_elements_611) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%1892 = arith.cmpi eq, %1816, %c0_i64 : i64
%1893 = arith.extui %1892 : i1 to i64
%1894 = arith.cmpi ne, %1893, %c0_i64 : i64
%1895 = linalg.fill ins(%1894 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1896 = linalg.fill ins(%1816 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1897 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1895, %1896, %1896 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_614 = tensor.extract %1897[] : tensor<i64>
%1898 = arith.muli %1883, %extracted_614 : i64
%1899 = arith.cmpi slt, %extracted_614, %c0_i64 : i64
%1900 = arith.select %1899, %1883, %1898 : i64
%1901 = arith.select %1899, %1885, %1884 : i64
%1902 = arith.muli %1900, %c768_i64 : i64
%1903 = arith.cmpi sle, %1901, %c1_i64 : i64
cf.assert %1903, "must have at most one inferred (negative) dimension"
%1904 = arith.divsi %1889, %1902 : i64
%1905 = arith.select %1882, %1904, %extracted_610 : i64
%1906 = arith.select %1899, %1904, %extracted_614 : i64
%from_elements_615 = tensor.from_elements %1905, %1906, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_616 = tensor.reshape %1876(%from_elements_615) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%1907 = arith.index_cast %1891 : i64 to index
%1908 = arith.index_cast %1890 : i64 to index
%1909 = tensor.empty(%1907, %1908) : tensor<?x12x?x64xf32>
%1910 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_612 : tensor<?x?x12x64xf32>) outs(%1909 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%1911 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_613 : tensor<?x?x12x64xf32>) outs(%1909 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%1912 = arith.index_cast %1905 : i64 to index
%1913 = arith.index_cast %1906 : i64 to index
%1914 = tensor.empty(%1912, %1913) : tensor<?x12x?x64xf32>
%1915 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_616 : tensor<?x?x12x64xf32>) outs(%1914 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_617 = tensor.concat dim(2) %arg8, %1910 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_618 = tensor.concat dim(2) %arg9, %1911 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_619 = tensor.extract_slice %concat_609[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_620 = tensor.extract %extracted_slice_619[%c0] : tensor<1xi64>
%1916 = arith.cmpi eq, %extracted_620, %c0_i64 : i64
%1917 = arith.extui %1916 : i1 to i64
%1918 = arith.cmpi ne, %1917, %c0_i64 : i64
%1919 = linalg.fill ins(%1918 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1920 = linalg.fill ins(%1905 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1921 = linalg.fill ins(%extracted_620 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1922 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1919, %1920, %1921 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_621 = tensor.extract %1922[] : tensor<i64>
%extracted_slice_622 = tensor.extract_slice %concat_609[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_623 = tensor.extract %extracted_slice_622[%c0] : tensor<1xi64>
%1923 = arith.cmpi eq, %extracted_623, %c0_i64 : i64
%1924 = arith.extui %1923 : i1 to i64
%1925 = arith.cmpi ne, %1924, %c0_i64 : i64
%1926 = linalg.fill ins(%1925 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1927 = linalg.fill ins(%extracted_623 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1928 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1926, %cst_292, %1927 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_624 = tensor.extract %1928[] : tensor<i64>
%extracted_slice_625 = tensor.extract_slice %concat_609[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_626 = tensor.extract %extracted_slice_625[%c0] : tensor<1xi64>
%1929 = arith.cmpi eq, %extracted_626, %c0_i64 : i64
%1930 = arith.extui %1929 : i1 to i64
%1931 = arith.cmpi ne, %1930, %c0_i64 : i64
%1932 = linalg.fill ins(%1931 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%1933 = linalg.fill ins(%1906 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1934 = linalg.fill ins(%extracted_626 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1935 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1932, %1933, %1934 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_627 = tensor.extract %1935[] : tensor<i64>
%1936 = arith.cmpi slt, %extracted_621, %c0_i64 : i64
%1937 = arith.select %1936, %c1_i64, %extracted_621 : i64
%1938 = arith.extui %1936 : i1 to i64
%1939 = arith.muli %1937, %extracted_624 : i64
%1940 = arith.addi %1938, %c1_i64 : i64
%1941 = arith.cmpi slt, %extracted_624, %c0_i64 : i64
%1942 = arith.select %1941, %1937, %1939 : i64
%1943 = arith.select %1941, %1940, %1938 : i64
%1944 = arith.muli %1942, %extracted_627 : i64
%1945 = arith.addi %1943, %c1_i64 : i64
%1946 = arith.cmpi slt, %extracted_627, %c0_i64 : i64
%1947 = arith.select %1946, %1942, %1944 : i64
%1948 = arith.select %1946, %1945, %1943 : i64
%1949 = arith.cmpi sle, %1948, %c1_i64 : i64
cf.assert %1949, "must have at most one inferred (negative) dimension"
%1950 = arith.muli %1905, %c12_i64 : i64
%1951 = arith.muli %1950, %1906 : i64
%1952 = arith.muli %1951, %c64_i64 : i64
%1953 = arith.divsi %1952, %1947 : i64
%1954 = arith.select %1936, %1953, %extracted_621 : i64
%1955 = arith.select %1941, %1953, %extracted_624 : i64
%1956 = arith.select %1946, %1953, %extracted_627 : i64
%from_elements_628 = tensor.from_elements %1954, %1955, %1956 : tensor<3xi64>
%reshape_629 = tensor.reshape %1915(%from_elements_628) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_630 = tensor.dim %arg8, %c0 : tensor<?x12x?x64xf32>
%1957 = arith.index_cast %dim_630 : index to i64
%1958 = linalg.fill ins(%1957 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1959 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1919, %1958, %1921 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_631 = tensor.extract %1959[] : tensor<i64>
%dim_632 = tensor.dim %arg8, %c2 : tensor<?x12x?x64xf32>
%dim_633 = tensor.dim %1910, %c2 : tensor<?x12x?x64xf32>
%1960 = affine.apply #map15()[%dim_632, %dim_633]
%1961 = arith.index_cast %1960 : index to i64
%1962 = linalg.fill ins(%1961 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1963 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1932, %1962, %1934 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_634 = tensor.extract %1963[] : tensor<i64>
%1964 = arith.cmpi slt, %extracted_631, %c0_i64 : i64
%1965 = arith.select %1964, %c1_i64, %extracted_631 : i64
%1966 = arith.extui %1964 : i1 to i64
%1967 = arith.muli %1965, %extracted_624 : i64
%1968 = arith.addi %1966, %c1_i64 : i64
%1969 = arith.select %1941, %1965, %1967 : i64
%1970 = arith.select %1941, %1968, %1966 : i64
%1971 = arith.muli %1969, %extracted_634 : i64
%1972 = arith.addi %1970, %c1_i64 : i64
%1973 = arith.cmpi slt, %extracted_634, %c0_i64 : i64
%1974 = arith.select %1973, %1969, %1971 : i64
%1975 = arith.select %1973, %1972, %1970 : i64
%1976 = arith.cmpi sle, %1975, %c1_i64 : i64
cf.assert %1976, "must have at most one inferred (negative) dimension"
%1977 = arith.muli %1957, %c12_i64 : i64
%1978 = arith.muli %1977, %1961 : i64
%1979 = arith.muli %1978, %c64_i64 : i64
%1980 = arith.divsi %1979, %1974 : i64
%1981 = arith.select %1964, %1980, %extracted_631 : i64
%1982 = arith.select %1941, %1980, %extracted_624 : i64
%1983 = arith.select %1973, %1980, %extracted_634 : i64
%from_elements_635 = tensor.from_elements %1981, %1982, %1983 : tensor<3xi64>
%reshape_636 = tensor.reshape %concat_617(%from_elements_635) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_637 = tensor.dim %arg9, %c0 : tensor<?x12x?x64xf32>
%1984 = arith.index_cast %dim_637 : index to i64
%1985 = linalg.fill ins(%1984 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1986 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1919, %1985, %1921 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_638 = tensor.extract %1986[] : tensor<i64>
%dim_639 = tensor.dim %arg9, %c2 : tensor<?x12x?x64xf32>
%dim_640 = tensor.dim %1911, %c2 : tensor<?x12x?x64xf32>
%1987 = affine.apply #map15()[%dim_639, %dim_640]
%1988 = arith.index_cast %1987 : index to i64
%1989 = linalg.fill ins(%1988 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%1990 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1932, %1989, %1934 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_641 = tensor.extract %1990[] : tensor<i64>
%1991 = arith.cmpi slt, %extracted_638, %c0_i64 : i64
%1992 = arith.select %1991, %c1_i64, %extracted_638 : i64
%1993 = arith.extui %1991 : i1 to i64
%1994 = arith.muli %1992, %extracted_624 : i64
%1995 = arith.addi %1993, %c1_i64 : i64
%1996 = arith.select %1941, %1992, %1994 : i64
%1997 = arith.select %1941, %1995, %1993 : i64
%1998 = arith.muli %1996, %extracted_641 : i64
%1999 = arith.addi %1997, %c1_i64 : i64
%2000 = arith.cmpi slt, %extracted_641, %c0_i64 : i64
%2001 = arith.select %2000, %1996, %1998 : i64
%2002 = arith.select %2000, %1999, %1997 : i64
%2003 = arith.cmpi sle, %2002, %c1_i64 : i64
cf.assert %2003, "must have at most one inferred (negative) dimension"
%2004 = arith.muli %1984, %c12_i64 : i64
%2005 = arith.muli %2004, %1988 : i64
%2006 = arith.muli %2005, %c64_i64 : i64
%2007 = arith.divsi %2006, %2001 : i64
%2008 = arith.select %1991, %2007, %extracted_638 : i64
%2009 = arith.select %1941, %2007, %extracted_624 : i64
%2010 = arith.select %2000, %2007, %extracted_641 : i64
%from_elements_642 = tensor.from_elements %2008, %2009, %2010 : tensor<3xi64>
%reshape_643 = tensor.reshape %concat_618(%from_elements_642) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%2011 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_629 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2012 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_629 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2013 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2011, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2014 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2012, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2015 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2013, %2014 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2016 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2015, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2017 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2012, %2016 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2018 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2017 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2019 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2018 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2020 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2019 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2021 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2020 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_644 = tensor.extract %2021[] : tensor<i8>
%2022 = arith.extui %extracted_644 : i8 to i64
%extracted_645 = tensor.extract %2016[] : tensor<f32>
%2023 = arith.extf %extracted_645 : f32 to f64
%2024 = arith.index_cast %1954 : i64 to index
%2025 = arith.index_cast %1955 : i64 to index
%2026 = tensor.empty(%2024, %2025) : tensor<?x?x64xi8>
%2027 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_629 : tensor<?x?x64xf32>) outs(%2026 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2022 : i64 to f32
%6767 = arith.truncf %2023 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%2028 = arith.index_cast %1981 : i64 to index
%2029 = arith.index_cast %1982 : i64 to index
%2030 = tensor.empty(%2028, %2029) : tensor<?x64x?xf32>
%2031 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_636 : tensor<?x?x64xf32>) outs(%2030 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%2032 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_643 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2033 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_643 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2034 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2032, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2035 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2033, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2036 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2034, %2035 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2037 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2036, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2038 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2033, %2037 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2039 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2038 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2040 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2039 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2041 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2040 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2042 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2041 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_646 = tensor.extract %2042[] : tensor<i8>
%2043 = arith.extui %extracted_646 : i8 to i64
%extracted_647 = tensor.extract %2037[] : tensor<f32>
%2044 = arith.extf %extracted_647 : f32 to f64
%2045 = arith.index_cast %2008 : i64 to index
%2046 = arith.index_cast %2009 : i64 to index
%2047 = tensor.empty(%2045, %2046) : tensor<?x?x64xi8>
%2048 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_643 : tensor<?x?x64xf32>) outs(%2047 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2043 : i64 to f32
%6767 = arith.truncf %2044 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%2049 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2031 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2050 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2031 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2051 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2049, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2052 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2050, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2053 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2051, %2052 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2054 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2053, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2055 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2050, %2054 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2056 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2055 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2057 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2056 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2058 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2057 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2059 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2058 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_648 = tensor.extract %2059[] : tensor<i8>
%2060 = arith.extui %extracted_648 : i8 to i64
%extracted_649 = tensor.extract %2054[] : tensor<f32>
%2061 = arith.extf %extracted_649 : f32 to f64
%2062 = tensor.empty(%2028, %2029) : tensor<?x64x?xi8>
%2063 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2031 : tensor<?x64x?xf32>) outs(%2062 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2060 : i64 to f32
%6767 = arith.truncf %2061 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%2064 = linalg.fill ins(%1982 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%2065 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2016, %2054 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2066 = arith.cmpi eq, %1954, %1981 : i64
cf.assert %2066, "mismatching contracting dimension"
%2067 = tensor.empty(%2024, %2025, %2029) : tensor<?x?x?xi32>
%2068 = linalg.fill ins(%c0_i32 : i32) outs(%2067 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%2069 = linalg.batch_matmul ins(%2027, %2063 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%2068 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_650 = tensor.concat dim(0) %expanded_608, %1866, %2064 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%2070 = tensor.empty(%2024, %2025, %2029) : tensor<?x?x?xf32>
%2071 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2069 : tensor<?x?x?xi32>) outs(%2070 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2072 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2071, %2065 : tensor<?x?x?xf32>, tensor<f32>) outs(%2070 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2073 = linalg.fill ins(%1954 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2074 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1880, %2073, %1848 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_651 = tensor.extract %2074[] : tensor<i64>
%2075 = linalg.fill ins(%1982 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2076 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1895, %2075, %1896 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_652 = tensor.extract %2076[] : tensor<i64>
%2077 = arith.cmpi slt, %extracted_651, %c0_i64 : i64
%2078 = arith.select %2077, %c1_i64, %extracted_651 : i64
%2079 = arith.extui %2077 : i1 to i64
%2080 = arith.muli %2078, %c12_i64 : i64
%2081 = arith.muli %2080, %extracted_652 : i64
%2082 = arith.addi %2079, %c1_i64 : i64
%2083 = arith.cmpi slt, %extracted_652, %c0_i64 : i64
%2084 = arith.select %2083, %2080, %2081 : i64
%2085 = arith.select %2083, %2082, %2079 : i64
%2086 = arith.muli %2084, %1982 : i64
%2087 = arith.addi %2085, %c1_i64 : i64
%2088 = arith.cmpi slt, %1982, %c0_i64 : i64
%2089 = arith.select %2088, %2084, %2086 : i64
%2090 = arith.select %2088, %2087, %2085 : i64
%2091 = arith.cmpi sle, %2090, %c1_i64 : i64
cf.assert %2091, "must have at most one inferred (negative) dimension"
%2092 = arith.muli %1954, %1955 : i64
%2093 = arith.muli %2092, %1982 : i64
%2094 = arith.divsi %2093, %2089 : i64
%2095 = arith.select %2077, %2094, %extracted_651 : i64
%2096 = arith.select %2083, %2094, %extracted_652 : i64
%2097 = arith.select %2088, %2094, %1982 : i64
%from_elements_653 = tensor.from_elements %2095, %c12_i64, %2096, %2097 : tensor<4xi64>
%reshape_654 = tensor.reshape %2072(%from_elements_653) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%2098 = arith.index_cast %2095 : i64 to index
%2099 = arith.index_cast %2096 : i64 to index
%2100 = arith.index_cast %2097 : i64 to index
%2101 = arith.cmpi eq, %2098, %105 : index
cf.assert %2101, "mismatched size for broadcast"
%2102 = arith.cmpi eq, %2099, %112 : index
cf.assert %2102, "mismatched size for broadcast"
%2103 = arith.cmpi eq, %2100, %113 : index
cf.assert %2103, "mismatched size for broadcast"
%2104 = tensor.empty(%2098, %2099, %2100) : tensor<?x12x?x?xf32>
%2105 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_654, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%2104 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%2106 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%2105, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%2104 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_655 = tensor.extract_slice %concat_650[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_656 = tensor.extract %extracted_slice_655[%c0] : tensor<1xi64>
%2107 = arith.cmpi eq, %extracted_656, %c0_i64 : i64
%2108 = arith.extui %2107 : i1 to i64
%2109 = arith.cmpi ne, %2108, %c0_i64 : i64
%2110 = linalg.fill ins(%2109 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2111 = linalg.fill ins(%2095 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2112 = linalg.fill ins(%extracted_656 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2113 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2110, %2111, %2112 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_657 = tensor.extract %2113[] : tensor<i64>
%extracted_slice_658 = tensor.extract_slice %concat_650[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_659 = tensor.extract %extracted_slice_658[%c0] : tensor<1xi64>
%2114 = arith.cmpi eq, %extracted_659, %c0_i64 : i64
%2115 = arith.extui %2114 : i1 to i64
%2116 = arith.cmpi ne, %2115, %c0_i64 : i64
%2117 = linalg.fill ins(%2116 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2118 = linalg.fill ins(%extracted_659 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2119 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2117, %cst_292, %2118 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_660 = tensor.extract %2119[] : tensor<i64>
%extracted_slice_661 = tensor.extract_slice %concat_650[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_662 = tensor.extract %extracted_slice_661[%c0] : tensor<1xi64>
%2120 = arith.cmpi eq, %extracted_662, %c0_i64 : i64
%2121 = arith.extui %2120 : i1 to i64
%2122 = arith.cmpi ne, %2121, %c0_i64 : i64
%2123 = linalg.fill ins(%2122 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2124 = linalg.fill ins(%2096 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2125 = linalg.fill ins(%extracted_662 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2126 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2123, %2124, %2125 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_663 = tensor.extract %2126[] : tensor<i64>
%2127 = arith.cmpi slt, %extracted_657, %c0_i64 : i64
%2128 = arith.select %2127, %c1_i64, %extracted_657 : i64
%2129 = arith.extui %2127 : i1 to i64
%2130 = arith.muli %2128, %extracted_660 : i64
%2131 = arith.addi %2129, %c1_i64 : i64
%2132 = arith.cmpi slt, %extracted_660, %c0_i64 : i64
%2133 = arith.select %2132, %2128, %2130 : i64
%2134 = arith.select %2132, %2131, %2129 : i64
%2135 = arith.muli %2133, %extracted_663 : i64
%2136 = arith.addi %2134, %c1_i64 : i64
%2137 = arith.cmpi slt, %extracted_663, %c0_i64 : i64
%2138 = arith.select %2137, %2133, %2135 : i64
%2139 = arith.select %2137, %2136, %2134 : i64
%2140 = arith.cmpi sle, %2139, %c1_i64 : i64
cf.assert %2140, "must have at most one inferred (negative) dimension"
%2141 = arith.muli %2095, %c12_i64 : i64
%2142 = arith.muli %2141, %2096 : i64
%2143 = arith.muli %2142, %2097 : i64
%2144 = arith.divsi %2143, %2138 : i64
%2145 = arith.select %2127, %2144, %extracted_657 : i64
%2146 = arith.select %2132, %2144, %extracted_660 : i64
%2147 = arith.select %2137, %2144, %extracted_663 : i64
%from_elements_664 = tensor.from_elements %2145, %2146, %2147 : tensor<3xi64>
%reshape_665 = tensor.reshape %2106(%from_elements_664) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%2148 = arith.index_cast %2145 : i64 to index
%2149 = arith.index_cast %2146 : i64 to index
%2150 = tensor.empty(%2148, %2149) : tensor<?x?xi64>
%2151 = linalg.fill ins(%c0_i64 : i64) outs(%2150 : tensor<?x?xi64>) -> tensor<?x?xi64>
%2152 = tensor.empty(%2148, %2149) : tensor<?x?xf32>
%2153 = linalg.fill ins(%cst_1 : f32) outs(%2152 : tensor<?x?xf32>) -> tensor<?x?xf32>
%2154:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_665 : tensor<?x?x?xf32>) outs(%2153, %2151 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_666 = tensor.expand_shape %2154#0 [[0], [1, 2]] output_shape [%2148, %2149, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%2155 = arith.index_cast %2147 : i64 to index
%2156 = tensor.empty(%2148, %2149, %2155) : tensor<?x?x?xf32>
%2157 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_665, %expanded_666 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%2156 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2158 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2157 : tensor<?x?x?xf32>) outs(%2156 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2159 = tensor.empty(%2148, %2149) : tensor<?x?x1xf32>
%2160 = linalg.fill ins(%cst_0 : f32) outs(%2159 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%2161 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%2158 : tensor<?x?x?xf32>) outs(%2160 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2162 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2158, %2161 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%2156 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2163 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2162 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2164 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2162 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2165 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2163, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2166 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2164, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2167 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2165, %2166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2168 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2167, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2169 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2164, %2168 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2170 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2169 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2171 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2170 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2172 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2171 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2173 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2172 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_667 = tensor.extract %2173[] : tensor<i8>
%2174 = arith.extui %extracted_667 : i8 to i64
%extracted_668 = tensor.extract %2168[] : tensor<f32>
%2175 = arith.extf %extracted_668 : f32 to f64
%2176 = tensor.empty(%2148, %2149, %2155) : tensor<?x?x?xi8>
%2177 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2162 : tensor<?x?x?xf32>) outs(%2176 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2174 : i64 to f32
%6767 = arith.truncf %2175 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%2178 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2168, %2037 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2179 = arith.cmpi eq, %2145, %2008 : i64
cf.assert %2179, "mismatching contracting dimension"
%2180 = arith.cmpi eq, %2147, %2009 : i64
cf.assert %2180, "mismatching contracting dimension"
%2181 = tensor.empty(%2148, %2149) : tensor<?x?x64xi32>
%2182 = linalg.fill ins(%c0_i32 : i32) outs(%2181 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%2183 = linalg.batch_matmul ins(%2177, %2048 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%2182 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%2184 = tensor.empty(%2148, %2149) : tensor<?x?x64xf32>
%2185 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2183 : tensor<?x?x64xi32>) outs(%2184 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%2186 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2185, %2178 : tensor<?x?x64xf32>, tensor<f32>) outs(%2184 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%2187 = linalg.fill ins(%2145 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2188 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1880, %2187, %1848 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_669 = tensor.extract %2188[] : tensor<i64>
%2189 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1895, %cst_7, %1896 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_670 = tensor.extract %2189[] : tensor<i64>
%2190 = arith.cmpi slt, %extracted_669, %c0_i64 : i64
%2191 = arith.select %2190, %c1_i64, %extracted_669 : i64
%2192 = arith.extui %2190 : i1 to i64
%2193 = arith.muli %2191, %c12_i64 : i64
%2194 = arith.muli %2193, %extracted_670 : i64
%2195 = arith.addi %2192, %c1_i64 : i64
%2196 = arith.cmpi slt, %extracted_670, %c0_i64 : i64
%2197 = arith.select %2196, %2193, %2194 : i64
%2198 = arith.select %2196, %2195, %2192 : i64
%2199 = arith.muli %2197, %c64_i64 : i64
%2200 = arith.cmpi sle, %2198, %c1_i64 : i64
cf.assert %2200, "must have at most one inferred (negative) dimension"
%2201 = arith.muli %2145, %2146 : i64
%2202 = arith.muli %2201, %c64_i64 : i64
%2203 = arith.divsi %2202, %2199 : i64
%2204 = arith.select %2190, %2203, %extracted_669 : i64
%2205 = arith.select %2196, %2203, %extracted_670 : i64
%from_elements_671 = tensor.from_elements %2204, %c12_i64, %2205, %c64_i64 : tensor<4xi64>
%reshape_672 = tensor.reshape %2186(%from_elements_671) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%2206 = arith.index_cast %2204 : i64 to index
%2207 = arith.index_cast %2205 : i64 to index
%2208 = tensor.empty(%2206, %2207) : tensor<?x?x12x64xf32>
%2209 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_672 : tensor<?x12x?x64xf32>) outs(%2208 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%2210 = linalg.fill ins(%2204 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2211 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1880, %2210, %1848 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_673 = tensor.extract %2211[] : tensor<i64>
%2212 = linalg.fill ins(%2205 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2213 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1895, %2212, %1896 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_674 = tensor.extract %2213[] : tensor<i64>
%2214 = arith.cmpi slt, %extracted_673, %c0_i64 : i64
%2215 = arith.select %2214, %c1_i64, %extracted_673 : i64
%2216 = arith.extui %2214 : i1 to i64
%2217 = arith.muli %2215, %extracted_674 : i64
%2218 = arith.addi %2216, %c1_i64 : i64
%2219 = arith.cmpi slt, %extracted_674, %c0_i64 : i64
%2220 = arith.select %2219, %2215, %2217 : i64
%2221 = arith.select %2219, %2218, %2216 : i64
%2222 = arith.muli %2220, %c768_i64 : i64
%2223 = arith.cmpi sle, %2221, %c1_i64 : i64
cf.assert %2223, "must have at most one inferred (negative) dimension"
%2224 = arith.muli %2204, %2205 : i64
%2225 = arith.muli %2224, %c768_i64 : i64
%2226 = arith.divsi %2225, %2222 : i64
%2227 = arith.select %2214, %2226, %extracted_673 : i64
%2228 = arith.select %2219, %2226, %extracted_674 : i64
%from_elements_675 = tensor.from_elements %2227, %2228, %c768_i64 : tensor<3xi64>
%reshape_676 = tensor.reshape %2209(%from_elements_675) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%2229 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_676 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2230 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_676 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2231 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2229, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2232 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2230, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2233 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2231, %2232 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2234 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2233, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2235 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2230, %2234 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2236 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2235 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2237 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2236 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2238 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2237 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2239 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2238 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_677 = tensor.extract %2239[] : tensor<i8>
%2240 = arith.extui %extracted_677 : i8 to i64
%extracted_678 = tensor.extract %2234[] : tensor<f32>
%2241 = arith.extf %extracted_678 : f32 to f64
%2242 = arith.index_cast %2227 : i64 to index
%2243 = arith.index_cast %2228 : i64 to index
%2244 = tensor.empty(%2242, %2243) : tensor<?x?x768xi8>
%2245 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_676 : tensor<?x?x768xf32>) outs(%2244 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2240 : i64 to f32
%6767 = arith.truncf %2241 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%2246 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2234, %cst_177 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2247 = arith.trunci %2240 : i64 to i32
%2248 = arith.addi %2247, %c-128_i32 : i32
%2249 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2245 : tensor<?x?x768xi8>) outs(%2244 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%2250 = arith.cmpi sge, %2227, %c0_i64 : i64
cf.assert %2250, "negative values not allowed in new dimensions"
%2251 = tensor.empty(%2242) : tensor<?x768x768xi8>
%2252 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_178 : tensor<768x768xi8>) outs(%2251 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2253 = tensor.empty(%2242, %2243) : tensor<?x?x768xi32>
%2254 = linalg.fill ins(%c0_i32 : i32) outs(%2253 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2255 = linalg.quantized_batch_matmul ins(%2249, %2252, %2248, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2254 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2256 = tensor.empty(%2242, %2243) : tensor<?x?x768xf32>
%2257 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2255 : tensor<?x?x768xi32>) outs(%2256 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2258 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2257, %2246 : tensor<?x?x768xf32>, tensor<f32>) outs(%2256 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2259 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_48, %2258 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2256 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2260 = arith.cmpi eq, %1817, %2242 : index
cf.assert %2260, "mismatched size for broadcast"
%2261 = arith.cmpi eq, %1818, %2243 : index
cf.assert %2261, "mismatched size for broadcast"
%2262 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_605, %2259 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%1823 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2263 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %1848, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_679 = tensor.extract %2263[] : tensor<i64>
%2264 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %1896, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_680 = tensor.extract %2264[] : tensor<i64>
%2265 = arith.cmpi slt, %extracted_679, %c0_i64 : i64
%2266 = arith.select %2265, %c1_i64, %extracted_679 : i64
%2267 = arith.extui %2265 : i1 to i64
%2268 = arith.muli %2266, %extracted_680 : i64
%2269 = arith.addi %2267, %c1_i64 : i64
%2270 = arith.cmpi slt, %extracted_680, %c0_i64 : i64
%2271 = arith.select %2270, %2266, %2268 : i64
%2272 = arith.select %2270, %2269, %2267 : i64
%2273 = arith.cmpi sle, %2272, %c1_i64 : i64
cf.assert %2273, "must have at most one inferred (negative) dimension"
%2274 = arith.divsi %1889, %2271 : i64
%2275 = arith.select %2265, %2274, %extracted_679 : i64
%2276 = arith.select %2270, %2274, %extracted_680 : i64
%from_elements_681 = tensor.from_elements %2275, %2276 : tensor<2xi64>
%reshape_682 = tensor.reshape %2262(%from_elements_681) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%2277 = arith.index_cast %2275 : i64 to index
%2278 = tensor.empty(%2277) : tensor<?x1xf32>
%2279 = linalg.fill ins(%cst_0 : f32) outs(%2278 : tensor<?x1xf32>) -> tensor<?x1xf32>
%2280 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_682 : tensor<?x768xf32>) outs(%2279 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2281 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2280 : tensor<?x1xf32>) outs(%2278 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2282 = tensor.empty(%2277) : tensor<?x768xf32>
%2283 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_682, %2281 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2284 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2283, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2285 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%2284 : tensor<?x768xf32>) outs(%2279 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2286 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2285 : tensor<?x1xf32>) outs(%2278 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2287 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2286, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%2278 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2288 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2287 : tensor<?x1xf32>) outs(%2278 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2289 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2283, %2288 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2290 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2289, %cst_53 : tensor<?x768xf32>, tensor<768xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2291 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2290, %cst_54 : tensor<?x768xf32>, tensor<768xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2292 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2291 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2293 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2291 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2294 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2292, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2295 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2293, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2296 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2294, %2295 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2297 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2296, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2298 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2293, %2297 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2299 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2298 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2300 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2299 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2301 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2300 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2302 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2301 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_683 = tensor.extract %2302[] : tensor<i8>
%2303 = arith.extui %extracted_683 : i8 to i64
%extracted_684 = tensor.extract %2297[] : tensor<f32>
%2304 = arith.extf %extracted_684 : f32 to f64
%2305 = tensor.empty(%2277) : tensor<?x768xi8>
%2306 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2291 : tensor<?x768xf32>) outs(%2305 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2303 : i64 to f32
%6767 = arith.truncf %2304 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%2307 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2297, %cst_179 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2308 = tensor.empty(%2277) : tensor<?x3072xi32>
%2309 = linalg.fill ins(%c0_i32 : i32) outs(%2308 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%2310 = arith.trunci %2303 : i64 to i32
%2311 = arith.addi %2310, %c-128_i32 : i32
%2312 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2306 : tensor<?x768xi8>) outs(%2305 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%2313 = linalg.quantized_matmul ins(%2312, %cst_180, %2311, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%2309 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%2314 = tensor.empty(%2277) : tensor<?x3072xf32>
%2315 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2313 : tensor<?x3072xi32>) outs(%2314 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2316 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2315, %2307 : tensor<?x3072xf32>, tensor<f32>) outs(%2314 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2317 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2316, %cst_51 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%2314 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2318 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2317 : tensor<?x3072xf32>) outs(%2314 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%2319 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2318 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2320 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2318 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2321 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2319, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2322 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2320, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2323 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2321, %2322 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2324 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2323, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2325 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2320, %2324 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2326 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2325 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2327 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2326 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2328 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2327 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2329 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2328 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_685 = tensor.extract %2329[] : tensor<i8>
%2330 = arith.extui %extracted_685 : i8 to i64
%extracted_686 = tensor.extract %2324[] : tensor<f32>
%2331 = arith.extf %extracted_686 : f32 to f64
%2332 = tensor.empty(%2277) : tensor<?x3072xi8>
%2333 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2318 : tensor<?x3072xf32>) outs(%2332 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2330 : i64 to f32
%6767 = arith.truncf %2331 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%2334 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2324, %cst_181 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2335 = tensor.empty(%2277) : tensor<?x768xi32>
%2336 = linalg.fill ins(%c0_i32 : i32) outs(%2335 : tensor<?x768xi32>) -> tensor<?x768xi32>
%2337 = arith.trunci %2330 : i64 to i32
%2338 = arith.addi %2337, %c-128_i32 : i32
%2339 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2333 : tensor<?x3072xi8>) outs(%2332 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%2340 = linalg.quantized_matmul ins(%2339, %cst_182, %2338, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%2336 : tensor<?x768xi32>) -> tensor<?x768xi32>
%2341 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2340 : tensor<?x768xi32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2342 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2341, %2334 : tensor<?x768xf32>, tensor<f32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2343 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2342, %cst_52 : tensor<?x768xf32>, tensor<768xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2344 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_682, %2343 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%2282 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2345 = linalg.fill ins(%2275 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2346 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1880, %2345, %1848 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_687 = tensor.extract %2346[] : tensor<i64>
%2347 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%1895, %cst_8, %1896 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_688 = tensor.extract %2347[] : tensor<i64>
%2348 = arith.cmpi slt, %extracted_687, %c0_i64 : i64
%2349 = arith.select %2348, %c1_i64, %extracted_687 : i64
%2350 = arith.extui %2348 : i1 to i64
%2351 = arith.muli %2349, %extracted_688 : i64
%2352 = arith.addi %2350, %c1_i64 : i64
%2353 = arith.cmpi slt, %extracted_688, %c0_i64 : i64
%2354 = arith.select %2353, %2349, %2351 : i64
%2355 = arith.select %2353, %2352, %2350 : i64
%2356 = arith.muli %2354, %c768_i64 : i64
%2357 = arith.cmpi sle, %2355, %c1_i64 : i64
cf.assert %2357, "must have at most one inferred (negative) dimension"
%2358 = arith.muli %2275, %c768_i64 : i64
%2359 = arith.divsi %2358, %2356 : i64
%2360 = arith.select %2348, %2359, %extracted_687 : i64
%2361 = arith.select %2353, %2359, %extracted_688 : i64
%from_elements_689 = tensor.from_elements %2360, %2361, %c768_i64 : tensor<3xi64>
%reshape_690 = tensor.reshape %2344(%from_elements_689) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%2362 = arith.index_cast %2360 : i64 to index
%2363 = arith.index_cast %2361 : i64 to index
%2364 = tensor.empty(%2362, %2363) : tensor<?x?x1xf32>
%2365 = linalg.fill ins(%cst_0 : f32) outs(%2364 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%2366 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_690 : tensor<?x?x768xf32>) outs(%2365 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2367 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2366 : tensor<?x?x1xf32>) outs(%2364 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2368 = tensor.empty(%2362, %2363) : tensor<?x?x768xf32>
%2369 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_690, %2367 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2370 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2369, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2371 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%2370 : tensor<?x?x768xf32>) outs(%2365 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2372 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2371 : tensor<?x?x1xf32>) outs(%2364 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2373 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2372, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%2364 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2374 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2373 : tensor<?x?x1xf32>) outs(%2364 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2375 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2369, %2374 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2376 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2375, %cst_59 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2377 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2376, %cst_60 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2378 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2377 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2379 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2377 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2380 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2378, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2381 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2379, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2382 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2380, %2381 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2383 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2382, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2384 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2379, %2383 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2385 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2384 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2386 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2385 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2387 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2386 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2388 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2387 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_691 = tensor.extract %2388[] : tensor<i8>
%2389 = arith.extui %extracted_691 : i8 to i64
%extracted_692 = tensor.extract %2383[] : tensor<f32>
%2390 = arith.extf %extracted_692 : f32 to f64
%2391 = tensor.empty(%2362, %2363) : tensor<?x?x768xi8>
%2392 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2377 : tensor<?x?x768xf32>) outs(%2391 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2389 : i64 to f32
%6767 = arith.truncf %2390 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%2393 = linalg.fill ins(%2360 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2394 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2383, %cst_183 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2395 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2383, %cst_185 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2396 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2383, %cst_187 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2397 = arith.trunci %2389 : i64 to i32
%2398 = arith.addi %2397, %c-128_i32 : i32
%2399 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2392 : tensor<?x?x768xi8>) outs(%2391 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%2400 = arith.cmpi sge, %2360, %c0_i64 : i64
cf.assert %2400, "negative values not allowed in new dimensions"
%2401 = tensor.empty(%2362) : tensor<?x768x768xi8>
%2402 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_184 : tensor<768x768xi8>) outs(%2401 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2403 = tensor.empty(%2362, %2363) : tensor<?x?x768xi32>
%2404 = linalg.fill ins(%c0_i32 : i32) outs(%2403 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2405 = linalg.quantized_batch_matmul ins(%2399, %2402, %2398, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2404 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %2400, "negative values not allowed in new dimensions"
%2406 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_186 : tensor<768x768xi8>) outs(%2401 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2407 = linalg.quantized_batch_matmul ins(%2399, %2406, %2398, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2404 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %2400, "negative values not allowed in new dimensions"
%2408 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_188 : tensor<768x768xi8>) outs(%2401 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2409 = linalg.quantized_batch_matmul ins(%2399, %2408, %2398, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2404 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2410 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2393, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%2411 = linalg.fill ins(%2361 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%2412 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2405 : tensor<?x?x768xi32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2413 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2407 : tensor<?x?x768xi32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2414 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2409 : tensor<?x?x768xi32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_693 = tensor.expand_shape %2410 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%2415 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2412, %2394 : tensor<?x?x768xf32>, tensor<f32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2416 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2413, %2395 : tensor<?x?x768xf32>, tensor<f32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2417 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2414, %2396 : tensor<?x?x768xf32>, tensor<f32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_694 = tensor.concat dim(0) %expanded_693, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%2418 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_57, %2415 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2419 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_55, %2416 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2420 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_56, %2417 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2421 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2418, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2422 = arith.cmpi eq, %2360, %c0_i64 : i64
%2423 = arith.extui %2422 : i1 to i64
%2424 = arith.cmpi ne, %2423, %c0_i64 : i64
%2425 = linalg.fill ins(%2424 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2426 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2425, %2393, %2393 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_695 = tensor.extract %2426[] : tensor<i64>
%2427 = arith.cmpi slt, %extracted_695, %c0_i64 : i64
%2428 = arith.select %2427, %c1_i64, %extracted_695 : i64
%2429 = arith.extui %2427 : i1 to i64
%2430 = arith.addi %2429, %c1_i64 : i64
%2431 = arith.muli %2428, %c768_i64 : i64
%2432 = arith.cmpi sle, %2430, %c1_i64 : i64
cf.assert %2432, "must have at most one inferred (negative) dimension"
%2433 = arith.muli %2360, %2361 : i64
%2434 = arith.muli %2433, %c768_i64 : i64
%2435 = arith.divsi %2434, %2431 : i64
%2436 = arith.select %2427, %2435, %extracted_695 : i64
%from_elements_696 = tensor.from_elements %2436, %2435, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_697 = tensor.reshape %2419(%from_elements_696) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %2432, "must have at most one inferred (negative) dimension"
%reshape_698 = tensor.reshape %2420(%from_elements_696) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%2437 = arith.cmpi eq, %2361, %c0_i64 : i64
%2438 = arith.extui %2437 : i1 to i64
%2439 = arith.cmpi ne, %2438, %c0_i64 : i64
%2440 = linalg.fill ins(%2439 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2441 = linalg.fill ins(%2361 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2442 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2440, %2441, %2441 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_699 = tensor.extract %2442[] : tensor<i64>
%2443 = arith.muli %2428, %extracted_699 : i64
%2444 = arith.cmpi slt, %extracted_699, %c0_i64 : i64
%2445 = arith.select %2444, %2428, %2443 : i64
%2446 = arith.select %2444, %2430, %2429 : i64
%2447 = arith.muli %2445, %c768_i64 : i64
%2448 = arith.cmpi sle, %2446, %c1_i64 : i64
cf.assert %2448, "must have at most one inferred (negative) dimension"
%2449 = arith.divsi %2434, %2447 : i64
%2450 = arith.select %2427, %2449, %extracted_695 : i64
%2451 = arith.select %2444, %2449, %extracted_699 : i64
%from_elements_700 = tensor.from_elements %2450, %2451, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_701 = tensor.reshape %2421(%from_elements_700) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%2452 = arith.index_cast %2436 : i64 to index
%2453 = arith.index_cast %2435 : i64 to index
%2454 = tensor.empty(%2452, %2453) : tensor<?x12x?x64xf32>
%2455 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_697 : tensor<?x?x12x64xf32>) outs(%2454 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%2456 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_698 : tensor<?x?x12x64xf32>) outs(%2454 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%2457 = arith.index_cast %2450 : i64 to index
%2458 = arith.index_cast %2451 : i64 to index
%2459 = tensor.empty(%2457, %2458) : tensor<?x12x?x64xf32>
%2460 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_701 : tensor<?x?x12x64xf32>) outs(%2459 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_702 = tensor.concat dim(2) %arg10, %2455 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_703 = tensor.concat dim(2) %arg11, %2456 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_704 = tensor.extract_slice %concat_694[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_705 = tensor.extract %extracted_slice_704[%c0] : tensor<1xi64>
%2461 = arith.cmpi eq, %extracted_705, %c0_i64 : i64
%2462 = arith.extui %2461 : i1 to i64
%2463 = arith.cmpi ne, %2462, %c0_i64 : i64
%2464 = linalg.fill ins(%2463 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2465 = linalg.fill ins(%2450 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2466 = linalg.fill ins(%extracted_705 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2467 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2464, %2465, %2466 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_706 = tensor.extract %2467[] : tensor<i64>
%extracted_slice_707 = tensor.extract_slice %concat_694[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_708 = tensor.extract %extracted_slice_707[%c0] : tensor<1xi64>
%2468 = arith.cmpi eq, %extracted_708, %c0_i64 : i64
%2469 = arith.extui %2468 : i1 to i64
%2470 = arith.cmpi ne, %2469, %c0_i64 : i64
%2471 = linalg.fill ins(%2470 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2472 = linalg.fill ins(%extracted_708 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2473 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2471, %cst_292, %2472 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_709 = tensor.extract %2473[] : tensor<i64>
%extracted_slice_710 = tensor.extract_slice %concat_694[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_711 = tensor.extract %extracted_slice_710[%c0] : tensor<1xi64>
%2474 = arith.cmpi eq, %extracted_711, %c0_i64 : i64
%2475 = arith.extui %2474 : i1 to i64
%2476 = arith.cmpi ne, %2475, %c0_i64 : i64
%2477 = linalg.fill ins(%2476 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2478 = linalg.fill ins(%2451 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2479 = linalg.fill ins(%extracted_711 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2480 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2477, %2478, %2479 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_712 = tensor.extract %2480[] : tensor<i64>
%2481 = arith.cmpi slt, %extracted_706, %c0_i64 : i64
%2482 = arith.select %2481, %c1_i64, %extracted_706 : i64
%2483 = arith.extui %2481 : i1 to i64
%2484 = arith.muli %2482, %extracted_709 : i64
%2485 = arith.addi %2483, %c1_i64 : i64
%2486 = arith.cmpi slt, %extracted_709, %c0_i64 : i64
%2487 = arith.select %2486, %2482, %2484 : i64
%2488 = arith.select %2486, %2485, %2483 : i64
%2489 = arith.muli %2487, %extracted_712 : i64
%2490 = arith.addi %2488, %c1_i64 : i64
%2491 = arith.cmpi slt, %extracted_712, %c0_i64 : i64
%2492 = arith.select %2491, %2487, %2489 : i64
%2493 = arith.select %2491, %2490, %2488 : i64
%2494 = arith.cmpi sle, %2493, %c1_i64 : i64
cf.assert %2494, "must have at most one inferred (negative) dimension"
%2495 = arith.muli %2450, %c12_i64 : i64
%2496 = arith.muli %2495, %2451 : i64
%2497 = arith.muli %2496, %c64_i64 : i64
%2498 = arith.divsi %2497, %2492 : i64
%2499 = arith.select %2481, %2498, %extracted_706 : i64
%2500 = arith.select %2486, %2498, %extracted_709 : i64
%2501 = arith.select %2491, %2498, %extracted_712 : i64
%from_elements_713 = tensor.from_elements %2499, %2500, %2501 : tensor<3xi64>
%reshape_714 = tensor.reshape %2460(%from_elements_713) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_715 = tensor.dim %arg10, %c0 : tensor<?x12x?x64xf32>
%2502 = arith.index_cast %dim_715 : index to i64
%2503 = linalg.fill ins(%2502 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2504 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2464, %2503, %2466 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_716 = tensor.extract %2504[] : tensor<i64>
%dim_717 = tensor.dim %arg10, %c2 : tensor<?x12x?x64xf32>
%dim_718 = tensor.dim %2455, %c2 : tensor<?x12x?x64xf32>
%2505 = affine.apply #map15()[%dim_717, %dim_718]
%2506 = arith.index_cast %2505 : index to i64
%2507 = linalg.fill ins(%2506 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2508 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2477, %2507, %2479 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_719 = tensor.extract %2508[] : tensor<i64>
%2509 = arith.cmpi slt, %extracted_716, %c0_i64 : i64
%2510 = arith.select %2509, %c1_i64, %extracted_716 : i64
%2511 = arith.extui %2509 : i1 to i64
%2512 = arith.muli %2510, %extracted_709 : i64
%2513 = arith.addi %2511, %c1_i64 : i64
%2514 = arith.select %2486, %2510, %2512 : i64
%2515 = arith.select %2486, %2513, %2511 : i64
%2516 = arith.muli %2514, %extracted_719 : i64
%2517 = arith.addi %2515, %c1_i64 : i64
%2518 = arith.cmpi slt, %extracted_719, %c0_i64 : i64
%2519 = arith.select %2518, %2514, %2516 : i64
%2520 = arith.select %2518, %2517, %2515 : i64
%2521 = arith.cmpi sle, %2520, %c1_i64 : i64
cf.assert %2521, "must have at most one inferred (negative) dimension"
%2522 = arith.muli %2502, %c12_i64 : i64
%2523 = arith.muli %2522, %2506 : i64
%2524 = arith.muli %2523, %c64_i64 : i64
%2525 = arith.divsi %2524, %2519 : i64
%2526 = arith.select %2509, %2525, %extracted_716 : i64
%2527 = arith.select %2486, %2525, %extracted_709 : i64
%2528 = arith.select %2518, %2525, %extracted_719 : i64
%from_elements_720 = tensor.from_elements %2526, %2527, %2528 : tensor<3xi64>
%reshape_721 = tensor.reshape %concat_702(%from_elements_720) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_722 = tensor.dim %arg11, %c0 : tensor<?x12x?x64xf32>
%2529 = arith.index_cast %dim_722 : index to i64
%2530 = linalg.fill ins(%2529 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2531 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2464, %2530, %2466 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_723 = tensor.extract %2531[] : tensor<i64>
%dim_724 = tensor.dim %arg11, %c2 : tensor<?x12x?x64xf32>
%dim_725 = tensor.dim %2456, %c2 : tensor<?x12x?x64xf32>
%2532 = affine.apply #map15()[%dim_724, %dim_725]
%2533 = arith.index_cast %2532 : index to i64
%2534 = linalg.fill ins(%2533 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2535 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2477, %2534, %2479 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_726 = tensor.extract %2535[] : tensor<i64>
%2536 = arith.cmpi slt, %extracted_723, %c0_i64 : i64
%2537 = arith.select %2536, %c1_i64, %extracted_723 : i64
%2538 = arith.extui %2536 : i1 to i64
%2539 = arith.muli %2537, %extracted_709 : i64
%2540 = arith.addi %2538, %c1_i64 : i64
%2541 = arith.select %2486, %2537, %2539 : i64
%2542 = arith.select %2486, %2540, %2538 : i64
%2543 = arith.muli %2541, %extracted_726 : i64
%2544 = arith.addi %2542, %c1_i64 : i64
%2545 = arith.cmpi slt, %extracted_726, %c0_i64 : i64
%2546 = arith.select %2545, %2541, %2543 : i64
%2547 = arith.select %2545, %2544, %2542 : i64
%2548 = arith.cmpi sle, %2547, %c1_i64 : i64
cf.assert %2548, "must have at most one inferred (negative) dimension"
%2549 = arith.muli %2529, %c12_i64 : i64
%2550 = arith.muli %2549, %2533 : i64
%2551 = arith.muli %2550, %c64_i64 : i64
%2552 = arith.divsi %2551, %2546 : i64
%2553 = arith.select %2536, %2552, %extracted_723 : i64
%2554 = arith.select %2486, %2552, %extracted_709 : i64
%2555 = arith.select %2545, %2552, %extracted_726 : i64
%from_elements_727 = tensor.from_elements %2553, %2554, %2555 : tensor<3xi64>
%reshape_728 = tensor.reshape %concat_703(%from_elements_727) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%2556 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_714 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2557 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_714 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2558 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2556, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2559 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2557, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2560 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2558, %2559 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2561 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2560, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2562 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2557, %2561 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2563 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2562 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2564 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2563 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2565 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2564 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2566 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2565 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_729 = tensor.extract %2566[] : tensor<i8>
%2567 = arith.extui %extracted_729 : i8 to i64
%extracted_730 = tensor.extract %2561[] : tensor<f32>
%2568 = arith.extf %extracted_730 : f32 to f64
%2569 = arith.index_cast %2499 : i64 to index
%2570 = arith.index_cast %2500 : i64 to index
%2571 = tensor.empty(%2569, %2570) : tensor<?x?x64xi8>
%2572 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_714 : tensor<?x?x64xf32>) outs(%2571 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2567 : i64 to f32
%6767 = arith.truncf %2568 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%2573 = arith.index_cast %2526 : i64 to index
%2574 = arith.index_cast %2527 : i64 to index
%2575 = tensor.empty(%2573, %2574) : tensor<?x64x?xf32>
%2576 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_721 : tensor<?x?x64xf32>) outs(%2575 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%2577 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_728 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2578 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_728 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2579 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2577, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2580 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2578, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2581 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2579, %2580 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2582 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2581, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2583 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2578, %2582 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2584 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2583 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2585 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2584 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2586 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2585 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2587 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2586 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_731 = tensor.extract %2587[] : tensor<i8>
%2588 = arith.extui %extracted_731 : i8 to i64
%extracted_732 = tensor.extract %2582[] : tensor<f32>
%2589 = arith.extf %extracted_732 : f32 to f64
%2590 = arith.index_cast %2553 : i64 to index
%2591 = arith.index_cast %2554 : i64 to index
%2592 = tensor.empty(%2590, %2591) : tensor<?x?x64xi8>
%2593 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_728 : tensor<?x?x64xf32>) outs(%2592 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2588 : i64 to f32
%6767 = arith.truncf %2589 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%2594 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2576 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2595 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2576 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2596 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2594, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2597 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2595, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2598 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2596, %2597 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2599 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2598, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2600 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2595, %2599 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2601 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2600 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2602 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2601 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2603 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2602 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2604 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2603 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_733 = tensor.extract %2604[] : tensor<i8>
%2605 = arith.extui %extracted_733 : i8 to i64
%extracted_734 = tensor.extract %2599[] : tensor<f32>
%2606 = arith.extf %extracted_734 : f32 to f64
%2607 = tensor.empty(%2573, %2574) : tensor<?x64x?xi8>
%2608 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2576 : tensor<?x64x?xf32>) outs(%2607 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2605 : i64 to f32
%6767 = arith.truncf %2606 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%2609 = linalg.fill ins(%2527 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%2610 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2561, %2599 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2611 = arith.cmpi eq, %2499, %2526 : i64
cf.assert %2611, "mismatching contracting dimension"
%2612 = tensor.empty(%2569, %2570, %2574) : tensor<?x?x?xi32>
%2613 = linalg.fill ins(%c0_i32 : i32) outs(%2612 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%2614 = linalg.batch_matmul ins(%2572, %2608 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%2613 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_735 = tensor.concat dim(0) %expanded_693, %2411, %2609 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%2615 = tensor.empty(%2569, %2570, %2574) : tensor<?x?x?xf32>
%2616 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2614 : tensor<?x?x?xi32>) outs(%2615 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2617 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2616, %2610 : tensor<?x?x?xf32>, tensor<f32>) outs(%2615 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2618 = linalg.fill ins(%2499 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2619 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2425, %2618, %2393 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_736 = tensor.extract %2619[] : tensor<i64>
%2620 = linalg.fill ins(%2527 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2621 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2440, %2620, %2441 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_737 = tensor.extract %2621[] : tensor<i64>
%2622 = arith.cmpi slt, %extracted_736, %c0_i64 : i64
%2623 = arith.select %2622, %c1_i64, %extracted_736 : i64
%2624 = arith.extui %2622 : i1 to i64
%2625 = arith.muli %2623, %c12_i64 : i64
%2626 = arith.muli %2625, %extracted_737 : i64
%2627 = arith.addi %2624, %c1_i64 : i64
%2628 = arith.cmpi slt, %extracted_737, %c0_i64 : i64
%2629 = arith.select %2628, %2625, %2626 : i64
%2630 = arith.select %2628, %2627, %2624 : i64
%2631 = arith.muli %2629, %2527 : i64
%2632 = arith.addi %2630, %c1_i64 : i64
%2633 = arith.cmpi slt, %2527, %c0_i64 : i64
%2634 = arith.select %2633, %2629, %2631 : i64
%2635 = arith.select %2633, %2632, %2630 : i64
%2636 = arith.cmpi sle, %2635, %c1_i64 : i64
cf.assert %2636, "must have at most one inferred (negative) dimension"
%2637 = arith.muli %2499, %2500 : i64
%2638 = arith.muli %2637, %2527 : i64
%2639 = arith.divsi %2638, %2634 : i64
%2640 = arith.select %2622, %2639, %extracted_736 : i64
%2641 = arith.select %2628, %2639, %extracted_737 : i64
%2642 = arith.select %2633, %2639, %2527 : i64
%from_elements_738 = tensor.from_elements %2640, %c12_i64, %2641, %2642 : tensor<4xi64>
%reshape_739 = tensor.reshape %2617(%from_elements_738) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%2643 = arith.index_cast %2640 : i64 to index
%2644 = arith.index_cast %2641 : i64 to index
%2645 = arith.index_cast %2642 : i64 to index
%2646 = arith.cmpi eq, %2643, %105 : index
cf.assert %2646, "mismatched size for broadcast"
%2647 = arith.cmpi eq, %2644, %112 : index
cf.assert %2647, "mismatched size for broadcast"
%2648 = arith.cmpi eq, %2645, %113 : index
cf.assert %2648, "mismatched size for broadcast"
%2649 = tensor.empty(%2643, %2644, %2645) : tensor<?x12x?x?xf32>
%2650 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_739, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%2649 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%2651 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%2650, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%2649 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_740 = tensor.extract_slice %concat_735[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_741 = tensor.extract %extracted_slice_740[%c0] : tensor<1xi64>
%2652 = arith.cmpi eq, %extracted_741, %c0_i64 : i64
%2653 = arith.extui %2652 : i1 to i64
%2654 = arith.cmpi ne, %2653, %c0_i64 : i64
%2655 = linalg.fill ins(%2654 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2656 = linalg.fill ins(%2640 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2657 = linalg.fill ins(%extracted_741 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2658 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2655, %2656, %2657 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_742 = tensor.extract %2658[] : tensor<i64>
%extracted_slice_743 = tensor.extract_slice %concat_735[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_744 = tensor.extract %extracted_slice_743[%c0] : tensor<1xi64>
%2659 = arith.cmpi eq, %extracted_744, %c0_i64 : i64
%2660 = arith.extui %2659 : i1 to i64
%2661 = arith.cmpi ne, %2660, %c0_i64 : i64
%2662 = linalg.fill ins(%2661 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2663 = linalg.fill ins(%extracted_744 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2664 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2662, %cst_292, %2663 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_745 = tensor.extract %2664[] : tensor<i64>
%extracted_slice_746 = tensor.extract_slice %concat_735[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_747 = tensor.extract %extracted_slice_746[%c0] : tensor<1xi64>
%2665 = arith.cmpi eq, %extracted_747, %c0_i64 : i64
%2666 = arith.extui %2665 : i1 to i64
%2667 = arith.cmpi ne, %2666, %c0_i64 : i64
%2668 = linalg.fill ins(%2667 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2669 = linalg.fill ins(%2641 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2670 = linalg.fill ins(%extracted_747 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2671 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2668, %2669, %2670 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_748 = tensor.extract %2671[] : tensor<i64>
%2672 = arith.cmpi slt, %extracted_742, %c0_i64 : i64
%2673 = arith.select %2672, %c1_i64, %extracted_742 : i64
%2674 = arith.extui %2672 : i1 to i64
%2675 = arith.muli %2673, %extracted_745 : i64
%2676 = arith.addi %2674, %c1_i64 : i64
%2677 = arith.cmpi slt, %extracted_745, %c0_i64 : i64
%2678 = arith.select %2677, %2673, %2675 : i64
%2679 = arith.select %2677, %2676, %2674 : i64
%2680 = arith.muli %2678, %extracted_748 : i64
%2681 = arith.addi %2679, %c1_i64 : i64
%2682 = arith.cmpi slt, %extracted_748, %c0_i64 : i64
%2683 = arith.select %2682, %2678, %2680 : i64
%2684 = arith.select %2682, %2681, %2679 : i64
%2685 = arith.cmpi sle, %2684, %c1_i64 : i64
cf.assert %2685, "must have at most one inferred (negative) dimension"
%2686 = arith.muli %2640, %c12_i64 : i64
%2687 = arith.muli %2686, %2641 : i64
%2688 = arith.muli %2687, %2642 : i64
%2689 = arith.divsi %2688, %2683 : i64
%2690 = arith.select %2672, %2689, %extracted_742 : i64
%2691 = arith.select %2677, %2689, %extracted_745 : i64
%2692 = arith.select %2682, %2689, %extracted_748 : i64
%from_elements_749 = tensor.from_elements %2690, %2691, %2692 : tensor<3xi64>
%reshape_750 = tensor.reshape %2651(%from_elements_749) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%2693 = arith.index_cast %2690 : i64 to index
%2694 = arith.index_cast %2691 : i64 to index
%2695 = tensor.empty(%2693, %2694) : tensor<?x?xi64>
%2696 = linalg.fill ins(%c0_i64 : i64) outs(%2695 : tensor<?x?xi64>) -> tensor<?x?xi64>
%2697 = tensor.empty(%2693, %2694) : tensor<?x?xf32>
%2698 = linalg.fill ins(%cst_1 : f32) outs(%2697 : tensor<?x?xf32>) -> tensor<?x?xf32>
%2699:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_750 : tensor<?x?x?xf32>) outs(%2698, %2696 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_751 = tensor.expand_shape %2699#0 [[0], [1, 2]] output_shape [%2693, %2694, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%2700 = arith.index_cast %2692 : i64 to index
%2701 = tensor.empty(%2693, %2694, %2700) : tensor<?x?x?xf32>
%2702 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_750, %expanded_751 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%2701 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2703 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2702 : tensor<?x?x?xf32>) outs(%2701 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2704 = tensor.empty(%2693, %2694) : tensor<?x?x1xf32>
%2705 = linalg.fill ins(%cst_0 : f32) outs(%2704 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%2706 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%2703 : tensor<?x?x?xf32>) outs(%2705 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2707 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2703, %2706 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%2701 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%2708 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2707 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2709 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2707 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2710 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2708, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2711 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2709, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2712 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2710, %2711 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2713 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2712, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2714 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2709, %2713 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2715 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2714 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2716 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2715 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2717 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2716 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2718 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2717 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_752 = tensor.extract %2718[] : tensor<i8>
%2719 = arith.extui %extracted_752 : i8 to i64
%extracted_753 = tensor.extract %2713[] : tensor<f32>
%2720 = arith.extf %extracted_753 : f32 to f64
%2721 = tensor.empty(%2693, %2694, %2700) : tensor<?x?x?xi8>
%2722 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2707 : tensor<?x?x?xf32>) outs(%2721 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2719 : i64 to f32
%6767 = arith.truncf %2720 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%2723 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2713, %2582 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2724 = arith.cmpi eq, %2690, %2553 : i64
cf.assert %2724, "mismatching contracting dimension"
%2725 = arith.cmpi eq, %2692, %2554 : i64
cf.assert %2725, "mismatching contracting dimension"
%2726 = tensor.empty(%2693, %2694) : tensor<?x?x64xi32>
%2727 = linalg.fill ins(%c0_i32 : i32) outs(%2726 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%2728 = linalg.batch_matmul ins(%2722, %2593 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%2727 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%2729 = tensor.empty(%2693, %2694) : tensor<?x?x64xf32>
%2730 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2728 : tensor<?x?x64xi32>) outs(%2729 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%2731 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2730, %2723 : tensor<?x?x64xf32>, tensor<f32>) outs(%2729 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%2732 = linalg.fill ins(%2690 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2733 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2425, %2732, %2393 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_754 = tensor.extract %2733[] : tensor<i64>
%2734 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2440, %cst_7, %2441 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_755 = tensor.extract %2734[] : tensor<i64>
%2735 = arith.cmpi slt, %extracted_754, %c0_i64 : i64
%2736 = arith.select %2735, %c1_i64, %extracted_754 : i64
%2737 = arith.extui %2735 : i1 to i64
%2738 = arith.muli %2736, %c12_i64 : i64
%2739 = arith.muli %2738, %extracted_755 : i64
%2740 = arith.addi %2737, %c1_i64 : i64
%2741 = arith.cmpi slt, %extracted_755, %c0_i64 : i64
%2742 = arith.select %2741, %2738, %2739 : i64
%2743 = arith.select %2741, %2740, %2737 : i64
%2744 = arith.muli %2742, %c64_i64 : i64
%2745 = arith.cmpi sle, %2743, %c1_i64 : i64
cf.assert %2745, "must have at most one inferred (negative) dimension"
%2746 = arith.muli %2690, %2691 : i64
%2747 = arith.muli %2746, %c64_i64 : i64
%2748 = arith.divsi %2747, %2744 : i64
%2749 = arith.select %2735, %2748, %extracted_754 : i64
%2750 = arith.select %2741, %2748, %extracted_755 : i64
%from_elements_756 = tensor.from_elements %2749, %c12_i64, %2750, %c64_i64 : tensor<4xi64>
%reshape_757 = tensor.reshape %2731(%from_elements_756) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%2751 = arith.index_cast %2749 : i64 to index
%2752 = arith.index_cast %2750 : i64 to index
%2753 = tensor.empty(%2751, %2752) : tensor<?x?x12x64xf32>
%2754 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_757 : tensor<?x12x?x64xf32>) outs(%2753 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%2755 = linalg.fill ins(%2749 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2756 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2425, %2755, %2393 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_758 = tensor.extract %2756[] : tensor<i64>
%2757 = linalg.fill ins(%2750 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2758 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2440, %2757, %2441 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_759 = tensor.extract %2758[] : tensor<i64>
%2759 = arith.cmpi slt, %extracted_758, %c0_i64 : i64
%2760 = arith.select %2759, %c1_i64, %extracted_758 : i64
%2761 = arith.extui %2759 : i1 to i64
%2762 = arith.muli %2760, %extracted_759 : i64
%2763 = arith.addi %2761, %c1_i64 : i64
%2764 = arith.cmpi slt, %extracted_759, %c0_i64 : i64
%2765 = arith.select %2764, %2760, %2762 : i64
%2766 = arith.select %2764, %2763, %2761 : i64
%2767 = arith.muli %2765, %c768_i64 : i64
%2768 = arith.cmpi sle, %2766, %c1_i64 : i64
cf.assert %2768, "must have at most one inferred (negative) dimension"
%2769 = arith.muli %2749, %2750 : i64
%2770 = arith.muli %2769, %c768_i64 : i64
%2771 = arith.divsi %2770, %2767 : i64
%2772 = arith.select %2759, %2771, %extracted_758 : i64
%2773 = arith.select %2764, %2771, %extracted_759 : i64
%from_elements_760 = tensor.from_elements %2772, %2773, %c768_i64 : tensor<3xi64>
%reshape_761 = tensor.reshape %2754(%from_elements_760) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%2774 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_761 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2775 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_761 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2776 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2774, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2777 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2775, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2778 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2776, %2777 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2779 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2778, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2780 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2775, %2779 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2781 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2780 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2782 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2781 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2783 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2782 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2784 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2783 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_762 = tensor.extract %2784[] : tensor<i8>
%2785 = arith.extui %extracted_762 : i8 to i64
%extracted_763 = tensor.extract %2779[] : tensor<f32>
%2786 = arith.extf %extracted_763 : f32 to f64
%2787 = arith.index_cast %2772 : i64 to index
%2788 = arith.index_cast %2773 : i64 to index
%2789 = tensor.empty(%2787, %2788) : tensor<?x?x768xi8>
%2790 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_761 : tensor<?x?x768xf32>) outs(%2789 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2785 : i64 to f32
%6767 = arith.truncf %2786 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%2791 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2779, %cst_189 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2792 = arith.trunci %2785 : i64 to i32
%2793 = arith.addi %2792, %c-128_i32 : i32
%2794 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2790 : tensor<?x?x768xi8>) outs(%2789 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%2795 = arith.cmpi sge, %2772, %c0_i64 : i64
cf.assert %2795, "negative values not allowed in new dimensions"
%2796 = tensor.empty(%2787) : tensor<?x768x768xi8>
%2797 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_190 : tensor<768x768xi8>) outs(%2796 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2798 = tensor.empty(%2787, %2788) : tensor<?x?x768xi32>
%2799 = linalg.fill ins(%c0_i32 : i32) outs(%2798 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2800 = linalg.quantized_batch_matmul ins(%2794, %2797, %2793, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2799 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2801 = tensor.empty(%2787, %2788) : tensor<?x?x768xf32>
%2802 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2800 : tensor<?x?x768xi32>) outs(%2801 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2803 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2802, %2791 : tensor<?x?x768xf32>, tensor<f32>) outs(%2801 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2804 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_58, %2803 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2801 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2805 = arith.cmpi eq, %2362, %2787 : index
cf.assert %2805, "mismatched size for broadcast"
%2806 = arith.cmpi eq, %2363, %2788 : index
cf.assert %2806, "mismatched size for broadcast"
%2807 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_690, %2804 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%2368 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2808 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %2393, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_764 = tensor.extract %2808[] : tensor<i64>
%2809 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %2441, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_765 = tensor.extract %2809[] : tensor<i64>
%2810 = arith.cmpi slt, %extracted_764, %c0_i64 : i64
%2811 = arith.select %2810, %c1_i64, %extracted_764 : i64
%2812 = arith.extui %2810 : i1 to i64
%2813 = arith.muli %2811, %extracted_765 : i64
%2814 = arith.addi %2812, %c1_i64 : i64
%2815 = arith.cmpi slt, %extracted_765, %c0_i64 : i64
%2816 = arith.select %2815, %2811, %2813 : i64
%2817 = arith.select %2815, %2814, %2812 : i64
%2818 = arith.cmpi sle, %2817, %c1_i64 : i64
cf.assert %2818, "must have at most one inferred (negative) dimension"
%2819 = arith.divsi %2434, %2816 : i64
%2820 = arith.select %2810, %2819, %extracted_764 : i64
%2821 = arith.select %2815, %2819, %extracted_765 : i64
%from_elements_766 = tensor.from_elements %2820, %2821 : tensor<2xi64>
%reshape_767 = tensor.reshape %2807(%from_elements_766) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%2822 = arith.index_cast %2820 : i64 to index
%2823 = tensor.empty(%2822) : tensor<?x1xf32>
%2824 = linalg.fill ins(%cst_0 : f32) outs(%2823 : tensor<?x1xf32>) -> tensor<?x1xf32>
%2825 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_767 : tensor<?x768xf32>) outs(%2824 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2826 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2825 : tensor<?x1xf32>) outs(%2823 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2827 = tensor.empty(%2822) : tensor<?x768xf32>
%2828 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_767, %2826 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2829 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2828, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2830 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%2829 : tensor<?x768xf32>) outs(%2824 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2831 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2830 : tensor<?x1xf32>) outs(%2823 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2832 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2831, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%2823 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2833 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2832 : tensor<?x1xf32>) outs(%2823 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%2834 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%2828, %2833 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2835 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2834, %cst_63 : tensor<?x768xf32>, tensor<768xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2836 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2835, %cst_64 : tensor<?x768xf32>, tensor<768xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2837 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2836 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2838 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2836 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2839 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2837, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2840 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2838, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2841 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2839, %2840 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2842 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2841, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2843 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2838, %2842 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2844 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2843 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2845 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2844 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2846 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2845 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2847 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2846 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_768 = tensor.extract %2847[] : tensor<i8>
%2848 = arith.extui %extracted_768 : i8 to i64
%extracted_769 = tensor.extract %2842[] : tensor<f32>
%2849 = arith.extf %extracted_769 : f32 to f64
%2850 = tensor.empty(%2822) : tensor<?x768xi8>
%2851 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2836 : tensor<?x768xf32>) outs(%2850 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2848 : i64 to f32
%6767 = arith.truncf %2849 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%2852 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2842, %cst_191 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2853 = tensor.empty(%2822) : tensor<?x3072xi32>
%2854 = linalg.fill ins(%c0_i32 : i32) outs(%2853 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%2855 = arith.trunci %2848 : i64 to i32
%2856 = arith.addi %2855, %c-128_i32 : i32
%2857 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2851 : tensor<?x768xi8>) outs(%2850 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%2858 = linalg.quantized_matmul ins(%2857, %cst_192, %2856, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%2854 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%2859 = tensor.empty(%2822) : tensor<?x3072xf32>
%2860 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2858 : tensor<?x3072xi32>) outs(%2859 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2861 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2860, %2852 : tensor<?x3072xf32>, tensor<f32>) outs(%2859 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2862 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2861, %cst_61 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%2859 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%2863 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2862 : tensor<?x3072xf32>) outs(%2859 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%2864 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2863 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2865 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%2863 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2866 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2864, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2867 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2865, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2868 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2866, %2867 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2869 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2868, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2870 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2865, %2869 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2871 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2870 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2872 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2871 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2873 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2872 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2874 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2873 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_770 = tensor.extract %2874[] : tensor<i8>
%2875 = arith.extui %extracted_770 : i8 to i64
%extracted_771 = tensor.extract %2869[] : tensor<f32>
%2876 = arith.extf %extracted_771 : f32 to f64
%2877 = tensor.empty(%2822) : tensor<?x3072xi8>
%2878 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2863 : tensor<?x3072xf32>) outs(%2877 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2875 : i64 to f32
%6767 = arith.truncf %2876 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%2879 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2869, %cst_193 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2880 = tensor.empty(%2822) : tensor<?x768xi32>
%2881 = linalg.fill ins(%c0_i32 : i32) outs(%2880 : tensor<?x768xi32>) -> tensor<?x768xi32>
%2882 = arith.trunci %2875 : i64 to i32
%2883 = arith.addi %2882, %c-128_i32 : i32
%2884 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2878 : tensor<?x3072xi8>) outs(%2877 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%2885 = linalg.quantized_matmul ins(%2884, %cst_194, %2883, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%2881 : tensor<?x768xi32>) -> tensor<?x768xi32>
%2886 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%2885 : tensor<?x768xi32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2887 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%2886, %2879 : tensor<?x768xf32>, tensor<f32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2888 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%2887, %cst_62 : tensor<?x768xf32>, tensor<768xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2889 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_767, %2888 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%2827 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%2890 = linalg.fill ins(%2820 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2891 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2425, %2890, %2393 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_772 = tensor.extract %2891[] : tensor<i64>
%2892 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2440, %cst_8, %2441 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_773 = tensor.extract %2892[] : tensor<i64>
%2893 = arith.cmpi slt, %extracted_772, %c0_i64 : i64
%2894 = arith.select %2893, %c1_i64, %extracted_772 : i64
%2895 = arith.extui %2893 : i1 to i64
%2896 = arith.muli %2894, %extracted_773 : i64
%2897 = arith.addi %2895, %c1_i64 : i64
%2898 = arith.cmpi slt, %extracted_773, %c0_i64 : i64
%2899 = arith.select %2898, %2894, %2896 : i64
%2900 = arith.select %2898, %2897, %2895 : i64
%2901 = arith.muli %2899, %c768_i64 : i64
%2902 = arith.cmpi sle, %2900, %c1_i64 : i64
cf.assert %2902, "must have at most one inferred (negative) dimension"
%2903 = arith.muli %2820, %c768_i64 : i64
%2904 = arith.divsi %2903, %2901 : i64
%2905 = arith.select %2893, %2904, %extracted_772 : i64
%2906 = arith.select %2898, %2904, %extracted_773 : i64
%from_elements_774 = tensor.from_elements %2905, %2906, %c768_i64 : tensor<3xi64>
%reshape_775 = tensor.reshape %2889(%from_elements_774) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%2907 = arith.index_cast %2905 : i64 to index
%2908 = arith.index_cast %2906 : i64 to index
%2909 = tensor.empty(%2907, %2908) : tensor<?x?x1xf32>
%2910 = linalg.fill ins(%cst_0 : f32) outs(%2909 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%2911 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_775 : tensor<?x?x768xf32>) outs(%2910 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2912 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2911 : tensor<?x?x1xf32>) outs(%2909 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2913 = tensor.empty(%2907, %2908) : tensor<?x?x768xf32>
%2914 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_775, %2912 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2915 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2914, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2916 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%2915 : tensor<?x?x768xf32>) outs(%2910 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2917 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2916 : tensor<?x?x1xf32>) outs(%2909 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2918 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2917, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%2909 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2919 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2918 : tensor<?x?x1xf32>) outs(%2909 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%2920 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2914, %2919 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2921 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2920, %cst_69 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2922 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2921, %cst_70 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2923 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2922 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2924 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%2922 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2925 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2923, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2926 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2924, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%2927 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2925, %2926 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2928 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2927, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2929 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2924, %2928 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2930 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %2929 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2931 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2930 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%2932 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2931 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2933 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%2932 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_776 = tensor.extract %2933[] : tensor<i8>
%2934 = arith.extui %extracted_776 : i8 to i64
%extracted_777 = tensor.extract %2928[] : tensor<f32>
%2935 = arith.extf %extracted_777 : f32 to f64
%2936 = tensor.empty(%2907, %2908) : tensor<?x?x768xi8>
%2937 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2922 : tensor<?x?x768xf32>) outs(%2936 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %2934 : i64 to f32
%6767 = arith.truncf %2935 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%2938 = linalg.fill ins(%2905 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2939 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2928, %cst_195 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2940 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2928, %cst_197 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2941 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2928, %cst_199 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%2942 = arith.trunci %2934 : i64 to i32
%2943 = arith.addi %2942, %c-128_i32 : i32
%2944 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2937 : tensor<?x?x768xi8>) outs(%2936 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%2945 = arith.cmpi sge, %2905, %c0_i64 : i64
cf.assert %2945, "negative values not allowed in new dimensions"
%2946 = tensor.empty(%2907) : tensor<?x768x768xi8>
%2947 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_196 : tensor<768x768xi8>) outs(%2946 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2948 = tensor.empty(%2907, %2908) : tensor<?x?x768xi32>
%2949 = linalg.fill ins(%c0_i32 : i32) outs(%2948 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2950 = linalg.quantized_batch_matmul ins(%2944, %2947, %2943, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2949 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %2945, "negative values not allowed in new dimensions"
%2951 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_198 : tensor<768x768xi8>) outs(%2946 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2952 = linalg.quantized_batch_matmul ins(%2944, %2951, %2943, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2949 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %2945, "negative values not allowed in new dimensions"
%2953 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_200 : tensor<768x768xi8>) outs(%2946 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%2954 = linalg.quantized_batch_matmul ins(%2944, %2953, %2943, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%2949 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%2955 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%2938, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%2956 = linalg.fill ins(%2906 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%2957 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2950 : tensor<?x?x768xi32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2958 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2952 : tensor<?x?x768xi32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2959 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2954 : tensor<?x?x768xi32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_778 = tensor.expand_shape %2955 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%2960 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2957, %2939 : tensor<?x?x768xf32>, tensor<f32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2961 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2958, %2940 : tensor<?x?x768xf32>, tensor<f32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2962 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2959, %2941 : tensor<?x?x768xf32>, tensor<f32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_779 = tensor.concat dim(0) %expanded_778, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%2963 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_67, %2960 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2964 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_65, %2961 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2965 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_66, %2962 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2966 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2963, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%2967 = arith.cmpi eq, %2905, %c0_i64 : i64
%2968 = arith.extui %2967 : i1 to i64
%2969 = arith.cmpi ne, %2968, %c0_i64 : i64
%2970 = linalg.fill ins(%2969 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2971 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2970, %2938, %2938 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_780 = tensor.extract %2971[] : tensor<i64>
%2972 = arith.cmpi slt, %extracted_780, %c0_i64 : i64
%2973 = arith.select %2972, %c1_i64, %extracted_780 : i64
%2974 = arith.extui %2972 : i1 to i64
%2975 = arith.addi %2974, %c1_i64 : i64
%2976 = arith.muli %2973, %c768_i64 : i64
%2977 = arith.cmpi sle, %2975, %c1_i64 : i64
cf.assert %2977, "must have at most one inferred (negative) dimension"
%2978 = arith.muli %2905, %2906 : i64
%2979 = arith.muli %2978, %c768_i64 : i64
%2980 = arith.divsi %2979, %2976 : i64
%2981 = arith.select %2972, %2980, %extracted_780 : i64
%from_elements_781 = tensor.from_elements %2981, %2980, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_782 = tensor.reshape %2964(%from_elements_781) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %2977, "must have at most one inferred (negative) dimension"
%reshape_783 = tensor.reshape %2965(%from_elements_781) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%2982 = arith.cmpi eq, %2906, %c0_i64 : i64
%2983 = arith.extui %2982 : i1 to i64
%2984 = arith.cmpi ne, %2983, %c0_i64 : i64
%2985 = linalg.fill ins(%2984 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%2986 = linalg.fill ins(%2906 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%2987 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2985, %2986, %2986 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_784 = tensor.extract %2987[] : tensor<i64>
%2988 = arith.muli %2973, %extracted_784 : i64
%2989 = arith.cmpi slt, %extracted_784, %c0_i64 : i64
%2990 = arith.select %2989, %2973, %2988 : i64
%2991 = arith.select %2989, %2975, %2974 : i64
%2992 = arith.muli %2990, %c768_i64 : i64
%2993 = arith.cmpi sle, %2991, %c1_i64 : i64
cf.assert %2993, "must have at most one inferred (negative) dimension"
%2994 = arith.divsi %2979, %2992 : i64
%2995 = arith.select %2972, %2994, %extracted_780 : i64
%2996 = arith.select %2989, %2994, %extracted_784 : i64
%from_elements_785 = tensor.from_elements %2995, %2996, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_786 = tensor.reshape %2966(%from_elements_785) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%2997 = arith.index_cast %2981 : i64 to index
%2998 = arith.index_cast %2980 : i64 to index
%2999 = tensor.empty(%2997, %2998) : tensor<?x12x?x64xf32>
%3000 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_782 : tensor<?x?x12x64xf32>) outs(%2999 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%3001 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_783 : tensor<?x?x12x64xf32>) outs(%2999 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%3002 = arith.index_cast %2995 : i64 to index
%3003 = arith.index_cast %2996 : i64 to index
%3004 = tensor.empty(%3002, %3003) : tensor<?x12x?x64xf32>
%3005 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_786 : tensor<?x?x12x64xf32>) outs(%3004 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_787 = tensor.concat dim(2) %arg12, %3000 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_788 = tensor.concat dim(2) %arg13, %3001 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_789 = tensor.extract_slice %concat_779[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_790 = tensor.extract %extracted_slice_789[%c0] : tensor<1xi64>
%3006 = arith.cmpi eq, %extracted_790, %c0_i64 : i64
%3007 = arith.extui %3006 : i1 to i64
%3008 = arith.cmpi ne, %3007, %c0_i64 : i64
%3009 = linalg.fill ins(%3008 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3010 = linalg.fill ins(%2995 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3011 = linalg.fill ins(%extracted_790 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3012 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3009, %3010, %3011 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_791 = tensor.extract %3012[] : tensor<i64>
%extracted_slice_792 = tensor.extract_slice %concat_779[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_793 = tensor.extract %extracted_slice_792[%c0] : tensor<1xi64>
%3013 = arith.cmpi eq, %extracted_793, %c0_i64 : i64
%3014 = arith.extui %3013 : i1 to i64
%3015 = arith.cmpi ne, %3014, %c0_i64 : i64
%3016 = linalg.fill ins(%3015 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3017 = linalg.fill ins(%extracted_793 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3018 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3016, %cst_292, %3017 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_794 = tensor.extract %3018[] : tensor<i64>
%extracted_slice_795 = tensor.extract_slice %concat_779[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_796 = tensor.extract %extracted_slice_795[%c0] : tensor<1xi64>
%3019 = arith.cmpi eq, %extracted_796, %c0_i64 : i64
%3020 = arith.extui %3019 : i1 to i64
%3021 = arith.cmpi ne, %3020, %c0_i64 : i64
%3022 = linalg.fill ins(%3021 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3023 = linalg.fill ins(%2996 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3024 = linalg.fill ins(%extracted_796 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3025 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3022, %3023, %3024 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_797 = tensor.extract %3025[] : tensor<i64>
%3026 = arith.cmpi slt, %extracted_791, %c0_i64 : i64
%3027 = arith.select %3026, %c1_i64, %extracted_791 : i64
%3028 = arith.extui %3026 : i1 to i64
%3029 = arith.muli %3027, %extracted_794 : i64
%3030 = arith.addi %3028, %c1_i64 : i64
%3031 = arith.cmpi slt, %extracted_794, %c0_i64 : i64
%3032 = arith.select %3031, %3027, %3029 : i64
%3033 = arith.select %3031, %3030, %3028 : i64
%3034 = arith.muli %3032, %extracted_797 : i64
%3035 = arith.addi %3033, %c1_i64 : i64
%3036 = arith.cmpi slt, %extracted_797, %c0_i64 : i64
%3037 = arith.select %3036, %3032, %3034 : i64
%3038 = arith.select %3036, %3035, %3033 : i64
%3039 = arith.cmpi sle, %3038, %c1_i64 : i64
cf.assert %3039, "must have at most one inferred (negative) dimension"
%3040 = arith.muli %2995, %c12_i64 : i64
%3041 = arith.muli %3040, %2996 : i64
%3042 = arith.muli %3041, %c64_i64 : i64
%3043 = arith.divsi %3042, %3037 : i64
%3044 = arith.select %3026, %3043, %extracted_791 : i64
%3045 = arith.select %3031, %3043, %extracted_794 : i64
%3046 = arith.select %3036, %3043, %extracted_797 : i64
%from_elements_798 = tensor.from_elements %3044, %3045, %3046 : tensor<3xi64>
%reshape_799 = tensor.reshape %3005(%from_elements_798) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_800 = tensor.dim %arg12, %c0 : tensor<?x12x?x64xf32>
%3047 = arith.index_cast %dim_800 : index to i64
%3048 = linalg.fill ins(%3047 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3049 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3009, %3048, %3011 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_801 = tensor.extract %3049[] : tensor<i64>
%dim_802 = tensor.dim %arg12, %c2 : tensor<?x12x?x64xf32>
%dim_803 = tensor.dim %3000, %c2 : tensor<?x12x?x64xf32>
%3050 = affine.apply #map15()[%dim_802, %dim_803]
%3051 = arith.index_cast %3050 : index to i64
%3052 = linalg.fill ins(%3051 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3053 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3022, %3052, %3024 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_804 = tensor.extract %3053[] : tensor<i64>
%3054 = arith.cmpi slt, %extracted_801, %c0_i64 : i64
%3055 = arith.select %3054, %c1_i64, %extracted_801 : i64
%3056 = arith.extui %3054 : i1 to i64
%3057 = arith.muli %3055, %extracted_794 : i64
%3058 = arith.addi %3056, %c1_i64 : i64
%3059 = arith.select %3031, %3055, %3057 : i64
%3060 = arith.select %3031, %3058, %3056 : i64
%3061 = arith.muli %3059, %extracted_804 : i64
%3062 = arith.addi %3060, %c1_i64 : i64
%3063 = arith.cmpi slt, %extracted_804, %c0_i64 : i64
%3064 = arith.select %3063, %3059, %3061 : i64
%3065 = arith.select %3063, %3062, %3060 : i64
%3066 = arith.cmpi sle, %3065, %c1_i64 : i64
cf.assert %3066, "must have at most one inferred (negative) dimension"
%3067 = arith.muli %3047, %c12_i64 : i64
%3068 = arith.muli %3067, %3051 : i64
%3069 = arith.muli %3068, %c64_i64 : i64
%3070 = arith.divsi %3069, %3064 : i64
%3071 = arith.select %3054, %3070, %extracted_801 : i64
%3072 = arith.select %3031, %3070, %extracted_794 : i64
%3073 = arith.select %3063, %3070, %extracted_804 : i64
%from_elements_805 = tensor.from_elements %3071, %3072, %3073 : tensor<3xi64>
%reshape_806 = tensor.reshape %concat_787(%from_elements_805) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_807 = tensor.dim %arg13, %c0 : tensor<?x12x?x64xf32>
%3074 = arith.index_cast %dim_807 : index to i64
%3075 = linalg.fill ins(%3074 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3076 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3009, %3075, %3011 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_808 = tensor.extract %3076[] : tensor<i64>
%dim_809 = tensor.dim %arg13, %c2 : tensor<?x12x?x64xf32>
%dim_810 = tensor.dim %3001, %c2 : tensor<?x12x?x64xf32>
%3077 = affine.apply #map15()[%dim_809, %dim_810]
%3078 = arith.index_cast %3077 : index to i64
%3079 = linalg.fill ins(%3078 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3080 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3022, %3079, %3024 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_811 = tensor.extract %3080[] : tensor<i64>
%3081 = arith.cmpi slt, %extracted_808, %c0_i64 : i64
%3082 = arith.select %3081, %c1_i64, %extracted_808 : i64
%3083 = arith.extui %3081 : i1 to i64
%3084 = arith.muli %3082, %extracted_794 : i64
%3085 = arith.addi %3083, %c1_i64 : i64
%3086 = arith.select %3031, %3082, %3084 : i64
%3087 = arith.select %3031, %3085, %3083 : i64
%3088 = arith.muli %3086, %extracted_811 : i64
%3089 = arith.addi %3087, %c1_i64 : i64
%3090 = arith.cmpi slt, %extracted_811, %c0_i64 : i64
%3091 = arith.select %3090, %3086, %3088 : i64
%3092 = arith.select %3090, %3089, %3087 : i64
%3093 = arith.cmpi sle, %3092, %c1_i64 : i64
cf.assert %3093, "must have at most one inferred (negative) dimension"
%3094 = arith.muli %3074, %c12_i64 : i64
%3095 = arith.muli %3094, %3078 : i64
%3096 = arith.muli %3095, %c64_i64 : i64
%3097 = arith.divsi %3096, %3091 : i64
%3098 = arith.select %3081, %3097, %extracted_808 : i64
%3099 = arith.select %3031, %3097, %extracted_794 : i64
%3100 = arith.select %3090, %3097, %extracted_811 : i64
%from_elements_812 = tensor.from_elements %3098, %3099, %3100 : tensor<3xi64>
%reshape_813 = tensor.reshape %concat_788(%from_elements_812) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%3101 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_799 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3102 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_799 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3103 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3101, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3104 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3102, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3105 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3103, %3104 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3106 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3105, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3107 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3102, %3106 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3108 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3107 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3109 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3108 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3110 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3109 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3111 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3110 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_814 = tensor.extract %3111[] : tensor<i8>
%3112 = arith.extui %extracted_814 : i8 to i64
%extracted_815 = tensor.extract %3106[] : tensor<f32>
%3113 = arith.extf %extracted_815 : f32 to f64
%3114 = arith.index_cast %3044 : i64 to index
%3115 = arith.index_cast %3045 : i64 to index
%3116 = tensor.empty(%3114, %3115) : tensor<?x?x64xi8>
%3117 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_799 : tensor<?x?x64xf32>) outs(%3116 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3112 : i64 to f32
%6767 = arith.truncf %3113 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%3118 = arith.index_cast %3071 : i64 to index
%3119 = arith.index_cast %3072 : i64 to index
%3120 = tensor.empty(%3118, %3119) : tensor<?x64x?xf32>
%3121 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_806 : tensor<?x?x64xf32>) outs(%3120 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%3122 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_813 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3123 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_813 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3124 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3122, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3125 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3123, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3126 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3124, %3125 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3127 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3126, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3128 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3123, %3127 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3129 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3128 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3130 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3129 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3131 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3130 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3132 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3131 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_816 = tensor.extract %3132[] : tensor<i8>
%3133 = arith.extui %extracted_816 : i8 to i64
%extracted_817 = tensor.extract %3127[] : tensor<f32>
%3134 = arith.extf %extracted_817 : f32 to f64
%3135 = arith.index_cast %3098 : i64 to index
%3136 = arith.index_cast %3099 : i64 to index
%3137 = tensor.empty(%3135, %3136) : tensor<?x?x64xi8>
%3138 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_813 : tensor<?x?x64xf32>) outs(%3137 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3133 : i64 to f32
%6767 = arith.truncf %3134 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%3139 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3121 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3140 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3121 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3141 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3139, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3142 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3140, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3143 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3141, %3142 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3144 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3143, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3145 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3140, %3144 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3146 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3145 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3147 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3146 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3148 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3147 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3149 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3148 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_818 = tensor.extract %3149[] : tensor<i8>
%3150 = arith.extui %extracted_818 : i8 to i64
%extracted_819 = tensor.extract %3144[] : tensor<f32>
%3151 = arith.extf %extracted_819 : f32 to f64
%3152 = tensor.empty(%3118, %3119) : tensor<?x64x?xi8>
%3153 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3121 : tensor<?x64x?xf32>) outs(%3152 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3150 : i64 to f32
%6767 = arith.truncf %3151 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%3154 = linalg.fill ins(%3072 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%3155 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3106, %3144 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3156 = arith.cmpi eq, %3044, %3071 : i64
cf.assert %3156, "mismatching contracting dimension"
%3157 = tensor.empty(%3114, %3115, %3119) : tensor<?x?x?xi32>
%3158 = linalg.fill ins(%c0_i32 : i32) outs(%3157 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%3159 = linalg.batch_matmul ins(%3117, %3153 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%3158 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_820 = tensor.concat dim(0) %expanded_778, %2956, %3154 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%3160 = tensor.empty(%3114, %3115, %3119) : tensor<?x?x?xf32>
%3161 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3159 : tensor<?x?x?xi32>) outs(%3160 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3162 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3161, %3155 : tensor<?x?x?xf32>, tensor<f32>) outs(%3160 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3163 = linalg.fill ins(%3044 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3164 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2970, %3163, %2938 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_821 = tensor.extract %3164[] : tensor<i64>
%3165 = linalg.fill ins(%3072 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3166 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2985, %3165, %2986 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_822 = tensor.extract %3166[] : tensor<i64>
%3167 = arith.cmpi slt, %extracted_821, %c0_i64 : i64
%3168 = arith.select %3167, %c1_i64, %extracted_821 : i64
%3169 = arith.extui %3167 : i1 to i64
%3170 = arith.muli %3168, %c12_i64 : i64
%3171 = arith.muli %3170, %extracted_822 : i64
%3172 = arith.addi %3169, %c1_i64 : i64
%3173 = arith.cmpi slt, %extracted_822, %c0_i64 : i64
%3174 = arith.select %3173, %3170, %3171 : i64
%3175 = arith.select %3173, %3172, %3169 : i64
%3176 = arith.muli %3174, %3072 : i64
%3177 = arith.addi %3175, %c1_i64 : i64
%3178 = arith.cmpi slt, %3072, %c0_i64 : i64
%3179 = arith.select %3178, %3174, %3176 : i64
%3180 = arith.select %3178, %3177, %3175 : i64
%3181 = arith.cmpi sle, %3180, %c1_i64 : i64
cf.assert %3181, "must have at most one inferred (negative) dimension"
%3182 = arith.muli %3044, %3045 : i64
%3183 = arith.muli %3182, %3072 : i64
%3184 = arith.divsi %3183, %3179 : i64
%3185 = arith.select %3167, %3184, %extracted_821 : i64
%3186 = arith.select %3173, %3184, %extracted_822 : i64
%3187 = arith.select %3178, %3184, %3072 : i64
%from_elements_823 = tensor.from_elements %3185, %c12_i64, %3186, %3187 : tensor<4xi64>
%reshape_824 = tensor.reshape %3162(%from_elements_823) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%3188 = arith.index_cast %3185 : i64 to index
%3189 = arith.index_cast %3186 : i64 to index
%3190 = arith.index_cast %3187 : i64 to index
%3191 = arith.cmpi eq, %3188, %105 : index
cf.assert %3191, "mismatched size for broadcast"
%3192 = arith.cmpi eq, %3189, %112 : index
cf.assert %3192, "mismatched size for broadcast"
%3193 = arith.cmpi eq, %3190, %113 : index
cf.assert %3193, "mismatched size for broadcast"
%3194 = tensor.empty(%3188, %3189, %3190) : tensor<?x12x?x?xf32>
%3195 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_824, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%3194 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%3196 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%3195, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%3194 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_825 = tensor.extract_slice %concat_820[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_826 = tensor.extract %extracted_slice_825[%c0] : tensor<1xi64>
%3197 = arith.cmpi eq, %extracted_826, %c0_i64 : i64
%3198 = arith.extui %3197 : i1 to i64
%3199 = arith.cmpi ne, %3198, %c0_i64 : i64
%3200 = linalg.fill ins(%3199 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3201 = linalg.fill ins(%3185 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3202 = linalg.fill ins(%extracted_826 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3203 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3200, %3201, %3202 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_827 = tensor.extract %3203[] : tensor<i64>
%extracted_slice_828 = tensor.extract_slice %concat_820[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_829 = tensor.extract %extracted_slice_828[%c0] : tensor<1xi64>
%3204 = arith.cmpi eq, %extracted_829, %c0_i64 : i64
%3205 = arith.extui %3204 : i1 to i64
%3206 = arith.cmpi ne, %3205, %c0_i64 : i64
%3207 = linalg.fill ins(%3206 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3208 = linalg.fill ins(%extracted_829 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3209 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3207, %cst_292, %3208 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_830 = tensor.extract %3209[] : tensor<i64>
%extracted_slice_831 = tensor.extract_slice %concat_820[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_832 = tensor.extract %extracted_slice_831[%c0] : tensor<1xi64>
%3210 = arith.cmpi eq, %extracted_832, %c0_i64 : i64
%3211 = arith.extui %3210 : i1 to i64
%3212 = arith.cmpi ne, %3211, %c0_i64 : i64
%3213 = linalg.fill ins(%3212 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3214 = linalg.fill ins(%3186 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3215 = linalg.fill ins(%extracted_832 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3216 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3213, %3214, %3215 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_833 = tensor.extract %3216[] : tensor<i64>
%3217 = arith.cmpi slt, %extracted_827, %c0_i64 : i64
%3218 = arith.select %3217, %c1_i64, %extracted_827 : i64
%3219 = arith.extui %3217 : i1 to i64
%3220 = arith.muli %3218, %extracted_830 : i64
%3221 = arith.addi %3219, %c1_i64 : i64
%3222 = arith.cmpi slt, %extracted_830, %c0_i64 : i64
%3223 = arith.select %3222, %3218, %3220 : i64
%3224 = arith.select %3222, %3221, %3219 : i64
%3225 = arith.muli %3223, %extracted_833 : i64
%3226 = arith.addi %3224, %c1_i64 : i64
%3227 = arith.cmpi slt, %extracted_833, %c0_i64 : i64
%3228 = arith.select %3227, %3223, %3225 : i64
%3229 = arith.select %3227, %3226, %3224 : i64
%3230 = arith.cmpi sle, %3229, %c1_i64 : i64
cf.assert %3230, "must have at most one inferred (negative) dimension"
%3231 = arith.muli %3185, %c12_i64 : i64
%3232 = arith.muli %3231, %3186 : i64
%3233 = arith.muli %3232, %3187 : i64
%3234 = arith.divsi %3233, %3228 : i64
%3235 = arith.select %3217, %3234, %extracted_827 : i64
%3236 = arith.select %3222, %3234, %extracted_830 : i64
%3237 = arith.select %3227, %3234, %extracted_833 : i64
%from_elements_834 = tensor.from_elements %3235, %3236, %3237 : tensor<3xi64>
%reshape_835 = tensor.reshape %3196(%from_elements_834) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%3238 = arith.index_cast %3235 : i64 to index
%3239 = arith.index_cast %3236 : i64 to index
%3240 = tensor.empty(%3238, %3239) : tensor<?x?xi64>
%3241 = linalg.fill ins(%c0_i64 : i64) outs(%3240 : tensor<?x?xi64>) -> tensor<?x?xi64>
%3242 = tensor.empty(%3238, %3239) : tensor<?x?xf32>
%3243 = linalg.fill ins(%cst_1 : f32) outs(%3242 : tensor<?x?xf32>) -> tensor<?x?xf32>
%3244:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_835 : tensor<?x?x?xf32>) outs(%3243, %3241 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_836 = tensor.expand_shape %3244#0 [[0], [1, 2]] output_shape [%3238, %3239, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%3245 = arith.index_cast %3237 : i64 to index
%3246 = tensor.empty(%3238, %3239, %3245) : tensor<?x?x?xf32>
%3247 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_835, %expanded_836 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%3246 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3248 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3247 : tensor<?x?x?xf32>) outs(%3246 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3249 = tensor.empty(%3238, %3239) : tensor<?x?x1xf32>
%3250 = linalg.fill ins(%cst_0 : f32) outs(%3249 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%3251 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%3248 : tensor<?x?x?xf32>) outs(%3250 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3252 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3248, %3251 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%3246 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3253 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3252 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3254 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3252 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3255 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3253, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3256 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3254, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3257 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3255, %3256 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3258 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3257, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3259 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3254, %3258 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3260 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3259 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3261 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3260 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3262 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3261 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3263 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3262 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_837 = tensor.extract %3263[] : tensor<i8>
%3264 = arith.extui %extracted_837 : i8 to i64
%extracted_838 = tensor.extract %3258[] : tensor<f32>
%3265 = arith.extf %extracted_838 : f32 to f64
%3266 = tensor.empty(%3238, %3239, %3245) : tensor<?x?x?xi8>
%3267 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3252 : tensor<?x?x?xf32>) outs(%3266 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3264 : i64 to f32
%6767 = arith.truncf %3265 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%3268 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3258, %3127 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3269 = arith.cmpi eq, %3235, %3098 : i64
cf.assert %3269, "mismatching contracting dimension"
%3270 = arith.cmpi eq, %3237, %3099 : i64
cf.assert %3270, "mismatching contracting dimension"
%3271 = tensor.empty(%3238, %3239) : tensor<?x?x64xi32>
%3272 = linalg.fill ins(%c0_i32 : i32) outs(%3271 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%3273 = linalg.batch_matmul ins(%3267, %3138 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%3272 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%3274 = tensor.empty(%3238, %3239) : tensor<?x?x64xf32>
%3275 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3273 : tensor<?x?x64xi32>) outs(%3274 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%3276 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3275, %3268 : tensor<?x?x64xf32>, tensor<f32>) outs(%3274 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%3277 = linalg.fill ins(%3235 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3278 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2970, %3277, %2938 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_839 = tensor.extract %3278[] : tensor<i64>
%3279 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2985, %cst_7, %2986 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_840 = tensor.extract %3279[] : tensor<i64>
%3280 = arith.cmpi slt, %extracted_839, %c0_i64 : i64
%3281 = arith.select %3280, %c1_i64, %extracted_839 : i64
%3282 = arith.extui %3280 : i1 to i64
%3283 = arith.muli %3281, %c12_i64 : i64
%3284 = arith.muli %3283, %extracted_840 : i64
%3285 = arith.addi %3282, %c1_i64 : i64
%3286 = arith.cmpi slt, %extracted_840, %c0_i64 : i64
%3287 = arith.select %3286, %3283, %3284 : i64
%3288 = arith.select %3286, %3285, %3282 : i64
%3289 = arith.muli %3287, %c64_i64 : i64
%3290 = arith.cmpi sle, %3288, %c1_i64 : i64
cf.assert %3290, "must have at most one inferred (negative) dimension"
%3291 = arith.muli %3235, %3236 : i64
%3292 = arith.muli %3291, %c64_i64 : i64
%3293 = arith.divsi %3292, %3289 : i64
%3294 = arith.select %3280, %3293, %extracted_839 : i64
%3295 = arith.select %3286, %3293, %extracted_840 : i64
%from_elements_841 = tensor.from_elements %3294, %c12_i64, %3295, %c64_i64 : tensor<4xi64>
%reshape_842 = tensor.reshape %3276(%from_elements_841) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%3296 = arith.index_cast %3294 : i64 to index
%3297 = arith.index_cast %3295 : i64 to index
%3298 = tensor.empty(%3296, %3297) : tensor<?x?x12x64xf32>
%3299 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_842 : tensor<?x12x?x64xf32>) outs(%3298 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%3300 = linalg.fill ins(%3294 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3301 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2970, %3300, %2938 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_843 = tensor.extract %3301[] : tensor<i64>
%3302 = linalg.fill ins(%3295 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3303 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2985, %3302, %2986 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_844 = tensor.extract %3303[] : tensor<i64>
%3304 = arith.cmpi slt, %extracted_843, %c0_i64 : i64
%3305 = arith.select %3304, %c1_i64, %extracted_843 : i64
%3306 = arith.extui %3304 : i1 to i64
%3307 = arith.muli %3305, %extracted_844 : i64
%3308 = arith.addi %3306, %c1_i64 : i64
%3309 = arith.cmpi slt, %extracted_844, %c0_i64 : i64
%3310 = arith.select %3309, %3305, %3307 : i64
%3311 = arith.select %3309, %3308, %3306 : i64
%3312 = arith.muli %3310, %c768_i64 : i64
%3313 = arith.cmpi sle, %3311, %c1_i64 : i64
cf.assert %3313, "must have at most one inferred (negative) dimension"
%3314 = arith.muli %3294, %3295 : i64
%3315 = arith.muli %3314, %c768_i64 : i64
%3316 = arith.divsi %3315, %3312 : i64
%3317 = arith.select %3304, %3316, %extracted_843 : i64
%3318 = arith.select %3309, %3316, %extracted_844 : i64
%from_elements_845 = tensor.from_elements %3317, %3318, %c768_i64 : tensor<3xi64>
%reshape_846 = tensor.reshape %3299(%from_elements_845) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%3319 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_846 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3320 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_846 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3321 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3319, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3322 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3320, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3323 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3321, %3322 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3324 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3323, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3325 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3320, %3324 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3326 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3325 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3327 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3326 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3328 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3327 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3329 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3328 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_847 = tensor.extract %3329[] : tensor<i8>
%3330 = arith.extui %extracted_847 : i8 to i64
%extracted_848 = tensor.extract %3324[] : tensor<f32>
%3331 = arith.extf %extracted_848 : f32 to f64
%3332 = arith.index_cast %3317 : i64 to index
%3333 = arith.index_cast %3318 : i64 to index
%3334 = tensor.empty(%3332, %3333) : tensor<?x?x768xi8>
%3335 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_846 : tensor<?x?x768xf32>) outs(%3334 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3330 : i64 to f32
%6767 = arith.truncf %3331 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%3336 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3324, %cst_201 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3337 = arith.trunci %3330 : i64 to i32
%3338 = arith.addi %3337, %c-128_i32 : i32
%3339 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3335 : tensor<?x?x768xi8>) outs(%3334 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%3340 = arith.cmpi sge, %3317, %c0_i64 : i64
cf.assert %3340, "negative values not allowed in new dimensions"
%3341 = tensor.empty(%3332) : tensor<?x768x768xi8>
%3342 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_202 : tensor<768x768xi8>) outs(%3341 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%3343 = tensor.empty(%3332, %3333) : tensor<?x?x768xi32>
%3344 = linalg.fill ins(%c0_i32 : i32) outs(%3343 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3345 = linalg.quantized_batch_matmul ins(%3339, %3342, %3338, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%3344 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3346 = tensor.empty(%3332, %3333) : tensor<?x?x768xf32>
%3347 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3345 : tensor<?x?x768xi32>) outs(%3346 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3348 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3347, %3336 : tensor<?x?x768xf32>, tensor<f32>) outs(%3346 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3349 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_68, %3348 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%3346 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3350 = arith.cmpi eq, %2907, %3332 : index
cf.assert %3350, "mismatched size for broadcast"
%3351 = arith.cmpi eq, %2908, %3333 : index
cf.assert %3351, "mismatched size for broadcast"
%3352 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_775, %3349 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%2913 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3353 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %2938, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_849 = tensor.extract %3353[] : tensor<i64>
%3354 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %2986, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_850 = tensor.extract %3354[] : tensor<i64>
%3355 = arith.cmpi slt, %extracted_849, %c0_i64 : i64
%3356 = arith.select %3355, %c1_i64, %extracted_849 : i64
%3357 = arith.extui %3355 : i1 to i64
%3358 = arith.muli %3356, %extracted_850 : i64
%3359 = arith.addi %3357, %c1_i64 : i64
%3360 = arith.cmpi slt, %extracted_850, %c0_i64 : i64
%3361 = arith.select %3360, %3356, %3358 : i64
%3362 = arith.select %3360, %3359, %3357 : i64
%3363 = arith.cmpi sle, %3362, %c1_i64 : i64
cf.assert %3363, "must have at most one inferred (negative) dimension"
%3364 = arith.divsi %2979, %3361 : i64
%3365 = arith.select %3355, %3364, %extracted_849 : i64
%3366 = arith.select %3360, %3364, %extracted_850 : i64
%from_elements_851 = tensor.from_elements %3365, %3366 : tensor<2xi64>
%reshape_852 = tensor.reshape %3352(%from_elements_851) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%3367 = arith.index_cast %3365 : i64 to index
%3368 = tensor.empty(%3367) : tensor<?x1xf32>
%3369 = linalg.fill ins(%cst_0 : f32) outs(%3368 : tensor<?x1xf32>) -> tensor<?x1xf32>
%3370 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_852 : tensor<?x768xf32>) outs(%3369 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3371 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3370 : tensor<?x1xf32>) outs(%3368 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3372 = tensor.empty(%3367) : tensor<?x768xf32>
%3373 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_852, %3371 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3374 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3373, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3375 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%3374 : tensor<?x768xf32>) outs(%3369 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3376 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3375 : tensor<?x1xf32>) outs(%3368 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3377 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3376, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%3368 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3378 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3377 : tensor<?x1xf32>) outs(%3368 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3379 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3373, %3378 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3380 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3379, %cst_73 : tensor<?x768xf32>, tensor<768xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3381 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3380, %cst_74 : tensor<?x768xf32>, tensor<768xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3382 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3381 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3383 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3381 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3384 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3382, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3385 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3383, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3386 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3384, %3385 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3387 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3386, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3388 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3383, %3387 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3389 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3388 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3390 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3389 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3391 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3390 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3392 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3391 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_853 = tensor.extract %3392[] : tensor<i8>
%3393 = arith.extui %extracted_853 : i8 to i64
%extracted_854 = tensor.extract %3387[] : tensor<f32>
%3394 = arith.extf %extracted_854 : f32 to f64
%3395 = tensor.empty(%3367) : tensor<?x768xi8>
%3396 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3381 : tensor<?x768xf32>) outs(%3395 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3393 : i64 to f32
%6767 = arith.truncf %3394 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%3397 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3387, %cst_203 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3398 = tensor.empty(%3367) : tensor<?x3072xi32>
%3399 = linalg.fill ins(%c0_i32 : i32) outs(%3398 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%3400 = arith.trunci %3393 : i64 to i32
%3401 = arith.addi %3400, %c-128_i32 : i32
%3402 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3396 : tensor<?x768xi8>) outs(%3395 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%3403 = linalg.quantized_matmul ins(%3402, %cst_204, %3401, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%3399 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%3404 = tensor.empty(%3367) : tensor<?x3072xf32>
%3405 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3403 : tensor<?x3072xi32>) outs(%3404 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3406 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3405, %3397 : tensor<?x3072xf32>, tensor<f32>) outs(%3404 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3407 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3406, %cst_71 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%3404 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3408 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3407 : tensor<?x3072xf32>) outs(%3404 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%3409 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3408 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3410 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3408 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3411 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3409, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3412 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3410, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3413 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3411, %3412 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3414 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3413, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3415 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3410, %3414 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3416 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3415 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3417 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3416 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3418 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3417 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3419 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3418 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_855 = tensor.extract %3419[] : tensor<i8>
%3420 = arith.extui %extracted_855 : i8 to i64
%extracted_856 = tensor.extract %3414[] : tensor<f32>
%3421 = arith.extf %extracted_856 : f32 to f64
%3422 = tensor.empty(%3367) : tensor<?x3072xi8>
%3423 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3408 : tensor<?x3072xf32>) outs(%3422 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3420 : i64 to f32
%6767 = arith.truncf %3421 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%3424 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3414, %cst_205 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3425 = tensor.empty(%3367) : tensor<?x768xi32>
%3426 = linalg.fill ins(%c0_i32 : i32) outs(%3425 : tensor<?x768xi32>) -> tensor<?x768xi32>
%3427 = arith.trunci %3420 : i64 to i32
%3428 = arith.addi %3427, %c-128_i32 : i32
%3429 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3423 : tensor<?x3072xi8>) outs(%3422 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%3430 = linalg.quantized_matmul ins(%3429, %cst_206, %3428, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%3426 : tensor<?x768xi32>) -> tensor<?x768xi32>
%3431 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3430 : tensor<?x768xi32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3432 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3431, %3424 : tensor<?x768xf32>, tensor<f32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3433 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3432, %cst_72 : tensor<?x768xf32>, tensor<768xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3434 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_852, %3433 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%3372 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3435 = linalg.fill ins(%3365 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3436 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2970, %3435, %2938 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_857 = tensor.extract %3436[] : tensor<i64>
%3437 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%2985, %cst_8, %2986 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_858 = tensor.extract %3437[] : tensor<i64>
%3438 = arith.cmpi slt, %extracted_857, %c0_i64 : i64
%3439 = arith.select %3438, %c1_i64, %extracted_857 : i64
%3440 = arith.extui %3438 : i1 to i64
%3441 = arith.muli %3439, %extracted_858 : i64
%3442 = arith.addi %3440, %c1_i64 : i64
%3443 = arith.cmpi slt, %extracted_858, %c0_i64 : i64
%3444 = arith.select %3443, %3439, %3441 : i64
%3445 = arith.select %3443, %3442, %3440 : i64
%3446 = arith.muli %3444, %c768_i64 : i64
%3447 = arith.cmpi sle, %3445, %c1_i64 : i64
cf.assert %3447, "must have at most one inferred (negative) dimension"
%3448 = arith.muli %3365, %c768_i64 : i64
%3449 = arith.divsi %3448, %3446 : i64
%3450 = arith.select %3438, %3449, %extracted_857 : i64
%3451 = arith.select %3443, %3449, %extracted_858 : i64
%from_elements_859 = tensor.from_elements %3450, %3451, %c768_i64 : tensor<3xi64>
%reshape_860 = tensor.reshape %3434(%from_elements_859) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%3452 = arith.index_cast %3450 : i64 to index
%3453 = arith.index_cast %3451 : i64 to index
%3454 = tensor.empty(%3452, %3453) : tensor<?x?x1xf32>
%3455 = linalg.fill ins(%cst_0 : f32) outs(%3454 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%3456 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_860 : tensor<?x?x768xf32>) outs(%3455 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3457 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3456 : tensor<?x?x1xf32>) outs(%3454 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3458 = tensor.empty(%3452, %3453) : tensor<?x?x768xf32>
%3459 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_860, %3457 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3460 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3459, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3461 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%3460 : tensor<?x?x768xf32>) outs(%3455 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3462 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3461 : tensor<?x?x1xf32>) outs(%3454 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3463 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3462, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%3454 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3464 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3463 : tensor<?x?x1xf32>) outs(%3454 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3465 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3459, %3464 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3466 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3465, %cst_79 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3467 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3466, %cst_80 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3468 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3467 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3469 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3467 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3470 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3468, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3471 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3469, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3472 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3470, %3471 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3473 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3472, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3474 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3469, %3473 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3475 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3474 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3476 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3475 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3477 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3476 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3478 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3477 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_861 = tensor.extract %3478[] : tensor<i8>
%3479 = arith.extui %extracted_861 : i8 to i64
%extracted_862 = tensor.extract %3473[] : tensor<f32>
%3480 = arith.extf %extracted_862 : f32 to f64
%3481 = tensor.empty(%3452, %3453) : tensor<?x?x768xi8>
%3482 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3467 : tensor<?x?x768xf32>) outs(%3481 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3479 : i64 to f32
%6767 = arith.truncf %3480 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%3483 = linalg.fill ins(%3450 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3484 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3473, %cst_207 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3485 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3473, %cst_209 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3486 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3473, %cst_211 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3487 = arith.trunci %3479 : i64 to i32
%3488 = arith.addi %3487, %c-128_i32 : i32
%3489 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3482 : tensor<?x?x768xi8>) outs(%3481 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%3490 = arith.cmpi sge, %3450, %c0_i64 : i64
cf.assert %3490, "negative values not allowed in new dimensions"
%3491 = tensor.empty(%3452) : tensor<?x768x768xi8>
%3492 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_208 : tensor<768x768xi8>) outs(%3491 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%3493 = tensor.empty(%3452, %3453) : tensor<?x?x768xi32>
%3494 = linalg.fill ins(%c0_i32 : i32) outs(%3493 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3495 = linalg.quantized_batch_matmul ins(%3489, %3492, %3488, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%3494 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %3490, "negative values not allowed in new dimensions"
%3496 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_210 : tensor<768x768xi8>) outs(%3491 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%3497 = linalg.quantized_batch_matmul ins(%3489, %3496, %3488, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%3494 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %3490, "negative values not allowed in new dimensions"
%3498 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_212 : tensor<768x768xi8>) outs(%3491 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%3499 = linalg.quantized_batch_matmul ins(%3489, %3498, %3488, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%3494 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3500 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3483, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%3501 = linalg.fill ins(%3451 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%3502 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3495 : tensor<?x?x768xi32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3503 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3497 : tensor<?x?x768xi32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3504 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3499 : tensor<?x?x768xi32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_863 = tensor.expand_shape %3500 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%3505 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3502, %3484 : tensor<?x?x768xf32>, tensor<f32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3506 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3503, %3485 : tensor<?x?x768xf32>, tensor<f32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3507 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3504, %3486 : tensor<?x?x768xf32>, tensor<f32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_864 = tensor.concat dim(0) %expanded_863, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%3508 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_77, %3505 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3509 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_75, %3506 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3510 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_76, %3507 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3511 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3508, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3512 = arith.cmpi eq, %3450, %c0_i64 : i64
%3513 = arith.extui %3512 : i1 to i64
%3514 = arith.cmpi ne, %3513, %c0_i64 : i64
%3515 = linalg.fill ins(%3514 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3516 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3515, %3483, %3483 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_865 = tensor.extract %3516[] : tensor<i64>
%3517 = arith.cmpi slt, %extracted_865, %c0_i64 : i64
%3518 = arith.select %3517, %c1_i64, %extracted_865 : i64
%3519 = arith.extui %3517 : i1 to i64
%3520 = arith.addi %3519, %c1_i64 : i64
%3521 = arith.muli %3518, %c768_i64 : i64
%3522 = arith.cmpi sle, %3520, %c1_i64 : i64
cf.assert %3522, "must have at most one inferred (negative) dimension"
%3523 = arith.muli %3450, %3451 : i64
%3524 = arith.muli %3523, %c768_i64 : i64
%3525 = arith.divsi %3524, %3521 : i64
%3526 = arith.select %3517, %3525, %extracted_865 : i64
%from_elements_866 = tensor.from_elements %3526, %3525, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_867 = tensor.reshape %3509(%from_elements_866) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %3522, "must have at most one inferred (negative) dimension"
%reshape_868 = tensor.reshape %3510(%from_elements_866) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%3527 = arith.cmpi eq, %3451, %c0_i64 : i64
%3528 = arith.extui %3527 : i1 to i64
%3529 = arith.cmpi ne, %3528, %c0_i64 : i64
%3530 = linalg.fill ins(%3529 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3531 = linalg.fill ins(%3451 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3532 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3530, %3531, %3531 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_869 = tensor.extract %3532[] : tensor<i64>
%3533 = arith.muli %3518, %extracted_869 : i64
%3534 = arith.cmpi slt, %extracted_869, %c0_i64 : i64
%3535 = arith.select %3534, %3518, %3533 : i64
%3536 = arith.select %3534, %3520, %3519 : i64
%3537 = arith.muli %3535, %c768_i64 : i64
%3538 = arith.cmpi sle, %3536, %c1_i64 : i64
cf.assert %3538, "must have at most one inferred (negative) dimension"
%3539 = arith.divsi %3524, %3537 : i64
%3540 = arith.select %3517, %3539, %extracted_865 : i64
%3541 = arith.select %3534, %3539, %extracted_869 : i64
%from_elements_870 = tensor.from_elements %3540, %3541, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_871 = tensor.reshape %3511(%from_elements_870) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%3542 = arith.index_cast %3526 : i64 to index
%3543 = arith.index_cast %3525 : i64 to index
%3544 = tensor.empty(%3542, %3543) : tensor<?x12x?x64xf32>
%3545 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_867 : tensor<?x?x12x64xf32>) outs(%3544 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%3546 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_868 : tensor<?x?x12x64xf32>) outs(%3544 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%3547 = arith.index_cast %3540 : i64 to index
%3548 = arith.index_cast %3541 : i64 to index
%3549 = tensor.empty(%3547, %3548) : tensor<?x12x?x64xf32>
%3550 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_871 : tensor<?x?x12x64xf32>) outs(%3549 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_872 = tensor.concat dim(2) %arg14, %3545 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_873 = tensor.concat dim(2) %arg15, %3546 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_874 = tensor.extract_slice %concat_864[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_875 = tensor.extract %extracted_slice_874[%c0] : tensor<1xi64>
%3551 = arith.cmpi eq, %extracted_875, %c0_i64 : i64
%3552 = arith.extui %3551 : i1 to i64
%3553 = arith.cmpi ne, %3552, %c0_i64 : i64
%3554 = linalg.fill ins(%3553 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3555 = linalg.fill ins(%3540 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3556 = linalg.fill ins(%extracted_875 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3557 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3554, %3555, %3556 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_876 = tensor.extract %3557[] : tensor<i64>
%extracted_slice_877 = tensor.extract_slice %concat_864[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_878 = tensor.extract %extracted_slice_877[%c0] : tensor<1xi64>
%3558 = arith.cmpi eq, %extracted_878, %c0_i64 : i64
%3559 = arith.extui %3558 : i1 to i64
%3560 = arith.cmpi ne, %3559, %c0_i64 : i64
%3561 = linalg.fill ins(%3560 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3562 = linalg.fill ins(%extracted_878 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3563 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3561, %cst_292, %3562 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_879 = tensor.extract %3563[] : tensor<i64>
%extracted_slice_880 = tensor.extract_slice %concat_864[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_881 = tensor.extract %extracted_slice_880[%c0] : tensor<1xi64>
%3564 = arith.cmpi eq, %extracted_881, %c0_i64 : i64
%3565 = arith.extui %3564 : i1 to i64
%3566 = arith.cmpi ne, %3565, %c0_i64 : i64
%3567 = linalg.fill ins(%3566 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3568 = linalg.fill ins(%3541 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3569 = linalg.fill ins(%extracted_881 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3570 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3567, %3568, %3569 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_882 = tensor.extract %3570[] : tensor<i64>
%3571 = arith.cmpi slt, %extracted_876, %c0_i64 : i64
%3572 = arith.select %3571, %c1_i64, %extracted_876 : i64
%3573 = arith.extui %3571 : i1 to i64
%3574 = arith.muli %3572, %extracted_879 : i64
%3575 = arith.addi %3573, %c1_i64 : i64
%3576 = arith.cmpi slt, %extracted_879, %c0_i64 : i64
%3577 = arith.select %3576, %3572, %3574 : i64
%3578 = arith.select %3576, %3575, %3573 : i64
%3579 = arith.muli %3577, %extracted_882 : i64
%3580 = arith.addi %3578, %c1_i64 : i64
%3581 = arith.cmpi slt, %extracted_882, %c0_i64 : i64
%3582 = arith.select %3581, %3577, %3579 : i64
%3583 = arith.select %3581, %3580, %3578 : i64
%3584 = arith.cmpi sle, %3583, %c1_i64 : i64
cf.assert %3584, "must have at most one inferred (negative) dimension"
%3585 = arith.muli %3540, %c12_i64 : i64
%3586 = arith.muli %3585, %3541 : i64
%3587 = arith.muli %3586, %c64_i64 : i64
%3588 = arith.divsi %3587, %3582 : i64
%3589 = arith.select %3571, %3588, %extracted_876 : i64
%3590 = arith.select %3576, %3588, %extracted_879 : i64
%3591 = arith.select %3581, %3588, %extracted_882 : i64
%from_elements_883 = tensor.from_elements %3589, %3590, %3591 : tensor<3xi64>
%reshape_884 = tensor.reshape %3550(%from_elements_883) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_885 = tensor.dim %arg14, %c0 : tensor<?x12x?x64xf32>
%3592 = arith.index_cast %dim_885 : index to i64
%3593 = linalg.fill ins(%3592 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3594 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3554, %3593, %3556 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_886 = tensor.extract %3594[] : tensor<i64>
%dim_887 = tensor.dim %arg14, %c2 : tensor<?x12x?x64xf32>
%dim_888 = tensor.dim %3545, %c2 : tensor<?x12x?x64xf32>
%3595 = affine.apply #map15()[%dim_887, %dim_888]
%3596 = arith.index_cast %3595 : index to i64
%3597 = linalg.fill ins(%3596 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3598 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3567, %3597, %3569 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_889 = tensor.extract %3598[] : tensor<i64>
%3599 = arith.cmpi slt, %extracted_886, %c0_i64 : i64
%3600 = arith.select %3599, %c1_i64, %extracted_886 : i64
%3601 = arith.extui %3599 : i1 to i64
%3602 = arith.muli %3600, %extracted_879 : i64
%3603 = arith.addi %3601, %c1_i64 : i64
%3604 = arith.select %3576, %3600, %3602 : i64
%3605 = arith.select %3576, %3603, %3601 : i64
%3606 = arith.muli %3604, %extracted_889 : i64
%3607 = arith.addi %3605, %c1_i64 : i64
%3608 = arith.cmpi slt, %extracted_889, %c0_i64 : i64
%3609 = arith.select %3608, %3604, %3606 : i64
%3610 = arith.select %3608, %3607, %3605 : i64
%3611 = arith.cmpi sle, %3610, %c1_i64 : i64
cf.assert %3611, "must have at most one inferred (negative) dimension"
%3612 = arith.muli %3592, %c12_i64 : i64
%3613 = arith.muli %3612, %3596 : i64
%3614 = arith.muli %3613, %c64_i64 : i64
%3615 = arith.divsi %3614, %3609 : i64
%3616 = arith.select %3599, %3615, %extracted_886 : i64
%3617 = arith.select %3576, %3615, %extracted_879 : i64
%3618 = arith.select %3608, %3615, %extracted_889 : i64
%from_elements_890 = tensor.from_elements %3616, %3617, %3618 : tensor<3xi64>
%reshape_891 = tensor.reshape %concat_872(%from_elements_890) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_892 = tensor.dim %arg15, %c0 : tensor<?x12x?x64xf32>
%3619 = arith.index_cast %dim_892 : index to i64
%3620 = linalg.fill ins(%3619 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3621 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3554, %3620, %3556 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_893 = tensor.extract %3621[] : tensor<i64>
%dim_894 = tensor.dim %arg15, %c2 : tensor<?x12x?x64xf32>
%dim_895 = tensor.dim %3546, %c2 : tensor<?x12x?x64xf32>
%3622 = affine.apply #map15()[%dim_894, %dim_895]
%3623 = arith.index_cast %3622 : index to i64
%3624 = linalg.fill ins(%3623 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3625 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3567, %3624, %3569 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_896 = tensor.extract %3625[] : tensor<i64>
%3626 = arith.cmpi slt, %extracted_893, %c0_i64 : i64
%3627 = arith.select %3626, %c1_i64, %extracted_893 : i64
%3628 = arith.extui %3626 : i1 to i64
%3629 = arith.muli %3627, %extracted_879 : i64
%3630 = arith.addi %3628, %c1_i64 : i64
%3631 = arith.select %3576, %3627, %3629 : i64
%3632 = arith.select %3576, %3630, %3628 : i64
%3633 = arith.muli %3631, %extracted_896 : i64
%3634 = arith.addi %3632, %c1_i64 : i64
%3635 = arith.cmpi slt, %extracted_896, %c0_i64 : i64
%3636 = arith.select %3635, %3631, %3633 : i64
%3637 = arith.select %3635, %3634, %3632 : i64
%3638 = arith.cmpi sle, %3637, %c1_i64 : i64
cf.assert %3638, "must have at most one inferred (negative) dimension"
%3639 = arith.muli %3619, %c12_i64 : i64
%3640 = arith.muli %3639, %3623 : i64
%3641 = arith.muli %3640, %c64_i64 : i64
%3642 = arith.divsi %3641, %3636 : i64
%3643 = arith.select %3626, %3642, %extracted_893 : i64
%3644 = arith.select %3576, %3642, %extracted_879 : i64
%3645 = arith.select %3635, %3642, %extracted_896 : i64
%from_elements_897 = tensor.from_elements %3643, %3644, %3645 : tensor<3xi64>
%reshape_898 = tensor.reshape %concat_873(%from_elements_897) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%3646 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_884 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3647 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_884 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3648 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3646, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3649 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3647, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3650 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3648, %3649 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3651 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3650, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3652 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3647, %3651 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3653 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3652 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3654 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3653 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3655 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3654 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3656 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3655 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_899 = tensor.extract %3656[] : tensor<i8>
%3657 = arith.extui %extracted_899 : i8 to i64
%extracted_900 = tensor.extract %3651[] : tensor<f32>
%3658 = arith.extf %extracted_900 : f32 to f64
%3659 = arith.index_cast %3589 : i64 to index
%3660 = arith.index_cast %3590 : i64 to index
%3661 = tensor.empty(%3659, %3660) : tensor<?x?x64xi8>
%3662 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_884 : tensor<?x?x64xf32>) outs(%3661 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3657 : i64 to f32
%6767 = arith.truncf %3658 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%3663 = arith.index_cast %3616 : i64 to index
%3664 = arith.index_cast %3617 : i64 to index
%3665 = tensor.empty(%3663, %3664) : tensor<?x64x?xf32>
%3666 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_891 : tensor<?x?x64xf32>) outs(%3665 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%3667 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_898 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3668 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_898 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3669 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3667, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3670 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3668, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3671 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3669, %3670 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3672 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3671, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3673 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3668, %3672 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3674 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3673 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3675 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3674 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3676 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3675 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3677 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3676 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_901 = tensor.extract %3677[] : tensor<i8>
%3678 = arith.extui %extracted_901 : i8 to i64
%extracted_902 = tensor.extract %3672[] : tensor<f32>
%3679 = arith.extf %extracted_902 : f32 to f64
%3680 = arith.index_cast %3643 : i64 to index
%3681 = arith.index_cast %3644 : i64 to index
%3682 = tensor.empty(%3680, %3681) : tensor<?x?x64xi8>
%3683 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_898 : tensor<?x?x64xf32>) outs(%3682 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3678 : i64 to f32
%6767 = arith.truncf %3679 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%3684 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3666 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3685 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3666 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3686 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3684, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3687 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3685, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3688 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3686, %3687 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3689 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3688, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3690 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3685, %3689 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3691 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3690 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3692 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3691 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3693 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3692 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3694 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3693 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_903 = tensor.extract %3694[] : tensor<i8>
%3695 = arith.extui %extracted_903 : i8 to i64
%extracted_904 = tensor.extract %3689[] : tensor<f32>
%3696 = arith.extf %extracted_904 : f32 to f64
%3697 = tensor.empty(%3663, %3664) : tensor<?x64x?xi8>
%3698 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3666 : tensor<?x64x?xf32>) outs(%3697 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3695 : i64 to f32
%6767 = arith.truncf %3696 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%3699 = linalg.fill ins(%3617 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%3700 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3651, %3689 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3701 = arith.cmpi eq, %3589, %3616 : i64
cf.assert %3701, "mismatching contracting dimension"
%3702 = tensor.empty(%3659, %3660, %3664) : tensor<?x?x?xi32>
%3703 = linalg.fill ins(%c0_i32 : i32) outs(%3702 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%3704 = linalg.batch_matmul ins(%3662, %3698 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%3703 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_905 = tensor.concat dim(0) %expanded_863, %3501, %3699 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%3705 = tensor.empty(%3659, %3660, %3664) : tensor<?x?x?xf32>
%3706 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3704 : tensor<?x?x?xi32>) outs(%3705 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3707 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3706, %3700 : tensor<?x?x?xf32>, tensor<f32>) outs(%3705 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3708 = linalg.fill ins(%3589 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3709 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3515, %3708, %3483 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_906 = tensor.extract %3709[] : tensor<i64>
%3710 = linalg.fill ins(%3617 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3711 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3530, %3710, %3531 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_907 = tensor.extract %3711[] : tensor<i64>
%3712 = arith.cmpi slt, %extracted_906, %c0_i64 : i64
%3713 = arith.select %3712, %c1_i64, %extracted_906 : i64
%3714 = arith.extui %3712 : i1 to i64
%3715 = arith.muli %3713, %c12_i64 : i64
%3716 = arith.muli %3715, %extracted_907 : i64
%3717 = arith.addi %3714, %c1_i64 : i64
%3718 = arith.cmpi slt, %extracted_907, %c0_i64 : i64
%3719 = arith.select %3718, %3715, %3716 : i64
%3720 = arith.select %3718, %3717, %3714 : i64
%3721 = arith.muli %3719, %3617 : i64
%3722 = arith.addi %3720, %c1_i64 : i64
%3723 = arith.cmpi slt, %3617, %c0_i64 : i64
%3724 = arith.select %3723, %3719, %3721 : i64
%3725 = arith.select %3723, %3722, %3720 : i64
%3726 = arith.cmpi sle, %3725, %c1_i64 : i64
cf.assert %3726, "must have at most one inferred (negative) dimension"
%3727 = arith.muli %3589, %3590 : i64
%3728 = arith.muli %3727, %3617 : i64
%3729 = arith.divsi %3728, %3724 : i64
%3730 = arith.select %3712, %3729, %extracted_906 : i64
%3731 = arith.select %3718, %3729, %extracted_907 : i64
%3732 = arith.select %3723, %3729, %3617 : i64
%from_elements_908 = tensor.from_elements %3730, %c12_i64, %3731, %3732 : tensor<4xi64>
%reshape_909 = tensor.reshape %3707(%from_elements_908) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%3733 = arith.index_cast %3730 : i64 to index
%3734 = arith.index_cast %3731 : i64 to index
%3735 = arith.index_cast %3732 : i64 to index
%3736 = arith.cmpi eq, %3733, %105 : index
cf.assert %3736, "mismatched size for broadcast"
%3737 = arith.cmpi eq, %3734, %112 : index
cf.assert %3737, "mismatched size for broadcast"
%3738 = arith.cmpi eq, %3735, %113 : index
cf.assert %3738, "mismatched size for broadcast"
%3739 = tensor.empty(%3733, %3734, %3735) : tensor<?x12x?x?xf32>
%3740 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_909, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%3739 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%3741 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%3740, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%3739 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_910 = tensor.extract_slice %concat_905[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_911 = tensor.extract %extracted_slice_910[%c0] : tensor<1xi64>
%3742 = arith.cmpi eq, %extracted_911, %c0_i64 : i64
%3743 = arith.extui %3742 : i1 to i64
%3744 = arith.cmpi ne, %3743, %c0_i64 : i64
%3745 = linalg.fill ins(%3744 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3746 = linalg.fill ins(%3730 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3747 = linalg.fill ins(%extracted_911 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3748 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3745, %3746, %3747 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_912 = tensor.extract %3748[] : tensor<i64>
%extracted_slice_913 = tensor.extract_slice %concat_905[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_914 = tensor.extract %extracted_slice_913[%c0] : tensor<1xi64>
%3749 = arith.cmpi eq, %extracted_914, %c0_i64 : i64
%3750 = arith.extui %3749 : i1 to i64
%3751 = arith.cmpi ne, %3750, %c0_i64 : i64
%3752 = linalg.fill ins(%3751 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3753 = linalg.fill ins(%extracted_914 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3754 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3752, %cst_292, %3753 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_915 = tensor.extract %3754[] : tensor<i64>
%extracted_slice_916 = tensor.extract_slice %concat_905[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_917 = tensor.extract %extracted_slice_916[%c0] : tensor<1xi64>
%3755 = arith.cmpi eq, %extracted_917, %c0_i64 : i64
%3756 = arith.extui %3755 : i1 to i64
%3757 = arith.cmpi ne, %3756, %c0_i64 : i64
%3758 = linalg.fill ins(%3757 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%3759 = linalg.fill ins(%3731 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3760 = linalg.fill ins(%extracted_917 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3761 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3758, %3759, %3760 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_918 = tensor.extract %3761[] : tensor<i64>
%3762 = arith.cmpi slt, %extracted_912, %c0_i64 : i64
%3763 = arith.select %3762, %c1_i64, %extracted_912 : i64
%3764 = arith.extui %3762 : i1 to i64
%3765 = arith.muli %3763, %extracted_915 : i64
%3766 = arith.addi %3764, %c1_i64 : i64
%3767 = arith.cmpi slt, %extracted_915, %c0_i64 : i64
%3768 = arith.select %3767, %3763, %3765 : i64
%3769 = arith.select %3767, %3766, %3764 : i64
%3770 = arith.muli %3768, %extracted_918 : i64
%3771 = arith.addi %3769, %c1_i64 : i64
%3772 = arith.cmpi slt, %extracted_918, %c0_i64 : i64
%3773 = arith.select %3772, %3768, %3770 : i64
%3774 = arith.select %3772, %3771, %3769 : i64
%3775 = arith.cmpi sle, %3774, %c1_i64 : i64
cf.assert %3775, "must have at most one inferred (negative) dimension"
%3776 = arith.muli %3730, %c12_i64 : i64
%3777 = arith.muli %3776, %3731 : i64
%3778 = arith.muli %3777, %3732 : i64
%3779 = arith.divsi %3778, %3773 : i64
%3780 = arith.select %3762, %3779, %extracted_912 : i64
%3781 = arith.select %3767, %3779, %extracted_915 : i64
%3782 = arith.select %3772, %3779, %extracted_918 : i64
%from_elements_919 = tensor.from_elements %3780, %3781, %3782 : tensor<3xi64>
%reshape_920 = tensor.reshape %3741(%from_elements_919) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%3783 = arith.index_cast %3780 : i64 to index
%3784 = arith.index_cast %3781 : i64 to index
%3785 = tensor.empty(%3783, %3784) : tensor<?x?xi64>
%3786 = linalg.fill ins(%c0_i64 : i64) outs(%3785 : tensor<?x?xi64>) -> tensor<?x?xi64>
%3787 = tensor.empty(%3783, %3784) : tensor<?x?xf32>
%3788 = linalg.fill ins(%cst_1 : f32) outs(%3787 : tensor<?x?xf32>) -> tensor<?x?xf32>
%3789:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_920 : tensor<?x?x?xf32>) outs(%3788, %3786 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_921 = tensor.expand_shape %3789#0 [[0], [1, 2]] output_shape [%3783, %3784, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%3790 = arith.index_cast %3782 : i64 to index
%3791 = tensor.empty(%3783, %3784, %3790) : tensor<?x?x?xf32>
%3792 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_920, %expanded_921 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%3791 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3793 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3792 : tensor<?x?x?xf32>) outs(%3791 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3794 = tensor.empty(%3783, %3784) : tensor<?x?x1xf32>
%3795 = linalg.fill ins(%cst_0 : f32) outs(%3794 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%3796 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%3793 : tensor<?x?x?xf32>) outs(%3795 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%3797 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3793, %3796 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%3791 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%3798 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3797 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3799 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%3797 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3800 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3798, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3801 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3799, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3802 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3800, %3801 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3803 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3802, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3804 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3799, %3803 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3805 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3804 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3806 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3805 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3807 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3806 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3808 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3807 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_922 = tensor.extract %3808[] : tensor<i8>
%3809 = arith.extui %extracted_922 : i8 to i64
%extracted_923 = tensor.extract %3803[] : tensor<f32>
%3810 = arith.extf %extracted_923 : f32 to f64
%3811 = tensor.empty(%3783, %3784, %3790) : tensor<?x?x?xi8>
%3812 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3797 : tensor<?x?x?xf32>) outs(%3811 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3809 : i64 to f32
%6767 = arith.truncf %3810 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%3813 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3803, %3672 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3814 = arith.cmpi eq, %3780, %3643 : i64
cf.assert %3814, "mismatching contracting dimension"
%3815 = arith.cmpi eq, %3782, %3644 : i64
cf.assert %3815, "mismatching contracting dimension"
%3816 = tensor.empty(%3783, %3784) : tensor<?x?x64xi32>
%3817 = linalg.fill ins(%c0_i32 : i32) outs(%3816 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%3818 = linalg.batch_matmul ins(%3812, %3683 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%3817 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%3819 = tensor.empty(%3783, %3784) : tensor<?x?x64xf32>
%3820 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3818 : tensor<?x?x64xi32>) outs(%3819 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%3821 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3820, %3813 : tensor<?x?x64xf32>, tensor<f32>) outs(%3819 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%3822 = linalg.fill ins(%3780 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3823 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3515, %3822, %3483 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_924 = tensor.extract %3823[] : tensor<i64>
%3824 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3530, %cst_7, %3531 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_925 = tensor.extract %3824[] : tensor<i64>
%3825 = arith.cmpi slt, %extracted_924, %c0_i64 : i64
%3826 = arith.select %3825, %c1_i64, %extracted_924 : i64
%3827 = arith.extui %3825 : i1 to i64
%3828 = arith.muli %3826, %c12_i64 : i64
%3829 = arith.muli %3828, %extracted_925 : i64
%3830 = arith.addi %3827, %c1_i64 : i64
%3831 = arith.cmpi slt, %extracted_925, %c0_i64 : i64
%3832 = arith.select %3831, %3828, %3829 : i64
%3833 = arith.select %3831, %3830, %3827 : i64
%3834 = arith.muli %3832, %c64_i64 : i64
%3835 = arith.cmpi sle, %3833, %c1_i64 : i64
cf.assert %3835, "must have at most one inferred (negative) dimension"
%3836 = arith.muli %3780, %3781 : i64
%3837 = arith.muli %3836, %c64_i64 : i64
%3838 = arith.divsi %3837, %3834 : i64
%3839 = arith.select %3825, %3838, %extracted_924 : i64
%3840 = arith.select %3831, %3838, %extracted_925 : i64
%from_elements_926 = tensor.from_elements %3839, %c12_i64, %3840, %c64_i64 : tensor<4xi64>
%reshape_927 = tensor.reshape %3821(%from_elements_926) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%3841 = arith.index_cast %3839 : i64 to index
%3842 = arith.index_cast %3840 : i64 to index
%3843 = tensor.empty(%3841, %3842) : tensor<?x?x12x64xf32>
%3844 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_927 : tensor<?x12x?x64xf32>) outs(%3843 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%3845 = linalg.fill ins(%3839 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3846 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3515, %3845, %3483 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_928 = tensor.extract %3846[] : tensor<i64>
%3847 = linalg.fill ins(%3840 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3848 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3530, %3847, %3531 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_929 = tensor.extract %3848[] : tensor<i64>
%3849 = arith.cmpi slt, %extracted_928, %c0_i64 : i64
%3850 = arith.select %3849, %c1_i64, %extracted_928 : i64
%3851 = arith.extui %3849 : i1 to i64
%3852 = arith.muli %3850, %extracted_929 : i64
%3853 = arith.addi %3851, %c1_i64 : i64
%3854 = arith.cmpi slt, %extracted_929, %c0_i64 : i64
%3855 = arith.select %3854, %3850, %3852 : i64
%3856 = arith.select %3854, %3853, %3851 : i64
%3857 = arith.muli %3855, %c768_i64 : i64
%3858 = arith.cmpi sle, %3856, %c1_i64 : i64
cf.assert %3858, "must have at most one inferred (negative) dimension"
%3859 = arith.muli %3839, %3840 : i64
%3860 = arith.muli %3859, %c768_i64 : i64
%3861 = arith.divsi %3860, %3857 : i64
%3862 = arith.select %3849, %3861, %extracted_928 : i64
%3863 = arith.select %3854, %3861, %extracted_929 : i64
%from_elements_930 = tensor.from_elements %3862, %3863, %c768_i64 : tensor<3xi64>
%reshape_931 = tensor.reshape %3844(%from_elements_930) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%3864 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_931 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3865 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_931 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3866 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3864, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3867 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3865, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3868 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3866, %3867 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3869 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3868, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3870 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3865, %3869 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3871 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3870 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3872 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3871 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3873 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3872 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3874 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3873 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_932 = tensor.extract %3874[] : tensor<i8>
%3875 = arith.extui %extracted_932 : i8 to i64
%extracted_933 = tensor.extract %3869[] : tensor<f32>
%3876 = arith.extf %extracted_933 : f32 to f64
%3877 = arith.index_cast %3862 : i64 to index
%3878 = arith.index_cast %3863 : i64 to index
%3879 = tensor.empty(%3877, %3878) : tensor<?x?x768xi8>
%3880 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_931 : tensor<?x?x768xf32>) outs(%3879 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3875 : i64 to f32
%6767 = arith.truncf %3876 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%3881 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3869, %cst_213 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3882 = arith.trunci %3875 : i64 to i32
%3883 = arith.addi %3882, %c-128_i32 : i32
%3884 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3880 : tensor<?x?x768xi8>) outs(%3879 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%3885 = arith.cmpi sge, %3862, %c0_i64 : i64
cf.assert %3885, "negative values not allowed in new dimensions"
%3886 = tensor.empty(%3877) : tensor<?x768x768xi8>
%3887 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_214 : tensor<768x768xi8>) outs(%3886 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%3888 = tensor.empty(%3877, %3878) : tensor<?x?x768xi32>
%3889 = linalg.fill ins(%c0_i32 : i32) outs(%3888 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3890 = linalg.quantized_batch_matmul ins(%3884, %3887, %3883, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%3889 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%3891 = tensor.empty(%3877, %3878) : tensor<?x?x768xf32>
%3892 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3890 : tensor<?x?x768xi32>) outs(%3891 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3893 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%3892, %3881 : tensor<?x?x768xf32>, tensor<f32>) outs(%3891 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3894 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_78, %3893 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%3891 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3895 = arith.cmpi eq, %3452, %3877 : index
cf.assert %3895, "mismatched size for broadcast"
%3896 = arith.cmpi eq, %3453, %3878 : index
cf.assert %3896, "mismatched size for broadcast"
%3897 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_860, %3894 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%3458 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%3898 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %3483, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_934 = tensor.extract %3898[] : tensor<i64>
%3899 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %3531, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_935 = tensor.extract %3899[] : tensor<i64>
%3900 = arith.cmpi slt, %extracted_934, %c0_i64 : i64
%3901 = arith.select %3900, %c1_i64, %extracted_934 : i64
%3902 = arith.extui %3900 : i1 to i64
%3903 = arith.muli %3901, %extracted_935 : i64
%3904 = arith.addi %3902, %c1_i64 : i64
%3905 = arith.cmpi slt, %extracted_935, %c0_i64 : i64
%3906 = arith.select %3905, %3901, %3903 : i64
%3907 = arith.select %3905, %3904, %3902 : i64
%3908 = arith.cmpi sle, %3907, %c1_i64 : i64
cf.assert %3908, "must have at most one inferred (negative) dimension"
%3909 = arith.divsi %3524, %3906 : i64
%3910 = arith.select %3900, %3909, %extracted_934 : i64
%3911 = arith.select %3905, %3909, %extracted_935 : i64
%from_elements_936 = tensor.from_elements %3910, %3911 : tensor<2xi64>
%reshape_937 = tensor.reshape %3897(%from_elements_936) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%3912 = arith.index_cast %3910 : i64 to index
%3913 = tensor.empty(%3912) : tensor<?x1xf32>
%3914 = linalg.fill ins(%cst_0 : f32) outs(%3913 : tensor<?x1xf32>) -> tensor<?x1xf32>
%3915 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_937 : tensor<?x768xf32>) outs(%3914 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3916 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3915 : tensor<?x1xf32>) outs(%3913 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3917 = tensor.empty(%3912) : tensor<?x768xf32>
%3918 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_937, %3916 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3919 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3918, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3920 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%3919 : tensor<?x768xf32>) outs(%3914 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3921 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3920 : tensor<?x1xf32>) outs(%3913 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3922 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3921, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%3913 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3923 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3922 : tensor<?x1xf32>) outs(%3913 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%3924 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%3918, %3923 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3925 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3924, %cst_83 : tensor<?x768xf32>, tensor<768xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3926 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3925, %cst_84 : tensor<?x768xf32>, tensor<768xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3927 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3926 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3928 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3926 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3929 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3927, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3930 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3928, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3931 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3929, %3930 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3932 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3931, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3933 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3928, %3932 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3934 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3933 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3935 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3934 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3936 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3935 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3937 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3936 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_938 = tensor.extract %3937[] : tensor<i8>
%3938 = arith.extui %extracted_938 : i8 to i64
%extracted_939 = tensor.extract %3932[] : tensor<f32>
%3939 = arith.extf %extracted_939 : f32 to f64
%3940 = tensor.empty(%3912) : tensor<?x768xi8>
%3941 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3926 : tensor<?x768xf32>) outs(%3940 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3938 : i64 to f32
%6767 = arith.truncf %3939 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%3942 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3932, %cst_215 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3943 = tensor.empty(%3912) : tensor<?x3072xi32>
%3944 = linalg.fill ins(%c0_i32 : i32) outs(%3943 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%3945 = arith.trunci %3938 : i64 to i32
%3946 = arith.addi %3945, %c-128_i32 : i32
%3947 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3941 : tensor<?x768xi8>) outs(%3940 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%3948 = linalg.quantized_matmul ins(%3947, %cst_216, %3946, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%3944 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%3949 = tensor.empty(%3912) : tensor<?x3072xf32>
%3950 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3948 : tensor<?x3072xi32>) outs(%3949 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3951 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3950, %3942 : tensor<?x3072xf32>, tensor<f32>) outs(%3949 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3952 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3951, %cst_81 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%3949 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%3953 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3952 : tensor<?x3072xf32>) outs(%3949 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%3954 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3953 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3955 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%3953 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3956 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3954, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3957 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3955, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%3958 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3956, %3957 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3959 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3958, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3960 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3955, %3959 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3961 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %3960 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3962 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3961 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%3963 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3962 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3964 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%3963 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_940 = tensor.extract %3964[] : tensor<i8>
%3965 = arith.extui %extracted_940 : i8 to i64
%extracted_941 = tensor.extract %3959[] : tensor<f32>
%3966 = arith.extf %extracted_941 : f32 to f64
%3967 = tensor.empty(%3912) : tensor<?x3072xi8>
%3968 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3953 : tensor<?x3072xf32>) outs(%3967 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %3965 : i64 to f32
%6767 = arith.truncf %3966 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%3969 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%3959, %cst_217 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%3970 = tensor.empty(%3912) : tensor<?x768xi32>
%3971 = linalg.fill ins(%c0_i32 : i32) outs(%3970 : tensor<?x768xi32>) -> tensor<?x768xi32>
%3972 = arith.trunci %3965 : i64 to i32
%3973 = arith.addi %3972, %c-128_i32 : i32
%3974 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3968 : tensor<?x3072xi8>) outs(%3967 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%3975 = linalg.quantized_matmul ins(%3974, %cst_218, %3973, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%3971 : tensor<?x768xi32>) -> tensor<?x768xi32>
%3976 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%3975 : tensor<?x768xi32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3977 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%3976, %3969 : tensor<?x768xf32>, tensor<f32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3978 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%3977, %cst_82 : tensor<?x768xf32>, tensor<768xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3979 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_937, %3978 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%3917 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%3980 = linalg.fill ins(%3910 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%3981 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3515, %3980, %3483 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_942 = tensor.extract %3981[] : tensor<i64>
%3982 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%3530, %cst_8, %3531 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_943 = tensor.extract %3982[] : tensor<i64>
%3983 = arith.cmpi slt, %extracted_942, %c0_i64 : i64
%3984 = arith.select %3983, %c1_i64, %extracted_942 : i64
%3985 = arith.extui %3983 : i1 to i64
%3986 = arith.muli %3984, %extracted_943 : i64
%3987 = arith.addi %3985, %c1_i64 : i64
%3988 = arith.cmpi slt, %extracted_943, %c0_i64 : i64
%3989 = arith.select %3988, %3984, %3986 : i64
%3990 = arith.select %3988, %3987, %3985 : i64
%3991 = arith.muli %3989, %c768_i64 : i64
%3992 = arith.cmpi sle, %3990, %c1_i64 : i64
cf.assert %3992, "must have at most one inferred (negative) dimension"
%3993 = arith.muli %3910, %c768_i64 : i64
%3994 = arith.divsi %3993, %3991 : i64
%3995 = arith.select %3983, %3994, %extracted_942 : i64
%3996 = arith.select %3988, %3994, %extracted_943 : i64
%from_elements_944 = tensor.from_elements %3995, %3996, %c768_i64 : tensor<3xi64>
%reshape_945 = tensor.reshape %3979(%from_elements_944) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%3997 = arith.index_cast %3995 : i64 to index
%3998 = arith.index_cast %3996 : i64 to index
%3999 = tensor.empty(%3997, %3998) : tensor<?x?x1xf32>
%4000 = linalg.fill ins(%cst_0 : f32) outs(%3999 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%4001 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_945 : tensor<?x?x768xf32>) outs(%4000 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4002 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4001 : tensor<?x?x1xf32>) outs(%3999 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4003 = tensor.empty(%3997, %3998) : tensor<?x?x768xf32>
%4004 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_945, %4002 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4005 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4004, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4006 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%4005 : tensor<?x?x768xf32>) outs(%4000 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4007 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4006 : tensor<?x?x1xf32>) outs(%3999 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4008 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4007, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%3999 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4009 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4008 : tensor<?x?x1xf32>) outs(%3999 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4010 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4004, %4009 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4011 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4010, %cst_89 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4012 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4011, %cst_90 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4013 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4012 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4014 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4012 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4015 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4013, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4016 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4014, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4017 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4015, %4016 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4018 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4017, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4019 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4014, %4018 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4020 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4019 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4021 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4020 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4022 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4021 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4023 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4022 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_946 = tensor.extract %4023[] : tensor<i8>
%4024 = arith.extui %extracted_946 : i8 to i64
%extracted_947 = tensor.extract %4018[] : tensor<f32>
%4025 = arith.extf %extracted_947 : f32 to f64
%4026 = tensor.empty(%3997, %3998) : tensor<?x?x768xi8>
%4027 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4012 : tensor<?x?x768xf32>) outs(%4026 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4024 : i64 to f32
%6767 = arith.truncf %4025 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%4028 = linalg.fill ins(%3995 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4029 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4018, %cst_219 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4030 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4018, %cst_221 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4031 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4018, %cst_223 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4032 = arith.trunci %4024 : i64 to i32
%4033 = arith.addi %4032, %c-128_i32 : i32
%4034 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4027 : tensor<?x?x768xi8>) outs(%4026 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%4035 = arith.cmpi sge, %3995, %c0_i64 : i64
cf.assert %4035, "negative values not allowed in new dimensions"
%4036 = tensor.empty(%3997) : tensor<?x768x768xi8>
%4037 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_220 : tensor<768x768xi8>) outs(%4036 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4038 = tensor.empty(%3997, %3998) : tensor<?x?x768xi32>
%4039 = linalg.fill ins(%c0_i32 : i32) outs(%4038 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4040 = linalg.quantized_batch_matmul ins(%4034, %4037, %4033, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4039 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %4035, "negative values not allowed in new dimensions"
%4041 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_222 : tensor<768x768xi8>) outs(%4036 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4042 = linalg.quantized_batch_matmul ins(%4034, %4041, %4033, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4039 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %4035, "negative values not allowed in new dimensions"
%4043 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_224 : tensor<768x768xi8>) outs(%4036 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4044 = linalg.quantized_batch_matmul ins(%4034, %4043, %4033, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4039 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4045 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4028, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%4046 = linalg.fill ins(%3996 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%4047 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4040 : tensor<?x?x768xi32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4048 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4042 : tensor<?x?x768xi32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4049 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4044 : tensor<?x?x768xi32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_948 = tensor.expand_shape %4045 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%4050 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4047, %4029 : tensor<?x?x768xf32>, tensor<f32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4051 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4048, %4030 : tensor<?x?x768xf32>, tensor<f32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4052 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4049, %4031 : tensor<?x?x768xf32>, tensor<f32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_949 = tensor.concat dim(0) %expanded_948, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%4053 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_87, %4050 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4054 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_85, %4051 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4055 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_86, %4052 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4056 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4053, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4057 = arith.cmpi eq, %3995, %c0_i64 : i64
%4058 = arith.extui %4057 : i1 to i64
%4059 = arith.cmpi ne, %4058, %c0_i64 : i64
%4060 = linalg.fill ins(%4059 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4061 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4060, %4028, %4028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_950 = tensor.extract %4061[] : tensor<i64>
%4062 = arith.cmpi slt, %extracted_950, %c0_i64 : i64
%4063 = arith.select %4062, %c1_i64, %extracted_950 : i64
%4064 = arith.extui %4062 : i1 to i64
%4065 = arith.addi %4064, %c1_i64 : i64
%4066 = arith.muli %4063, %c768_i64 : i64
%4067 = arith.cmpi sle, %4065, %c1_i64 : i64
cf.assert %4067, "must have at most one inferred (negative) dimension"
%4068 = arith.muli %3995, %3996 : i64
%4069 = arith.muli %4068, %c768_i64 : i64
%4070 = arith.divsi %4069, %4066 : i64
%4071 = arith.select %4062, %4070, %extracted_950 : i64
%from_elements_951 = tensor.from_elements %4071, %4070, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_952 = tensor.reshape %4054(%from_elements_951) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %4067, "must have at most one inferred (negative) dimension"
%reshape_953 = tensor.reshape %4055(%from_elements_951) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%4072 = arith.cmpi eq, %3996, %c0_i64 : i64
%4073 = arith.extui %4072 : i1 to i64
%4074 = arith.cmpi ne, %4073, %c0_i64 : i64
%4075 = linalg.fill ins(%4074 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4076 = linalg.fill ins(%3996 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4077 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4075, %4076, %4076 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_954 = tensor.extract %4077[] : tensor<i64>
%4078 = arith.muli %4063, %extracted_954 : i64
%4079 = arith.cmpi slt, %extracted_954, %c0_i64 : i64
%4080 = arith.select %4079, %4063, %4078 : i64
%4081 = arith.select %4079, %4065, %4064 : i64
%4082 = arith.muli %4080, %c768_i64 : i64
%4083 = arith.cmpi sle, %4081, %c1_i64 : i64
cf.assert %4083, "must have at most one inferred (negative) dimension"
%4084 = arith.divsi %4069, %4082 : i64
%4085 = arith.select %4062, %4084, %extracted_950 : i64
%4086 = arith.select %4079, %4084, %extracted_954 : i64
%from_elements_955 = tensor.from_elements %4085, %4086, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_956 = tensor.reshape %4056(%from_elements_955) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%4087 = arith.index_cast %4071 : i64 to index
%4088 = arith.index_cast %4070 : i64 to index
%4089 = tensor.empty(%4087, %4088) : tensor<?x12x?x64xf32>
%4090 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_952 : tensor<?x?x12x64xf32>) outs(%4089 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%4091 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_953 : tensor<?x?x12x64xf32>) outs(%4089 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%4092 = arith.index_cast %4085 : i64 to index
%4093 = arith.index_cast %4086 : i64 to index
%4094 = tensor.empty(%4092, %4093) : tensor<?x12x?x64xf32>
%4095 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_956 : tensor<?x?x12x64xf32>) outs(%4094 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_957 = tensor.concat dim(2) %arg16, %4090 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_958 = tensor.concat dim(2) %arg17, %4091 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_959 = tensor.extract_slice %concat_949[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_960 = tensor.extract %extracted_slice_959[%c0] : tensor<1xi64>
%4096 = arith.cmpi eq, %extracted_960, %c0_i64 : i64
%4097 = arith.extui %4096 : i1 to i64
%4098 = arith.cmpi ne, %4097, %c0_i64 : i64
%4099 = linalg.fill ins(%4098 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4100 = linalg.fill ins(%4085 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4101 = linalg.fill ins(%extracted_960 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4102 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4099, %4100, %4101 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_961 = tensor.extract %4102[] : tensor<i64>
%extracted_slice_962 = tensor.extract_slice %concat_949[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_963 = tensor.extract %extracted_slice_962[%c0] : tensor<1xi64>
%4103 = arith.cmpi eq, %extracted_963, %c0_i64 : i64
%4104 = arith.extui %4103 : i1 to i64
%4105 = arith.cmpi ne, %4104, %c0_i64 : i64
%4106 = linalg.fill ins(%4105 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4107 = linalg.fill ins(%extracted_963 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4108 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4106, %cst_292, %4107 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_964 = tensor.extract %4108[] : tensor<i64>
%extracted_slice_965 = tensor.extract_slice %concat_949[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_966 = tensor.extract %extracted_slice_965[%c0] : tensor<1xi64>
%4109 = arith.cmpi eq, %extracted_966, %c0_i64 : i64
%4110 = arith.extui %4109 : i1 to i64
%4111 = arith.cmpi ne, %4110, %c0_i64 : i64
%4112 = linalg.fill ins(%4111 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4113 = linalg.fill ins(%4086 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4114 = linalg.fill ins(%extracted_966 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4115 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4112, %4113, %4114 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_967 = tensor.extract %4115[] : tensor<i64>
%4116 = arith.cmpi slt, %extracted_961, %c0_i64 : i64
%4117 = arith.select %4116, %c1_i64, %extracted_961 : i64
%4118 = arith.extui %4116 : i1 to i64
%4119 = arith.muli %4117, %extracted_964 : i64
%4120 = arith.addi %4118, %c1_i64 : i64
%4121 = arith.cmpi slt, %extracted_964, %c0_i64 : i64
%4122 = arith.select %4121, %4117, %4119 : i64
%4123 = arith.select %4121, %4120, %4118 : i64
%4124 = arith.muli %4122, %extracted_967 : i64
%4125 = arith.addi %4123, %c1_i64 : i64
%4126 = arith.cmpi slt, %extracted_967, %c0_i64 : i64
%4127 = arith.select %4126, %4122, %4124 : i64
%4128 = arith.select %4126, %4125, %4123 : i64
%4129 = arith.cmpi sle, %4128, %c1_i64 : i64
cf.assert %4129, "must have at most one inferred (negative) dimension"
%4130 = arith.muli %4085, %c12_i64 : i64
%4131 = arith.muli %4130, %4086 : i64
%4132 = arith.muli %4131, %c64_i64 : i64
%4133 = arith.divsi %4132, %4127 : i64
%4134 = arith.select %4116, %4133, %extracted_961 : i64
%4135 = arith.select %4121, %4133, %extracted_964 : i64
%4136 = arith.select %4126, %4133, %extracted_967 : i64
%from_elements_968 = tensor.from_elements %4134, %4135, %4136 : tensor<3xi64>
%reshape_969 = tensor.reshape %4095(%from_elements_968) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_970 = tensor.dim %arg16, %c0 : tensor<?x12x?x64xf32>
%4137 = arith.index_cast %dim_970 : index to i64
%4138 = linalg.fill ins(%4137 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4139 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4099, %4138, %4101 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_971 = tensor.extract %4139[] : tensor<i64>
%dim_972 = tensor.dim %arg16, %c2 : tensor<?x12x?x64xf32>
%dim_973 = tensor.dim %4090, %c2 : tensor<?x12x?x64xf32>
%4140 = affine.apply #map15()[%dim_972, %dim_973]
%4141 = arith.index_cast %4140 : index to i64
%4142 = linalg.fill ins(%4141 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4143 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4112, %4142, %4114 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_974 = tensor.extract %4143[] : tensor<i64>
%4144 = arith.cmpi slt, %extracted_971, %c0_i64 : i64
%4145 = arith.select %4144, %c1_i64, %extracted_971 : i64
%4146 = arith.extui %4144 : i1 to i64
%4147 = arith.muli %4145, %extracted_964 : i64
%4148 = arith.addi %4146, %c1_i64 : i64
%4149 = arith.select %4121, %4145, %4147 : i64
%4150 = arith.select %4121, %4148, %4146 : i64
%4151 = arith.muli %4149, %extracted_974 : i64
%4152 = arith.addi %4150, %c1_i64 : i64
%4153 = arith.cmpi slt, %extracted_974, %c0_i64 : i64
%4154 = arith.select %4153, %4149, %4151 : i64
%4155 = arith.select %4153, %4152, %4150 : i64
%4156 = arith.cmpi sle, %4155, %c1_i64 : i64
cf.assert %4156, "must have at most one inferred (negative) dimension"
%4157 = arith.muli %4137, %c12_i64 : i64
%4158 = arith.muli %4157, %4141 : i64
%4159 = arith.muli %4158, %c64_i64 : i64
%4160 = arith.divsi %4159, %4154 : i64
%4161 = arith.select %4144, %4160, %extracted_971 : i64
%4162 = arith.select %4121, %4160, %extracted_964 : i64
%4163 = arith.select %4153, %4160, %extracted_974 : i64
%from_elements_975 = tensor.from_elements %4161, %4162, %4163 : tensor<3xi64>
%reshape_976 = tensor.reshape %concat_957(%from_elements_975) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_977 = tensor.dim %arg17, %c0 : tensor<?x12x?x64xf32>
%4164 = arith.index_cast %dim_977 : index to i64
%4165 = linalg.fill ins(%4164 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4166 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4099, %4165, %4101 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_978 = tensor.extract %4166[] : tensor<i64>
%dim_979 = tensor.dim %arg17, %c2 : tensor<?x12x?x64xf32>
%dim_980 = tensor.dim %4091, %c2 : tensor<?x12x?x64xf32>
%4167 = affine.apply #map15()[%dim_979, %dim_980]
%4168 = arith.index_cast %4167 : index to i64
%4169 = linalg.fill ins(%4168 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4170 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4112, %4169, %4114 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_981 = tensor.extract %4170[] : tensor<i64>
%4171 = arith.cmpi slt, %extracted_978, %c0_i64 : i64
%4172 = arith.select %4171, %c1_i64, %extracted_978 : i64
%4173 = arith.extui %4171 : i1 to i64
%4174 = arith.muli %4172, %extracted_964 : i64
%4175 = arith.addi %4173, %c1_i64 : i64
%4176 = arith.select %4121, %4172, %4174 : i64
%4177 = arith.select %4121, %4175, %4173 : i64
%4178 = arith.muli %4176, %extracted_981 : i64
%4179 = arith.addi %4177, %c1_i64 : i64
%4180 = arith.cmpi slt, %extracted_981, %c0_i64 : i64
%4181 = arith.select %4180, %4176, %4178 : i64
%4182 = arith.select %4180, %4179, %4177 : i64
%4183 = arith.cmpi sle, %4182, %c1_i64 : i64
cf.assert %4183, "must have at most one inferred (negative) dimension"
%4184 = arith.muli %4164, %c12_i64 : i64
%4185 = arith.muli %4184, %4168 : i64
%4186 = arith.muli %4185, %c64_i64 : i64
%4187 = arith.divsi %4186, %4181 : i64
%4188 = arith.select %4171, %4187, %extracted_978 : i64
%4189 = arith.select %4121, %4187, %extracted_964 : i64
%4190 = arith.select %4180, %4187, %extracted_981 : i64
%from_elements_982 = tensor.from_elements %4188, %4189, %4190 : tensor<3xi64>
%reshape_983 = tensor.reshape %concat_958(%from_elements_982) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%4191 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_969 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4192 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_969 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4193 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4191, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4194 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4192, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4195 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4193, %4194 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4196 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4195, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4197 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4192, %4196 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4198 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4197 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4199 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4198 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4200 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4199 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4201 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4200 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_984 = tensor.extract %4201[] : tensor<i8>
%4202 = arith.extui %extracted_984 : i8 to i64
%extracted_985 = tensor.extract %4196[] : tensor<f32>
%4203 = arith.extf %extracted_985 : f32 to f64
%4204 = arith.index_cast %4134 : i64 to index
%4205 = arith.index_cast %4135 : i64 to index
%4206 = tensor.empty(%4204, %4205) : tensor<?x?x64xi8>
%4207 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_969 : tensor<?x?x64xf32>) outs(%4206 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4202 : i64 to f32
%6767 = arith.truncf %4203 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%4208 = arith.index_cast %4161 : i64 to index
%4209 = arith.index_cast %4162 : i64 to index
%4210 = tensor.empty(%4208, %4209) : tensor<?x64x?xf32>
%4211 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_976 : tensor<?x?x64xf32>) outs(%4210 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%4212 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_983 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4213 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_983 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4214 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4212, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4215 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4213, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4216 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4214, %4215 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4217 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4216, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4218 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4213, %4217 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4219 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4218 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4220 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4219 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4221 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4220 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4222 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4221 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_986 = tensor.extract %4222[] : tensor<i8>
%4223 = arith.extui %extracted_986 : i8 to i64
%extracted_987 = tensor.extract %4217[] : tensor<f32>
%4224 = arith.extf %extracted_987 : f32 to f64
%4225 = arith.index_cast %4188 : i64 to index
%4226 = arith.index_cast %4189 : i64 to index
%4227 = tensor.empty(%4225, %4226) : tensor<?x?x64xi8>
%4228 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_983 : tensor<?x?x64xf32>) outs(%4227 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4223 : i64 to f32
%6767 = arith.truncf %4224 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%4229 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4211 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4230 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4211 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4231 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4229, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4232 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4230, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4233 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4231, %4232 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4234 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4233, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4235 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4230, %4234 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4236 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4235 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4237 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4236 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4238 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4237 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4239 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4238 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_988 = tensor.extract %4239[] : tensor<i8>
%4240 = arith.extui %extracted_988 : i8 to i64
%extracted_989 = tensor.extract %4234[] : tensor<f32>
%4241 = arith.extf %extracted_989 : f32 to f64
%4242 = tensor.empty(%4208, %4209) : tensor<?x64x?xi8>
%4243 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4211 : tensor<?x64x?xf32>) outs(%4242 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4240 : i64 to f32
%6767 = arith.truncf %4241 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%4244 = linalg.fill ins(%4162 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%4245 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4196, %4234 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4246 = arith.cmpi eq, %4134, %4161 : i64
cf.assert %4246, "mismatching contracting dimension"
%4247 = tensor.empty(%4204, %4205, %4209) : tensor<?x?x?xi32>
%4248 = linalg.fill ins(%c0_i32 : i32) outs(%4247 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%4249 = linalg.batch_matmul ins(%4207, %4243 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%4248 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_990 = tensor.concat dim(0) %expanded_948, %4046, %4244 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%4250 = tensor.empty(%4204, %4205, %4209) : tensor<?x?x?xf32>
%4251 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4249 : tensor<?x?x?xi32>) outs(%4250 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4252 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4251, %4245 : tensor<?x?x?xf32>, tensor<f32>) outs(%4250 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4253 = linalg.fill ins(%4134 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4254 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4060, %4253, %4028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_991 = tensor.extract %4254[] : tensor<i64>
%4255 = linalg.fill ins(%4162 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4256 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4075, %4255, %4076 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_992 = tensor.extract %4256[] : tensor<i64>
%4257 = arith.cmpi slt, %extracted_991, %c0_i64 : i64
%4258 = arith.select %4257, %c1_i64, %extracted_991 : i64
%4259 = arith.extui %4257 : i1 to i64
%4260 = arith.muli %4258, %c12_i64 : i64
%4261 = arith.muli %4260, %extracted_992 : i64
%4262 = arith.addi %4259, %c1_i64 : i64
%4263 = arith.cmpi slt, %extracted_992, %c0_i64 : i64
%4264 = arith.select %4263, %4260, %4261 : i64
%4265 = arith.select %4263, %4262, %4259 : i64
%4266 = arith.muli %4264, %4162 : i64
%4267 = arith.addi %4265, %c1_i64 : i64
%4268 = arith.cmpi slt, %4162, %c0_i64 : i64
%4269 = arith.select %4268, %4264, %4266 : i64
%4270 = arith.select %4268, %4267, %4265 : i64
%4271 = arith.cmpi sle, %4270, %c1_i64 : i64
cf.assert %4271, "must have at most one inferred (negative) dimension"
%4272 = arith.muli %4134, %4135 : i64
%4273 = arith.muli %4272, %4162 : i64
%4274 = arith.divsi %4273, %4269 : i64
%4275 = arith.select %4257, %4274, %extracted_991 : i64
%4276 = arith.select %4263, %4274, %extracted_992 : i64
%4277 = arith.select %4268, %4274, %4162 : i64
%from_elements_993 = tensor.from_elements %4275, %c12_i64, %4276, %4277 : tensor<4xi64>
%reshape_994 = tensor.reshape %4252(%from_elements_993) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%4278 = arith.index_cast %4275 : i64 to index
%4279 = arith.index_cast %4276 : i64 to index
%4280 = arith.index_cast %4277 : i64 to index
%4281 = arith.cmpi eq, %4278, %105 : index
cf.assert %4281, "mismatched size for broadcast"
%4282 = arith.cmpi eq, %4279, %112 : index
cf.assert %4282, "mismatched size for broadcast"
%4283 = arith.cmpi eq, %4280, %113 : index
cf.assert %4283, "mismatched size for broadcast"
%4284 = tensor.empty(%4278, %4279, %4280) : tensor<?x12x?x?xf32>
%4285 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_994, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%4284 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%4286 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%4285, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%4284 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_995 = tensor.extract_slice %concat_990[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_996 = tensor.extract %extracted_slice_995[%c0] : tensor<1xi64>
%4287 = arith.cmpi eq, %extracted_996, %c0_i64 : i64
%4288 = arith.extui %4287 : i1 to i64
%4289 = arith.cmpi ne, %4288, %c0_i64 : i64
%4290 = linalg.fill ins(%4289 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4291 = linalg.fill ins(%4275 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4292 = linalg.fill ins(%extracted_996 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4293 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4290, %4291, %4292 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_997 = tensor.extract %4293[] : tensor<i64>
%extracted_slice_998 = tensor.extract_slice %concat_990[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_999 = tensor.extract %extracted_slice_998[%c0] : tensor<1xi64>
%4294 = arith.cmpi eq, %extracted_999, %c0_i64 : i64
%4295 = arith.extui %4294 : i1 to i64
%4296 = arith.cmpi ne, %4295, %c0_i64 : i64
%4297 = linalg.fill ins(%4296 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4298 = linalg.fill ins(%extracted_999 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4299 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4297, %cst_292, %4298 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1000 = tensor.extract %4299[] : tensor<i64>
%extracted_slice_1001 = tensor.extract_slice %concat_990[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1002 = tensor.extract %extracted_slice_1001[%c0] : tensor<1xi64>
%4300 = arith.cmpi eq, %extracted_1002, %c0_i64 : i64
%4301 = arith.extui %4300 : i1 to i64
%4302 = arith.cmpi ne, %4301, %c0_i64 : i64
%4303 = linalg.fill ins(%4302 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4304 = linalg.fill ins(%4276 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4305 = linalg.fill ins(%extracted_1002 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4306 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4303, %4304, %4305 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1003 = tensor.extract %4306[] : tensor<i64>
%4307 = arith.cmpi slt, %extracted_997, %c0_i64 : i64
%4308 = arith.select %4307, %c1_i64, %extracted_997 : i64
%4309 = arith.extui %4307 : i1 to i64
%4310 = arith.muli %4308, %extracted_1000 : i64
%4311 = arith.addi %4309, %c1_i64 : i64
%4312 = arith.cmpi slt, %extracted_1000, %c0_i64 : i64
%4313 = arith.select %4312, %4308, %4310 : i64
%4314 = arith.select %4312, %4311, %4309 : i64
%4315 = arith.muli %4313, %extracted_1003 : i64
%4316 = arith.addi %4314, %c1_i64 : i64
%4317 = arith.cmpi slt, %extracted_1003, %c0_i64 : i64
%4318 = arith.select %4317, %4313, %4315 : i64
%4319 = arith.select %4317, %4316, %4314 : i64
%4320 = arith.cmpi sle, %4319, %c1_i64 : i64
cf.assert %4320, "must have at most one inferred (negative) dimension"
%4321 = arith.muli %4275, %c12_i64 : i64
%4322 = arith.muli %4321, %4276 : i64
%4323 = arith.muli %4322, %4277 : i64
%4324 = arith.divsi %4323, %4318 : i64
%4325 = arith.select %4307, %4324, %extracted_997 : i64
%4326 = arith.select %4312, %4324, %extracted_1000 : i64
%4327 = arith.select %4317, %4324, %extracted_1003 : i64
%from_elements_1004 = tensor.from_elements %4325, %4326, %4327 : tensor<3xi64>
%reshape_1005 = tensor.reshape %4286(%from_elements_1004) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%4328 = arith.index_cast %4325 : i64 to index
%4329 = arith.index_cast %4326 : i64 to index
%4330 = tensor.empty(%4328, %4329) : tensor<?x?xi64>
%4331 = linalg.fill ins(%c0_i64 : i64) outs(%4330 : tensor<?x?xi64>) -> tensor<?x?xi64>
%4332 = tensor.empty(%4328, %4329) : tensor<?x?xf32>
%4333 = linalg.fill ins(%cst_1 : f32) outs(%4332 : tensor<?x?xf32>) -> tensor<?x?xf32>
%4334:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_1005 : tensor<?x?x?xf32>) outs(%4333, %4331 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_1006 = tensor.expand_shape %4334#0 [[0], [1, 2]] output_shape [%4328, %4329, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%4335 = arith.index_cast %4327 : i64 to index
%4336 = tensor.empty(%4328, %4329, %4335) : tensor<?x?x?xf32>
%4337 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1005, %expanded_1006 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%4336 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4338 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4337 : tensor<?x?x?xf32>) outs(%4336 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4339 = tensor.empty(%4328, %4329) : tensor<?x?x1xf32>
%4340 = linalg.fill ins(%cst_0 : f32) outs(%4339 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%4341 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%4338 : tensor<?x?x?xf32>) outs(%4340 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4342 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4338, %4341 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%4336 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4343 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4342 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4344 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4342 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4345 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4343, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4346 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4344, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4347 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4345, %4346 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4348 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4347, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4349 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4344, %4348 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4350 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4349 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4351 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4350 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4352 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4351 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4353 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4352 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1007 = tensor.extract %4353[] : tensor<i8>
%4354 = arith.extui %extracted_1007 : i8 to i64
%extracted_1008 = tensor.extract %4348[] : tensor<f32>
%4355 = arith.extf %extracted_1008 : f32 to f64
%4356 = tensor.empty(%4328, %4329, %4335) : tensor<?x?x?xi8>
%4357 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4342 : tensor<?x?x?xf32>) outs(%4356 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4354 : i64 to f32
%6767 = arith.truncf %4355 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%4358 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4348, %4217 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4359 = arith.cmpi eq, %4325, %4188 : i64
cf.assert %4359, "mismatching contracting dimension"
%4360 = arith.cmpi eq, %4327, %4189 : i64
cf.assert %4360, "mismatching contracting dimension"
%4361 = tensor.empty(%4328, %4329) : tensor<?x?x64xi32>
%4362 = linalg.fill ins(%c0_i32 : i32) outs(%4361 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%4363 = linalg.batch_matmul ins(%4357, %4228 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%4362 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%4364 = tensor.empty(%4328, %4329) : tensor<?x?x64xf32>
%4365 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4363 : tensor<?x?x64xi32>) outs(%4364 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%4366 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4365, %4358 : tensor<?x?x64xf32>, tensor<f32>) outs(%4364 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%4367 = linalg.fill ins(%4325 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4368 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4060, %4367, %4028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1009 = tensor.extract %4368[] : tensor<i64>
%4369 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4075, %cst_7, %4076 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1010 = tensor.extract %4369[] : tensor<i64>
%4370 = arith.cmpi slt, %extracted_1009, %c0_i64 : i64
%4371 = arith.select %4370, %c1_i64, %extracted_1009 : i64
%4372 = arith.extui %4370 : i1 to i64
%4373 = arith.muli %4371, %c12_i64 : i64
%4374 = arith.muli %4373, %extracted_1010 : i64
%4375 = arith.addi %4372, %c1_i64 : i64
%4376 = arith.cmpi slt, %extracted_1010, %c0_i64 : i64
%4377 = arith.select %4376, %4373, %4374 : i64
%4378 = arith.select %4376, %4375, %4372 : i64
%4379 = arith.muli %4377, %c64_i64 : i64
%4380 = arith.cmpi sle, %4378, %c1_i64 : i64
cf.assert %4380, "must have at most one inferred (negative) dimension"
%4381 = arith.muli %4325, %4326 : i64
%4382 = arith.muli %4381, %c64_i64 : i64
%4383 = arith.divsi %4382, %4379 : i64
%4384 = arith.select %4370, %4383, %extracted_1009 : i64
%4385 = arith.select %4376, %4383, %extracted_1010 : i64
%from_elements_1011 = tensor.from_elements %4384, %c12_i64, %4385, %c64_i64 : tensor<4xi64>
%reshape_1012 = tensor.reshape %4366(%from_elements_1011) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%4386 = arith.index_cast %4384 : i64 to index
%4387 = arith.index_cast %4385 : i64 to index
%4388 = tensor.empty(%4386, %4387) : tensor<?x?x12x64xf32>
%4389 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1012 : tensor<?x12x?x64xf32>) outs(%4388 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%4390 = linalg.fill ins(%4384 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4391 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4060, %4390, %4028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1013 = tensor.extract %4391[] : tensor<i64>
%4392 = linalg.fill ins(%4385 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4393 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4075, %4392, %4076 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1014 = tensor.extract %4393[] : tensor<i64>
%4394 = arith.cmpi slt, %extracted_1013, %c0_i64 : i64
%4395 = arith.select %4394, %c1_i64, %extracted_1013 : i64
%4396 = arith.extui %4394 : i1 to i64
%4397 = arith.muli %4395, %extracted_1014 : i64
%4398 = arith.addi %4396, %c1_i64 : i64
%4399 = arith.cmpi slt, %extracted_1014, %c0_i64 : i64
%4400 = arith.select %4399, %4395, %4397 : i64
%4401 = arith.select %4399, %4398, %4396 : i64
%4402 = arith.muli %4400, %c768_i64 : i64
%4403 = arith.cmpi sle, %4401, %c1_i64 : i64
cf.assert %4403, "must have at most one inferred (negative) dimension"
%4404 = arith.muli %4384, %4385 : i64
%4405 = arith.muli %4404, %c768_i64 : i64
%4406 = arith.divsi %4405, %4402 : i64
%4407 = arith.select %4394, %4406, %extracted_1013 : i64
%4408 = arith.select %4399, %4406, %extracted_1014 : i64
%from_elements_1015 = tensor.from_elements %4407, %4408, %c768_i64 : tensor<3xi64>
%reshape_1016 = tensor.reshape %4389(%from_elements_1015) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%4409 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1016 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4410 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1016 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4411 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4409, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4412 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4410, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4413 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4411, %4412 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4414 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4413, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4415 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4410, %4414 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4416 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4415 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4417 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4416 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4418 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4417 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4419 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4418 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1017 = tensor.extract %4419[] : tensor<i8>
%4420 = arith.extui %extracted_1017 : i8 to i64
%extracted_1018 = tensor.extract %4414[] : tensor<f32>
%4421 = arith.extf %extracted_1018 : f32 to f64
%4422 = arith.index_cast %4407 : i64 to index
%4423 = arith.index_cast %4408 : i64 to index
%4424 = tensor.empty(%4422, %4423) : tensor<?x?x768xi8>
%4425 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1016 : tensor<?x?x768xf32>) outs(%4424 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4420 : i64 to f32
%6767 = arith.truncf %4421 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%4426 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4414, %cst_225 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4427 = arith.trunci %4420 : i64 to i32
%4428 = arith.addi %4427, %c-128_i32 : i32
%4429 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4425 : tensor<?x?x768xi8>) outs(%4424 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%4430 = arith.cmpi sge, %4407, %c0_i64 : i64
cf.assert %4430, "negative values not allowed in new dimensions"
%4431 = tensor.empty(%4422) : tensor<?x768x768xi8>
%4432 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_226 : tensor<768x768xi8>) outs(%4431 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4433 = tensor.empty(%4422, %4423) : tensor<?x?x768xi32>
%4434 = linalg.fill ins(%c0_i32 : i32) outs(%4433 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4435 = linalg.quantized_batch_matmul ins(%4429, %4432, %4428, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4434 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4436 = tensor.empty(%4422, %4423) : tensor<?x?x768xf32>
%4437 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4435 : tensor<?x?x768xi32>) outs(%4436 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4438 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4437, %4426 : tensor<?x?x768xf32>, tensor<f32>) outs(%4436 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4439 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_88, %4438 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4436 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4440 = arith.cmpi eq, %3997, %4422 : index
cf.assert %4440, "mismatched size for broadcast"
%4441 = arith.cmpi eq, %3998, %4423 : index
cf.assert %4441, "mismatched size for broadcast"
%4442 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_945, %4439 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%4003 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4443 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %4028, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1019 = tensor.extract %4443[] : tensor<i64>
%4444 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %4076, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1020 = tensor.extract %4444[] : tensor<i64>
%4445 = arith.cmpi slt, %extracted_1019, %c0_i64 : i64
%4446 = arith.select %4445, %c1_i64, %extracted_1019 : i64
%4447 = arith.extui %4445 : i1 to i64
%4448 = arith.muli %4446, %extracted_1020 : i64
%4449 = arith.addi %4447, %c1_i64 : i64
%4450 = arith.cmpi slt, %extracted_1020, %c0_i64 : i64
%4451 = arith.select %4450, %4446, %4448 : i64
%4452 = arith.select %4450, %4449, %4447 : i64
%4453 = arith.cmpi sle, %4452, %c1_i64 : i64
cf.assert %4453, "must have at most one inferred (negative) dimension"
%4454 = arith.divsi %4069, %4451 : i64
%4455 = arith.select %4445, %4454, %extracted_1019 : i64
%4456 = arith.select %4450, %4454, %extracted_1020 : i64
%from_elements_1021 = tensor.from_elements %4455, %4456 : tensor<2xi64>
%reshape_1022 = tensor.reshape %4442(%from_elements_1021) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%4457 = arith.index_cast %4455 : i64 to index
%4458 = tensor.empty(%4457) : tensor<?x1xf32>
%4459 = linalg.fill ins(%cst_0 : f32) outs(%4458 : tensor<?x1xf32>) -> tensor<?x1xf32>
%4460 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_1022 : tensor<?x768xf32>) outs(%4459 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4461 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%4460 : tensor<?x1xf32>) outs(%4458 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4462 = tensor.empty(%4457) : tensor<?x768xf32>
%4463 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_1022, %4461 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4464 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%4463, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4465 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%4464 : tensor<?x768xf32>) outs(%4459 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4466 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%4465 : tensor<?x1xf32>) outs(%4458 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4467 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%4466, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%4458 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4468 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%4467 : tensor<?x1xf32>) outs(%4458 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%4469 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%4463, %4468 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4470 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%4469, %cst_93 : tensor<?x768xf32>, tensor<768xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4471 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%4470, %cst_94 : tensor<?x768xf32>, tensor<768xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4472 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%4471 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4473 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%4471 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4474 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4472, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4475 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4473, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4476 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4474, %4475 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4477 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4476, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4478 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4473, %4477 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4479 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4478 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4480 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4479 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4481 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4480 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4482 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4481 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1023 = tensor.extract %4482[] : tensor<i8>
%4483 = arith.extui %extracted_1023 : i8 to i64
%extracted_1024 = tensor.extract %4477[] : tensor<f32>
%4484 = arith.extf %extracted_1024 : f32 to f64
%4485 = tensor.empty(%4457) : tensor<?x768xi8>
%4486 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4471 : tensor<?x768xf32>) outs(%4485 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4483 : i64 to f32
%6767 = arith.truncf %4484 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%4487 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4477, %cst_227 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4488 = tensor.empty(%4457) : tensor<?x3072xi32>
%4489 = linalg.fill ins(%c0_i32 : i32) outs(%4488 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%4490 = arith.trunci %4483 : i64 to i32
%4491 = arith.addi %4490, %c-128_i32 : i32
%4492 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4486 : tensor<?x768xi8>) outs(%4485 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%4493 = linalg.quantized_matmul ins(%4492, %cst_228, %4491, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%4489 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%4494 = tensor.empty(%4457) : tensor<?x3072xf32>
%4495 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4493 : tensor<?x3072xi32>) outs(%4494 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%4496 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%4495, %4487 : tensor<?x3072xf32>, tensor<f32>) outs(%4494 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%4497 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%4496, %cst_91 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%4494 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%4498 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4497 : tensor<?x3072xf32>) outs(%4494 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%4499 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%4498 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4500 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%4498 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4501 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4499, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4502 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4500, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4503 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4501, %4502 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4504 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4503, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4505 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4500, %4504 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4506 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4505 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4507 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4506 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4508 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4507 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4509 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4508 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1025 = tensor.extract %4509[] : tensor<i8>
%4510 = arith.extui %extracted_1025 : i8 to i64
%extracted_1026 = tensor.extract %4504[] : tensor<f32>
%4511 = arith.extf %extracted_1026 : f32 to f64
%4512 = tensor.empty(%4457) : tensor<?x3072xi8>
%4513 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4498 : tensor<?x3072xf32>) outs(%4512 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4510 : i64 to f32
%6767 = arith.truncf %4511 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%4514 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4504, %cst_229 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4515 = tensor.empty(%4457) : tensor<?x768xi32>
%4516 = linalg.fill ins(%c0_i32 : i32) outs(%4515 : tensor<?x768xi32>) -> tensor<?x768xi32>
%4517 = arith.trunci %4510 : i64 to i32
%4518 = arith.addi %4517, %c-128_i32 : i32
%4519 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4513 : tensor<?x3072xi8>) outs(%4512 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%4520 = linalg.quantized_matmul ins(%4519, %cst_230, %4518, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%4516 : tensor<?x768xi32>) -> tensor<?x768xi32>
%4521 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%4520 : tensor<?x768xi32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4522 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%4521, %4514 : tensor<?x768xf32>, tensor<f32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4523 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%4522, %cst_92 : tensor<?x768xf32>, tensor<768xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4524 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_1022, %4523 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%4462 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%4525 = linalg.fill ins(%4455 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4526 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4060, %4525, %4028 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1027 = tensor.extract %4526[] : tensor<i64>
%4527 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4075, %cst_8, %4076 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1028 = tensor.extract %4527[] : tensor<i64>
%4528 = arith.cmpi slt, %extracted_1027, %c0_i64 : i64
%4529 = arith.select %4528, %c1_i64, %extracted_1027 : i64
%4530 = arith.extui %4528 : i1 to i64
%4531 = arith.muli %4529, %extracted_1028 : i64
%4532 = arith.addi %4530, %c1_i64 : i64
%4533 = arith.cmpi slt, %extracted_1028, %c0_i64 : i64
%4534 = arith.select %4533, %4529, %4531 : i64
%4535 = arith.select %4533, %4532, %4530 : i64
%4536 = arith.muli %4534, %c768_i64 : i64
%4537 = arith.cmpi sle, %4535, %c1_i64 : i64
cf.assert %4537, "must have at most one inferred (negative) dimension"
%4538 = arith.muli %4455, %c768_i64 : i64
%4539 = arith.divsi %4538, %4536 : i64
%4540 = arith.select %4528, %4539, %extracted_1027 : i64
%4541 = arith.select %4533, %4539, %extracted_1028 : i64
%from_elements_1029 = tensor.from_elements %4540, %4541, %c768_i64 : tensor<3xi64>
%reshape_1030 = tensor.reshape %4524(%from_elements_1029) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%4542 = arith.index_cast %4540 : i64 to index
%4543 = arith.index_cast %4541 : i64 to index
%4544 = tensor.empty(%4542, %4543) : tensor<?x?x1xf32>
%4545 = linalg.fill ins(%cst_0 : f32) outs(%4544 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%4546 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_1030 : tensor<?x?x768xf32>) outs(%4545 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4547 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4546 : tensor<?x?x1xf32>) outs(%4544 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4548 = tensor.empty(%4542, %4543) : tensor<?x?x768xf32>
%4549 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1030, %4547 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4550 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4549, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4551 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%4550 : tensor<?x?x768xf32>) outs(%4545 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4552 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4551 : tensor<?x?x1xf32>) outs(%4544 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4553 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4552, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%4544 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4554 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4553 : tensor<?x?x1xf32>) outs(%4544 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4555 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4549, %4554 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4556 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4555, %cst_99 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4557 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4556, %cst_100 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4558 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4557 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4559 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4557 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4560 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4558, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4561 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4559, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4562 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4560, %4561 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4563 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4562, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4564 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4559, %4563 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4565 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4564 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4566 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4565 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4567 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4566 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4568 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4567 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1031 = tensor.extract %4568[] : tensor<i8>
%4569 = arith.extui %extracted_1031 : i8 to i64
%extracted_1032 = tensor.extract %4563[] : tensor<f32>
%4570 = arith.extf %extracted_1032 : f32 to f64
%4571 = tensor.empty(%4542, %4543) : tensor<?x?x768xi8>
%4572 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4557 : tensor<?x?x768xf32>) outs(%4571 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4569 : i64 to f32
%6767 = arith.truncf %4570 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%4573 = linalg.fill ins(%4540 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4574 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4563, %cst_231 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4575 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4563, %cst_233 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4576 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4563, %cst_235 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4577 = arith.trunci %4569 : i64 to i32
%4578 = arith.addi %4577, %c-128_i32 : i32
%4579 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4572 : tensor<?x?x768xi8>) outs(%4571 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%4580 = arith.cmpi sge, %4540, %c0_i64 : i64
cf.assert %4580, "negative values not allowed in new dimensions"
%4581 = tensor.empty(%4542) : tensor<?x768x768xi8>
%4582 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_232 : tensor<768x768xi8>) outs(%4581 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4583 = tensor.empty(%4542, %4543) : tensor<?x?x768xi32>
%4584 = linalg.fill ins(%c0_i32 : i32) outs(%4583 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4585 = linalg.quantized_batch_matmul ins(%4579, %4582, %4578, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4584 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %4580, "negative values not allowed in new dimensions"
%4586 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_234 : tensor<768x768xi8>) outs(%4581 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4587 = linalg.quantized_batch_matmul ins(%4579, %4586, %4578, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4584 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
cf.assert %4580, "negative values not allowed in new dimensions"
%4588 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_236 : tensor<768x768xi8>) outs(%4581 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4589 = linalg.quantized_batch_matmul ins(%4579, %4588, %4578, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4584 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4590 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4573, %cst_292 : tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i64, %in_1373: i64, %out: i64):
%6766 = arith.muli %in, %in_1373 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%4591 = linalg.fill ins(%4541 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%4592 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4585 : tensor<?x?x768xi32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4593 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4587 : tensor<?x?x768xi32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4594 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4589 : tensor<?x?x768xi32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%expanded_1033 = tensor.expand_shape %4590 [] output_shape [1] : tensor<i64> into tensor<1xi64>
%4595 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4592, %4574 : tensor<?x?x768xf32>, tensor<f32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4596 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4593, %4575 : tensor<?x?x768xf32>, tensor<f32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4597 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4594, %4576 : tensor<?x?x768xf32>, tensor<f32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%concat_1034 = tensor.concat dim(0) %expanded_1033, %cst_282, %cst_291 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%4598 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_97, %4595 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4599 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_95, %4596 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4600 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_96, %4597 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4601 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4598, %cst_290 : tensor<?x?x768xf32>, tensor<f32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4602 = arith.cmpi eq, %4540, %c0_i64 : i64
%4603 = arith.extui %4602 : i1 to i64
%4604 = arith.cmpi ne, %4603, %c0_i64 : i64
%4605 = linalg.fill ins(%4604 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4606 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4605, %4573, %4573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1035 = tensor.extract %4606[] : tensor<i64>
%4607 = arith.cmpi slt, %extracted_1035, %c0_i64 : i64
%4608 = arith.select %4607, %c1_i64, %extracted_1035 : i64
%4609 = arith.extui %4607 : i1 to i64
%4610 = arith.addi %4609, %c1_i64 : i64
%4611 = arith.muli %4608, %c768_i64 : i64
%4612 = arith.cmpi sle, %4610, %c1_i64 : i64
cf.assert %4612, "must have at most one inferred (negative) dimension"
%4613 = arith.muli %4540, %4541 : i64
%4614 = arith.muli %4613, %c768_i64 : i64
%4615 = arith.divsi %4614, %4611 : i64
%4616 = arith.select %4607, %4615, %extracted_1035 : i64
%from_elements_1036 = tensor.from_elements %4616, %4615, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_1037 = tensor.reshape %4599(%from_elements_1036) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
cf.assert %4612, "must have at most one inferred (negative) dimension"
%reshape_1038 = tensor.reshape %4600(%from_elements_1036) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%4617 = arith.cmpi eq, %4541, %c0_i64 : i64
%4618 = arith.extui %4617 : i1 to i64
%4619 = arith.cmpi ne, %4618, %c0_i64 : i64
%4620 = linalg.fill ins(%4619 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4621 = linalg.fill ins(%4541 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4622 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4620, %4621, %4621 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1039 = tensor.extract %4622[] : tensor<i64>
%4623 = arith.muli %4608, %extracted_1039 : i64
%4624 = arith.cmpi slt, %extracted_1039, %c0_i64 : i64
%4625 = arith.select %4624, %4608, %4623 : i64
%4626 = arith.select %4624, %4610, %4609 : i64
%4627 = arith.muli %4625, %c768_i64 : i64
%4628 = arith.cmpi sle, %4626, %c1_i64 : i64
cf.assert %4628, "must have at most one inferred (negative) dimension"
%4629 = arith.divsi %4614, %4627 : i64
%4630 = arith.select %4607, %4629, %extracted_1035 : i64
%4631 = arith.select %4624, %4629, %extracted_1039 : i64
%from_elements_1040 = tensor.from_elements %4630, %4631, %c12_i64, %c64_i64 : tensor<4xi64>
%reshape_1041 = tensor.reshape %4601(%from_elements_1040) : (tensor<?x?x768xf32>, tensor<4xi64>) -> tensor<?x?x12x64xf32>
%4632 = arith.index_cast %4616 : i64 to index
%4633 = arith.index_cast %4615 : i64 to index
%4634 = tensor.empty(%4632, %4633) : tensor<?x12x?x64xf32>
%4635 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1037 : tensor<?x?x12x64xf32>) outs(%4634 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%4636 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1038 : tensor<?x?x12x64xf32>) outs(%4634 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%4637 = arith.index_cast %4630 : i64 to index
%4638 = arith.index_cast %4631 : i64 to index
%4639 = tensor.empty(%4637, %4638) : tensor<?x12x?x64xf32>
%4640 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1041 : tensor<?x?x12x64xf32>) outs(%4639 : tensor<?x12x?x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x12x?x64xf32>
%concat_1042 = tensor.concat dim(2) %arg18, %4635 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%concat_1043 = tensor.concat dim(2) %arg19, %4636 : (tensor<?x12x?x64xf32>, tensor<?x12x?x64xf32>) -> tensor<?x12x?x64xf32>
%extracted_slice_1044 = tensor.extract_slice %concat_1034[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1045 = tensor.extract %extracted_slice_1044[%c0] : tensor<1xi64>
%4641 = arith.cmpi eq, %extracted_1045, %c0_i64 : i64
%4642 = arith.extui %4641 : i1 to i64
%4643 = arith.cmpi ne, %4642, %c0_i64 : i64
%4644 = linalg.fill ins(%4643 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4645 = linalg.fill ins(%4630 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4646 = linalg.fill ins(%extracted_1045 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4647 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4644, %4645, %4646 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1046 = tensor.extract %4647[] : tensor<i64>
%extracted_slice_1047 = tensor.extract_slice %concat_1034[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1048 = tensor.extract %extracted_slice_1047[%c0] : tensor<1xi64>
%4648 = arith.cmpi eq, %extracted_1048, %c0_i64 : i64
%4649 = arith.extui %4648 : i1 to i64
%4650 = arith.cmpi ne, %4649, %c0_i64 : i64
%4651 = linalg.fill ins(%4650 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4652 = linalg.fill ins(%extracted_1048 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4653 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4651, %cst_292, %4652 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1049 = tensor.extract %4653[] : tensor<i64>
%extracted_slice_1050 = tensor.extract_slice %concat_1034[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1051 = tensor.extract %extracted_slice_1050[%c0] : tensor<1xi64>
%4654 = arith.cmpi eq, %extracted_1051, %c0_i64 : i64
%4655 = arith.extui %4654 : i1 to i64
%4656 = arith.cmpi ne, %4655, %c0_i64 : i64
%4657 = linalg.fill ins(%4656 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4658 = linalg.fill ins(%4631 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4659 = linalg.fill ins(%extracted_1051 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4660 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4657, %4658, %4659 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1052 = tensor.extract %4660[] : tensor<i64>
%4661 = arith.cmpi slt, %extracted_1046, %c0_i64 : i64
%4662 = arith.select %4661, %c1_i64, %extracted_1046 : i64
%4663 = arith.extui %4661 : i1 to i64
%4664 = arith.muli %4662, %extracted_1049 : i64
%4665 = arith.addi %4663, %c1_i64 : i64
%4666 = arith.cmpi slt, %extracted_1049, %c0_i64 : i64
%4667 = arith.select %4666, %4662, %4664 : i64
%4668 = arith.select %4666, %4665, %4663 : i64
%4669 = arith.muli %4667, %extracted_1052 : i64
%4670 = arith.addi %4668, %c1_i64 : i64
%4671 = arith.cmpi slt, %extracted_1052, %c0_i64 : i64
%4672 = arith.select %4671, %4667, %4669 : i64
%4673 = arith.select %4671, %4670, %4668 : i64
%4674 = arith.cmpi sle, %4673, %c1_i64 : i64
cf.assert %4674, "must have at most one inferred (negative) dimension"
%4675 = arith.muli %4630, %c12_i64 : i64
%4676 = arith.muli %4675, %4631 : i64
%4677 = arith.muli %4676, %c64_i64 : i64
%4678 = arith.divsi %4677, %4672 : i64
%4679 = arith.select %4661, %4678, %extracted_1046 : i64
%4680 = arith.select %4666, %4678, %extracted_1049 : i64
%4681 = arith.select %4671, %4678, %extracted_1052 : i64
%from_elements_1053 = tensor.from_elements %4679, %4680, %4681 : tensor<3xi64>
%reshape_1054 = tensor.reshape %4640(%from_elements_1053) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_1055 = tensor.dim %arg18, %c0 : tensor<?x12x?x64xf32>
%4682 = arith.index_cast %dim_1055 : index to i64
%4683 = linalg.fill ins(%4682 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4684 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4644, %4683, %4646 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1056 = tensor.extract %4684[] : tensor<i64>
%dim_1057 = tensor.dim %arg18, %c2 : tensor<?x12x?x64xf32>
%dim_1058 = tensor.dim %4635, %c2 : tensor<?x12x?x64xf32>
%4685 = affine.apply #map15()[%dim_1057, %dim_1058]
%4686 = arith.index_cast %4685 : index to i64
%4687 = linalg.fill ins(%4686 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4688 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4657, %4687, %4659 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1059 = tensor.extract %4688[] : tensor<i64>
%4689 = arith.cmpi slt, %extracted_1056, %c0_i64 : i64
%4690 = arith.select %4689, %c1_i64, %extracted_1056 : i64
%4691 = arith.extui %4689 : i1 to i64
%4692 = arith.muli %4690, %extracted_1049 : i64
%4693 = arith.addi %4691, %c1_i64 : i64
%4694 = arith.select %4666, %4690, %4692 : i64
%4695 = arith.select %4666, %4693, %4691 : i64
%4696 = arith.muli %4694, %extracted_1059 : i64
%4697 = arith.addi %4695, %c1_i64 : i64
%4698 = arith.cmpi slt, %extracted_1059, %c0_i64 : i64
%4699 = arith.select %4698, %4694, %4696 : i64
%4700 = arith.select %4698, %4697, %4695 : i64
%4701 = arith.cmpi sle, %4700, %c1_i64 : i64
cf.assert %4701, "must have at most one inferred (negative) dimension"
%4702 = arith.muli %4682, %c12_i64 : i64
%4703 = arith.muli %4702, %4686 : i64
%4704 = arith.muli %4703, %c64_i64 : i64
%4705 = arith.divsi %4704, %4699 : i64
%4706 = arith.select %4689, %4705, %extracted_1056 : i64
%4707 = arith.select %4666, %4705, %extracted_1049 : i64
%4708 = arith.select %4698, %4705, %extracted_1059 : i64
%from_elements_1060 = tensor.from_elements %4706, %4707, %4708 : tensor<3xi64>
%reshape_1061 = tensor.reshape %concat_1042(%from_elements_1060) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%dim_1062 = tensor.dim %arg19, %c0 : tensor<?x12x?x64xf32>
%4709 = arith.index_cast %dim_1062 : index to i64
%4710 = linalg.fill ins(%4709 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4711 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4644, %4710, %4646 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1063 = tensor.extract %4711[] : tensor<i64>
%dim_1064 = tensor.dim %arg19, %c2 : tensor<?x12x?x64xf32>
%dim_1065 = tensor.dim %4636, %c2 : tensor<?x12x?x64xf32>
%4712 = affine.apply #map15()[%dim_1064, %dim_1065]
%4713 = arith.index_cast %4712 : index to i64
%4714 = linalg.fill ins(%4713 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4715 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4657, %4714, %4659 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1066 = tensor.extract %4715[] : tensor<i64>
%4716 = arith.cmpi slt, %extracted_1063, %c0_i64 : i64
%4717 = arith.select %4716, %c1_i64, %extracted_1063 : i64
%4718 = arith.extui %4716 : i1 to i64
%4719 = arith.muli %4717, %extracted_1049 : i64
%4720 = arith.addi %4718, %c1_i64 : i64
%4721 = arith.select %4666, %4717, %4719 : i64
%4722 = arith.select %4666, %4720, %4718 : i64
%4723 = arith.muli %4721, %extracted_1066 : i64
%4724 = arith.addi %4722, %c1_i64 : i64
%4725 = arith.cmpi slt, %extracted_1066, %c0_i64 : i64
%4726 = arith.select %4725, %4721, %4723 : i64
%4727 = arith.select %4725, %4724, %4722 : i64
%4728 = arith.cmpi sle, %4727, %c1_i64 : i64
cf.assert %4728, "must have at most one inferred (negative) dimension"
%4729 = arith.muli %4709, %c12_i64 : i64
%4730 = arith.muli %4729, %4713 : i64
%4731 = arith.muli %4730, %c64_i64 : i64
%4732 = arith.divsi %4731, %4726 : i64
%4733 = arith.select %4716, %4732, %extracted_1063 : i64
%4734 = arith.select %4666, %4732, %extracted_1049 : i64
%4735 = arith.select %4725, %4732, %extracted_1066 : i64
%from_elements_1067 = tensor.from_elements %4733, %4734, %4735 : tensor<3xi64>
%reshape_1068 = tensor.reshape %concat_1043(%from_elements_1067) : (tensor<?x12x?x64xf32>, tensor<3xi64>) -> tensor<?x?x64xf32>
%4736 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1054 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4737 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1054 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4738 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4736, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4739 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4737, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4740 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4738, %4739 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4741 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4740, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4742 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4737, %4741 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4743 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4742 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4744 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4743 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4745 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4744 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4746 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4745 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1069 = tensor.extract %4746[] : tensor<i8>
%4747 = arith.extui %extracted_1069 : i8 to i64
%extracted_1070 = tensor.extract %4741[] : tensor<f32>
%4748 = arith.extf %extracted_1070 : f32 to f64
%4749 = arith.index_cast %4679 : i64 to index
%4750 = arith.index_cast %4680 : i64 to index
%4751 = tensor.empty(%4749, %4750) : tensor<?x?x64xi8>
%4752 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1054 : tensor<?x?x64xf32>) outs(%4751 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4747 : i64 to f32
%6767 = arith.truncf %4748 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%4753 = arith.index_cast %4706 : i64 to index
%4754 = arith.index_cast %4707 : i64 to index
%4755 = tensor.empty(%4753, %4754) : tensor<?x64x?xf32>
%4756 = linalg.generic {indexing_maps = [#map5, #map18], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1061 : tensor<?x?x64xf32>) outs(%4755 : tensor<?x64x?xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x64x?xf32>
%4757 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1068 : tensor<?x?x64xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4758 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1068 : tensor<?x?x64xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4759 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4757, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4760 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4758, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4761 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4759, %4760 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4762 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4761, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4763 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4758, %4762 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4764 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4763 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4765 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4764 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4766 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4765 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4767 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4766 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1071 = tensor.extract %4767[] : tensor<i8>
%4768 = arith.extui %extracted_1071 : i8 to i64
%extracted_1072 = tensor.extract %4762[] : tensor<f32>
%4769 = arith.extf %extracted_1072 : f32 to f64
%4770 = arith.index_cast %4733 : i64 to index
%4771 = arith.index_cast %4734 : i64 to index
%4772 = tensor.empty(%4770, %4771) : tensor<?x?x64xi8>
%4773 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1068 : tensor<?x?x64xf32>) outs(%4772 : tensor<?x?x64xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4768 : i64 to f32
%6767 = arith.truncf %4769 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x64xi8>
%4774 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4756 : tensor<?x64x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4775 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4756 : tensor<?x64x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4776 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4774, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4777 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4775, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4778 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4776, %4777 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4779 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4778, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4780 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4775, %4779 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4781 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4780 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4782 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4781 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4783 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4782 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4784 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4783 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1073 = tensor.extract %4784[] : tensor<i8>
%4785 = arith.extui %extracted_1073 : i8 to i64
%extracted_1074 = tensor.extract %4779[] : tensor<f32>
%4786 = arith.extf %extracted_1074 : f32 to f64
%4787 = tensor.empty(%4753, %4754) : tensor<?x64x?xi8>
%4788 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4756 : tensor<?x64x?xf32>) outs(%4787 : tensor<?x64x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4785 : i64 to f32
%6767 = arith.truncf %4786 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x64x?xi8>
%4789 = linalg.fill ins(%4707 : i64) outs(%17 : tensor<1xi64>) -> tensor<1xi64>
%4790 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4741, %4779 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4791 = arith.cmpi eq, %4679, %4706 : i64
cf.assert %4791, "mismatching contracting dimension"
%4792 = tensor.empty(%4749, %4750, %4754) : tensor<?x?x?xi32>
%4793 = linalg.fill ins(%c0_i32 : i32) outs(%4792 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%4794 = linalg.batch_matmul ins(%4752, %4788 : tensor<?x?x64xi8>, tensor<?x64x?xi8>) outs(%4793 : tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%concat_1075 = tensor.concat dim(0) %expanded_1033, %4591, %4789 : (tensor<1xi64>, tensor<1xi64>, tensor<1xi64>) -> tensor<3xi64>
%4795 = tensor.empty(%4749, %4750, %4754) : tensor<?x?x?xf32>
%4796 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4794 : tensor<?x?x?xi32>) outs(%4795 : tensor<?x?x?xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4797 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4796, %4790 : tensor<?x?x?xf32>, tensor<f32>) outs(%4795 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4798 = linalg.fill ins(%4679 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4799 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4605, %4798, %4573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1076 = tensor.extract %4799[] : tensor<i64>
%4800 = linalg.fill ins(%4707 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4801 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4620, %4800, %4621 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1077 = tensor.extract %4801[] : tensor<i64>
%4802 = arith.cmpi slt, %extracted_1076, %c0_i64 : i64
%4803 = arith.select %4802, %c1_i64, %extracted_1076 : i64
%4804 = arith.extui %4802 : i1 to i64
%4805 = arith.muli %4803, %c12_i64 : i64
%4806 = arith.muli %4805, %extracted_1077 : i64
%4807 = arith.addi %4804, %c1_i64 : i64
%4808 = arith.cmpi slt, %extracted_1077, %c0_i64 : i64
%4809 = arith.select %4808, %4805, %4806 : i64
%4810 = arith.select %4808, %4807, %4804 : i64
%4811 = arith.muli %4809, %4707 : i64
%4812 = arith.addi %4810, %c1_i64 : i64
%4813 = arith.cmpi slt, %4707, %c0_i64 : i64
%4814 = arith.select %4813, %4809, %4811 : i64
%4815 = arith.select %4813, %4812, %4810 : i64
%4816 = arith.cmpi sle, %4815, %c1_i64 : i64
cf.assert %4816, "must have at most one inferred (negative) dimension"
%4817 = arith.muli %4679, %4680 : i64
%4818 = arith.muli %4817, %4707 : i64
%4819 = arith.divsi %4818, %4814 : i64
%4820 = arith.select %4802, %4819, %extracted_1076 : i64
%4821 = arith.select %4808, %4819, %extracted_1077 : i64
%4822 = arith.select %4813, %4819, %4707 : i64
%from_elements_1078 = tensor.from_elements %4820, %c12_i64, %4821, %4822 : tensor<4xi64>
%reshape_1079 = tensor.reshape %4797(%from_elements_1078) : (tensor<?x?x?xf32>, tensor<4xi64>) -> tensor<?x12x?x?xf32>
%4823 = arith.index_cast %4820 : i64 to index
%4824 = arith.index_cast %4821 : i64 to index
%4825 = arith.index_cast %4822 : i64 to index
%4826 = arith.cmpi eq, %4823, %105 : index
cf.assert %4826, "mismatched size for broadcast"
%4827 = arith.cmpi eq, %4824, %112 : index
cf.assert %4827, "mismatched size for broadcast"
%4828 = arith.cmpi eq, %4825, %113 : index
cf.assert %4828, "mismatched size for broadcast"
%4829 = tensor.empty(%4823, %4824, %4825) : tensor<?x12x?x?xf32>
%4830 = linalg.generic {indexing_maps = [#map9, #map9, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1079, %223 : tensor<?x12x?x?xf32>, tensor<?x12x?x?xf32>) outs(%4829 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x12x?x?xf32>
%4831 = linalg.generic {indexing_maps = [#map9, #map13, #map9], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%4830, %cst_287 : tensor<?x12x?x?xf32>, tensor<f32>) outs(%4829 : tensor<?x12x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<?x12x?x?xf32>
%extracted_slice_1080 = tensor.extract_slice %concat_1075[0] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1081 = tensor.extract %extracted_slice_1080[%c0] : tensor<1xi64>
%4832 = arith.cmpi eq, %extracted_1081, %c0_i64 : i64
%4833 = arith.extui %4832 : i1 to i64
%4834 = arith.cmpi ne, %4833, %c0_i64 : i64
%4835 = linalg.fill ins(%4834 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4836 = linalg.fill ins(%4820 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4837 = linalg.fill ins(%extracted_1081 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4838 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4835, %4836, %4837 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1082 = tensor.extract %4838[] : tensor<i64>
%extracted_slice_1083 = tensor.extract_slice %concat_1075[1] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1084 = tensor.extract %extracted_slice_1083[%c0] : tensor<1xi64>
%4839 = arith.cmpi eq, %extracted_1084, %c0_i64 : i64
%4840 = arith.extui %4839 : i1 to i64
%4841 = arith.cmpi ne, %4840, %c0_i64 : i64
%4842 = linalg.fill ins(%4841 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4843 = linalg.fill ins(%extracted_1084 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4844 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4842, %cst_292, %4843 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1085 = tensor.extract %4844[] : tensor<i64>
%extracted_slice_1086 = tensor.extract_slice %concat_1075[2] [1] [1] : tensor<3xi64> to tensor<1xi64>
%extracted_1087 = tensor.extract %extracted_slice_1086[%c0] : tensor<1xi64>
%4845 = arith.cmpi eq, %extracted_1087, %c0_i64 : i64
%4846 = arith.extui %4845 : i1 to i64
%4847 = arith.cmpi ne, %4846, %c0_i64 : i64
%4848 = linalg.fill ins(%4847 : i1) outs(%122 : tensor<i1>) -> tensor<i1>
%4849 = linalg.fill ins(%4821 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4850 = linalg.fill ins(%extracted_1087 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4851 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4848, %4849, %4850 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1088 = tensor.extract %4851[] : tensor<i64>
%4852 = arith.cmpi slt, %extracted_1082, %c0_i64 : i64
%4853 = arith.select %4852, %c1_i64, %extracted_1082 : i64
%4854 = arith.extui %4852 : i1 to i64
%4855 = arith.muli %4853, %extracted_1085 : i64
%4856 = arith.addi %4854, %c1_i64 : i64
%4857 = arith.cmpi slt, %extracted_1085, %c0_i64 : i64
%4858 = arith.select %4857, %4853, %4855 : i64
%4859 = arith.select %4857, %4856, %4854 : i64
%4860 = arith.muli %4858, %extracted_1088 : i64
%4861 = arith.addi %4859, %c1_i64 : i64
%4862 = arith.cmpi slt, %extracted_1088, %c0_i64 : i64
%4863 = arith.select %4862, %4858, %4860 : i64
%4864 = arith.select %4862, %4861, %4859 : i64
%4865 = arith.cmpi sle, %4864, %c1_i64 : i64
cf.assert %4865, "must have at most one inferred (negative) dimension"
%4866 = arith.muli %4820, %c12_i64 : i64
%4867 = arith.muli %4866, %4821 : i64
%4868 = arith.muli %4867, %4822 : i64
%4869 = arith.divsi %4868, %4863 : i64
%4870 = arith.select %4852, %4869, %extracted_1082 : i64
%4871 = arith.select %4857, %4869, %extracted_1085 : i64
%4872 = arith.select %4862, %4869, %extracted_1088 : i64
%from_elements_1089 = tensor.from_elements %4870, %4871, %4872 : tensor<3xi64>
%reshape_1090 = tensor.reshape %4831(%from_elements_1089) : (tensor<?x12x?x?xf32>, tensor<3xi64>) -> tensor<?x?x?xf32>
%4873 = arith.index_cast %4870 : i64 to index
%4874 = arith.index_cast %4871 : i64 to index
%4875 = tensor.empty(%4873, %4874) : tensor<?x?xi64>
%4876 = linalg.fill ins(%c0_i64 : i64) outs(%4875 : tensor<?x?xi64>) -> tensor<?x?xi64>
%4877 = tensor.empty(%4873, %4874) : tensor<?x?xf32>
%4878 = linalg.fill ins(%cst_1 : f32) outs(%4877 : tensor<?x?xf32>) -> tensor<?x?xf32>
%4879:2 = linalg.generic {indexing_maps = [#map5, #map19, #map19], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_1090 : tensor<?x?x?xf32>) outs(%4878, %4876 : tensor<?x?xf32>, tensor<?x?xi64>) {
^bb0(%in: f32, %out: f32, %out_1373: i64):
%6766 = linalg.index 2 : index
%6767 = arith.index_cast %6766 : index to i64
%6768 = arith.maximumf %in, %out : f32
%6769 = arith.cmpf ogt, %in, %out : f32
%6770 = arith.select %6769, %6767, %out_1373 : i64
linalg.yield %6768, %6770 : f32, i64
} -> (tensor<?x?xf32>, tensor<?x?xi64>)
%expanded_1091 = tensor.expand_shape %4879#0 [[0], [1, 2]] output_shape [%4873, %4874, 1] : tensor<?x?xf32> into tensor<?x?x1xf32>
%4880 = arith.index_cast %4872 : i64 to index
%4881 = tensor.empty(%4873, %4874, %4880) : tensor<?x?x?xf32>
%4882 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1090, %expanded_1091 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%4881 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4883 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4882 : tensor<?x?x?xf32>) outs(%4881 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.exp %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4884 = tensor.empty(%4873, %4874) : tensor<?x?x1xf32>
%4885 = linalg.fill ins(%cst_0 : f32) outs(%4884 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%4886 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%4883 : tensor<?x?x?xf32>) outs(%4885 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%4887 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4883, %4886 : tensor<?x?x?xf32>, tensor<?x?x1xf32>) outs(%4881 : tensor<?x?x?xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x?xf32>
%4888 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4887 : tensor<?x?x?xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4889 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%4887 : tensor<?x?x?xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4890 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4888, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4891 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4889, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4892 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4890, %4891 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4893 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4892, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4894 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4889, %4893 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4895 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4894 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4896 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4895 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4897 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4896 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4898 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4897 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1092 = tensor.extract %4898[] : tensor<i8>
%4899 = arith.extui %extracted_1092 : i8 to i64
%extracted_1093 = tensor.extract %4893[] : tensor<f32>
%4900 = arith.extf %extracted_1093 : f32 to f64
%4901 = tensor.empty(%4873, %4874, %4880) : tensor<?x?x?xi8>
%4902 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4887 : tensor<?x?x?xf32>) outs(%4901 : tensor<?x?x?xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4899 : i64 to f32
%6767 = arith.truncf %4900 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x?xi8>
%4903 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4893, %4762 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4904 = arith.cmpi eq, %4870, %4733 : i64
cf.assert %4904, "mismatching contracting dimension"
%4905 = arith.cmpi eq, %4872, %4734 : i64
cf.assert %4905, "mismatching contracting dimension"
%4906 = tensor.empty(%4873, %4874) : tensor<?x?x64xi32>
%4907 = linalg.fill ins(%c0_i32 : i32) outs(%4906 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%4908 = linalg.batch_matmul ins(%4902, %4773 : tensor<?x?x?xi8>, tensor<?x?x64xi8>) outs(%4907 : tensor<?x?x64xi32>) -> tensor<?x?x64xi32>
%4909 = tensor.empty(%4873, %4874) : tensor<?x?x64xf32>
%4910 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4908 : tensor<?x?x64xi32>) outs(%4909 : tensor<?x?x64xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%4911 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4910, %4903 : tensor<?x?x64xf32>, tensor<f32>) outs(%4909 : tensor<?x?x64xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x64xf32>
%4912 = linalg.fill ins(%4870 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4913 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4605, %4912, %4573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1094 = tensor.extract %4913[] : tensor<i64>
%4914 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4620, %cst_7, %4621 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1095 = tensor.extract %4914[] : tensor<i64>
%4915 = arith.cmpi slt, %extracted_1094, %c0_i64 : i64
%4916 = arith.select %4915, %c1_i64, %extracted_1094 : i64
%4917 = arith.extui %4915 : i1 to i64
%4918 = arith.muli %4916, %c12_i64 : i64
%4919 = arith.muli %4918, %extracted_1095 : i64
%4920 = arith.addi %4917, %c1_i64 : i64
%4921 = arith.cmpi slt, %extracted_1095, %c0_i64 : i64
%4922 = arith.select %4921, %4918, %4919 : i64
%4923 = arith.select %4921, %4920, %4917 : i64
%4924 = arith.muli %4922, %c64_i64 : i64
%4925 = arith.cmpi sle, %4923, %c1_i64 : i64
cf.assert %4925, "must have at most one inferred (negative) dimension"
%4926 = arith.muli %4870, %4871 : i64
%4927 = arith.muli %4926, %c64_i64 : i64
%4928 = arith.divsi %4927, %4924 : i64
%4929 = arith.select %4915, %4928, %extracted_1094 : i64
%4930 = arith.select %4921, %4928, %extracted_1095 : i64
%from_elements_1096 = tensor.from_elements %4929, %c12_i64, %4930, %c64_i64 : tensor<4xi64>
%reshape_1097 = tensor.reshape %4911(%from_elements_1096) : (tensor<?x?x64xf32>, tensor<4xi64>) -> tensor<?x12x?x64xf32>
%4931 = arith.index_cast %4929 : i64 to index
%4932 = arith.index_cast %4930 : i64 to index
%4933 = tensor.empty(%4931, %4932) : tensor<?x?x12x64xf32>
%4934 = linalg.generic {indexing_maps = [#map9, #map17], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%reshape_1097 : tensor<?x12x?x64xf32>) outs(%4933 : tensor<?x?x12x64xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<?x?x12x64xf32>
%4935 = linalg.fill ins(%4929 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4936 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4605, %4935, %4573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1098 = tensor.extract %4936[] : tensor<i64>
%4937 = linalg.fill ins(%4930 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%4938 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4620, %4937, %4621 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1099 = tensor.extract %4938[] : tensor<i64>
%4939 = arith.cmpi slt, %extracted_1098, %c0_i64 : i64
%4940 = arith.select %4939, %c1_i64, %extracted_1098 : i64
%4941 = arith.extui %4939 : i1 to i64
%4942 = arith.muli %4940, %extracted_1099 : i64
%4943 = arith.addi %4941, %c1_i64 : i64
%4944 = arith.cmpi slt, %extracted_1099, %c0_i64 : i64
%4945 = arith.select %4944, %4940, %4942 : i64
%4946 = arith.select %4944, %4943, %4941 : i64
%4947 = arith.muli %4945, %c768_i64 : i64
%4948 = arith.cmpi sle, %4946, %c1_i64 : i64
cf.assert %4948, "must have at most one inferred (negative) dimension"
%4949 = arith.muli %4929, %4930 : i64
%4950 = arith.muli %4949, %c768_i64 : i64
%4951 = arith.divsi %4950, %4947 : i64
%4952 = arith.select %4939, %4951, %extracted_1098 : i64
%4953 = arith.select %4944, %4951, %extracted_1099 : i64
%from_elements_1100 = tensor.from_elements %4952, %4953, %c768_i64 : tensor<3xi64>
%reshape_1101 = tensor.reshape %4934(%from_elements_1100) : (tensor<?x?x12x64xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%4954 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1101 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4955 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%reshape_1101 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4956 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4954, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4957 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4955, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%4958 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4956, %4957 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4959 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4958, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4960 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4955, %4959 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4961 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %4960 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4962 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4961 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%4963 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4962 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4964 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%4963 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1102 = tensor.extract %4964[] : tensor<i8>
%4965 = arith.extui %extracted_1102 : i8 to i64
%extracted_1103 = tensor.extract %4959[] : tensor<f32>
%4966 = arith.extf %extracted_1103 : f32 to f64
%4967 = arith.index_cast %4952 : i64 to index
%4968 = arith.index_cast %4953 : i64 to index
%4969 = tensor.empty(%4967, %4968) : tensor<?x?x768xi8>
%4970 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1101 : tensor<?x?x768xf32>) outs(%4969 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %4965 : i64 to f32
%6767 = arith.truncf %4966 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%4971 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%4959, %cst_237 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%4972 = arith.trunci %4965 : i64 to i32
%4973 = arith.addi %4972, %c-128_i32 : i32
%4974 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4970 : tensor<?x?x768xi8>) outs(%4969 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%4975 = arith.cmpi sge, %4952, %c0_i64 : i64
cf.assert %4975, "negative values not allowed in new dimensions"
%4976 = tensor.empty(%4967) : tensor<?x768x768xi8>
%4977 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_238 : tensor<768x768xi8>) outs(%4976 : tensor<?x768x768xi8>) {
^bb0(%in: i8, %out: i8):
linalg.yield %in : i8
} -> tensor<?x768x768xi8>
%4978 = tensor.empty(%4967, %4968) : tensor<?x?x768xi32>
%4979 = linalg.fill ins(%c0_i32 : i32) outs(%4978 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4980 = linalg.quantized_batch_matmul ins(%4974, %4977, %4973, %c0_i32 : tensor<?x?x768xi8>, tensor<?x768x768xi8>, i32, i32) outs(%4979 : tensor<?x?x768xi32>) -> tensor<?x?x768xi32>
%4981 = tensor.empty(%4967, %4968) : tensor<?x?x768xf32>
%4982 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4980 : tensor<?x?x768xi32>) outs(%4981 : tensor<?x?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4983 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%4982, %4971 : tensor<?x?x768xf32>, tensor<f32>) outs(%4981 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4984 = linalg.generic {indexing_maps = [#map14, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_98, %4983 : tensor<768xf32>, tensor<?x?x768xf32>) outs(%4981 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4985 = arith.cmpi eq, %4542, %4967 : index
cf.assert %4985, "mismatched size for broadcast"
%4986 = arith.cmpi eq, %4543, %4968 : index
cf.assert %4986, "mismatched size for broadcast"
%4987 = linalg.generic {indexing_maps = [#map5, #map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1030, %4984 : tensor<?x?x768xf32>, tensor<?x?x768xf32>) outs(%4548 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%4988 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%621, %4573, %622 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1104 = tensor.extract %4988[] : tensor<i64>
%4989 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%627, %4621, %628 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1105 = tensor.extract %4989[] : tensor<i64>
%4990 = arith.cmpi slt, %extracted_1104, %c0_i64 : i64
%4991 = arith.select %4990, %c1_i64, %extracted_1104 : i64
%4992 = arith.extui %4990 : i1 to i64
%4993 = arith.muli %4991, %extracted_1105 : i64
%4994 = arith.addi %4992, %c1_i64 : i64
%4995 = arith.cmpi slt, %extracted_1105, %c0_i64 : i64
%4996 = arith.select %4995, %4991, %4993 : i64
%4997 = arith.select %4995, %4994, %4992 : i64
%4998 = arith.cmpi sle, %4997, %c1_i64 : i64
cf.assert %4998, "must have at most one inferred (negative) dimension"
%4999 = arith.divsi %4614, %4996 : i64
%5000 = arith.select %4990, %4999, %extracted_1104 : i64
%5001 = arith.select %4995, %4999, %extracted_1105 : i64
%from_elements_1106 = tensor.from_elements %5000, %5001 : tensor<2xi64>
%reshape_1107 = tensor.reshape %4987(%from_elements_1106) : (tensor<?x?x768xf32>, tensor<2xi64>) -> tensor<?x768xf32>
%5002 = arith.index_cast %5000 : i64 to index
%5003 = tensor.empty(%5002) : tensor<?x1xf32>
%5004 = linalg.fill ins(%cst_0 : f32) outs(%5003 : tensor<?x1xf32>) -> tensor<?x1xf32>
%5005 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%reshape_1107 : tensor<?x768xf32>) outs(%5004 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5006 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%5005 : tensor<?x1xf32>) outs(%5003 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5007 = tensor.empty(%5002) : tensor<?x768xf32>
%5008 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_1107, %5006 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5009 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%5008, %cst_288 : tensor<?x768xf32>, tensor<f32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5010 = linalg.generic {indexing_maps = [#map, #map12], iterator_types = ["parallel", "reduction"]} ins(%5009 : tensor<?x768xf32>) outs(%5004 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5011 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%5010 : tensor<?x1xf32>) outs(%5003 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5012 = linalg.generic {indexing_maps = [#map12, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%5011, %cst_289 : tensor<?x1xf32>, tensor<f32>) outs(%5003 : tensor<?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5013 = linalg.generic {indexing_maps = [#map12, #map], iterator_types = ["parallel", "parallel"]} ins(%5012 : tensor<?x1xf32>) outs(%5003 : tensor<?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x1xf32>
%5014 = linalg.generic {indexing_maps = [#map, #map12, #map], iterator_types = ["parallel", "parallel"]} ins(%5008, %5013 : tensor<?x768xf32>, tensor<?x1xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5015 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%5014, %cst_103 : tensor<?x768xf32>, tensor<768xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5016 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%5015, %cst_104 : tensor<?x768xf32>, tensor<768xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5017 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%5016 : tensor<?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5018 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%5016 : tensor<?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5019 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5017, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5020 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5018, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5021 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5019, %5020 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5022 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5021, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5023 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5018, %5022 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5024 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %5023 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5025 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5024 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%5026 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5025 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5027 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5026 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1108 = tensor.extract %5027[] : tensor<i8>
%5028 = arith.extui %extracted_1108 : i8 to i64
%extracted_1109 = tensor.extract %5022[] : tensor<f32>
%5029 = arith.extf %extracted_1109 : f32 to f64
%5030 = tensor.empty(%5002) : tensor<?x768xi8>
%5031 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5016 : tensor<?x768xf32>) outs(%5030 : tensor<?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %5028 : i64 to f32
%6767 = arith.truncf %5029 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x768xi8>
%5032 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5022, %cst_239 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5033 = tensor.empty(%5002) : tensor<?x3072xi32>
%5034 = linalg.fill ins(%c0_i32 : i32) outs(%5033 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%5035 = arith.trunci %5028 : i64 to i32
%5036 = arith.addi %5035, %c-128_i32 : i32
%5037 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5031 : tensor<?x768xi8>) outs(%5030 : tensor<?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x768xi8>
%5038 = linalg.quantized_matmul ins(%5037, %cst_240, %5036, %c0_i32 : tensor<?x768xi8>, tensor<768x3072xi8>, i32, i32) outs(%5034 : tensor<?x3072xi32>) -> tensor<?x3072xi32>
%5039 = tensor.empty(%5002) : tensor<?x3072xf32>
%5040 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5038 : tensor<?x3072xi32>) outs(%5039 : tensor<?x3072xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%5041 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%5040, %5032 : tensor<?x3072xf32>, tensor<f32>) outs(%5039 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%5042 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%5041, %cst_101 : tensor<?x3072xf32>, tensor<3072xf32>) outs(%5039 : tensor<?x3072xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x3072xf32>
%5043 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5042 : tensor<?x3072xf32>) outs(%5039 : tensor<?x3072xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ugt, %in, %cst_0 : f32
%6767 = arith.select %6766, %in, %cst_0 : f32
linalg.yield %6767 : f32
} -> tensor<?x3072xf32>
%5044 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%5043 : tensor<?x3072xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5045 = linalg.generic {indexing_maps = [#map, #map2], iterator_types = ["reduction", "reduction"]} ins(%5043 : tensor<?x3072xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5046 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5044, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5047 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5045, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5048 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5046, %5047 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5049 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5048, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5050 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5045, %5049 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5051 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %5050 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5052 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5051 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%5053 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5052 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5054 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5053 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1110 = tensor.extract %5054[] : tensor<i8>
%5055 = arith.extui %extracted_1110 : i8 to i64
%extracted_1111 = tensor.extract %5049[] : tensor<f32>
%5056 = arith.extf %extracted_1111 : f32 to f64
%5057 = tensor.empty(%5002) : tensor<?x3072xi8>
%5058 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5043 : tensor<?x3072xf32>) outs(%5057 : tensor<?x3072xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %5055 : i64 to f32
%6767 = arith.truncf %5056 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x3072xi8>
%5059 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5049, %cst_241 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5060 = tensor.empty(%5002) : tensor<?x768xi32>
%5061 = linalg.fill ins(%c0_i32 : i32) outs(%5060 : tensor<?x768xi32>) -> tensor<?x768xi32>
%5062 = arith.trunci %5055 : i64 to i32
%5063 = arith.addi %5062, %c-128_i32 : i32
%5064 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5058 : tensor<?x3072xi8>) outs(%5057 : tensor<?x3072xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x3072xi8>
%5065 = linalg.quantized_matmul ins(%5064, %cst_242, %5063, %c0_i32 : tensor<?x3072xi8>, tensor<3072x768xi8>, i32, i32) outs(%5061 : tensor<?x768xi32>) -> tensor<?x768xi32>
%5066 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%5065 : tensor<?x768xi32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: i32, %out: f32):
%6766 = arith.sitofp %in : i32 to f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5067 = linalg.generic {indexing_maps = [#map, #map2, #map], iterator_types = ["parallel", "parallel"]} ins(%5066, %5059 : tensor<?x768xf32>, tensor<f32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5068 = linalg.generic {indexing_maps = [#map, #map11, #map], iterator_types = ["parallel", "parallel"]} ins(%5067, %cst_102 : tensor<?x768xf32>, tensor<768xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5069 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel", "parallel"]} ins(%reshape_1107, %5068 : tensor<?x768xf32>, tensor<?x768xf32>) outs(%5007 : tensor<?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x768xf32>
%5070 = linalg.fill ins(%5000 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%5071 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4605, %5070, %4573 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1112 = tensor.extract %5071[] : tensor<i64>
%5072 = linalg.generic {indexing_maps = [#map1, #map1, #map1, #map1], iterator_types = []} ins(%4620, %cst_8, %4621 : tensor<i1>, tensor<i64>, tensor<i64>) outs(%10 : tensor<i64>) {
^bb0(%in: i1, %in_1373: i64, %in_1374: i64, %out: i64):
%6766 = arith.select %in, %in_1373, %in_1374 : i64
linalg.yield %6766 : i64
} -> tensor<i64>
%extracted_1113 = tensor.extract %5072[] : tensor<i64>
%5073 = arith.cmpi slt, %extracted_1112, %c0_i64 : i64
%5074 = arith.select %5073, %c1_i64, %extracted_1112 : i64
%5075 = arith.extui %5073 : i1 to i64
%5076 = arith.muli %5074, %extracted_1113 : i64
%5077 = arith.addi %5075, %c1_i64 : i64
%5078 = arith.cmpi slt, %extracted_1113, %c0_i64 : i64
%5079 = arith.select %5078, %5074, %5076 : i64
%5080 = arith.select %5078, %5077, %5075 : i64
%5081 = arith.muli %5079, %c768_i64 : i64
%5082 = arith.cmpi sle, %5080, %c1_i64 : i64
cf.assert %5082, "must have at most one inferred (negative) dimension"
%5083 = arith.muli %5000, %c768_i64 : i64
%5084 = arith.divsi %5083, %5081 : i64
%5085 = arith.select %5073, %5084, %extracted_1112 : i64
%5086 = arith.select %5078, %5084, %extracted_1113 : i64
%from_elements_1114 = tensor.from_elements %5085, %5086, %c768_i64 : tensor<3xi64>
%reshape_1115 = tensor.reshape %5069(%from_elements_1114) : (tensor<?x768xf32>, tensor<3xi64>) -> tensor<?x?x768xf32>
%5087 = arith.index_cast %5085 : i64 to index
%5088 = arith.index_cast %5086 : i64 to index
%5089 = tensor.empty(%5087, %5088) : tensor<?x?x1xf32>
%5090 = linalg.fill ins(%cst_0 : f32) outs(%5089 : tensor<?x?x1xf32>) -> tensor<?x?x1xf32>
%5091 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%reshape_1115 : tensor<?x?x768xf32>) outs(%5090 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5092 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5091 : tensor<?x?x1xf32>) outs(%5089 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5093 = tensor.empty(%5087, %5088) : tensor<?x?x768xf32>
%5094 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%reshape_1115, %5092 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%5093 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%5095 = linalg.generic {indexing_maps = [#map5, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5094, %cst_288 : tensor<?x?x768xf32>, tensor<f32>) outs(%5093 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = math.powf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%5096 = linalg.generic {indexing_maps = [#map5, #map7], iterator_types = ["parallel", "parallel", "reduction"]} ins(%5095 : tensor<?x?x768xf32>) outs(%5090 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.addf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5097 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5096 : tensor<?x?x1xf32>) outs(%5089 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.divf %in, %cst_4 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5098 = linalg.generic {indexing_maps = [#map7, #map10, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5097, %cst_289 : tensor<?x?x1xf32>, tensor<f32>) outs(%5089 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5099 = linalg.generic {indexing_maps = [#map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5098 : tensor<?x?x1xf32>) outs(%5089 : tensor<?x?x1xf32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.sqrt %in : f32
linalg.yield %6766 : f32
} -> tensor<?x?x1xf32>
%5100 = linalg.generic {indexing_maps = [#map5, #map7, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5094, %5099 : tensor<?x?x768xf32>, tensor<?x?x1xf32>) outs(%5093 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%5101 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5100, %cst_109 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%5093 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%5102 = linalg.generic {indexing_maps = [#map5, #map14, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5101, %cst_110 : tensor<?x?x768xf32>, tensor<768xf32>) outs(%5093 : tensor<?x?x768xf32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.addf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<?x?x768xf32>
%5103 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%5102 : tensor<?x?x768xf32>) outs(%159 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.maximumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5104 = linalg.generic {indexing_maps = [#map5, #map10], iterator_types = ["reduction", "reduction", "reduction"]} ins(%5102 : tensor<?x?x768xf32>) outs(%161 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.minimumf %in, %out : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5105 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5103, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf ogt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5106 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5104, %37 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.cmpf olt, %in, %in_1373 : f32
%6767 = arith.select %6766, %in, %in_1373 : f32
linalg.yield %6767 : f32
} -> tensor<f32>
%5107 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5105, %5106 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5108 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5107, %166 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5109 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5104, %5108 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.divf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5110 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%37, %5109 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.subf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5111 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5110 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = arith.cmpf ult, %in, %cst_0 : f32
%6767 = arith.select %6766, %cst_0, %in : f32
%6768 = arith.cmpf ugt, %6767, %cst_3 : f32
%6769 = arith.select %6768, %cst_3, %6767 : f32
linalg.yield %6769 : f32
} -> tensor<f32>
%5112 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5111 : tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %out: f32):
%6766 = math.roundeven %in : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5113 = linalg.generic {indexing_maps = [#map1, #map1], iterator_types = []} ins(%5112 : tensor<f32>) outs(%172 : tensor<i8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.fptosi %in : f32 to i8
linalg.yield %6766 : i8
} -> tensor<i8>
%extracted_1116 = tensor.extract %5113[] : tensor<i8>
%5114 = arith.extui %extracted_1116 : i8 to i64
%extracted_1117 = tensor.extract %5108[] : tensor<f32>
%5115 = arith.extf %extracted_1117 : f32 to f64
%5116 = tensor.empty(%5087, %5088) : tensor<?x?x768xi8>
%5117 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5102 : tensor<?x?x768xf32>) outs(%5116 : tensor<?x?x768xi8>) {
^bb0(%in: f32, %out: i8):
%6766 = arith.sitofp %5114 : i64 to f32
%6767 = arith.truncf %5115 : f64 to f32
%6768 = arith.divf %in, %6767 : f32
%6769 = math.round %6768 : f32
%6770 = arith.addf %6769, %6766 : f32
%6771 = arith.cmpf ult, %6770, %cst_0 : f32
%6772 = arith.cmpf ugt, %6770, %cst_3 : f32
%6773 = arith.select %6771, %cst_0, %6770 : f32
%6774 = arith.select %6772, %cst_3, %6773 : f32
%6775 = arith.fptoui %6774 : f32 to i8
linalg.yield %6775 : i8
} -> tensor<?x?x768xi8>
%5118 = linalg.fill ins(%5085 : i64) outs(%10 : tensor<i64>) -> tensor<i64>
%5119 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5108, %cst_243 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5120 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5108, %cst_245 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5121 = linalg.generic {indexing_maps = [#map1, #map1, #map1], iterator_types = []} ins(%5108, %cst_247 : tensor<f32>, tensor<f32>) outs(%30 : tensor<f32>) {
^bb0(%in: f32, %in_1373: f32, %out: f32):
%6766 = arith.mulf %in, %in_1373 : f32
linalg.yield %6766 : f32
} -> tensor<f32>
%5122 = arith.trunci %5114 : i64 to i32
%5123 = arith.addi %5122, %c-128_i32 : i32
%5124 = linalg.generic {indexing_maps = [#map5, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%5117 : tensor<?x?x768xi8>) outs(%5116 : tensor<?x?x768xi8>) {
^bb0(%in: i8, %out: i8):
%6766 = arith.addi %in, %c-128_i8 : i8
linalg.yield %6766 : i8
} -> tensor<?x?x768xi8>
%5125 = arith.cmpi sge, %5085, %c0_i64 : i64
cf.assert %5125, "negative values not allowed in new dimensions"
%5126 = tensor.empty(%5087) : tensor<?x768x768xi8>
%5127 = linalg.generic {indexing_maps = [#map16, #map5], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cst_244 : tensor<768x768xi8>) ou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment