HardTanh on Rust/Oxide

Hard Hyperbolic Tangent

⏳ PENDING — not yet measured

Operation

OperationHardTanh (bpd_hardtanh)
Formulaf(x) = max(-1, min(1, x))
CategoryPiecewise linear

Kernel Specification (Prolog/Logtalk)

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_hardtanh,
    sel(le(var, const(-1.0)), const(-1.0),
        sel(ge(var, const(1.0)), const(1.0), var))).

Backend

BackendRust/Oxide (rust_oxide)
Targetgpu
DescriptionRust/cuda-oxide. Compiled with rustc + cuda-oxide runtime.

Verification

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.