def check_add_has_scalar_tensor_input(args):
        r"""
        This function is about check add whether has scalar(tensor) input.
        """
        nonlocal global_disable_torch_function_override
        old_global_disable_torch_function_override = (
            global_disable_torch_function_override
        )
        global_disable_torch_function_override = True
        for arg in args:
            if not isinstance(arg, torch.Tensor) or arg.dim() == 0:
                global_disable_torch_function_override = (
                    old_global_disable_torch_function_override
                )
                return True
        global_disable_torch_function_override = (
            old_global_disable_torch_function_override
        )
        return False

        This function is about check add whether has scalar(tensor) input.
        
intel_extension_for_pytorch/quantization/_quantize_utils.py