@@ -858,6 +858,123 @@ def ReduceSumDimIntListKeepDimIntModule_basic(module, tu: TestUtils):
858858# ==============================================================================
859859
860860
861+ class ReduceLogSumExpDimIntListFloatModule (torch .nn .Module ):
862+ def __init__ (self ):
863+ super ().__init__ ()
864+
865+ @export
866+ @annotate_args (
867+ [
868+ None ,
869+ ([- 1 , - 1 , - 1 ], torch .float32 , True ),
870+ ]
871+ )
872+ def forward (self , a ):
873+ return torch .ops .aten .logsumexp (a , [0 , 1 ], False )
874+
875+
876+ @register_test_case (module_factory = lambda : ReduceLogSumExpDimIntListFloatModule ())
877+ def ReduceLogSumExpDimIntListFloatModule_basic (module , tu : TestUtils ):
878+ module .forward (tu .rand (3 , 4 , 5 ))
879+
880+
881+ # ==============================================================================
882+
883+
884+ class ReduceLogSumExpDimIntListEmptyDimKeepDimModule (torch .nn .Module ):
885+ def __init__ (self ):
886+ super ().__init__ ()
887+
888+ @export
889+ @annotate_args (
890+ [
891+ None ,
892+ ([- 1 , - 1 , - 1 ], torch .float32 , True ),
893+ ]
894+ )
895+ def forward (self , a ):
896+ return torch .ops .aten .logsumexp (a , [], True )
897+
898+
899+ @register_test_case (
900+ module_factory = lambda : ReduceLogSumExpDimIntListEmptyDimKeepDimModule ()
901+ )
902+ def ReduceLogSumExpDimIntListEmptyDimKeepDimModule_basic (module , tu : TestUtils ):
903+ module .forward (tu .rand (3 , 4 , 5 ))
904+
905+
906+ # ==============================================================================
907+
908+
909+ class ReduceLogSumExpDimIntListNegativeDimModule (torch .nn .Module ):
910+ def __init__ (self ):
911+ super ().__init__ ()
912+
913+ @export
914+ @annotate_args (
915+ [
916+ None ,
917+ ([- 1 , - 1 , - 1 ], torch .float32 , True ),
918+ ]
919+ )
920+ def forward (self , a ):
921+ return torch .ops .aten .logsumexp (a , [- 1 ], True )
922+
923+
924+ @register_test_case (module_factory = lambda : ReduceLogSumExpDimIntListNegativeDimModule ())
925+ def ReduceLogSumExpDimIntListNegativeDimModule_basic (module , tu : TestUtils ):
926+ module .forward (tu .rand (3 , 4 , 5 ))
927+
928+
929+ # ==============================================================================
930+
931+
932+ class ReduceLogSumExpDimIntListIntModule (torch .nn .Module ):
933+ def __init__ (self ):
934+ super ().__init__ ()
935+
936+ @export
937+ @annotate_args (
938+ [
939+ None ,
940+ ([- 1 , - 1 , - 1 ], torch .int64 , True ),
941+ ]
942+ )
943+ def forward (self , a ):
944+ return torch .ops .aten .logsumexp (a , [- 1 ], False )
945+
946+
947+ @register_test_case (module_factory = lambda : ReduceLogSumExpDimIntListIntModule ())
948+ def ReduceLogSumExpDimIntListIntModule_basic (module , tu : TestUtils ):
949+ module .forward (tu .randint (3 , 4 , 5 , low = 0 , high = 100 ))
950+
951+
952+ # ==============================================================================
953+
954+
955+ class ReduceLogSumExpDimIntListBoolModule (torch .nn .Module ):
956+ def __init__ (self ):
957+ super ().__init__ ()
958+
959+ @export
960+ @annotate_args (
961+ [
962+ None ,
963+ ([- 1 , - 1 , - 1 ], torch .bool , True ),
964+ ]
965+ )
966+ def forward (self , a ):
967+ return torch .ops .aten .logsumexp (a , [- 1 ], False )
968+
969+
970+ @register_test_case (module_factory = lambda : ReduceLogSumExpDimIntListBoolModule ())
971+ def ReduceLogSumExpDimIntListBoolModule_basic (module , tu : TestUtils ):
972+ module .forward (tu .randint (3 , 4 , 5 , high = 2 ).to (torch .bool ))
973+
974+
975+ # ==============================================================================
976+
977+
861978class ReduceProdDimIntFloatModule (torch .nn .Module ):
862979 def __init__ (self ):
863980 super ().__init__ ()
0 commit comments