Aussie AI

SiLU AVX SIMD Vectorization

  • Book Excerpt from "Generative AI in C++"
  • by David Spuler, Ph.D.

SiLU AVX SIMD Vectorization

The SiLU function has a sequence of operations that could be vectorized with AVX: negation, exponentiation, scalar addition, reciprocal, and multiplication. With so many distinct AVX operations required in sequence, even if parallelized across 4 or 8 float values, it will probably be slow. Hence, our best option is probably a vectorized lookup-table instead.

 

Next:

Up: Table of Contents

Buy: Generative AI in C++: Coding Transformers and LLMs

Generative AI in C++ The new AI programming book by Aussie AI co-founders:
  • AI coding in C++
  • Transformer engine speedups
  • LLM models
  • Phone and desktop AI
  • Code examples
  • Research citations

Get your copy from Amazon: Generative AI in C++