Unofficial Hacker News companion — get notified on comment replies, and more.

FP64 Is All You Want, INT8 Is All You Need, FP4/6/8 Is All You Have (opens external site)

249 points by peter_d_sherman 4 days ago | arxiv.org | 61 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (4)

  1. On modern NVIDIA GPUs, both consumer and datacenter, any software implementation of FP64 computations will be much faster than the hardware FP64, because the hardware has 1:64 FP64:FP32 throughput.

    Simple implementations of the FP64 operations with FP32 will result in a speed of up to 4 times greater than that of the hardware, for correct implementations that also implement the FP64 exponent range and the behaviors for special FP values.

    By using the GPU "tensor" units, higher speedups should be achievable, like claimed in this paper.

    Nonetheless, the 83x speedup from the paper is most likely bogus and not reachable in most applications. The real speedup might be 2 or 3 times less than that.

    After a quick skimming through the paper, I could not find any mention about how they handle exponents and floating-point exceptions.

    If they do not implement the standard FP64 exponent range, underflows and overflows would be extremely frequent. Depending on how they handle exceptions, this would either produce incorrect results or slow down the computation dramatically.

    Replies (2)
    1. There is a good chance that for optimizations like that they rely on higher level layers of software to keep the values within bounds to avoid exceptions.
      Replies (1)
      1. I agree that this would be the only way to achieve the claimed speedup.

        This would achieve maximum computational efficiency, but the higher level layers of the software would have to be modified from problem to problem.

        Nonetheless, it might be possible for such a rewriting of the higher level layers to become simpler than in the past, when using an LLM assistant.

    2. One interesting observation I made is that your comment extrapolates to lower precision type. Fused code that computes over hi-lo vector pairs of bf16 is faster than fp32 compute. And code that computes fused op over hi-lo bfp16 pairs (on hardware which supports it) is faster than bf16.

      Edit: apparently paper is exactly about this (I started reading it after comments...)