this post was submitted on 27 Nov 2023
1 points (100.0% liked)

Hardware

47 readers
1 users here now

A place for quality hardware news, reviews, and intelligent discussion.

founded 1 year ago
MODERATORS
 

Afaik, gpu cores a very stripped down cpu cores that do basic math, but what sort of math can cpus do that gpus can't

I'm talking, cpu core vs Tensor/Cuda cores.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 11 months ago (1 children)

Not so much GPUs themselves but GPU shader compilers really struggle on some code with a lot of branching and loops, operating on strings.

[โ€“] [email protected] 1 points 11 months ago
  1. It's the GPU itself. GPUs work by grouping together multiple threads into a single thread group, which NVIDIA calls a warp and AMD/Intel call a wave. Every thread belonging to a given warp/wave has to take the exact same path through the code, so if you have heavily divergent branches where some threads in a warp/wave take one path and other threads take another path then that can kill performance as the code needs to be executed multiple times to cover all paths.
  2. GPUs typically don't operate on strings. Strings aren't even a supported data type in most GPU-oriented languages or frameworks, especially graphics. If you need to operate on strings on a GPU then you typically break the strings up into individual characters and treat each character as a simple integer, which is totally fine so long as you're able to wrap your head around dealing with strings at such a low level.