xnn.krnn.fast.sgdml_kernels#

Triton kernels and autograd functions of the sGDML fast path (see xnn.krnn.fast.sgdml).

Imported only when the fast path runs, so that triton is needed only there.

Module Attributes

PAIR_CHUNK

entries of the (B, M Q) coefficient matrices formed at once (64 MB each in float64)

BLOCK_B

block sizes of the pair kernel (structures, training terms, descriptor entries)

BLOCK_J

block sizes of the pair kernel (structures, training terms, descriptor entries)

BLOCK_D

block sizes of the pair kernel (structures, training terms, descriptor entries)

PROGRAMS_PER_SM

contraction programs per streaming multiprocessor; the contraction splits the training terms to reach them

Functions

coefficients(kernel, device)

[a, p, q, t, (t' - a t)] of the kernel's radial functions, float64 on device (cached).

energy_gradient(x, xp, wp, ec, kernel[, ...])

Energies (B,) and (with gradient) gradients (B, D) of the kernel expansion.

hessian_vector(x, v, xp, wp, ec, kernel)

(B, D) products of the Hessians of the kernel expansion with the directions v.

target_programs(device)

Contraction programs that fill device: PROGRAMS_PER_SM per multiprocessor (as if one multiprocessor off CUDA, where only Triton's interpreter runs them).

Classes

KernelEnergy(*args, **kwargs)

energy_gradient() with the gradient as the derivative and the Hessian beyond it.

KernelGradient(*args, **kwargs)

The gradient formed by KernelEnergy, differentiable once more (Hessian products).