3 ms·
Article doesn’t mention this, but I’d consider neural networks a form of branchless programming. It’s all a bunch of multiply and threshold operations.
by Legend2440 1y ago
Article doesn’t mention this, but I’d consider neural networks a form of branchless programming. It’s all a bunch of multiply and threshold operations.
- abyesilyurt 1y agoThresholding requires branching no?
- WJW 1y agoNo, you can do that without branching. See https://en.algorithmica.org/hpc/pipelining/branchless/#predication https://en.algorithmica.org/hpc/pipelining/branchless/#predi... for example.
- Legend2440 1y agoNo, it’s just a math operation and can be applied to any amount of data in parallel.
- bqmjjx0kac 1y agoAs demonstrated in the article, you can compute clamp(x, min, max) with straight-line code.
- david-gpu 1y ago> It’s all a bunch of multiply and threshold operations. Real-world high-performance matrix multiplication functions do contain branches internally, even on GPUs. If you are ever curious about what that looks like, NVidia maintains an open-source library called CUTLASS.