Live data from Hacker News

FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

twitter.com

31–40 of 114 posts

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#31
post #30

This tweet appears to be taking the original material out of context to misrepresent it: > Rewrite the attention kernel to be persistent. This gives better performance at low-contexts. However, fp16 at large context has suffered a bit due to a ptxas instruction scheduling issue in the softmax partition. fp8 is ~100 tflops faster when the kernel name has "cutlass" in it. The charitable reading is that, on certain kern…

I think you're the one doing that to the tweet, actually.

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#34
post #30

This tweet appears to be taking the original material out of context to misrepresent it: > Rewrite the attention kernel to be persistent. This gives better performance at low-contexts. However, fp16 at large context has suffered a bit due to a ptxas instruction scheduling issue in the softmax partition. fp8 is ~100 tflops faster when the kernel name has "cutlass" in it. The charitable reading is that, on certain kern…

No, that sentence is separate from the rest. Take a look at the pull request:

    # Up to 150 TFLOPS faster for fp8!
    if specialization.constants["dtype"] == gl.float8e5:
        name = "cutlass_" + name

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#35
post #30

This tweet appears to be taking the original material out of context to misrepresent it: > Rewrite the attention kernel to be persistent. This gives better performance at low-contexts. However, fp16 at large context has suffered a bit due to a ptxas instruction scheduling issue in the softmax partition. fp8 is ~100 tflops faster when the kernel name has "cutlass" in it. The charitable reading is that, on certain kern…

https://github.com/triton-lang/triton/pull/7298/commits/a5e2...

It's literally in the code.

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#36

So, what is Cutlass, can someone explain whether checking for kernel names makes sense here or is a form of cheating? https://docs.nvidia.com/cutlass/index.html

That's strange because the cutlass docs explicitly does NOT mention fp8 support. So it looks like it can be used nevertheless with fp8 by using the name hack.

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#37
post #10

In `libnvidia-nvvm.so` the string `cutlass` appears right after `Memory Dependence Analysis` and `memdep`. Perhaps it acts as an optimization attribute of some sort, where the compiler is allowed to make assumptions about the kernel's behavior that are not valid in general?

yes, that is a very usual way (known practices) of vendors applying specific optimizations for known things.

It is also part of the benchmarks game they play against each other.

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#39
post #36

So, what is Cutlass, can someone explain whether checking for kernel names makes sense here or is a form of cheating? https://docs.nvidia.com/cutlass/index.html

That's strange because the cutlass docs explicitly does NOT mention fp8 support. So it looks like it can be used nevertheless with fp8 by using the name hack.

It supports e5m2 and e4m3 right in the doc linked.

Re: FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

#40
post #18

I have small experience with compilers and llvm but youd be shocked how many things rely on names and parsing names If you have hundreds of passes that are complex and rely on various "contracts" like type names or some shit, then really crazy things like this can happen unintentionally and not maliciously

Web-developers are well aware of this too. Sincerely, Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0

Funny we send a browser wars tombstone in every request!
Post reply on HN