@@ -58,10 +58,10 @@ def rand_validator(rand_node: Node) -> bool:
5858 )
5959 return False
6060 if layout is not None :
61- _LOGGER .debug (
62- f"Currently we don't support specifying layout, got { layout } ."
63- )
64- return False
61+ _LOGGER .debug (f"Currently we don't support specifying layout, got { layout } ." )
62+ return False
63+
64+
6565@dynamo_tensorrt_converter (torch .ops .aten .rand .default )
6666def aten_ops_rand (
6767 ctx : ConversionContext ,
@@ -83,10 +83,10 @@ def randn_validator(randn_node: Node) -> bool:
8383 )
8484 return False
8585 if layout is not None :
86- _LOGGER .debug (
87- f"Currently we don't support specifying layout, got { layout } ."
88- )
89- return False
86+ _LOGGER .debug (f"Currently we don't support specifying layout, got { layout } ." )
87+ return False
88+
89+
9090@dynamo_tensorrt_converter (torch .ops .aten .randn .default )
9191def aten_ops_randn (
9292 ctx : ConversionContext ,
@@ -108,10 +108,10 @@ def randperm_validator(randperm_node: Node) -> bool:
108108 )
109109 return False
110110 if layout is not None :
111- _LOGGER .debug (
112- f"Currently we don't support specifying layout, got { layout } ."
113- )
114- return False
111+ _LOGGER .debug (f"Currently we don't support specifying layout, got { layout } ." )
112+ return False
113+
114+
115115@dynamo_tensorrt_converter (torch .ops .aten .randperm .default )
116116def aten_ops_randperm (
117117 ctx : ConversionContext ,
@@ -123,7 +123,5 @@ def aten_ops_randperm(
123123 device = kwargs .get ("device" , None )
124124 input = args [0 ]
125125 if not isinstance (input , int ):
126- raise RuntimeError (
127- f"The input must be an integer"
128- )
129- return np .random .randperm (* args ).to (device = device )
126+ raise RuntimeError (f"The input must be an integer" )
127+ return np .random .randperm (* args ).to (device = device )
0 commit comments