@@ -163,3 +163,21 @@ func.func @parse() -> !qalias {
163163 %0 = " foo" () : () -> !qalias
164164 return %0 : !qalias
165165}
166+
167+ // -----
168+ // Negative scale checking
169+ // CHECK: !quant.quantile<i4:f16:f32, {-1.000000e+00,-8.667000e-01,-7.333000e-01,-6.000000e-01,-4.667000e-01,-3.333000e-01,-2.000000e-01,-0.066699999999999995,0.066699999999999995,2.000000e-01,3.333000e-01,4.667000e-01,6.000000e-01,7.333000e-01,8.667000e-01,1.000000e+00}:-2.000000e+02>
170+ !qalias = !quant.quantile <i4 :f16 :f32 , {-1.0000 ,-0.8667 ,-0.7333 ,-0.6000 ,-0.4667 ,-0.3333 ,-0.2000 ,-0.0667,0.0667,0.2000,0.3333,0.4667,0.6000,0.7333,0.8667,1.0000 }:-2.0e+2 >
171+ func.func @parse () -> !qalias {
172+ %0 = " foo" () : () -> !qalias
173+ return %0 : !qalias
174+ }
175+
176+ // -----
177+ // Per-axis negative scale checking
178+ // CHECK: !quant.quantile<i4:f16:f32:1, {-1.000000e+00,-8.667000e-01,-7.333000e-01,-6.000000e-01,-4.667000e-01,-3.333000e-01,-2.000000e-01,-0.066699999999999995,0.066699999999999995,2.000000e-01,3.333000e-01,4.667000e-01,6.000000e-01,7.333000e-01,8.667000e-01,1.000000e+00}:{-2.000000e+02,-9.987200e-01:120}>
179+ !qalias = !quant.quantile <i4 :f16 :f32 :1 , {-1.0000 ,-0.8667 ,-0.7333 ,-0.6000 ,-0.4667 ,-0.3333 ,-0.2000 ,-0.0667,0.0667,0.2000,0.3333,0.4667,0.6000,0.7333,0.8667,1.0000 }:{-2.0e+2 ,-0.99872 :120 }>
180+ func.func @parse () -> !qalias {
181+ %0 = " foo" () : () -> !qalias
182+ return %0 : !qalias
183+ }
0 commit comments