@@ -2143,18 +2143,22 @@ def _test_forward_reduce(testop, dtype="float32"):
21432143 if dtype == "bool" :
21442144 data0 = [np .random .choice (a = [False , True ], size = (16 , 16 , 16 , 16 )).astype (dtype ), None ]
21452145 data1 = [
2146+ np .random .choice (a = [False , True ], size = (16 , 16 , 16 , 16 )).astype (dtype ),
2147+ np .array (1 , dtype = np .int32 ),
2148+ ]
2149+ data2 = [
21462150 np .random .choice (a = [False , True ], size = (16 , 16 , 16 , 16 )).astype (dtype ),
21472151 np .array ([1 , 2 ], dtype = np .int32 ),
21482152 ]
21492153 else :
21502154 data0 = [np .random .rand (16 , 16 , 16 , 16 ).astype (dtype ), None ]
2151- data1 = [np .random .rand (16 , 16 , 16 , 16 ).astype (dtype ), np .array ([ 1 , 2 ] , dtype = np .int32 )]
2152- testop ( data0 )
2153- testop ( data0 , keep_dims = False )
2154- testop ( data0 , keep_dims = True )
2155- testop (data1 )
2156- testop (data1 , keep_dims = False )
2157- testop (data1 , keep_dims = True )
2155+ data1 = [np .random .rand (16 , 16 , 16 , 16 ).astype (dtype ), np .array (1 , dtype = np .int32 )]
2156+ data2 = [ np . random . rand ( 16 , 16 , 16 , 16 ). astype ( dtype ), np . array ([ 1 , 2 ], dtype = np . int32 )]
2157+
2158+ for data in [ data0 , data1 , data2 ]:
2159+ testop (data )
2160+ testop (data , keep_dims = False )
2161+ testop (data , keep_dims = True )
21582162
21592163
21602164def _test_forward_reduce_quantized (testop ):
0 commit comments