project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pytorch_ao | public | public | 0 | 0 | _generate_qdq_quantized_model | def _generate_qdq_quantized_model(mod, inputs, is_qat=False, is_dynamic=False, quantizer=None):maybe_no_grad = contextlib.nullcontext() if is_qat else torch.no_grad()with maybe_no_grad:export_model = torch.export.export(mod, inputs, strict=True).module()quantizer = (quantizer if quantizer else get_default_quantizer(is_... | 4 | 18 | 5 | 113 | 5 | 104 | 121 | 104 | null | ['export_model', 'maybe_no_grad', 'prepare_model', 'quantizer', 'convert_model'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_generate_qdq_quantized_model) defined within the public class called public.The function start at line 104 and ends at 121. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [104.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | cal_conv_generated_kernel_number | def cal_conv_generated_kernel_number(mod, input, dtype, dim=4, device="cpu"):# this function is to decide how many kernels are generated# while testing conv2d/3d/deconv2d# the assumption is:# (1) There will be a to_dtype kernel for input for lp# (2) inductor always use channel_last format, there will# be a to_channel_l... | 9 | 23 | 5 | 164 | 6 | 124 | 157 | 124 | null | ['output', 'input', 'mod', 'input_kernel', 'output_kernel', 'maybe_autocast'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (cal_conv_generated_kernel_number) defined within the public class called public.The function start at line 124 and ends at 157. It contains 23 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [124.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _check_unary_is_decomposed | def _check_unary_is_decomposed(self, unary_fn):return not any(isinstance(unary_fn, fn)for fn in [torch.nn.ReLU, torch.nn.Sigmoid, torch.nn.Tanh]) | 2 | 5 | 2 | 40 | 0 | 162 | 166 | 162 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_check_unary_is_decomposed) defined within the public class called public.The function start at line 162 and ends at 166. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [162.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _clone_inputs.clone | def clone(x):if not isinstance(x, torch.Tensor):return xreturn x.clone() | 2 | 4 | 1 | 24 | 0 | 169 | 172 | 169 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_clone_inputs.clone) defined within the public class called public.The function start at line 169 and ends at 172. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _clone_inputs | def _clone_inputs(self, inputs):def clone(x):if not isinstance(x, torch.Tensor):return xreturn x.clone()return tuple(clone(x) for x in inputs) | 2 | 3 | 2 | 21 | 0 | 168 | 174 | 168 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_clone_inputs) defined within the public class called public.The function start at line 168 and ends at 174. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [168.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_common | def _test_common(self,mod,inputs,matcher_check_fn,atol=1e-5,rtol=1.3e-6,check_autocast=torch.float32,check_quantization=False,is_qat=False,dtype=None,is_dynamic=False,quantizer=None,compile_options={},# noqa: B006):if not hasattr(self, "device"):has_xpu = any(isinstance(input, torch.Tensor) and input.device.type == "xp... | 12 | 55 | 13 | 349 | 0 | 176 | 231 | 176 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_common) defined within the public class called public.The function start at line 176 and ends at 231. It contains 55 lines of code and it has a cyclomatic complexity of 12. It takes 13 parameters, represented as [176.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_code_common | def _test_code_common(self,mod,inputs,include_ops,exclude_ops,atol=1e-5,rtol=1.3e-6,check_quantization=False,check_dynamic=None,num_include_ops=None,quantizer=None,):with torch.no_grad():clone_inputs = self._clone_inputs(inputs)if check_quantization:mod = _generate_qdq_quantized_model(mod, inputs, quantizer=quantizer)e... | 8 | 36 | 11 | 215 | 0 | 233 | 269 | 233 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_code_common) defined within the public class called public.The function start at line 233 and ends at 269. It contains 36 lines of code and it has a cyclomatic complexity of 8. It takes 11 parameters, represented as [233.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_test_helper.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.conv2 = torch.nn.Conv2d(128, 128, kernel_size=3, stride=1)self.conv3 = torch.nn.Conv2d(128, 128, kernel_size=3, stride=1, groups=4) | 1 | 10 | 2 | 86 | 0 | 276 | 285 | 276 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_test_helper.__init__) defined within the public class called public.The function start at line 276 and ends at 285. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [276.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_test_helper.forward | def forward(self, x):return self.conv3(self.conv2(self.conv(x))) | 1 | 2 | 2 | 24 | 0 | 287 | 288 | 287 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_test_helper.forward) defined within the public class called public.The function start at line 287 and ends at 288. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [287.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_test_helper.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in QConv2D weight prepack * 1#int8_mixed_fp32: [dequant_node, dequantize_per_channel, clone, convolution]#int8_mixed_bf16: [dequant_node, optional(convert_element_type_4),# dequantize_per_channel, optional(convert_element_type_3), clone, convolution]self.assert... | 3 | 11 | 0 | 55 | 0 | 297 | 311 | 297 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_test_helper.matcher_check_fn) defined within the public class called public.The function start at line 297 and ends at 311. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_test_helper | def _qconv2d_test_helper(self, device="cpu", int8_mixed_bf16=False):class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.conv2 = torch.nn.Conv2d(128, 128, kernel_size=3, stride=1)self.conv3 = torch.nn.Conv2d(128, 128, kernel_size=3, str... | 2 | 18 | 3 | 115 | 0 | 274 | 319 | 274 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_test_helper) defined within the public class called public.The function start at line 274 and ends at 319. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [274.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_cpu | def test_qconv2d_cpu(self):r"""This testcase will quantize a single Conv2d module."""self._qconv2d_test_helper("cpu") | 1 | 2 | 1 | 13 | 0 | 324 | 328 | 324 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_cpu) defined within the public class called public.The function start at line 324 and ends at 328. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_int8_mixed_bf16 | def test_qconv2d_int8_mixed_bf16(self):r"""This testcase will quantize a single Conv2d module with int8_mixed_bf16 quantization."""self._qconv2d_test_helper(int8_mixed_bf16=True) | 1 | 2 | 1 | 15 | 0 | 334 | 338 | 334 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_int8_mixed_bf16) defined within the public class called public.The function start at line 334 and ends at 338. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_unary_test_helper.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.conv2 = torch.nn.Conv2d(128, 128, kernel_size=3, stride=1, bias=False)self.unary_fn2 = copy.deepcopy(unary_op) | 1 | 11 | 2 | 84 | 0 | 348 | 358 | 348 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_unary_test_helper.__init__) defined within the public class called public.The function start at line 348 and ends at 358. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [348.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_unary_test_helper.forward | def forward(self, x):tmp = self.unary_fn(self.conv(x))return self.unary_fn2(self.conv2(tmp)) | 1 | 3 | 2 | 32 | 0 | 360 | 362 | 360 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_unary_test_helper.forward) defined within the public class called public.The function start at line 360 and ends at 362. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [360.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_unary_test_helper.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in quantization weight prepack * 2self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)# 2. QConv2D Unary fusion in post-grad fusion pass * 2self.assertEqual(counters["inductor"]["qconv_unary_matcher_count"],0 if TEST_ACL else 2,)self.... | 5 | 16 | 0 | 77 | 0 | 371 | 388 | 371 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_unary_test_helper.matcher_check_fn) defined within the public class called public.The function start at line 371 and ends at 388. It contains 16 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_unary_test_helper | def _qconv2d_unary_test_helper(self,device="cpu",int8_mixed_bf16=False,unary_op=torch.nn.ReLU(),qconv_unary_matcher_nodes=None,):class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.conv2 = torch.n... | 2 | 24 | 4 | 132 | 0 | 340 | 396 | 340 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_unary_test_helper) defined within the public class called public.The function start at line 340 and ends at 396. It contains 24 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [340.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_relu_cpu | def test_qconv2d_relu_cpu(self):r"""This testcase will quantize Conv2d->ReLU pattern."""self._qconv2d_unary_test_helper(device="cpu") | 1 | 2 | 1 | 15 | 0 | 400 | 404 | 400 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_relu_cpu) defined within the public class called public.The function start at line 400 and ends at 404. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_relu_int8_mixed_bf16_xpu | def test_qconv2d_relu_int8_mixed_bf16_xpu(self):r"""This testcase will quantize Conv2d->ReLU pattern with int8_mixed_bf16 quantization."""self._qconv2d_unary_test_helper(int8_mixed_bf16=True) | 1 | 2 | 1 | 15 | 0 | 409 | 413 | 409 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_relu_int8_mixed_bf16_xpu) defined within the public class called public.The function start at line 409 and ends at 413. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_relu6_cpu | def test_qconv2d_relu6_cpu(self):r"""This testcase will quantize Conv2d->ReLU6 pattern."""self._qconv2d_unary_test_helper(device="cpu", unary_op=torch.nn.ReLU6()) | 1 | 2 | 1 | 25 | 0 | 417 | 421 | 417 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_relu6_cpu) defined within the public class called public.The function start at line 417 and ends at 421. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_hardtanh_cpu | def test_qconv2d_hardtanh_cpu(self):r"""This testcase will quantize Conv2d->Hardtanh pattern."""self._qconv2d_unary_test_helper(device="cpu", unary_op=torch.nn.Hardtanh()) | 1 | 2 | 1 | 25 | 0 | 425 | 429 | 425 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_hardtanh_cpu) defined within the public class called public.The function start at line 425 and ends at 429. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_hardtanh_int8_mixed_bf16_cpu | def test_qconv2d_hardtanh_int8_mixed_bf16_cpu(self):r"""This testcase will quantize Conv2d->Hardtanh pattern.Match.nodes:[qconv2d_pointwise_default, convert_element_type, clamp_min, clamp_max, convert_element_type, quantize_per_tensor][qconv2d_pointwise_default, convert_element_type, clamp_min, clamp_max, convert_eleme... | 1 | 6 | 1 | 30 | 0 | 434 | 445 | 434 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_hardtanh_int8_mixed_bf16_cpu) defined within the public class called public.The function start at line 434 and ends at 445. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_hardswish_cpu | def test_qconv2d_hardswish_cpu(self):r"""This testcase will quantize Conv2d->Hardswish pattern."""self._qconv2d_unary_test_helper(device="cpu", unary_op=torch.nn.Hardswish()) | 1 | 2 | 1 | 25 | 0 | 449 | 453 | 449 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_hardswish_cpu) defined within the public class called public.The function start at line 449 and ends at 453. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_hardswish_int8_mixed_bf16_cpu | def test_qconv2d_hardswish_int8_mixed_bf16_cpu(self):r"""This testcase will quantize Conv2d->Hardswish pattern.Match.nodes:[qconv2d_pointwise_default, convert_element_type, add, clamp_min, clamp_max, mul, div, convert_element_type, quantize_per_tensor][qconv2d_pointwise_default, convert_element_type, add, clamp_min, cl... | 1 | 6 | 1 | 30 | 0 | 458 | 470 | 458 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_hardswish_int8_mixed_bf16_cpu) defined within the public class called public.The function start at line 458 and ends at 470. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_silu_cpu | def test_qconv2d_silu_cpu(self):r"""This testcase will quantize Conv2d->SiLU pattern."""self._qconv2d_unary_test_helper(device="cpu", unary_op=torch.nn.SiLU()) | 1 | 2 | 1 | 25 | 0 | 474 | 478 | 474 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_silu_cpu) defined within the public class called public.The function start at line 474 and ends at 478. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_silu_int8_mixed_bf16_cpu | def test_qconv2d_silu_int8_mixed_bf16_cpu(self):r"""This testcase will quantize Conv2d->SiLU pattern.Match.nodes:[qconv2d_pointwise_default, convert_element_type, sigmoid, mul, convert_element_type, quantize_per_tensor][qconv2d_pointwise_default, convert_element_type, sigmoid, mul, convert_element_type]"""self._qconv2d... | 1 | 6 | 1 | 30 | 0 | 483 | 495 | 483 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_silu_int8_mixed_bf16_cpu) defined within the public class called public.The function start at line 483 and ends at 495. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper.__init__ | def __init__(self,add_fn,use_relu,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.conv2 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.add_fn = add_fnself.relu = torch.nn.ReLU()self.conv3 = torch.nn.Conv2d(6, 6, kernel_size=3, stride=1, bias=False)self.conv4 = torch.nn... | 1 | 16 | 4 | 153 | 0 | 514 | 529 | 514 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper.__init__) defined within the public class called public.The function start at line 514 and ends at 529. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [514.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper.forward | def forward(self, x):x1 = self.conv1(x)x2 = self.conv2(x)tmp = self.add_fn(x1, x2)if self.use_relu:tmp = self.relu(tmp)tmp1 = self.conv3(tmp)tmp2 = self.conv4(tmp)res = self.add_fn2(tmp1, tmp2)if self.use_relu:res = self.relu2(res)return res | 3 | 12 | 2 | 87 | 0 | 531 | 542 | 531 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper.forward) defined within the public class called public.The function start at line 531 and ends at 542. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [531.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in quantization weight prepack * 4self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 4)# 2. Qconv2d Binary Unary fusion in post-grad fusion pass * 2self.assertEqual(counters["inductor"]["qconv2d_binary_matcher_count"],0 if TEST_ACL els... | 3 | 12 | 0 | 56 | 0 | 552 | 565 | 552 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper.matcher_check_fn) defined within the public class called public.The function start at line 552 and ends at 565. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper | def _qconv2d_add_test_helper(self, device="cpu", use_relu=False, int8_mixed_bf16=False):r"""This testcase will quantize a Conv2d->Add pattern as: X / \Conv1(X) Conv2(X) \ /Add | Optional(relu) | Y"""class M(torch.nn.Module):def __init__(self,add_fn,use_relu,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6... | 3 | 21 | 4 | 131 | 0 | 497 | 573 | 497 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper) defined within the public class called public.The function start at line 497 and ends at 573. It contains 21 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [497.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper2.__init__ | def __init__(self,add_fn,use_relu,swap_inputs,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.add_fn = add_fnself.relu = torch.nn.ReLU()self.conv2 = torch.nn.Conv2d(6, 6, kernel_size=3, stride=1, bias=False)self.add_fn2 = add_fnself.relu2 = torch.nn.ReLU()self.use_relu = use... | 1 | 16 | 5 | 112 | 0 | 601 | 616 | 601 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper2.__init__) defined within the public class called public.The function start at line 601 and ends at 616. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [601.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper2.forward | def forward(self, x, x2, x3):x1 = self.conv1(x)if self.swap_inputs:tmp = self.add_fn(x2, x1)else:tmp = self.add_fn(x1, x2)if self.use_relu:tmp = self.relu(tmp)tmp1 = self.conv2(tmp)if self.swap_inputs:res = self.add_fn2(x3, tmp1)else:res = self.add_fn2(tmp1, x3)if self.use_relu:res = self.relu2(res)return res | 5 | 16 | 4 | 109 | 0 | 618 | 633 | 618 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper2.forward) defined within the public class called public.The function start at line 618 and ends at 633. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [618.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper2.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in quantization weight prepack * 2self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)# 2. Qconv2d Binary Unary fusion in post-grad fusion pass * 2self.assertEqual(counters["inductor"]["qconv2d_binary_matcher_count"],0 if TEST_ACL els... | 3 | 12 | 0 | 56 | 0 | 649 | 662 | 649 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper2.matcher_check_fn) defined within the public class called public.The function start at line 649 and ends at 662. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qconv2d_add_test_helper2 | def _qconv2d_add_test_helper2(self, device="cpu", use_relu=False, int8_mixed_bf16=False):r"""This testcase will quantize two Conv2d->Add patterns as:Conv(X) extra input \ /Add | Optional(relu) | Y, andextra input Conv(X) \ /Add | Optional(relu) | Y"""class M(torch.nn.Module):def __init__(self,add_fn,use_relu,swap_input... | 3 | 27 | 4 | 199 | 0 | 575 | 670 | 575 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qconv2d_add_test_helper2) defined within the public class called public.The function start at line 575 and ends at 670. It contains 27 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [575.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_cpu | def test_qconv2d_add_cpu(self):self._qconv2d_add_test_helper()self._qconv2d_add_test_helper2() | 1 | 3 | 1 | 15 | 0 | 674 | 676 | 674 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_cpu) defined within the public class called public.The function start at line 674 and ends at 676. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_int8_mixed_bf16 | def test_qconv2d_add_int8_mixed_bf16(self):self._qconv2d_add_test_helper(int8_mixed_bf16=True)self._qconv2d_add_test_helper2(int8_mixed_bf16=True) | 1 | 3 | 1 | 21 | 0 | 681 | 683 | 681 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_int8_mixed_bf16) defined within the public class called public.The function start at line 681 and ends at 683. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_relu_cpu | def test_qconv2d_add_relu_cpu(self):self._qconv2d_add_test_helper(use_relu=True)self._qconv2d_add_test_helper2(use_relu=True) | 1 | 3 | 1 | 21 | 0 | 687 | 689 | 687 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_relu_cpu) defined within the public class called public.The function start at line 687 and ends at 689. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_relu_int8_mixed_bf16 | def test_qconv2d_add_relu_int8_mixed_bf16(self):self._qconv2d_add_test_helper(use_relu=True, int8_mixed_bf16=True)self._qconv2d_add_test_helper2(use_relu=True, int8_mixed_bf16=True) | 1 | 3 | 1 | 29 | 0 | 694 | 696 | 694 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_relu_int8_mixed_bf16) defined within the public class called public.The function start at line 694 and ends at 696. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_broadcast_shapes_cpu.__init__ | def __init__(self, use_bias):super().__init__()self.conv = torch.nn.Conv2d(32, 32, kernel_size=3, stride=1) | 1 | 3 | 2 | 36 | 0 | 707 | 709 | 707 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_broadcast_shapes_cpu.__init__) defined within the public class called public.The function start at line 707 and ends at 709. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [707.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_broadcast_shapes_cpu.forward | def forward(self, x1, x2):return torch.add(self.conv(x1), x2) | 1 | 2 | 3 | 23 | 0 | 711 | 712 | 711 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_broadcast_shapes_cpu.forward) defined within the public class called public.The function start at line 711 and ends at 712. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [711.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_broadcast_shapes_cpu.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in quantization weight prepack * 1self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 1)# 2. Qconv2d Binary Unary fusion in post-grad fusion pass * 0self.assertEqual(counters["inductor"]["qconv2d_binary_matcher_count"], 0) | 1 | 7 | 0 | 32 | 0 | 720 | 728 | 720 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_broadcast_shapes_cpu.matcher_check_fn) defined within the public class called public.The function start at line 720 and ends at 728. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_broadcast_shapes_cpu | def test_qconv2d_add_broadcast_shapes_cpu(self):r"""This testcase will quantize Conv2d->add pattern using broadcast shape inputs.Conv2d->Add fusion will fail for the broadcast shape inputs case."""class M(torch.nn.Module):def __init__(self, use_bias):super().__init__()self.conv = torch.nn.Conv2d(32, 32, kernel_size=3, ... | 2 | 16 | 1 | 96 | 0 | 700 | 735 | 700 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_broadcast_shapes_cpu) defined within the public class called public.The function start at line 700 and ends at 735. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_with_concat_cpu.__init__ | def __init__(self,):super().__init__()self.conv1 = torch.nn.Conv2d(channel_1, channel_2, 1, stride=1, dilation=1, padding=0)self.conv2 = torch.nn.Conv2d(channel_1, channel_2, 1, stride=1, dilation=1, padding=0)self.conv3 = torch.nn.Conv2d(channel_2, channel_3, 3, stride=1, dilation=1, padding=1)self.conv = torch.nn.Con... | 1 | 16 | 1 | 125 | 0 | 746 | 762 | 746 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_with_concat_cpu.__init__) defined within the public class called public.The function start at line 746 and ends at 762. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_with_concat_cpu.forward | def forward(self, x: torch.Tensor):x1 = self.conv1(x)x2 = self.conv2(x)x3 = self.conv3(x2)res = torch.cat([x1, x2, x3], dim=1)res = self.conv(res)return res | 1 | 7 | 2 | 63 | 0 | 764 | 770 | 764 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_with_concat_cpu.forward) defined within the public class called public.The function start at line 764 and ends at 770. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [764.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_with_concat_cpu.matcher_check_fn | def matcher_check_fn():self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 4)self.assertEqual(counters["inductor"]["qconv_unary_matcher_count"],0 if TEST_ACL else 3,)self.assertEqual(counters["inductor"]["qconv_unary_lower_count"], 0 if TEST_ACL else 4) | 3 | 11 | 0 | 55 | 0 | 777 | 787 | 777 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_with_concat_cpu.matcher_check_fn) defined within the public class called public.The function start at line 777 and ends at 787. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_with_concat_cpu | def test_qconv2d_with_concat_cpu(self):channel_1 = 32channel_2 = 16channel_3 = 8channel_4 = int(channel_2 * 2 + channel_3)class Model(torch.nn.Module):def __init__(self,):super().__init__()self.conv1 = torch.nn.Conv2d(channel_1, channel_2, 1, stride=1, dilation=1, padding=0)self.conv2 = torch.nn.Conv2d(channel_1, chann... | 1 | 19 | 1 | 93 | 0 | 739 | 794 | 739 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_with_concat_cpu) defined within the public class called public.The function start at line 739 and ends at 794. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_2.__init__ | def __init__(self,post_op,):super().__init__()self.conv = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.post_op = post_op | 1 | 7 | 2 | 42 | 0 | 808 | 814 | 808 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_2.__init__) defined within the public class called public.The function start at line 808 and ends at 814. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [808.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_2.forward | def forward(self, x):return self.post_op(self.conv(x)) | 1 | 2 | 2 | 19 | 0 | 816 | 817 | 816 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_2.forward) defined within the public class called public.The function start at line 816 and ends at 817. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [816.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_2.matcher_check_fn | def matcher_check_fn():# Shouldn't hit conv binary fusionself.assertEqual(counters["inductor"]["qconv2d_binary_matcher_count"], 0) | 1 | 4 | 0 | 18 | 0 | 828 | 832 | 828 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_2.matcher_check_fn) defined within the public class called public.The function start at line 828 and ends at 832. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_2 | def test_qconv2d_add_2(self):r"""This testcase prevents this pattern be matched as a conv_binary fusion by mistake.Conv(X)3\ / AddWe see this pattern in Mobilenet v3 large which add is decomposed from torch.nn.Hardswish or torch.nn.Hardsigmoid."""class M(torch.nn.Module):def __init__(self,post_op,):super().__init__()se... | 2 | 19 | 1 | 110 | 0 | 798 | 839 | 798 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_2) defined within the public class called public.The function start at line 798 and ends at 839. It contains 19 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_3.__init__ | def __init__(self,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 3, kernel_size=3, stride=1)self.conv2 = torch.nn.Conv2d(3, 3, kernel_size=1, stride=1)self.maxpool = torch.nn.MaxPool2d(kernel_size=3, stride=1, padding=0, dilation=1) | 1 | 9 | 1 | 83 | 0 | 882 | 890 | 882 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_3.__init__) defined within the public class called public.The function start at line 882 and ends at 890. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_3.forward | def forward(self, x):tmp1 = self.conv1(x)tmp2 = self.maxpool(x)add = torch.add(tmp1, tmp2)tmp3 = self.conv2(tmp2)return torch.cat((add, tmp3), dim=1) | 1 | 6 | 2 | 56 | 0 | 892 | 897 | 892 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_3.forward) defined within the public class called public.The function start at line 892 and ends at 897. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [892.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_3.matcher_check_fn | def matcher_check_fn():self.assertEqual(counters["inductor"]["qconv2d_binary_matcher_count"],0 if TEST_ACL else 1,)# The matched qconv binary pattern should have 2 nodes [qconv, add]# instead of 11 which has dequant in binary input and output quantself.assertEqual(counters["inductor"]["qconv2d_binary_matcher_nodes"],0 ... | 4 | 13 | 0 | 61 | 0 | 902 | 916 | 902 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_3.matcher_check_fn) defined within the public class called public.The function start at line 902 and ends at 916. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_add_3 | def test_qconv2d_add_3(self):r"""This testcase will test below model: x / \conv1maxpool\/ \ addconv2\ /catBased on default recipe of x86InductorQuantizer, we will see this pattern after convert:qconv1maxpool \ |\ q1 \ / \\ dq1qconv2 \ /add | q2Since q1 has 2 users and qconv2 is not ancestor node of qconv1, we shouldn't... | 1 | 13 | 1 | 81 | 0 | 843 | 923 | 843 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_add_3) defined within the public class called public.The function start at line 843 and ends at 923. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.bn = torch.nn.BatchNorm2d(128) | 1 | 7 | 2 | 50 | 0 | 934 | 940 | 934 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d.__init__) defined within the public class called public.The function start at line 934 and ends at 940. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [934.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d.forward | def forward(self, x):return self.bn(self.conv(x)) | 1 | 2 | 2 | 19 | 0 | 942 | 943 | 942 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d.forward) defined within the public class called public.The function start at line 942 and ends at 943. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [942.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d.matcher_check_fn | def matcher_check_fn():# 1. Dequant-conv pattern matched in quantization weight prepack * 1#[dequantize_per_tensor, dequantize_per_channel, clone, convolution]self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 1)self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_nodes"], 4)# 2... | 4 | 18 | 0 | 88 | 0 | 948 | 969 | 948 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d.matcher_check_fn) defined within the public class called public.The function start at line 948 and ends at 969. It contains 18 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d | def test_qat_qconv2d(self):r"""This testcase will quantize a single Conv2d module with qat flow."""class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 128, kernel_size=3, stride=1)self.bn = torch.nn.BatchNorm2d(128)def forward(self, x):return self.bn(self.conv(x))mod =... | 1 | 14 | 1 | 85 | 0 | 928 | 977 | 928 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d) defined within the public class called public.The function start at line 928 and ends at 977. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qat_qconv2d_unary_cpu_test_helper.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 3, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.bn = torch.nn.BatchNorm2d(3)self.conv2 = torch.nn.Conv2d(3, 3, kernel_size=3, stride=1)self.unary_fn2 = copy.deepcopy(unary_op)self.bn2 = torch.nn.BatchNorm2d(3) | 1 | 11 | 2 | 104 | 0 | 984 | 994 | 984 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qat_qconv2d_unary_cpu_test_helper.__init__) defined within the public class called public.The function start at line 984 and ends at 994. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [984.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qat_qconv2d_unary_cpu_test_helper.forward | def forward(self, x):tmp = self.unary_fn(self.bn(self.conv(x)))return self.unary_fn2(self.bn2(self.conv2(tmp))) | 1 | 3 | 2 | 42 | 0 | 996 | 998 | 996 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qat_qconv2d_unary_cpu_test_helper.forward) defined within the public class called public.The function start at line 996 and ends at 998. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [996.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qat_qconv2d_unary_cpu_test_helper.matcher_check_fn | def matcher_check_fn():# 1. Dequant-conv pattern matched in quantization weight prepack * 1#[convert_element_type_1, sub, mul_1, dequantize_per_channel, clone, convolution]self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)# 2. QConv2D Unary fusion in post-grad fusion pass * 1#[qconv2d_point... | 3 | 11 | 0 | 55 | 0 | 1,003 | 1,017 | 1,003 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qat_qconv2d_unary_cpu_test_helper.matcher_check_fn) defined within the public class called public.The function start at line 1003 and ends at 1017. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qat_qconv2d_unary_cpu_test_helper | def _qat_qconv2d_unary_cpu_test_helper(self,unary_op=torch.nn.ReLU(),):class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv = torch.nn.Conv2d(3, 3, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.bn = torch.nn.BatchNorm2d(3)self.conv2 = torch.nn.Conv2d(3, 3, kernel_size=... | 1 | 17 | 2 | 90 | 0 | 979 | 1,025 | 979 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qat_qconv2d_unary_cpu_test_helper) defined within the public class called public.The function start at line 979 and ends at 1025. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [979.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_relu | def test_qat_qconv2d_relu(self):r"""This testcase will quantize Conv2d->ReLU pattern with qat flow."""self._qat_qconv2d_unary_cpu_test_helper() | 1 | 2 | 1 | 12 | 0 | 1,029 | 1,034 | 1,029 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_relu) defined within the public class called public.The function start at line 1029 and ends at 1034. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_relu6 | def test_qat_qconv2d_relu6(self):r"""This testcase will quantize Conv2d->ReLU6 pattern with qat flow."""self._qat_qconv2d_unary_cpu_test_helper(unary_op=torch.nn.ReLU6()) | 1 | 2 | 1 | 21 | 0 | 1,038 | 1,042 | 1,038 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_relu6) defined within the public class called public.The function start at line 1038 and ends at 1042. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_hardtanh | def test_qat_qconv2d_hardtanh(self):r"""This testcase will quantize Conv2d->Hardtanh pattern with qat flow."""self._qat_qconv2d_unary_cpu_test_helper(unary_op=torch.nn.Hardtanh()) | 1 | 2 | 1 | 21 | 0 | 1,046 | 1,050 | 1,046 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_hardtanh) defined within the public class called public.The function start at line 1046 and ends at 1050. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_silu | def test_qat_qconv2d_silu(self):r"""This testcase will quantize Conv2d->SiLU pattern with qat flow."""self._qat_qconv2d_unary_cpu_test_helper(unary_op=torch.nn.SiLU()) | 1 | 2 | 1 | 21 | 0 | 1,054 | 1,058 | 1,054 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_silu) defined within the public class called public.The function start at line 1054 and ends at 1058. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_hardswish | def test_qat_qconv2d_hardswish(self):r"""This testcase will quantize Conv2d->Hardswish pattern with qat flow."""self._qat_qconv2d_unary_cpu_test_helper(unary_op=torch.nn.Hardswish()) | 1 | 2 | 1 | 21 | 0 | 1,062 | 1,066 | 1,062 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_hardswish) defined within the public class called public.The function start at line 1062 and ends at 1066. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn1 = torch.nn.BatchNorm2d(6)self.conv2 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn2 = torch.nn.BatchNorm2d(6) | 1 | 9 | 2 | 84 | 0 | 1,084 | 1,092 | 1,084 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add.__init__) defined within the public class called public.The function start at line 1084 and ends at 1092. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1084.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add.forward | def forward(self, x):x1 = self.bn1(self.conv1(x))x2 = self.bn2(self.conv2(x))return x1 + x2 | 1 | 4 | 2 | 37 | 0 | 1,094 | 1,097 | 1,094 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add.forward) defined within the public class called public.The function start at line 1094 and ends at 1097. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1094.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add.matcher_check_fn | def matcher_check_fn():# 1. Dequant-conv pattern matched in quantization weight prepack * 2#[dequantize_per_tensor, dequantize_per_channel, clone, convolution]self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_nodes"], 8)# 2... | 4 | 19 | 0 | 89 | 0 | 1,102 | 1,124 | 1,102 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add.matcher_check_fn) defined within the public class called public.The function start at line 1102 and ends at 1124. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add | def test_qat_qconv2d_add(self):r"""This testcase will quantize a Conv2d->Add pattern as: X / \Conv1(X) Conv2(X) \ /Add | Y"""class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn1 = torch.nn.BatchNorm2d(6)self.conv2 = torch.nn.Conv2d(3... | 1 | 14 | 1 | 85 | 0 | 1,071 | 1,132 | 1,071 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add) defined within the public class called public.The function start at line 1071 and ends at 1132. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add_relu.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn1 = torch.nn.BatchNorm2d(6)self.conv2 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn2 = torch.nn.BatchNorm2d(6)self.relu = torch.nn.ReLU() | 1 | 10 | 2 | 95 | 0 | 1,152 | 1,161 | 1,152 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add_relu.__init__) defined within the public class called public.The function start at line 1152 and ends at 1161. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1152.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add_relu.forward | def forward(self, x):x1 = self.bn1(self.conv1(x))x2 = self.bn2(self.conv2(x))return self.relu(x1 + x2) | 1 | 4 | 2 | 42 | 0 | 1,163 | 1,166 | 1,163 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add_relu.forward) defined within the public class called public.The function start at line 1163 and ends at 1166. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1163.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add_relu.matcher_check_fn | def matcher_check_fn():# 1. Dequant-conv pattern matched in quantization weight prepack * 2#[dequantize_per_tensor, dequantize_per_channel, clone, convolution]self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_nodes"], 8)# 2... | 4 | 19 | 0 | 89 | 0 | 1,171 | 1,193 | 1,171 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add_relu.matcher_check_fn) defined within the public class called public.The function start at line 1171 and ends at 1193. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qat_qconv2d_add_relu | def test_qat_qconv2d_add_relu(self):r"""This testcase will quantize a Conv2d->Add->ReLU pattern as: X / \Conv1(X) Conv2(X) \ /Add |ReLU | Y"""class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.bn1 = torch.nn.BatchNorm2d(6)self.conv2 = ... | 1 | 14 | 1 | 85 | 0 | 1,137 | 1,201 | 1,137 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qat_qconv2d_add_relu) defined within the public class called public.The function start at line 1137 and ends at 1201. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_qconv2d_dequant_promotion_helper.__init__ | def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)self.conv2 = torch.nn.Conv2d(6, 6, kernel_size=3, stride=1)self.conv3 = torch.nn.Conv2d(6, 6, kernel_size=3, stride=1) | 1 | 8 | 2 | 82 | 0 | 1,218 | 1,225 | 1,218 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_qconv2d_dequant_promotion_helper.__init__) defined within the public class called public.The function start at line 1218 and ends at 1225. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1218.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_qconv2d_dequant_promotion_helper.forward | def forward(self, x):temp = self.conv1(x)temp = self.conv2(temp) + self.conv3(temp)return temp | 1 | 4 | 2 | 32 | 0 | 1,227 | 1,230 | 1,227 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_qconv2d_dequant_promotion_helper.forward) defined within the public class called public.The function start at line 1227 and ends at 1230. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1227.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_qconv2d_dequant_promotion_helper.matcher_check_fn | def matcher_check_fn():# 1. Dequant pattern matcher for dequant promotion * 1#[dequantize_per_tensor]self.assertEqual(counters["inductor"]["dequant_promotion_matcher_count"], 1)self.assertEqual(counters["inductor"]["dequant_promotion_matcher_nodes"], 1)# 2. Dequant-conv pattern matched in quantization weight prepack * ... | 4 | 21 | 0 | 117 | 0 | 1,239 | 1,265 | 1,239 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_qconv2d_dequant_promotion_helper.matcher_check_fn) defined within the public class called public.The function start at line 1239 and ends at 1265. It contains 21 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _test_qconv2d_dequant_promotion_helper | def _test_qconv2d_dequant_promotion_helper(self, device="cpu"):r"""This testcase tests if dequant node before conv2d is promoted correctly: X |Conv1(X) / \Conv2(X) Conv3(X) \ /Add | Y"""class M(torch.nn.Module):def __init__(self,**kwargs,):super().__init__()self.conv1 = torch.nn.Conv2d(3, 6, kernel_size=3, stride=1)sel... | 1 | 17 | 2 | 101 | 0 | 1,203 | 1,272 | 1,203 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_test_qconv2d_dequant_promotion_helper) defined within the public class called public.The function start at line 1203 and ends at 1272. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1203.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv2d_dequant_promotion_cpu | def test_qconv2d_dequant_promotion_cpu(self):self._test_qconv2d_dequant_promotion_helper() | 1 | 2 | 1 | 10 | 0 | 1,277 | 1,278 | 1,277 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv2d_dequant_promotion_cpu) defined within the public class called public.The function start at line 1277 and ends at 1278. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv1d_relu_cpu.__init__ | def __init__(self,):super().__init__()self.conv = torch.nn.Conv1d(3, 128, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.conv2 = torch.nn.Conv1d(128, 128, kernel_size=3, stride=1, bias=False)self.unary_fn2 = copy.deepcopy(unary_op) | 1 | 10 | 1 | 81 | 0 | 1,290 | 1,299 | 1,290 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv1d_relu_cpu.__init__) defined within the public class called public.The function start at line 1290 and ends at 1299. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv1d_relu_cpu.forward | def forward(self, x):tmp = self.unary_fn(self.conv(x))return self.unary_fn2(self.conv2(tmp)) | 1 | 3 | 2 | 32 | 0 | 1,301 | 1,303 | 1,301 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv1d_relu_cpu.forward) defined within the public class called public.The function start at line 1301 and ends at 1303. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1301.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv1d_relu_cpu.matcher_check_fn | def matcher_check_fn():# 1. Dequant-Conv2D pattern matched in quantization weight prepack * 2self.assertEqual(counters["inductor"]["qconv_weight_prepack_matcher_count"], 2)# 2. QConv2D Unary fusion in post-grad fusion pass * 2self.assertEqual(counters["inductor"]["qconv_unary_matcher_count"],0 if TEST_ACL else 2,)self.... | 3 | 11 | 0 | 55 | 0 | 1,312 | 1,324 | 1,312 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv1d_relu_cpu.matcher_check_fn) defined within the public class called public.The function start at line 1312 and ends at 1324. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qconv1d_relu_cpu | def test_qconv1d_relu_cpu(self):r"""This testcase will quantize Conv1d->ReLU pattern."""device = "cpu"unary_op = torch.nn.ReLU()class M(torch.nn.Module):def __init__(self,):super().__init__()self.conv = torch.nn.Conv1d(3, 128, kernel_size=3, stride=1)self.unary_fn = copy.deepcopy(unary_op)self.conv2 = torch.nn.Conv1d(1... | 1 | 19 | 1 | 109 | 0 | 1,282 | 1,331 | 1,282 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qconv1d_relu_cpu) defined within the public class called public.The function start at line 1282 and ends at 1331. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qlinear_test_helper.__init__ | def __init__(self, use_bias, do_permute=False):super().__init__()self.linear = torch.nn.Linear(4, 3, use_bias)self.linear2 = torch.nn.Linear(3, 4, use_bias)self.do_permute = do_permute | 1 | 5 | 3 | 55 | 0 | 1,345 | 1,349 | 1,345 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qlinear_test_helper.__init__) defined within the public class called public.The function start at line 1345 and ends at 1349. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1345.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qlinear_test_helper.forward | def forward(self, x):if self.do_permute:x = torch.reshape(torch.permute(x, (0, 2, 3, 1)), (2, 12, 4))return self.linear2(self.linear(x)) | 2 | 4 | 2 | 55 | 0 | 1,351 | 1,354 | 1,351 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qlinear_test_helper.forward) defined within the public class called public.The function start at line 1351 and ends at 1354. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1351.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qlinear_test_helper.__convert_tensor_to_device | def __convert_tensor_to_device(input, device):return input.to(device=device) if isinstance(input, torch.Tensor) else input | 2 | 2 | 2 | 27 | 0 | 1,359 | 1,360 | 1,359 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qlinear_test_helper.__convert_tensor_to_device) defined within the public class called public.The function start at line 1359 and ends at 1360. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1359.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qlinear_test_helper._default_matcher_check_fn | def _default_matcher_check_fn():self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_count"], 2) | 1 | 4 | 0 | 18 | 0 | 1,364 | 1,367 | 1,364 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qlinear_test_helper._default_matcher_check_fn) defined within the public class called public.The function start at line 1364 and ends at 1367. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | _qlinear_test_helper | def _qlinear_test_helper(self,inputs,device="cpu",int8_mixed_bf16=False,do_permute=False,matcher_check_fn=None,bias=True,is_dynamic=False,is_qat=False,):class M(torch.nn.Module):def __init__(self, use_bias, do_permute=False):super().__init__()self.linear = torch.nn.Linear(4, 3, use_bias)self.linear2 = torch.nn.Linear(3... | 4 | 32 | 9 | 143 | 0 | 1,333 | 1,381 | 1,333 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_qlinear_test_helper) defined within the public class called public.The function start at line 1333 and ends at 1381. It contains 32 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [1333.0] and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_cpu | def test_qlinear_cpu(self):r"""This testcase will quantize a single Linear Moduel."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 4)),), bias=bias) | 2 | 3 | 1 | 38 | 0 | 1,385 | 1,390 | 1,385 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_cpu) defined within the public class called public.The function start at line 1385 and ends at 1390. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_dynamic_qlinear_cpu | def test_dynamic_qlinear_cpu(self):r"""This testcase will quantize a single Linear Moduel."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 4)),), bias=bias, is_dynamic=True) | 2 | 5 | 1 | 42 | 0 | 1,394 | 1,401 | 1,394 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_dynamic_qlinear_cpu) defined within the public class called public.The function start at line 1394 and ends at 1401. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_dynamic_qlinear_qat_cpu | def test_dynamic_qlinear_qat_cpu(self):r"""This testcase will quantize a single Linear Moduel."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 4)),), bias=bias, is_dynamic=True, is_qat=True) | 2 | 5 | 1 | 46 | 0 | 1,405 | 1,412 | 1,405 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_dynamic_qlinear_qat_cpu) defined within the public class called public.The function start at line 1405 and ends at 1412. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_dynamic_qlinear_input_dim_exceeds_2 | def test_dynamic_qlinear_input_dim_exceeds_2(self):r"""This testcase will quantize a single Linear Moduel."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 3, 4)),), bias=bias, is_dynamic=True) | 2 | 5 | 1 | 44 | 0 | 1,416 | 1,423 | 1,416 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_dynamic_qlinear_input_dim_exceeds_2) defined within the public class called public.The function start at line 1416 and ends at 1423. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_int8_mixed_bf16 | def test_qlinear_int8_mixed_bf16(self):r"""This testcase will quantize a single Linear Moduel with int8_mixed_bf16 quantization."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 4)),), int8_mixed_bf16=True, bias=bias) | 2 | 5 | 1 | 42 | 0 | 1,428 | 1,435 | 1,428 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_int8_mixed_bf16) defined within the public class called public.The function start at line 1428 and ends at 1435. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_input_dim_exceeds_2 | def test_qlinear_input_dim_exceeds_2(self):r"""This testcase will quantize a single Linear Moduel."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 3, 4)),), bias=bias) | 2 | 3 | 1 | 40 | 0 | 1,439 | 1,444 | 1,439 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_input_dim_exceeds_2) defined within the public class called public.The function start at line 1439 and ends at 1444. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_int8_mixed_bf16_input_dim_exceeds_2 | def test_qlinear_int8_mixed_bf16_input_dim_exceeds_2(self):r"""This testcase will quantize a single Linear Moduel with int8_mixed_bf16 quantization."""for bias in [True, False]:self._qlinear_test_helper((torch.randn((2, 3, 4)),), int8_mixed_bf16=True, bias=bias) | 2 | 5 | 1 | 44 | 0 | 1,449 | 1,456 | 1,449 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_int8_mixed_bf16_input_dim_exceeds_2) defined within the public class called public.The function start at line 1449 and ends at 1456. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_input_dim_exceeds_2_and_not_contiguous.matcher_check_fn | def matcher_check_fn():self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_count"], 2)self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_nodes"],13 if bias else 12,) | 2 | 8 | 0 | 37 | 0 | 1,468 | 1,475 | 1,468 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_input_dim_exceeds_2_and_not_contiguous.matcher_check_fn) defined within the public class called public.The function start at line 1468 and ends at 1475. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value... |
pytorch_ao | public | public | 0 | 0 | test_qlinear_input_dim_exceeds_2_and_not_contiguous | def test_qlinear_input_dim_exceeds_2_and_not_contiguous(self):r"""This testcase will quantize a single Linear Module.* Input dim exceeds 2* Input not contiguous"""for bias in [True, False]:def matcher_check_fn():self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_count"], 2)self.assertEqual(counters["... | 2 | 9 | 1 | 53 | 0 | 1,460 | 1,482 | 1,460 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_input_dim_exceeds_2_and_not_contiguous) defined within the public class called public.The function start at line 1460 and ends at 1482. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pytorch_ao | public | public | 0 | 0 | test_qlinear_int8_mixed_bf16_input_dim_exceeds_2_and_not_contiguous.matcher_check_fn | def matcher_check_fn():self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_count"], 2)self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_nodes"],17 if bias else 16,) | 2 | 8 | 0 | 37 | 0 | 1,495 | 1,502 | 1,495 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_int8_mixed_bf16_input_dim_exceeds_2_and_not_contiguous.matcher_check_fn) defined within the public class called public.The function start at line 1495 and ends at 1502. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not ... |
pytorch_ao | public | public | 0 | 0 | test_qlinear_int8_mixed_bf16_input_dim_exceeds_2_and_not_contiguous | def test_qlinear_int8_mixed_bf16_input_dim_exceeds_2_and_not_contiguous(self):r"""This testcase will quantize a single Linear Module for int8_bf16.* Input dim exceeds 2* Input not contiguous"""for bias in [True, False]:def matcher_check_fn():self.assertEqual(counters["inductor"]["qlinear_weight_prepack_matcher_count"],... | 2 | 10 | 1 | 57 | 0 | 1,487 | 1,510 | 1,487 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_qlinear_int8_mixed_bf16_input_dim_exceeds_2_and_not_contiguous) defined within the public class called public.The function start at line 1487 and ends at 1510. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.