def _tensor_quantizable_data_type(self, tensor_name):
            """
            Return the tensor type if it is quantizable.
            """
            weight = find_by_name(tensor_name, self.model.initializer())
            if weight is not None:
                if weight.data_type in {onnx_proto.TensorProto.FLOAT, onnx_proto.TensorProto.FLOAT16}:
                    return weight.data_type
            elif tensor_name in self.value_infos.keys():
                vi = self.value_infos[tensor_name]
                if vi.type.HasField("tensor_type") and vi.type.tensor_type.elem_type in {
                    TensorProto.FLOAT,
                    TensorProto.FLOAT16,
                }:
                    return vi.type.tensor_type.elem_type
            else:
                logger.warning(
                    "failed to infer the type of tensor: {}. Skip to quantize it. Please check if it is expected.".format(
                        tensor_name
                    )
                )

            return None

            Return the tensor type if it is quantizable.
            
olive/passes/onnx/vitis_ai/quantizer.py