Expand description
High-performance CPU Unary operation kernels.
ReLU is bandwidth-bound (simple comparison) → single-threaded, LLVM auto-vectorizes. Sigmoid is compute-bound (exp() is expensive) → uses Rayon for large tensors.
Functions§
- relu_
forward - Executes the Rectified Linear Unit (ReLU) activation function: f(x) = max(0, x)
- sigmoid_
forward - Executes the Sigmoid activation function: f(x) = 1 / (1 + exp(-x))