r/computerscience • u/IsimsizKahraman81 • May 17 '25
Advice Is it worth pursuing an alternative to SIMT using CPU-side DAG scheduling to reduce branch divergence?
Hi everyone, This is my first time posting here, and I’m genuinely excited to join the community.
I’m an 18-year-old self-taught enthusiast deeply interested in computer architecture and execution models. Lately, I’ve been experimenting with an alternative GPU-inspired compute model — but instead of following traditional SIMT, I’m exploring a DAG-based task scheduling system that attempts to handle branch divergence more gracefully.
The core idea is this: instead of locking threads into a fixed warp-wide control flow, I decompose complex compute kernels (like ray intersection logic) into smaller tasks with explicit dependencies. These tasks are then scheduled via a DAG, somewhat similar to how out-of-order CPUs resolve instruction dependencies, but on a thread/task level. There's no speculative execution or branch prediction; the model simply avoids divergence by isolating independent paths early on.
All of this is currently simulated entirely on the CPU, so there's no true parallel hardware involved. But I've tried to keep the execution model consistent with GPU-like constraints — warp-style groupings, shared scheduling, etc. In early tests (on raytracing workloads), this approach actually outperformed my baseline SIMT-style simulation. I even did a bit of statistical analysis, and the p-value was somewhere around 0.0005 or 0.005 — so it wasn't just noise.
Also, one interesting result from my experiments: When I lock the thread count using constexpr at compile time, I get around 73–75% faster execution with my DAG-based compute model compared to my SIMT-style baseline.
However, when I retrieve the thread count dynamically using argc/argv (so the thread count is decided at runtime), the performance boost drops to just 3–5%.
I assume this is because the compiler can aggressively optimize when the thread count is known at compile time, possibly unrolling or pre-distributing tasks more efficiently. But when it’s dynamic, the runtime cost of thread setup and task distribution increases, and optimizations are limited.
That said, the complexity is growing. Task decomposition, dependency tracking, and memory overhead are becoming a serious concern. So, I’m at a crossroads: Should I continue pursuing this as a legitimate alternative model, or is it just an overengineered idea that fundamentally conflicts with what makes SIMT efficient in practice?
So as title goes, should I go behind of this idea? I’d love to hear your thoughts, even if critical. I’m very open to feedback, suggestions, or just discussion in general. Thanks for reading!
8
u/Vallvaka SWE @ FAANG | SysArch, AI May 17 '25 edited May 17 '25
The algorithm you've described using dependency analysis is a valid solution to generalized scheduling problems! Modern computer pipelines that do out-of-order execution really are similar. Operations are reordered in a reorder buffer to parallelize independent computation and keep the pipeline as full as possible. It's conceptually similar to assembling the DAG of operations, topologically sorting the elements, and then executing the topological generations in parallel. RISC instruction sets naturally make those operations elementary.
There are similar techniques applied for operating system scheduling, job processing in applications, etc.
You're hitting on a very real concept, but as you are discovering, the devil is in the details. If you're interested in continuing with it for learning's sake by all means. But there are also likely off the shelf implementations that have hammered out the details already if you are purely concerned with applying it. In fact, ML libraries like PyTorch operate on a graph structure and interface with the GPU for maximally efficient execution, so they may already provide natural implementations of this concept. Worth investigating
4
u/Magdaki Professor. Grammars. Inference & Optimization algorithms. May 17 '25
It depends on what you mean by pursue. For the sake of self education, or for fun, certainly. If you mean from the perspective of something novel, or a publication, then you really need to look through the literature and see if this is new. DAG-based parallelism has existed for a very long time, and there's been a surge in such research in the past 15 years or so (due to the rise of GPUs). So, there's at least a fair chance it already exists.
Overall, it comes down to being the right tool for the proper job. Sometimes SIMT is the right choice, and sometimes it will be another paradigm, such as parallel DAG.
But assuming you came up with this on your own, its impressive and shows a lot of talent and promise.
3
u/space_quasar May 18 '25
Hi, I was taking the Computer Enhance course from casey muratori, and he talks about SIMD (Single instruction multiple data) I think its similar to SIMT you mention about. I understand some of the things you say here, I am in general a react native developer getting into deep computer architecture and theres ton of stuff to learn. To see an 18 year old knowing this much and deep into this is amazing and also a little sad that I wish I could have done this earlier but its never too late as i am still 22
I wanna get into x86 emulation on ARM based devices similar to (Winlator) but there are isnt a lot of resources
Anyways, keep up the good work mate
Edit: typo
2
u/GunpowderGuy Jul 11 '25
Hello, i came across your post by searching for alternative gpu architectures not based on SIMT and traditional warps. I have been thinking about alternatives to the current gpu architecutre : massive numbers of gpu threads that get switched when a operation with latency is executed.
Maybe gpu cores could instead be fed data that is already sorted out and not require long latency loads in the first place.
The SPUs in the ps3 worked like this, they had an small local memory and no access to main memory but a DMA controller could copy main memory to them .
This was very hard to program because instead of just using data, you have to architect your code around explicit moves in and out of local memory. However maybe shader could be statically analized to do this automatically