Hard Sigmoid Approximation
⏳ PENDING — not yet measured| Operation | HardSigmoid (bpd_hardsigmoid) |
|---|---|
| Formula | f(x) = max(0, min(1, (x + 3) / 6)) |
| Category | Piecewise linear |
This is the backend-neutral op_expr fact that specifies the operation. The same term is lowered to LLVM IR, CUDA C, MLIR, and every other backend — one specification, many targets.
op_expr(bpd_hardsigmoid,
sel(le(var, const(-3.0)), const(0.0),
sel(ge(var, const(3.0)), const(1.0),
add(mul(var, const(0.16666667)), const(0.5))))).
| Backend | CUDA C (cuda_c) |
|---|---|
| Target | gpu |
| Description | CUDA C source code. Compiled with nvcc. |
This (operation, backend) pair has not yet been measured. When the backend emitter and verification infrastructure are ready, this cell will be tested against the PyTorch reference.