Package ai.beestream.jitnn


package ai.beestream.jitnn
The jitNN API: Tensor (n-dimensional arrays, lazy on TornadoVM devices), reverse-mode differentiation (Tensor.backward(), Grad), the functional operators of F, linear algebra (Linalg), Fourier transforms (Fft), sparse matrices (SparseMatrix), mixed precision (Autocast) and user-defined operators (CustomOp).
  • Class
    Description
    Mixed precision, per thread: inside Autocast.enable(DType), F.linear(Tensor, Tensor, Tensor), Tensor.matmul(Tensor) and the products of F.scaledDotProductAttention(Tensor, Tensor, Tensor, Tensor, boolean, float) cast their operands to FP16 or BF16 and run the half-precision GEMMs, accumulating in FP32.
    Where operators run.
    A fixed set of sizes that a changing dimension (batch, sequence length) is rounded up to, so requests of many shapes run a few compiled plans instead of compiling one per shape, as TensorRT's optimization profiles or vLLM's CUDA-graph batch sizes do.
    An operator defined outside jitNN: a kernel written in plain Java with TornadoVM's KernelContext, an optional host reference and an optional gradient.
    Gradients with respect to each input (null where none is needed), given the gradient of the first output.
    The gradients of an element-wise binary operator y = f(a, b): [dL/da, dL/db] from a, b, y and dL/dy.
    Defines a custom operator step by step; CustomOp.Builder.build() registers its name.
    Adds the operator's device tasks for node to the plan being built.
    The shape of an output, from the inputs and the integer attributes of the call.
    Computes node on the host: inputs are readable, outputs are allocated.
    The gradient of an element-wise unary operator y = f(x): dL/dx from x, y and dL/dy.
    Element type of a tensor: FP32 data, INT32 labels and indices, and the half-precision storage types for mixed precision, IEEE FP16 and bfloat16 (the top 16 bits of an FP32), and Q8_0, GGUF's 8-bit blocks (per 32 consecutive values an FP16 scale and 32 signed bytes, 34 bytes), and the OCP 8-bit floats FP8 E4M3 and E5M2, one byte per value, stored without their scale (see Fp8).
    Functional operators that are not methods of Tensor.
    How F.pad(Tensor, int[], int[], F.PadMode, float) fills: a constant, the reflection without the edge, or the edge replicated.
    How a loss reduces its per-element values.
    Fourier transforms after torch.fft, and the short-time transforms torch.stft and torch.istft.
    Scaling, torch's norm: BACKWARD scales the inverse by 1/n, ORTHO both by 1/sqrt(n), FORWARD the forward by 1/n.
    Whether new operators record what autograd needs.
    A try-with-resources scope that restores the previous gradient mode.
    jitNN's options, in one immutable object.
    Builds a configuration option by option.
    One option: its key, type, default and description.
    The groups options are listed in.
    A failure of the device or the runtime: a plan that TornadoVM could not compile or run, a vendor library call that failed, a native library of the CPU backend that could not be called.
    jitNN's runtime: where operators run, sync points, determinism, profiling and statistics.
    Linear algebra on matrices and batches of matrices [..., rows, cols], after torch.linalg: LU, triangular and general solves, inverse, determinants, Cholesky, QR, symmetric eigendecomposition and SVD.
    A rescaling of the rotary position embedding's frequencies, as Hugging Face's rope_scaling.
    Positions divided by factor.
    An immutable, row-major tensor shape.
    The structure of a sparse matrix (which entries are stored), built once on the host from coordinate lists; the values are a separate tensor, in the order the coordinates were given, so they can be learned.
    A structure with fixed values.
    An n-dimensional array.