Predicable branching patterns (aykm; )

By: Eric Fink (eric.delete@this.anon.com), August 28, 2022 1:22 am
Room: Moderated Discussions
Kara (karaardalan.delete@this.gmail.com) on August 27, 2022 1:00 pm wrote:
>
> Someone said if the branch pattern is easily predicted,
> or has a clear patter, then let the hardware do it :)
>
> Bruh :) how lazy would you have to be.
>
> If it's easy, you do it. Tell the compiler where to look, use your
> avx instructions my friend, use the big juicy regs on there.
>
> And if the branching have chaotic directions, then let's do everyone a favor
> and not try to predict it by a perceptron algorithm of things, shall we?
>
> In ray tracing intersections and in A.I gradient descend we'd just throw rands and
> execute gops of differences and a multitude of epochs and let nature find its way.

What might work for your programming domain might not work for general-purpose. So far you have been only talking about numerical code where branchless execution is a natural fit. It's not the case for many other applications.

> Good thing GPUs don't have a bpu.

They will need something similar anyway. Just instead of predicting branches you'd need to predict/schedule/reorder threads based on their memory access patterns. That's the key to high-performant, efficient raytracing on the GPU. Doesn't Nvidia already use something like that in their RT approach?

< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Do we need branch prediction?Kara2022/08/24 02:07 PM
  Do we need branch prediction?Rayla2022/08/24 03:04 PM
  Do we need branch prediction?Mark Roulo2022/08/24 04:25 PM
    Do we need branch prediction?Paul A. Clayton2022/08/24 06:28 PM
      Do we need branch prediction?Anon2022/08/24 06:52 PM
    Do we need branch prediction?rwessel2022/08/24 06:40 PM
    Do we need branch prediction?ananon2022/08/25 12:56 AM
      Do we need branch prediction?Carlie Coats2022/08/25 07:39 AM
        OT: You wanted rather than Mark Roulo2022/08/25 09:57 AM
          OT: You wanted "pre" rather than "code" rather than Mark Roulo2022/08/25 09:57 AM
            OT: You wanted "pre" rather than "code" rather than Carlie Coats2022/08/25 11:43 AM
    Do we need branch prediction?Kevin G2022/08/25 08:47 AM
      Do we need branch prediction?rwessel2022/08/25 11:10 AM
          Do we need branch prediction?rwessel2022/08/26 10:37 AM
  Do we need branch prediction?Geoff Langdale2022/08/24 07:18 PM
  Do we need branch prediction?Adrian2022/08/25 12:58 AM
  Do we need branch prediction?Brendan2022/08/25 07:54 AM
    Do we need branch prediction?Anon42022/08/25 11:45 AM
      Do we need branch prediction?anon22022/08/25 09:08 PM
  Predicable branching patterns (aykm; )Kara2022/08/27 01:00 PM
    Predicable branching patterns (aykm; )Jukka Larja2022/08/27 11:38 PM
    Predicable branching patterns (aykm; )Eric Fink2022/08/28 01:22 AM
      Predicable branching patterns (aykm; )Doug S2022/08/28 10:17 AM
    Predicable branching patterns (aykm; )---2022/08/28 02:16 PM
      Predicable branching patterns (aykm; )Anon2022/08/28 02:35 PM
  Q: Do we need branch prediction? A: We don't need it, but....2022/08/29 02:17 PM
    Quantum stuff.Kara2022/08/29 03:01 PM
      Q: Do we need branch prediction? A: We don't need it, but....2022/08/30 11:48 AM
    "Quantum Woo" (hint; that's NOT how it works) (NT)anonymous22022/08/29 04:19 PM
      Q: Do we need branch prediction? A: We don't need it, but....2022/08/30 12:14 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? 🍊