@@ -2202,7 +2202,7 @@ def test_cat(self, X, num, dim, relu):
22022202 X = torch .from_numpy (X )
22032203 new_shape = np .array (X .shape )
22042204 new_shape [dim ] = 0
2205- for idx in range (num ):
2205+ for _ in range (num ):
22062206 tensors_q .append (torch .quantize_per_tensor (X , scale , zero_point ,
22072207 torch_type ))
22082208 tensors_ref .append (X )
@@ -3162,7 +3162,7 @@ def forward(
31623162 # Quantize
31633163 mha_quantized = torch .ao .quantization .convert (mha_prepared )
31643164
3165- for name , param in mha_quantized .named_parameters ():
3165+ for name , _param in mha_quantized .named_parameters ():
31663166 self .assertTrue ("in_proj_weight" not in name )
31673167
31683168 qy = mha_quantized (* q_data )
@@ -5991,7 +5991,7 @@ def trace_handler(p):
59915991 activities = [ProfilerActivity .CPU , ProfilerActivity .CUDA ],
59925992 schedule = my_schedule ,
59935993 on_trace_ready = trace_handler ) as prof :
5994- for i in range (30 ):
5994+ for _ in range (30 ):
59955995 conv_op (input , weight , None , stride , padding , dilation , groups )
59965996 prof .step ()
59975997
@@ -6006,7 +6006,7 @@ def trace_handler(p):
60066006 activities = [ProfilerActivity .CPU , ProfilerActivity .CUDA ],
60076007 schedule = my_schedule ,
60086008 on_trace_ready = trace_handler ) as prof :
6009- for i in range (30 ):
6009+ for _ in range (30 ):
60106010 conv_op (input_fp16 , weight_fp16 , None , stride , padding , dilation , groups )
60116011 prof .step ()
60126012
@@ -6023,7 +6023,7 @@ def trace_handler(p):
60236023 activities = [ProfilerActivity .CPU , ProfilerActivity .CUDA ],
60246024 schedule = my_schedule ,
60256025 on_trace_ready = trace_handler ) as prof :
6026- for i in range (30 ):
6026+ for _ in range (30 ):
60276027 conv_op (input_int8 , weight_prepacked , scale , zero_point )
60286028 prof .step ()
60296029
0 commit comments