def METHOD_NAME(tensor, tensor_quantizer, _):
    """
    FP8 quantization entry function.
    """
    mantissa_bits_to_device(tensor)
    if not hasattr(tensor_quantizer, 'fp8_maxval') or tensor_quantizer.fp8_maxval is None:
        raise ValueError('tensor_quantizer.fp8_maxval not present or not initialized!')
    return quantize_to_fp8(
        tensor, tensor_quantizer.fp8_maxval, NUM_MANTISSA_BITS, tensor_quantizer.channel_axis)