Skip to main content

clika_runtime.ops

The operators, as functions: ops.add(x, y), ops.matmul(a, b), ops.softmax(x, dim=-1).

Every operator takes its tensors first and returns a new tensor (a trailing-underscore twin, ops.add_, writes through its first tensor). A trailing-underscore twin applied to a layer's parameter or buffer (ops.mul_(layer.weight, 2.0)) reaches the layer's next forward, as the tensor's own method form (layer.weight.mul_(2.0)) does. A mode argument takes a name (ops.gelu(x, approximate="tanh")) or the enum value the module carries (ops.GeluMode.Tanh); the value classes (ops.ScalarOrTensor, ops.IndexSlice, ...) name the argument shapes the operators accept. __all__ lists every name.

NameKind
GeluModeclass
GridSampleModeclass
GridSamplePaddingModeclass
HashLaneAlgoclass
HashTensorModeclass
IndexBoundclass
IndexEntryclass
IndexSliceclass
InterpModeclass
MeshgridIndexingclass
ModModeclass
MoeRoutingclass
PixelShuffleModeclass
QComputeModeclass
QuantileInterpclass
Reductionclass
RopeScalingclass
RotaryModeclass
RoundingModeclass
Scalarclass
ScalarOrTensorclass
ScatterReduceModeclass
StreamOrDeviceclass
SwigluFusionclass
functionsmodule functions